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,
));
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.
Flags
You should add auto-displaying of the country flag each time a country is selected like in :
https://github.com/azcoov/jQuery.Locale
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
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.