I was wondering if you could help me here, in my controler I have something like this:
$model1 = new Contact;
$model2 = new Contact;
$model3 = new Contact;
This 3 contacts are rendered in the same form, but since Yii uses the class name for the input name and id, the post does not contain expected data. I tried making inherited clases out of Contact but that only works when creating a new instance not while loading an old one (for some reason). Also the 3 clases have a lot of fields so I find setting the name and id manually is not an option.
How can I say the form to use a different prefix for each of the 3 models? You can assume my form is just as created by gii, $form=$this->beginWidget(‘CActiveForm’,…);