Take the tour ×  I used Yii's Gii's CRUD generator for a model
that has a relation defined with another model, expecting that
it would create some sort of dropdown or other way to select an
instance of the related entity, but rather it just showed a
regular textbox.  Is this the normal behavior of Gii or did I do
something wrong?  This are the models and their relations: Model
Event: relation 'Venue' => array( self::BELONGS_TO, 'Venue',
'venue' ) Model Venue: relation 'Events' => array(
self::HAS_MANY, 'Event', 'venue' )  I was expecting the Event
CRUD to show some way of picking an instance of Venues.
share|improve this question add comment  2 Answers  up vote 6
down vote accepted  That is just normal behaviour for Gii, when
generating forms(for both CRUD and only forms), it makes all
input fields textfields. So the default gii CRUD and form
generator doesn't take relations into account while generating
code. We have to manually make changes to the view file, namely
_form.php for the model in question, for