Error with zero value in a form with shopping cart

dean1011
New Community Member

Hi I am trying to create a form with 4 different dropdown boxes, the first is set to a specific amount and the other 3 are items to purchase. I want the user to be able to select either one of the other three and possibly leaving some at 0 value which would be a $0.00 value. I get an error when I leave any as a 0 value but the form will work if I pick any other number.  I guess what I am asking is, is there a way to either send the $0.00 to the shopping cart or set it up so if the 0 value is selected that it would remove it from the add to cart button. I have included my code below.

 

<form method="post" action="https://www.paypal.com/cgi-bin/webscr">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="******@*******.com">
<input type="hidden" name="currency_code" value="CAD">


<!--First Item-->
<p>
<input type="hidden" name="item_name_1" value="Registration Fee">
<input type="hidden" name="item_number_1" value="Fee">
<input type="hidden" name="amount_1" value="70.00">
Participant Registration Fee - $70.00
<select name="quantity_1" value="">

<option value="1">1</option>

</select>
</p>

<!--Second Item-->
<p>
<input type="hidden" name="item_name_2" value="Non-Participant Lunch Meal(s)">
<input type="hidden" name="item_number_2" value="Lunch">
<input type="hidden" name="amount_2" value="5.00">

Non-Participant Lunch Meal(s) - $5.00
<select name="quantity_2" value="">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>

</select>
</p>

<!--Third Item-->
<p>
<input type="hidden" name="item_name_3" value="Non-Participant Dinner Meal(s)">
<input type="hidden" name="item_number_3" value="Dinner">
<input type="hidden" name="amount_3" value="12.00">

Non-Participant Dinner Meal(s) - $12.00
<select name="quantity_3" value="">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>

</select>
</p>

<!--Fourth Item-->
<p>
<input type="hidden" name="item_name_4" value="Non-Participant T-Shirt">
<input type="hidden" name="item_number_4" value="shirt">
<input type="hidden" name="amount_4" value="25.00">
T-shirts (Sm) - $25.00
<select name="quantity_4" value="">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>

</select>
</p>

<input type="image" src="http://images.paypal.com/en_US/i/btn/x-click-but22.gif" border="0" name="submit" width="87" height="23" alt="Make payments with PayPal - it's fast, free and secure!">
</form>

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.