data from controller to model

Basically loading relational data (One Venue has one Address)

In Controller:



$this->render(‘update’,array(‘model’=>$model, ‘address’=>$address));[/indent]

In view:

[indent]<?php echo CHtml::activeTextField($model,‘website’,array(‘size’=>60,‘maxlength’=>145)); ?>

<?php echo CHtml::activeTextField($address,‘unit’,array(‘size’=>60,‘maxlength’=>145)); ?>


Getting following error when trying to view the update view for Venue:

Undefined variable: address

cheers, Jake

If you use the _form.php subview you need to propagate the variable by specifying it in the renderPartial call.


Spot on mate, thanks heaps!