🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms Campaign Donations Premium Add-on Setup Guide

Updated 9 min read Gravity Forms CRM & Email Marketing
On this page
  1. Video walkthrough
  2. What You Get
  3. What It Does Not Do
  4. Requirements
  5. Quick Start
  6. The Donation Feed
  7. How the Status Follows the Payment
  8. The Donor
  9. Campaign Choices
  10. Checks When the Form Is Sent
  11. The Form on Campaign Pages
  12. Merge Tags
  13. Hooks for Developers
  14. If Something Is Wrong
  15. Frequently Asked Questions
  16. Does it take cards?
  17. Does it send its own e-mails?
  18. Can one form give to several campaigns?
  19. Do I need to write code?
  20. Does it send data to another service?
  21. Record Gravity Forms gifts in Charitable

Video walkthrough

Gravity Forms Charitable: Record Donation Pledges in Campaigns with the Free Plugin
Gravity Forms pledges become donations in free Charitable campaigns Watch on YouTube

Campaign Donations joins Gravity Forms and the free Charitable donation plugin. A donor gives through a Gravity Forms form that your payment add-on already handles. When the payment completes, the add-on records a donation in Charitable for the campaign the donor chose: the donor is matched by email address, the amount is the amount paid, the status follows the payment, and the campaign total, the donor list and the Charitable reports are right without any copying. The add-on never touches a card.

A Give to a campaign form with name, email, a Campaign drop-down that shows Winter Shelter with its percent of the goal, a Gift amount and a Total
The campaign drop-down is filled from Charitable, with the progress of each campaign.

What You Get

  • A donation feed that records the Charitable donation: campaign, amount and donor from the form.
  • The campaign from a form field or one fixed campaign, and the amount from the payment total or from a field.
  • The donor matched to an existing Charitable donor by email address, otherwise a new donor, linked to the WordPress user with the same email address.
  • Statuses that follow the payment: Pending while the payment is open, Paid when it completes, Failed, Cancelled and Refunded. A refund lowers the campaign total.
  • Campaign choices for select and radio fields, with the percent of the goal in the label, only campaigns that take donations if you like.
  • The gateway of the donation reads Gravity Forms in the Charitable donation list.
  • Merge tags for the campaign name, goal, raised amount and percent, and for the donation of the entry.
  • Checks before the entry is saved: a campaign that takes donations, and an amount inside the limits of the campaign.
  • Feed conditions, entry notes, entry meta and a box on the entry screen with a link to the donation.
  • A clear notice when Charitable is missing, too old or switched off, and no outside requests.

What It Does Not Do

The add-on takes no payment: a Gravity Forms payment add-on charges the card and the add-on records the result. It does not offer Gravity Forms as a payment method on Charitable donation forms, and it does not change your campaigns, goals or Charitable settings. Recurring plans are not created in Charitable in version 1.0.0: the first payment of a subscription is recorded as a donation, later payments of the same subscription are not. Charitable works in one currency, so the Gravity Forms currency and the Charitable currency must match.

Requirements

  • Gravity Forms 2.9 or newer and PHP 7.4 or newer.
  • The free Charitable plugin from wordpress.org, version 1.8 or newer, active on the same site. The add-on is tested with Charitable 1.8.13.2 and checks what it needs on every request, so a version that moves something shows a clear message instead of an error.
  • A GravityExtra license key.

Quick Start

  1. Install and activate the add-on, then activate your license key in Forms → Settings → Campaign Donations. The same screen shows the Charitable version found, how many campaigns take donations and the currencies.
  2. Build a form with an Email field, a Name field, a select or radio field for the campaign and a product field or a donation amount with a Total. Add your payment add-on feed as usual.
  3. In the editor open the campaign field and set Campaign choices to Campaigns. The choices are filled from Charitable each time the form is shown.
  4. Open the form settings, go to Campaign Donations, add a feed and choose the campaign field and the email and name fields.
  5. Send a test gift. Open the entry: the Charitable donation box shows the donation number and its status, and the donation is in Charitable → Donations.
The Donation feed settings in Gravity Forms: which campaign gets the donation, the donation amount, the donor fields and the status for forms without payment
One feed: choose the campaign and amount, map the donor and set the status for forms without a payment.

The Donation Feed

Setting What it does
Which campaign gets the donation A field of the form (the value is the campaign ID: use the Campaign choices, or a hidden field with the parameter name charitable_campaign_id), or one fixed campaign picked from your list.
Donation amount The payment total of the entry (the amount the payment add-on charged), or a field of the form. Use a field when the form takes no payment, for example a pledge form.
Donor Email is required. Add a full name, or a first and last name. A full name is split at the last space.
Donation status when the form takes no payment Pending (to be confirmed in Charitable) or Completed. A form with a payment follows the payment instead.
Condition Record the donation only when your conditional logic is met.
Record the donation only when the payment is completed Shown when a Gravity Forms payment add-on is active: the feed waits until the payment is complete.

How the Status Follows the Payment

When the feed runs it reads the payment status of the entry. When the payment add-on reports a change later, the donation changes with it.

Gravity Forms says Charitable donation becomes
Paid or Active Paid (completed). The gift counts in the campaign total.
Pending, Processing or Authorized Pending. It does not count yet.
Failed Failed. It never counts.
Cancelled, Expired or Voided Cancelled. It never counts.
Refunded Refunded, through Charitable itself, so its refund log is written and the campaign total goes down.

A refund is final: a late Paid report does not bring a refunded donation back, and a Paid donation never goes back to Pending. If a fundraiser changes a donation in Charitable, for example to Refunded after a bank transfer was returned, the entry gets the new status and a note. A change that the add-on made itself is not echoed back to the entry a second time.

The Charitable donations list with donations from the form shown as via Gravity Forms, each with its amount, campaign and a Paid, Pending, Failed, Cancelled or Refunded status
The donations are in Charitable like any other, with Gravity Forms as the gateway.

The Donor

Charitable keeps one donor for each email address. The add-on asks Charitable for the donor with the email address of the form, in any letter case. If there is one, the donation is added to that donor and the entry note says so. Otherwise Charitable makes a new donor with the first and last name of the form. A visitor who has a WordPress user with the same email address is linked to that user. A logged in visitor who gives is recorded as that user.

Campaign Choices

Select and radio fields get a Campaign choices panel in the form editor. When it is on, the choices are replaced with your Charitable campaigns each time the form is shown, checked and saved, and on the entry screens, but never in the editor, so the saved form keeps the choices you typed as a fallback.

  • Only campaigns that take donations: leaves out campaigns that have ended, drafts and private campaigns.
  • Show the percent of the goal: Winter Shelter (42% of $5,000.00). A campaign without a goal shows only its name.
  • Most campaigns listed: a limit for sites with many campaigns.

Checks When the Form Is Sent

Before the entry is saved the add-on checks the feed. A campaign that has ended or is not published is refused with a message on the campaign field, an amount below the smallest or above the largest gift that the campaign allows is refused at the amount field, and a missing or invalid email address is refused at the email field. Nothing is saved while a check fails. When there is no visible field for the message, for example a hidden campaign field on a campaign page, the message is shown above the form.

The Form on Campaign Pages

Give the campaign of the page to the form in one of three ways. A hidden field with Allow field to be populated dynamically and the parameter name charitable_campaign_id is filled with the campaign shown on the page, with the campaign in the address, or with the campaign of the shortcode. The shortcode is written with the name gfxchar_form, the form id and the campaign id as attributes, placed in square brackets in your page or campaign text.

Merge Tags

Merge tag Value
{charitable_campaign_name} The name of the campaign.
{charitable_campaign_goal} The goal, such as $5,000.00. Empty when the campaign has no goal.
{charitable_campaign_raised} The amount raised so far.
{charitable_campaign_percent} The percent of the goal, such as 42%. Empty when there is no goal.
{charitable_campaign_donors} The number of donors of the campaign.
{charitable_campaign_url}, {charitable_campaign_id} The link and the ID of the campaign.
{charitable_donation_id}, {charitable_donation_status}, {charitable_donation_amount} The donation of the entry: its number, its status in words and its amount.

The tags work in notifications, confirmations and feed fields. They take the campaign of the entry. To show another campaign, add a colon, the word campaign, an equals sign and the campaign ID, for example charitable_campaign_raised:campaign=12 inside the braces. That form works for any campaign, even where there is no entry. A plain colon and a number is not used, because Gravity Forms reads it as a field ID.

Hooks for Developers

// Change the donor or the amount before the donation is recorded.
add_filter( 'gfxchar_donation_request', function ( $request, $feed, $entry, $form ) {
    $request['donor']['first_name'] = ucwords( strtolower( $request['donor']['first_name'] ) );
    return $request;
}, 10, 4 );
// Run your own code after a donation was recorded or its status was synced.
add_action( 'gfxchar_donation_created', function ( $donation_id, $request, $feed, $entry, $form ) {
    // $request holds the campaign, amount, donor and status that were recorded.
}, 10, 5 );
add_action( 'gfxchar_donation_status_synced', function ( $donation_id, $new_status, $entry, $payment_action ) {
    // A payment event changed the donation, for example to refunded.
}, 10, 4 );
// Allow a currency difference when you convert amounts yourself.
add_filter( 'gfxchar_allow_currency_mismatch', function ( $allow, $form_currency, $charitable_currency ) {
    return 'EUR' === $form_currency && 'USD' === $charitable_currency;
}, 10, 3 );

If Something Is Wrong

The add-on never lets a problem on the Charitable side break your form. If Charitable is not active, the form shows your typed choices, the entry is saved, and a note on the entry says no donation was recorded. The Forms screens and the settings page show the reason. If the license is not active, no donation is recorded and the entry says so. If the Gravity Forms currency differs from the Charitable currency, no donation is recorded and the entry note names both currencies.

Frequently Asked Questions

Does it take cards?

No. A Gravity Forms payment add-on charges the card. The add-on only records the result in Charitable. It does not add a payment method to Charitable forms.

Does it send its own e-mails?

No. Charitable sends the e-mails you set up in its own settings when it saves the donation. Gravity Forms notifications work as usual and can use the merge tags above.

Can one form give to several campaigns?

Yes. Use a campaign field and one feed, or add a feed for each campaign with a condition.

Do I need to write code?

No. Everything is set in the form editor and in the feed. A few optional hooks exist for developers.

Does it send data to another service?

No. Everything happens on your own site.

A giving form that checks the campaign, a donation list that fills itself, and an entry that always knows what became of the gift take three chores away from every appeal you run.

Record Gravity Forms gifts in Charitable

Choose the campaign, follow the payment and keep the donor, the donation and the campaign total in step.

Still need help?

Our support team answers tickets every day, usually within a few hours.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr