Creating A Basic Paypal Order Form

Written by Formstack on April 20, 2009

Posted in Form Hacks

We get a lot of questions here at Formstack about setting up basic order forms, so I thought over the next several weeks I could get a little more in-depth with order forms here in the blog than we do in our support documentation.  For today, I’m going to show you how to build a simple single-item form and integrate it with Paypal.

In this example form, we’re going to offer t-shirts for sale.  I’m going to start with a blank form and then add two select lists, one for the t-shirt size and one for t-shirt quantity.  For size, my choices are Small, Medium, Large and Extra Large.  For quantity, the user can choose from 1 to 5.

order1

So with those two fields, we have a basic order form, but how do we associate a dollar value with that, so we can pass it on to Paypal?  To do this, we’ll have to use separate values.  First, we’ll click on the t-shirt size field to edit it.

order2

Next, we’ll add some option values to our option labels.  Columnn one is option labels, which are what our users will see on the form.  Column two is option values, which are the dollar values associated with those labels.  The user does not see the values, but these are passed on to Paypal.

order3

Note: You’ll notice that I used both $12 and $12.0 as option values instead of just making them both $12.  This is because option values must be unique.  To add more values with the same number, I could just add more zeroes.  $12.00, $12.000, $12.0000, etc.

Okay, now we’re ready for our Paypal integration.  You can set this up under Settings > Payment Integration > Paypal.  Our price field is “Please choose a t-shirt size,” so that is what we’ll choose from the drop-down menu.  We called our quantity field “Quantity,” so we’ll set that as well.

order4

Now, when we test the form, we should be taken to Paypal and charged the proper amount.  I’m going to test this by choosing 3 “Extra Large” t-shirts, which are $15 each, so my total when I get to Paypal should be $15.

order51

As you can see from the image below, my total at Paypal is indeed $45.

order6

Next week, I’ll show you how to build an order form with multiple items and integrate that into Paypal.