How to Build a Donation Form with Gravity Forms


Accepting donations online is typically something required by non-profit organisations, but another group of people that could benefit from it is plugin and theme developers for instance, accepting donations for the hours of free work they’ve put into their open-source products.

I was recently building a website for a church and they wanted to create an online donations page, where people could either make a single donation, or create a recurring donation as part of their tithe.

Install Gravity Forms

The first order of business is to purchase and install Gravity Forms. If you don’t yet have a license, you’ll soon to come to realise how useful it is and how quickly it pays for itself. It’s an immensely powerful plugin that beats any other form-building solution (this being a prime example) and it’s what I’ll be using in this demonstration. Once you’ve installed it, be sure to also install the PayPal add-on (you can do this by going to Forms > Add-ons).

Configure PayPal

First of all, you need to configure PayPal so that it sends its Instant Payment Notifications back to your WordPress installation to confirm payment. Go to Forms > Settings and click on the PayPal tab at the top of the page. It will give you specific instructions for how to do it for your site (each site will have its own unique address to configure).

Build the Form

Create Donation Field in Gravity FormsNow you need to build your form. Create a new form and enter an appropriate title and description. Then, under the Pricing Fields, add a Product field and set the field type to User Defined Price. You can instead use Radio Buttons to allow the user to select from pre-determined donation amounts. This is the same process whether you’re creating a form for a one-time donation, or a recurring donation.

If you want to collect the name, email and/or address from the donor, add those fields as well – Gravity Forms is clever enough to pass that information on to PayPal too.

Once you’ve built the form, save it.

Connect it to PayPal

Now navigate to Forms > PayPal and click on Create a New Feed. This will allow form submissions to be “fed” to PayPal.

Enter the email address of the PayPal account and set the mode to Production (unless you want to do some testing). The Transaction Type will depend on whether this is a one-time donation, or a recurring donation. If it’s for one-time donations, then select Donations. Otherwise, choose subscriptions for recurring donations.

Recurring Donations in Gravity FormsIf it is a recurring donation, you’ll be prompted to enter the terms of the donation, such as the frequency, whether there is a “free trial period” (not usually applicable for donations) and the form field that contains the donation amount.

Select the form from the drop-down that contains your donation form and if applicable, enter the fields which contain the name, email and address of the donor. Then complete the rest of your options and save the Feed. Note that you can create a PayPal condition, which means that only under certain conditions will the form be sent to PayPal. If it’s disabled (default), all entries will be sent to PayPal.

You can also use this to create a donation widget, since you can add Gravity Forms to your sidebars in widgets. Just another reason I love Gravity Forms.

Now go to your form and perform a test. When you hit submit, you should be sent to PayPal to complete the donation. What kind of sites have you used this on?

Get Started

13 thoughts on “How to Build a Donation Form with Gravity Forms”

  1. Donnie Lee says:

    What a great tutorial. I’ve been using Cforms II for most of my forms. I’ve looked at Gravity before, but based on this tutorial, I’ll be switching over to Gravity and ditching Cforms.

  2. I have often wondered whether a donation form is worth it because I have never donated but I guess there is only one way to find out and that is to try it. This looks like and easy way to give it a go, thanks for posting.

    1. Well, that depends on the application. I wouldn’t have one on my blog for instance, unless I had some big plugins that I was giving away for free, but for charities, it’s useful. But that’s not to say that you can’t; I’d be interested to hear how it goes.

  3. We’ve used gravity forms for a long time, and I’ve seen the e-commerce feature (but never used it). I think this a great way to use that feature. I haven’t seen seen the donation model used as nearly as much as it should be.

    1. Yes, the e-commerce feature is very useful for people who have a few items to sell, and I plan to write a tutorial on it soon.

  4. Sam says:

    Great post. I followed your steps above and I got this warning message from GF. I was wondering if you had this issue as well.

    “The form selected does not have any Donation fields. Please add a Donation field to the form and try again”

    1. When did you encounter that issue? Did you set the form up as described in this tutorial?

      1. Sam says:

        I finally got it resolved. I did not update the Paypal add-on to the latest version. I wasn’t aware of it until I logged into support. Thanks for responding. It works just fine now.

  5. Joe says:

    Thanks for this info.
    I set things up the way you explained. All worked well, except for the very last stage.
    Paypal simply returns the user to the page from which the transaction came. The transaction does not appear as complete in the back end. Rather, it comes up as “Processing”.
    What settings did you use in the Confirmation settings on the form you set up?



    1. The confirmation settings shouldn’t have any impact on the PayPal IPN. It could be that your site is somehow blocking the IPN data from coming through.

  6. Thanks for your straightforward post! One question: do you need an SSL certificate for your site in order for this method of enabling PayPal donations to work securely?

    1. No, because the transaction is handled off-site, on PayPal’s site, so an SSL certificate is not necessary.

      1. That’s what I thought, but wanted to check. Thanks!

Leave a Reply