Difference between #2 and #3 of
How to use a single form to collect data for two or more models?

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)
88 0
79 followers
Viewed: 353 743 times
Version: 1.1
Category: Tutorials
Written by: qiang
Last updated by: Yang He
Created on: Feb 27, 2009
Last updated: 12 years ago
Update Article

Revisions

View all history