Welcome Guest, Not a member yet? Register   Sign In
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!




Theme © iAndrew 2016 - Forum software by © MyBB