PDA

View Full Version : Need Help With DW Form


dsellers
09-29-2007, 09:53 PM
Iím new to coding calculations in forms. Any suggestions greatly appreciated. This is just a generic test form I designed in DW. Iím trying to figure out how to add the dollar value of radio group ďsessionoption" to the dollar value of radio group sessionoption.Ē

Somehow I have to post the sum of these two values into tag: <INPUT type="hidden" name="chargetotal" value=" ">

This is for a simple order form that will eventually go to a gateway. Iím just trying to get the easiest method for creating this calculation (maybe a javascript). Even a reference to a tutorial would be helpful. Here is the code:


<body>
<form id="form1" name="form1">
<p>
<INPUT type="hidden" name="chargetotal" value=" ">
<INPUT type="hidden" name="storename" value="000000">
<input type="hidden" name="taxexempt" value="1">
<input type="hidden" name="txntype" value="preauth">
<input type="hidden" name="authenticateTransaction" value="true">
<input type="hidden" name="responseURL" value="http://www.mystore.com/receipt.cgi">
<input type="hidden" name="oid" value="webform1">
<br />
<br />
<br />
</p>
<FORM action="https://www.mygatewaytest.com/lpc/servlet/lppay" method="post">
<table width="100%" border="0">
<tr>
<td>
Please Choose On Of The Following Consultation Amounts:<br />
<br />
<table width="314">
<tr>
<td width="306"><label>
<input type="radio" name="sessionoption" value="20.00" id="sessionoption_0" />
45 Minutes ($20.00)</label></td>
</tr>
<tr>
<td><label>
<input type="radio" name="sessionoption" value="15.00" id="sessionoption_1" />
35 Minutes ($15.00)</label></td>
</tr>
<tr>
<td><label>
<input type="radio" name="sessionoption" value="10.00" id="sessionoption_2" />
25 Minutes ($10.00)</label></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0">
<tr>
<td><br />
Please choose one of the options for a recording of your consultation:<br />
<table width="200">
<tr>
<td><label>
<input type="radio" name="audiooption" value="5.00" id="audiooption_0" />
postal mail ($5.00)</label></td>
</tr>
<tr>
<td><label>
<input type="radio" name="audiooption" value="3.00" id="audiooption_1" />
email ($3.00)</label></td>
</tr>
<tr>
<td><label>
<input type="radio" name="audiooption" value="00.00" id="audiooption_2" />
none</label></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<label>
<INPUT type="submit" value="Continue to secure payment form">
<br />
<br />
</Form>
<br />
<br />
<br />
<br />
</body>

davidj
09-29-2007, 11:39 PM
please use your code tags when posting code