|
|
|
Insure yourself from spam! The Anti Spam Insurance Company - ProtectWebForm!
Forum - Input fields with autosum
davncong |
2008-08-25 11:17:17 |
|
Hello. I am (1) new to this and (2) not now nor never will be an
advanced programmer, but I do know just enough to really mess things
up.
I'm trying to create a form with user input fields that autosum. Its a
catalog order form where the user inputs the item #, quantity, desc, &
price, and autosum will multiply the price by the quantity for a total
price. (In a prefect world it would also subtotal those prices, add 8%
sales tax, and give a grand total, but my hopes for that are
dwindling... )
The form I created has room for 10 item entries. I've seen this done
with 1 item, but was unable to modify the script for multiple entries.
All other forms I've seen have set prices that go with each item.
Is this really as big of a project as it seems? When I started this
project seemed like it would be simple enough, but maybe I'm missing
something.
Any help greatly appreciated. Thanks.
Here's the table.
<form action="http://www.hostmonster.com/monstermail"
enctype="multipart/form-data" method="POST" style="border:3px
">
<p>
<table width="660" border="3" cellpadding="3" id="order">
<tr>
<td width="75"><span class="style5">Item # </span></td>
<td width="50"><span class="style5">Qty</span></td>
<td width="319"><span class="style5">Description</span></td>
<td width="81"><span class="style5">Price</span></td>
<td width="77"><span class="style5">Total</span></td>
</tr>
<tr>
<td><input name="item1" type="text" id="item1" size="10"
maxlength="10" /></td>
<td><input name="qty1" type="text" id="qty1" value="1" size="5"
/></td>
<td><input name="desc1" type="text" id="desc1" size="50"
maxlength="50" /></td>
<td><input name="price1" type="text" id="price1" size="10"
maxlength="10" /></td>
<td> </td>
</tr>
<tr>
<td><input name="item2" type="text" id="item2" size="10"
maxlength="10" /></td>
<td><input name="qty2" type="text" id="qty2" value="" size="5"
/></td>
<td><input name="desc2" type="text" id="desc2" size="50"
maxlength="50" /></td>
<td><input name="price2" type="text" id="price2" size="10"
maxlength="10" /></td>
<td> </td>
</tr>
<tr>
<td><input name="item3" type="text" id="item3" size="10"
maxlength="10" /></td>
<td><input name="qty3" type="text" id="qty3" value="" size="5"
/></td>
<td><input name="desc3" type="text" id="desc3" size="50"
maxlength="50" /></td>
<td><input name="price3" type="text" id="price3" size="10"
maxlength="10" /></td>
<td> </td>
</tr>
<tr>
<td><input name="item4" type="text" id="item4" size="10"
maxlength="10" /></td>
<td><input name="qty4" type="text" id="qty4" value="" size="5"
/></td>
<td><input name="desc4" type="text" id="desc4" size="50"
maxlength="50" /></td>
<td><input name="price4" type="text" id="price4" size="10"
maxlength="10" /></td>
<td> </td>
</tr>
<tr>
<td><input name="item5" type="text" id="item5" size="10"
maxlength="10" /></td>
<td><input name="qty5" type="text" id="qty5" value="" size="5"
/></td>
<td><input name="desc5" type="text" id="desc5" size="50"
maxlength="50" /></td>
<td><input name="price5" type="text" id="price5" size="10"
maxlength="10" /></td>
<td> </td>
</tr>
<tr>
<td><input name="item6" type="text" id="item6" size="10"
maxlength="10" /></td>
<td><input name="qty6" type="text" id="qty6" value="" size="5"
/></td>
<td><input name="desc6" type="text" id="desc6" size="50"
maxlength="50" /></td>
<td><input name="price6" type="text" id="price6" size="10"
maxlength="10" /></td>
<td> </td>
</tr>
<tr>
<td><input name="item7" type="text" id="item7" size="10"
maxlength="10" /></td>
<td><input name="qty7" type="text" id="qty7" value="" size="5"
/></td>
<td><input name="desc7" type="text" id="desc7" size="50"
maxlength="50" /></td>
<td><input name="price7" type="text" id="price7" size="10"
maxlength="10" /></td>
<td> </td>
</tr>
<tr>
<td><input name="item8" type="text" id="item8" size="10"
maxlength="10" /></td>
<td><input name="qty8" type="text" id="qty8" value="" size="5"
/></td>
<td><input name="desc8" type="text" id="desc8" size="50"
maxlength="50" /></td>
<td><input name="price8" type="text" id="price8" size="10"
maxlength="10" /></td>
<td> </td>
</tr>
<tr>
<td><input name="item9" type="text" id="item9" size="10"
maxlength="10" /></td>
<td><input name="qty9" type="text" id="qty9" value="" size="5"
/></td>
<td><input name="desc9" type="text" id="desc9" size="50"
maxlength="50" /></td>
<td><input name="price9" type="text" id="price9" size="10"
maxlength="10" /></td>
<td> </td>
</tr>
<tr>
<td><input name="item10" type="text" id="item10" size="10"
maxlength="10" /></td>
<td><input name="qty10" type="text" id="qty10" value="" size="5"
/></td>
<td><input name="desc10" type="text" id="desc10" size="50"
maxlength="50" /></td>
<td><input name="price10" type="text" id="price10" size="10"
maxlength="10" /></td>
<td> </td>
</tr>
<tr>
<td colspan="4"><div align="right">Sub-Total</div></td>
<td> </td>
</tr>
<tr>
<td colspan="4"><div align="right">Sales Tax (8%)
</div> <div align="right"></div></td>
<td> </td>
</tr>
<tr>
<td colspan="3"><div align="right">
</div></td>
<td><strong>Grand Total</strong></td>
<td> </td>
</tr>
</table>
|
davncong |
2008-08-25 14:35:23 |
|
Sorry...I posted this to the wrong forum. not sure how to delete the
post. |
Post Reply:
You must be logged in to reply.
|
Post message
|
Registered users: 88191
Forms protected: 48551
Further Reading & Anti Spam Resources:
Directory
|
|