Want To Know How To Make Hidden Textfield

Hi there,

does any one knows how to build a hidden type input text field?

In my form, I need to pass hidden values to certain fields

I tried

<div class="row">

	&lt;?php echo &#036;form-&gt;labelEx(&#036;model,'rec'); ?&gt;


	&lt;?php echo &#036;form-&gt;textField(&#036;model,'rec',array('type'=&gt;'hidden','value'=&gt;1)); ?&gt;


	&lt;?php echo &#036;form-&gt;error(&#036;model,'rec'); ?&gt;


&lt;/div&gt;

but still renders the input field with the value in it.

I’ll appreciate your help.

try


<?php echo $form->hiddenField($model,'rec',array('value'=>'1')); ?>

It works!

Thanks a lot

Have a nice day

try this,

[color=#666600]<?[/color][color=#000000]php echo $form[/color][color=#666600]->[/color][color=#000000]hiddenField[/color]color=#666600;[/color][color=#000000] [/color][color=#666600]?>[/color]

It works.

Thanks a lot

have a nice day

hi friends

here is my code to make a field hidden

&lt;?php echo &#036;form-&gt;hiddenField(&#036;model,'attribute name',array('value'=&gt;&#036;model-&gt;here you pass the value)); ?&gt;

try it it works fine for me.