Skip to content
This repository has been archived by the owner on Jan 31, 2019. It is now read-only.

vol0da/yii-extension-countryselectorwidget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Installation

Put the CountrySelectorWidget.php file under the extensions/ subdirectory of application base directory.

Usage

<?php

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

?>

Attributes

  • useCountryCode - determines whether country code (US, GB) or country full name (United States, United Kingdom) will be used for select value

  • firstEmpty - determines whether an empty option should be inserted on top of select. Text can be specified using firstText parameter.

  • firstText - specifies text for optional empty first option, by default (please select a country)

  • defaultValue - default pre-selected option for case value is empty

About

Country selector widget for Yii

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages