Hi All,
I am new to yii framework. I want to do the following thing.
I am trying to create a user registration form in which one has to fill his all data.
In that form, he has to also select city . I have created City as table in which all cities will be stored.
while in user table only city id will be stored. Now, in user form view i am trying to fetch data
from city table. How should i do it. I have city as model also.
I tried following things but could not solve.
<
echo $form->dropDownList($model,‘City’, CHtml::listData(City::model()->findAll(), ‘CITY_ID’,‘CITY_NAME’));
//above code says error User.city is not defined what does that mean
>
I tried different solution on this forum still i was not able to do this. so posting this question. Please
help guys… waiting for solution