Auto generated code |
[eluser]saima[/eluser]
I need an auto generated code feild. this function is working properly and generate random code. but problem is i want to display it in my view static so that user can not change it. rite now it is showing in input feild. how to dispaly it without input field. m new in codeigniter plz help me. thanks
[eluser]Sanjay Sarvaiya[/eluser]
there is so many way to do this. simple way is store in hidden field and display in label instead of input field.
[eluser]saima[/eluser]
my code is this <?php if($device_access_code!=""){ $device_access_code = $device_access_code; }else{ $device_access_code = $this->auth->getDeviceCode(5); } ?> <label for="device_access_code"><?php echo lang('device_access_code');?></label> <?php $data = array('id'=>'device_access_code', 'name'=>'device_access_code', 'value'=>set_value('device_access_code', $device_access_code), 'class'=>'gc_tf1');echo form_input($data); ?> don't know how to use hidden field there and print if
[eluser]Sanjay Sarvaiya[/eluser]
simple read User guide for form field http://ellislab.com/codeigniter/user-gui...elper.html Code: echo form_hidden('device_access_code', $device_access_code); |
Welcome Guest, Not a member yet? Register Sign In |