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

Revision #7 has been created by nups on Dec 21, 2010, 5:18:01 AM with the memo:

//create.php renderPartial('_form', array('a'=>$a,'b'=>$b)); ?>
« previous (#6) next (#8) »

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

[...]
And for the `create` view, we would need the following code,


```php
<?php echo CHtml::form(); ?>
 
//create.php
 
<?php echo $this->renderPartial('_form', array('a'=>$a,'b'=>$b)); ?>


<?php echo CHtml::errorSummary(array($a,$b)); ?>

...input fields for $a, $b...
[...]
88 0
79 followers
Viewed: 332 160 times
Version: 1.1
Category: Tutorials
Written by: qiang
Last updated by: Yang He
Created on: Feb 27, 2009
Last updated: 11 years ago
Update Article

Revisions

View all history