• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Auto Fill Textbox Field

#1
[eluser]glenconde[/eluser]
hi Igniters!

I have a bit of a problem here.. i don't know how to get the value of my textbox field,
i wanted to auto fill textbox wth the result of the computation on my code..
help thanks!

Code:
<div class="field_row clearfix">
&lt;?php echo form_label($this->lang->line('items_cost_price').':', 'cost_price',array('class'=>'required wide')); ?&gt;
<div class='form_field'>
&lt;?php echo form_input(array(
  'name'=>'cost_price',
  'size'=>'8',
  'id'=>'cost_price',
  'value'=>$item_info->cost_price)
);?&gt;
</div>
</div>

<div class="field_row clearfix">
&lt;?php echo form_label($this->lang->line('items_unit_price').':', 'unit_price',array('class'=>'required wide')); ?&gt;
<div class='form_field'>
&lt;?php echo form_input(array(
  'name'=>'unit_price',
  'size'=>'8',
  'id'=>'unit_price',
  'value'=>$item_info->cost_price/0.7) <-- MY COMPUTATION
);?&gt;
</div>
</div>



I have a textbox for this two:

Cost Price : _______
Unit Price : _______ <-- auto fill from the result computation

Thank you in advance!


Messages In This Thread
Auto Fill Textbox Field - by El Forum - 03-02-2012, 09:13 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:


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