Hi
I’m new, coming from CaVisualObjects,
The question is I’m trying change an external related field creating combo when inserting a new register by a readonly textfield when editing existing.
The trouble is coding the else statement of the IF isnewrecord sentence.
I think code lines explain it better than my english:
<?php if($model->isNewRecord)
{echo $form->dropDownListRow($model, 'genorganizacion_id', CHtml::listData(Genorganizacion::model()->findAll(), 'id', Genorganizacion::representingColumn()));}
[color="#FF0000"] else{echo CHtml::encode($data->genorganizacion->nombre); }?>[/color]
This code works well when creating new records but editing (else sentence), because it renders nothing when editing
What 'd be the solution?
Tia
EdSolano