Answered
Auto fill field...
I have a form which collects some currency value data.
what I am trying to achieve is to obtain a calculated value, based on the above, which would then appear in another text field automatically before submit. This value would then be saved to the db on submit.
for instance:
<?php
$unitvalue=$POST_VARS['textfieldunitvalue'];
$quantity=$POST_VARS['textfieldquantity'];
$totalvalue=($unitvalue*$quantity);
?>
<td><input name="textfieldtotalvalue" type="text" id="textfieldtotalvalue" value=$totalvalue></td>
I assume though that both the GET and POST methods only activate on "sumbit"
How then do I achieve an autofill functionality?
Is there a simpler solution?
what I am trying to achieve is to obtain a calculated value, based on the above, which would then appear in another text field automatically before submit. This value would then be saved to the db on submit.
for instance:
<?php
$unitvalue=$POST_VARS['textfieldunitvalue'];
$quantity=$POST_VARS['textfieldquantity'];
$totalvalue=($unitvalue*$quantity);
?>
<td><input name="textfieldtotalvalue" type="text" id="textfieldtotalvalue" value=$totalvalue></td>
I assume though that both the GET and POST methods only activate on "sumbit"
How then do I achieve an autofill functionality?
Is there a simpler solution?
