Alternative content

Get Adobe Flash player

Web Design Articles

Other Related Links

PayPal Star Developer Award Winner 2005

Setting up PayPal for Beginners
Buy Now Buttons


From Scorpion Systems

Last Page 1 , 2 , 3 , 4 , 5 , 6  Next Page

Now Lets look at how to spice up the button by letting the user choose up to 2 options.

I am going to introduce 4 new input field names used by PayPal they are

hidden / on0 & on1 / Option type
These are used to send an item option name to paypal. Example: Color

Discussed Below / os0 & os 1 / Option Value
These are used to send an item option value to paypal. Example: BLUE

Now lets take a look at how to use them

This is where all those other input types I told you about will come in. Lets say you want to add a size and color option. There are 3 ways to do this:

1 Using radio buttons

Add this to your example form from earlier. Put it between the form tags because it is part of the form.

<input type="hidden" name="on0" value="Color">
<input type="radio" name="os0" value="Red">Red
<input type="radio" name="os0" value="White">White
<input type="radio" name="os0" value="Blue">Blue

So it looks like this
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="paypal" >
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="Payment@youremail.net">
<input type="hidden" name="undefined_quantity" value="0">
<input type="hidden" name="item_name" value="Your Item Name">
<input type="hidden" name="item_number" value="Your Item Number">
<input type="hidden" name="amount" value="1.00">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="return" value="http://success">
<input type="hidden" name="cancel_return" value="http://cancel">
<input type="hidden" name="on0" value="Color">
<input type="radio" name="os0" value="Red">Red
<input type="radio" name="os0" value="White">White
<input type="radio" name="os0" value="Blue">Blue
<input name="submit" type="submit" value="click here">
</form>


This will be your result
Red
White Blue
2 Using text box or Text area

Add this to your example form from earlier. Put it between the form tags because it is part of the form.

<input type="hidden" name="on1" value="Phrase to enter:">
<input name="os1" type="text" value="Enter the text you want">

So it looks like this
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="paypal" >
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="Payment@youremail.net">
<input type="hidden" name="undefined_quantity" value="0">
<input type="hidden" name="item_name" value="Your Item Name">
<input type="hidden" name="item_number" value="Your Item Number">
<input type="hidden" name="amount" value="1.00">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="return" value="http://success">
<input type="hidden" name="cancel_return" value="http://cancel">
<input type="hidden" name="on0" value="Color">
<input type="radio" name="os0" value="Red">Red
<input type="radio" name="os0" value="White">White
<input type="radio" name="os0" value="Blue">Blue
<input type="hidden" name="on1" value="Phrase to enter:">
<input name="os1" type="text" value="Enter the text you want">
<input name="submit" type="submit" value="click here">
</form>

And your result will be this
Red White Blue


Lastly I will show you how to make a drop down (list box)

Last Page  1 , 2 , 3 , 4 , 5 , 6  Next Page