ruben_e
(Mbcmexico)
1
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">
<?php echo $form->labelEx($model,'rec'); ?>
<?php echo $form->textField($model,'rec',array('type'=>'hidden','value'=>1)); ?>
<?php echo $form->error($model,'rec'); ?>
</div>
but still renders the input field with the value in it.
I’ll appreciate your help.
cc96ai
(Calvinca)
2
try
<?php echo $form->hiddenField($model,'rec',array('value'=>'1')); ?>
kiran123
(Sharmakiran71)
4
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]
hi friends
here is my code to make a field hidden
<?php echo $form->hiddenField($model,'attribute name',array('value'=>$model->here you pass the value)); ?>
try it it works fine for me.