Answer the question
In order to leave comments, you need to log in
How would you recommend doing it?
<?php echo $form->dropDownList($model,'parent_id', CHtml::listData(RefRegion::model()->findAll(), 'id', 'name_ru'), array('empty'=>Yii::t("region", 'Выберите регион'), 'class'=>'span3')); ?>
<?php echo $form->dropDownList($model,'parent_id', CHtml::listData(RefRegion::model()->findAll(), 'id', 'name_ru'), array('empty'=>Yii::t("region", 'Выберите район'), 'class'=>'span3')); ?>
Answer the question
In order to leave comments, you need to log in
Ajax or Sql requests?
region is transferred by ajax, sql query is executed on the server
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question