[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">
<?php echo form_label($this->lang->line('items_cost_price').':', 'cost_price',array('class'=>'required wide')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'cost_price',
'size'=>'8',
'id'=>'cost_price',
'value'=>$item_info->cost_price)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_unit_price').':', 'unit_price',array('class'=>'required wide')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'unit_price',
'size'=>'8',
'id'=>'unit_price',
'value'=>$item_info->cost_price/0.7) <-- MY COMPUTATION
);?>
</div>
</div>
I have a textbox for this two:
Cost Price : _______
Unit Price : _______ <-- auto fill from the result computation
Thank you in advance!