states Creates a dropdown list of states from the US, US Territories and Canada

  1. Requirements
  2. Install
  3. Usage

Creates a dropdown list of states from the US, US Territories and Canada

GitHub

Requirements

  • Yii 1.1.x

Install

  • Extract to extensions directory
  • Add following to the import section of the main config
  • 'application.extensions.states.*'

Usage

$options = array(
  "name" => "thestates",
  "seperateCountries" => true,
  "selected" => "VA",
);
$htmlOptions = array(
  "prompt" => "Please select a state",
);

echo States::render(array("US","canada","us territories"), $options, $htmlOptions);

Active Form

$form->dropDownList($address, 'state', My_States::getStates(array("US"), true), 
       array('prompt' => 'State', 'class' => 'abc', 'style' => "width:75px;")),
1 1
5 followers
661 downloads
Yii Version: 1.1
License: Apache-2.0
Category: Others
Developed by: cfletcher1856
Created on: Oct 25, 2011
Last updated: 11 years ago

Downloads

show all

Related Extensions