Hello.
I have a form where the user will enter an amount, where the field that they are entering it in is a variable that will be passed to another URL.
It is a number field (Currency). I would like to be able to add (.50 cent) onto the value of this field before the form is submitted. The field in question is
[red] "pg_total_amount".[/red]
This does not change what the user entered. Instead I get an error
"Must be numeric value and greater than zero : pg_total_amount. "
This is what I have so far:
So I guess my question is what is the appropriate syntax to change a form value before it is submitted?
THANKS!
I have a form where the user will enter an amount, where the field that they are entering it in is a variable that will be passed to another URL.
It is a number field (Currency). I would like to be able to add (.50 cent) onto the value of this field before the form is submitted. The field in question is
[red] "pg_total_amount".[/red]
This does not change what the user entered. Instead I get an error
"Must be numeric value and greater than zero : pg_total_amount. "
This is what I have so far:
Code:
<form method='post' action= '[URL unfurl="true"]https://swp.paymentsgateway.net/default.aspx'>[/URL] <div align="center" onfocus="MM_validateForm('pg_billto_postal_name_company','','R');return document.MM_returnValue">
<table width="574" border="0" align="center" cellspacing="0" bordercolor="#996600">
<tr>
<td align="right" width="260"><p align="right"><b>Dealer Name<font color="#ff0000" face="Arial, Helvetica"> *</font></b> </p></td>
<td width="310"><font face="Arial, Helvetica">
<input name="pg_billto_postal_name_company" id="pg_billto_postal_name_company"
size="35" />
</font></td>
</tr>
<tr>
<td align="right" width="260"><p><span class="style1"><b>Dealer Number</b></span><b><font color="#ff0000" face="Arial, Helvetica">*</font></b></p></td>
<td width="310"><font face="Arial, Helvetica">
<input name="pg_consumerorderid" id="pg_consumerorderid"
size="35" />
</font></td>
</tr>
<tr>
<td align="right" width="260"><p><span class="style1"><b>Payment Amoun</b></span><b>t <font color="#ff0000" face="Arial, Helvetica"> *<span class="style3">(No comma) </span></font></b></p>
<p><font face="Arial, Helvetica"><br />
</font></p></td>
[red]<td width="310"><font face="Arial, Helvetica">
<input name="pg_total_amount" id ="pg_total_amount"
size="35" />[/red]
</font></td>
</tr>
<tr>
<td align="right" width="260"><p><span class="style1"><b>Batch Number</b></span><font face="Arial, Helvetica"><b><font
color="#ff0000"
>*</font></b></font></p></td>
<td width="310"><font face="Arial, Helvetica">
<input name="pg_merchant_data_3" id="pg_merchant_data_3"
size="35" />
</font></td>
</tr>
</table>
</div>
[red]
/* THIS IS WHERE I TRY TO ALTER THE AMOUNT
<%
dim total_amount
total_amount = pg_total_amount + .50
%>
[/red]
<table cellSpacing='0' cellPadding='0' border='0'><tr><td align='right' width='300'></td><td width='200' align='left' onfocus="MM_validateForm('pg_billto_postal_name_company','','R','pg_consumerorderid','','R','pg_total_amount','','R','pg_merchant_data_3','','R');return document.MM_returnValue">
<input type='hidden' name='pg_api_login_id' value='1PeYtqSMv5'/>
[red]
*/ THIS IS WHERE I WAS TRYING TO SEND OVER SUBMIT
<input type='hidden' name='pg_total_amount' value='<%=total_amount%>'/>
[/red]
<input type='hidden' name='pg_merchant_data_1' value='N/A'/>
<input type='hidden' name='pg_merchant_data_2' value='N/A'/>
<input type='hidden' name='pg_walletid' value='Dealer Work'/>
</td></tr><tr><td align='right' width='300'></td><td align='left' width='200'><input type='hidden' type='text' name='pg_return_url' value='[URL unfurl="true"]http://www.seminoletax.org/dev/dealer/dealerACHreturn.asp'/></td></tr><tr><td[/URL] align='right' width='300'></td><td align='left' width='200'><br></td></tr><tr><td align='right' width='300'></td><td align='left' width='200'><INPUT TYPE=SUBMIT value='Pay by eCheck Now'><br></td></tr></table></form>
So I guess my question is what is the appropriate syntax to change a form value before it is submitted?
THANKS!