Populating _Form from $GET_

I am trying to populate a field to set the Company ID automatically, everything looks right, but it does not work… Am I on the right track here? Also, how would I make this field hidden?




	<div class="row">

		<?php echo $form->labelEx($model,'ID_COMPANY'); ?>

		


		<?php echo CHtml::textField($model['ID_COMPANY'], $thisCompID); ?>                

		

		<?php echo $form->error($model,'ID_COMPANY'); ?>

		

	</div>



CHtml::activeTextField is what you are looking for. Just initialize the model instance with the values you want.

/Tommy

Thanks, I guess I actually needed CHtml::activeHiddenField to make it hidden!