I am in a view of another Model an now I want to define a link (for example “<?php echo CHtml::link(“Hello”,array(‘bla/create’)); ?>”) to create a new “bla”. But I know already some attributes of the new “bla”. How can I send this data to the Form and disable the fields? What is the yii-way to do this.
OK, but how is it possible to tell method actionCreate the attributes from an other view?
If I create the Link <?php echo CHtml::link(“Hello”,array(‘bla/create’)); ?> I get a new form without any filled fields.
An Example:
I have 2 models: Father and child
Father has many childs
In the view of father I want define an add button to create a new child. In this view I know the father_id. So I want that the field father_id in the create Form is already filled and disabled.