In HTML, how do you stop a variable from being populated in an order form to Paypal?

  • Thread starter Thread starter Hope
  • Start date Start date
H

Hope

Guest
I am trying to create a form where a user can specify the quantity of three different items, pass the info along to Paypal, and then they can pay using Paypal.

It works great when it's only one item (whether you buy 1 or 100). It doesn't seem to accept null values or a value of "0". For each quantity field it is expecting a value of 1 or greater.

If you are only purchasing one or two of the three items, it processes with a default value of "1" and is calculated into the total payment. Copy of my code is below, email address has been substituted for privacy purposes.

<html>
<head>
</head>
<body>


<form action="https://www.paypal.com/cgi-bin/webscr" method="post">

<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="currency_code" value="USD">

<input type="hidden" name="item_name_1" value="Show Registration">
<input type="hidden" name=amount_1 value="2.00">
<input type="hidden" name="item_name_2" value="Kid Registration">
<input type="hidden" name=amount_2 value="1.00">
<input type="hidden" name="item_name_3" value="Game Registration">
<input type="hidden" name=amount_3 value="1.00">

Show Registration Quantity: <input name="quantity_1"><br />
Kid Show Registration Quantity: <input name="quantity_2"><br />
Game Registration Quantity: <input name="quantity_3"><br />

<CENTER><input type="image" src="images/paypal.gif" name="submit"
alt="Make payments with PayPal - it's fast, free and secure!">
<a href="mailto:[email protected]">Contact the event planner for payment by Money

Order</a></CENTER></form>

</body>
</html>
 
Back
Top