Revision #3 has been created by PoL on Mar 11, 2009, 6:54:35 PM with the memo:
Review by cyberpol
« previous (#2) next (#4) »
Changes
Title
unchanged
How to use a single form to collect data for two or more models?
Category
unchanged
Tutorials
Yii version
unchanged
Tags
unchanged
Content
changed
[...]
</form>
```
The above approach can also be used if we have more than two models to deal with.
[hr]
Now, since version 1.0.3 and the `_form.php` view things change a litle. Folowing the example, we need to redlclare en the `create` view the parameters passed to the `create` view so the `_form` view can use them.
~~~
```php
<h2>Create view</h2>[...]
'update'=>false,
)); ?>
~~~```
And in the `_form` work as ever (i.e. we can use $a and $b)