With WPdirectdebit V4 you’ll no longer find a multitude of form types. Whatever you want to build can be created with one single form type: a Gravity Forms form with a WPdirectdebit feed. That covers single payments, subscriptions, regular payments with a one-off initial payment, and simply setting up a Direct Debit so that you can collect from the customer later.

The feed is where you tell WPdirectdebit what should happen when someone submits the form: what kind of payment to set up, in which currency, how much, how often, and where to send the customer afterwards.

This page is a basic walkthrough. We will build a donation form from scratch, add the feed, test it, and put it on your website. When you want the detail on every setting, the form feed settings reference has it all.

Also new for V4 is the ability to import an existing payment plan from your GoCardless account and turn it into a Gravity Form you can start using straight away. That is covered separately.

If you would rather not build a form by hand, the Build Recurring Payment and Build Payment buttons in the Your Forms card on the WPdirectdebit Dashboard create a form and its feed for you. (We call these our Builder Wizards). It’s still worth reading this page, because the feed is where you make changes later.

Here is an example of a form that sets up regular donations. We’ll show you how to build something similar.

An example donation form that sets up regular Direct Debit payments


Build the form

Create the form

Start by creating a new form in Gravity Forms.

Creating a new form in Gravity Forms

Add the fields

Initially your form is blank. We will drag and drop some fields onto it using the Gravity Forms editor.

The blank Gravity Forms editor, ready for fields

We are going to create a form suitable for accepting online donations. We will give the donor full control over how much to give, and also how often to donate.

Start by adding a Name field and an Email field. You will find these under the Gravity Forms Advanced Fields section.

Adding the Name and Email fields from the Advanced Fields section

Now add a radio button field (or a drop-down field if you prefer) for the donor to choose how often they wish to donate.

A radio button field asking how often the donor wants to give

We have made this a required choice, and the green check mark shows that we selected “Every Year” as the default. The labels can say whatever you like, but the values should be weekly, monthly and/or yearly. Capital letters do not matter, and words such as “annually” are understood too. The order does not matter either.

Next, add a product field from the Pricing Fields section. We will choose Radio Buttons for the field type, so that we can offer some suggested donation amounts, plus the option to enter their own amount. To enter these amounts, click Edit Choices.

Editing the choices on the donation amount product field

When the donor selects the “Let me choose” option, we need a field for the amount. Add another product field, this time with the field type User Defined Price. We have called it “Your amount”.

A User Defined Price product field called Your amount

Donors who do not select “Let me choose” should not see the “Your amount” field, so we will hide it using conditional logic. Enable Conditional Logic for this field.

The Enable Conditional Logic option on a field

Then open the Conditional Logic settings and adjust the drop-downs as shown, so the field only appears when “Let me choose” is selected.

Conditional logic that shows Your amount only when Let me choose is selected

We also need a Total field, from the Pricing Fields section. We have labelled this one “Regular donation amount”.

A Total field labelled Regular donation amount

That is all of the fields you need to collect donations. Save the form. The completed form looks like this in the form preview. The “Your amount” field appears when “Let me choose” is selected.

The completed donation form in the form preview

You may want to add some more fields to complete the form. For example:

  • Address: if you add an address field, you can capture donor addresses directly on your website. Perhaps you need addresses for your direct marketing campaigns. Address fields completed on the form can be mapped and passed to GoCardless, so the donor does not have to enter their details twice.
  • Gift Aid declaration: in the UK, a Gift Aid declaration helps the charity reclaim tax. The Gravity Forms Consent field gives you a yes/no checkbox and a detailed description of what is being consented to. It is under Advanced Fields in the form editor.
  • Mailing preferences: capture consent to contact the donor, so you have a record of them opting in to receive further communications.

Having added all of the fields, save the form. Now you need to add a WPdirectdebit feed to it.


Add the feed

What is field mapping?

Many feed settings have a drop-down menu that lists the fields on your form. Choosing a field from the menu is called mapping. It tells WPdirectdebit which field to read when the customer submits the form, and that is how it passes the right information to GoCardless. For example, you map your Email field so GoCardless knows the donor’s email address.

Create the feed

In the form, go to Settings and choose WPdirectdebit. With no feed yet, you should see this:

The form Settings menu with WPdirectdebit selected, showing the feeds list and the Add New button

Click Add New to display the feed settings.

Settings for the donation form

For our donation form, these are the settings to use. Every setting is explained in the form feed settings reference.

Setting What to choose
Feed name Anything you will recognise, such as “Regular donations”.
Payment type Recurring Payment, because donors give on a schedule.
Currency GBP for UK donations.
Mandate description What the donor will see when they authorise the Direct Debit, for example “Regular donations to Example Charity”.
Amount Form total, so the feed uses the amount from the Total field.
Interval unit Map field, then choose the “how often” radio buttons you created, so the donor decides.
Every 1, meaning every week, month or year according to the donor’s choice.
Number of payments Until further notice, so donations continue until they are cancelled.
Start date As soon as possible.
Customer Prefill Check that your Name, Email and Address fields are selected. WPdirectdebit fills these in for you when it can find them.
Success page A thank-you page, if you want one. It is optional.
Exit page Where to send donors who close the payment window without finishing. It is optional.

Click Save Settings.


Finish the form

Confirmation

Gravity Forms confirmations work as normal. A short thank-you message is a good place to start. If you have set a Success page in the feed, donors who complete a Direct Debit are sent there instead. The reference explains how the two fit together.

Notifications

Notifications are emails sent automatically when something happens. Gravity Forms sends them, and WPdirectdebit adds events such as Mandate ready, Recurring payment created and Payment failed to the Event drop-down. A good set-up is an email to the donor once their Direct Debit is in place, and an email to you if a payment fails. The reference lists every event and which one to use when.

Add the form to your site

Add the form to a page or post with the Gravity Forms block, or with a Gravity Forms shortcode.


Try it in sandbox mode

Before you go live, switch WPdirectdebit to sandbox mode in its Settings, fill in your form as a donor would, and check the entry in Gravity Forms. Then look for the new customer, mandate and subscription in your GoCardless sandbox dashboard. Once you are happy, switch to live mode.