Form Hidden

#1
[eluser]01010011[/eluser]
EDIT:
Code:
form_hidden('Name',$variable->id);
Thanks ryeguy

END OF EDIT

Hi,
I am trying to do this:
Code:
//view.php
<input type="hidden" name="Name" value="<?php echo $variable->id; ?>

with CI's form_hidden helper:
Code:
//view.php
<?php echo form_hidden('Name','<?php echo $variable->id;') ?>

Nothing prints when I use the CI helper function but the first input type works fine. Any assistance will be appreciated.

#2
[eluser]Thea_G[/eluser]
I just wrap my input forms inside a div tag and make the div tag invisible, like this

<div id="id_" name="id_" style="display:none">

(Labels, buttons and input forms can go here)

</div>

To turn it back on you just need to get the element by id and then set display:inline or display:block

#3
[eluser]Zack Kitzmiller[/eluser]
Don't call the PHP Processor from inside the PHP Processor. Don't use quotes either. Just access the variable directly.

Code:
&lt;?php echo form_hidden('name', $variable->id); ?&gt;


And I'd like to say:
[quote author="Thea_G" date="1272930540"]I just wrap my input forms inside a div tag and make the div tag invisible, like this

<div id="id_" name="id_" style="display:none">

(Labels, buttons and input forms can go here)

</div>

To turn it back on you just need to get the element by id and then set display:inline or display:block[/quote]

The OP wasn't talking about temporarily hiding form elements that aren't being used. They were talking about input type 'hidden.'

#4
[eluser]Thea_G[/eluser]
oh...Zack..you're right. Sorry.

#5
[eluser]Zack Kitzmiller[/eluser]
Not a problem.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.