Yii 1.1: countryselectorwidget

Simple Country Selector Widget for Yii
9 followers

CountrySelectorWidget is a simple widget for selecting a country.

Usage

$this->widget('ext.countrySelectorWidget', array(
    'value' => $model->country,
    'name' => Chtml::activeName($model, 'country'),
    'id' => Chtml::activeId($model, 'country'),
    'useCountryCode' => false,
    'defaultValue' => 'Japan',
    'firstEmpty' => false,
));

Resources

Total 3 comments

#15142 report it
Vicer at 2013/10/11 01:52am
Using the widget

I am using Yii 1.1.x and to use the widget 'ext.countrySelectorWidget' has to be replaced with 'ext.countrySelectorWidget.CountrySelectorWidget' where the first 'countrySelectorWidget' would be the folder name inside your protected/extensions folder.

Good extension. Thanks for this

#8117 report it
saegeek at 2012/05/11 10:49am
Flags

You should add auto-displaying of the country flag each time a country is selected like in : https://github.com/azcoov/jQuery.Locale

#5675 report it
Pablovp at 2011/10/31 02:21pm
Countries missing

Hi vol0da! I like your extension but I have seen some mistakes in the content, and at least the first of them is quite serious:

  • You are including Yugoslavia (YU) while you should be including two different countries: Serbia (RS) and Montenegro (ME).

  • I'm missing also a small country like Timor-Leste (TL) and the recently created South Sudan (SS).

  • Netherland Antilles was dissolved in 2010 so now it should be included separately Curaçao (CW), Sint Maarten (SX) and Bonaire, Sint Eustatius and Saba (BQ).

  • There are some other islands that might be included like Åland Islands (AX), Isle of Man (IM), Jersey (JE), Saint Barthélemy (BL) and Saint Martin (MF), which is the french part of the island, while the previously commented Sint Maarten is a country of the Kingdom of Netherlands.

  • I don't understand why you are including France, Metropolitan (FX).

  • Depending of the criteria, also Palestinian territories (PS) should be included.

Thanks for your time, Pablo.

Leave a comment

Please to leave your comment.

Create extension