Charitable Documentation

Learn how to make the most of Charitable with clear, step-by-step instructions.

Adding Custom Fields to PDF Receipts

Would you like a custom field from your donation form to show up on the PDF receipt? When you add a custom field to a legacy form or build one in the campaign visual builder, Charitable saves the donor’s answer with the donation – but the PDF receipt template doesn’t print it automatically. You’ll need to tell the receipt where the value lives and how to display it.

This guide will walk you through the steps to add a custom donation field to your PDF receipt, whether the field came from a legacy form or the visual form builder.

Note: This section assumes you are using Charitable Pro 1.8.13+ and involves a small amount of PHP. If you’re not comfortable editing code, paste the snippet into a tool like WPCode so you don’t have to touch theme files directly, or hand it to your developer.

How Are Custom Fields Stored?

Before you can show a field on the receipt, you need two things: where its value is stored, and what key to look it up by. Charitable saves both legacy form and visual form custom fields as donation post meta, but the meta key looks different depending on which form created it.

For legacy form custom fields, the meta key is whatever was registered with the field. If you registered a field with the key t_shirt_size using the Donation Fields API, the value is stored under that exact key.

For visual form custom fields, the key uses the format field_X, where X is the numeric ID the campaign builder assigned to the field. Hidden fields are the exception – those use whatever name you typed into the Field Name setting.

Finding the Meta Key for Your Field

The easiest way to confirm which meta key a field uses is to look at a real donation that included the field.

For a legacy form, the meta key is the array key you used when registering the field with the charitable_default_donation_fields filter. If you didn’t write the snippet yourself, you can search your site (or ask your developer) for that filter to confirm the key.

For a visual form, go to Charitable » Donations, open a test donation that submitted the custom field, and look through the donation’s saved data for entries like field_3 or field_5. The number is the field’s builder ID. If you’d rather see every meta key in one shot, you can drop this temporary snippet onto any admin page:

echo '<pre>';
print_r( get_post_meta( 123 ) ); // Replace 123 with your test donation ID.
echo '</pre>';

Note: Once you’ve copied down the keys you need, remove the snippet – leaving print_r() calls in production output is messy and can leak donor data.

Adding a Field Using a Hook (Recommended)

Charitable fires an action called charitable_pdf_receipt_after_donor_details right after the donor details block on every PDF receipt. Hooking into this action is the simplest way to add a custom field, because you don’t have to override any template files – your changes survive plugin updates with no extra work.

To activate the snippet, paste it into your child theme’s functions.php file or into a code snippets plugin:

add_action( 'charitable_pdf_receipt_after_donor_details', function( $donor, $donation ) {

    // Replace 't_shirt_size' with your field's meta key.
    // For a visual form custom field, this will look like 'field_3'.
    $value = get_post_meta( $donation->ID, 't_shirt_size', true );

    if ( empty( $value ) ) {
        return;
    }

    printf(
        '<p style="margin-top: 10px; margin-bottom: 0;"><strong>%s:</strong> %s</p>',
        esc_html__( 'T-Shirt Size', 'charitable-pro' ),
        esc_html( $value )
    );

}, 10, 2 );

The example prints the field underneath the donor’s name, address, and email. When adapting it, swap the meta key, the visible label, and the markup to match the field you’re adding.

Note: If your value contains HTML – for example, output from a long-text field – use wp_kses_post() instead of esc_html() so basic formatting tags survive.

Adding a Field by Overriding the Template

If you need to place the field somewhere other than after the donor details – for example, inside the donations table or in the footer – you can override the PDF receipt template.

Charitable’s PDF templates are theme-overridable. To customize the main PDF layout, copy this file:

wp-content/plugins/charitable-pro/templates/pro/pdf-receipts/pdf.php

Into your active theme at this path:

wp-content/themes/your-theme/charitable-pro/pro/pdf-receipts/pdf.php

Once your copy is in place, Charitable will load it instead of the plugin’s version. The same path pattern works for the two partial templates that pdf.php calls:

  • Donor details: templates/pro/pdf-receipts/donation-receipt/donor-details.php
  • Donation details: templates/pro/pdf-receipts/donation-receipt/details.php

Inside any copied template, the $donation variable is the full Charitable_Donation object. To pull a custom field’s value, use the same get_post_meta() call from the previous method, then add markup wherever you want the value to appear:

<?php
$value = get_post_meta( $donation->ID, 'field_3', true );
if ( ! empty( $value ) ) :
    ?>
    <p><strong><?php esc_html_e( 'Gift Aid Eligible', 'charitable-pro' ); ?>:</strong> <?php echo esc_html( $value ); ?></p>
    <?php
endif;
?>

Note: Template overrides need to be reviewed every time you update Charitable Pro. If the plugin’s version of the template picks up new features or bug fixes, your override won’t see them automatically. The hook method above avoids this entirely, so use a template override only when you need control over placement.

Previewing Your Changes

Once your snippet or template override is saved, generate a real PDF to confirm the field appears as expected. From the Charitable » Donations screen, pick a donation that included the custom field, then click the PDF icon next to it to download the receipt. If the field doesn’t appear, work through these checks one at a time:

  • Confirm the meta key matches exactly – field_3 and field_03 are not the same.
  • Verify the donation you’re testing actually submitted a value for the field. Empty values won’t print.
  • Try a different test donation to rule out one entry being empty.

Note: Field values that look empty on the donation admin screen will also be empty on the PDF. The receipt cannot show data the donation never collected.

Still have questions? We’re here to help!

Last Modified:

What's New In Charitable

View The Latest Updates
🔔 Subscribe to get our latest updates
📧 Subscribe to Emails

Email Subscription

Join our Newsletter

We won’t spam you. We only send an email when we think it will genuinely help you. Unsubscribe at any time!

Addon New

🗒️ Custom Receipts… New Addon!

With Custom Receipts, you decide which page your donors see, on every campaign. Here’s how it works, and why it’s worth turning on today.

Left side shows a donation receipt with donation number, date, total, and payment method for a  gift to Anywhere, titled 'One Family Gets Clean Water For A Week.'

Create receipts that are CUSTOM TO THE DONOR OR CAMPAIGN. You can also:

📅 Year-end appeal: Reinforce the goal and invite donors to share while momentum is high.

🎗️ Memorial or tribute campaign: Give a gentle, respectful thank-you that fits the moment.

💎 Major gifts: Show a special message only to donors who give above a threshold.

🔁 Recurring growth: Invite one-time donors to become monthly supporters right on the receipt.

🌍 Global campaigns: Surface a country-specific note, like a Gift Aid reminder, only where it applies.

Learn more here.

New templates

🤩 New Beacon Campaign Templates w/ “Hero” Block!

With the new Beacon Campaign Templates for Charitable Pro, you can launch a stunning, full-width fundraising page that instantly captures visitor attention above the fold.

Fundraising page header for Save Maple Grove Park with a donation widget and a small square photo of a sunlit tree thumbnail on the left.

🔦 Above-the-Fold Impact: Lead with a full-width hero image, your logo, and your goal with a donation widget locked right on top of the banner so your ask and momentum register instantly without scrolling.

📐 Two Flexible Layouts: Choose between a structured two-column layout for side-by-side storytelling and supporting details, or a clean one-column view designed for uninterrupted long-form narratives.

⚡ All-in-One Hero Field: Powered by the new Campaign Hero field, bringing background media, live progress bars, custom donation amounts, and recurring giving tabs together into a single cohesive block that can be dropped into any layout.

🎨 Automatic Theme Matching: The hero banner and donation widget automatically inherit your campaign theme’s button and accent colors, ensuring your entire presentation stays beautifully on-brand without touching a line of CSS.

Learn more here.

donation form Feature New

📝 Donation Form Block: Embed a Working Donation Form Anywhere

With the new Donation Form Block for Charitable Pro, you can drop a fully working donation form directly onto any page or post in the WordPress block editor. No redirects, no page reloads, and zero friction between reading your story and making a contribution.

📝 Drop Forms Anywhere: Place a working form directly onto your homepage, inside a story-driven blog post, on a dedicated landing page, or within a campaign announcement.

🎯 Dynamic Campaign Binding: Easily choose a specific campaign from the block sidebar or set it to automatically bind to whichever campaign is currently being viewed.

📐 Full vs. Minimal Form Views: Switch between a full layout or a compact minimal view to perfectly fit sidebars, narrow columns, or wide landing pages.

🎨 Scoped No-Code Styling: Customize typography, container spacing, border radius, amount buttons, and accent colors independently for every form instance without touching a line of CSS.

Learn more here.

ambassadors New

👤 Creator Profiles: Put a Face to Every Peer-to-Peer Campaign

Ambassadors 3.3.0 now provies Creator Profiles — giving your supporters a permanent, shareable public home that turns one-time fundraisers into ongoing relationships.

👤 Public Creator Pages: Give every fundraiser an instant, clean landing page at /creator/their-name/ to showcase their custom avatar, bio, and a browsable grid of their campaigns.

📊 Proof of Impact: Boost donor trust by displaying site-wide milestones on the profile—like total funds raised and total donor counts.

💳 Interactive Hover Cards: When donors hover over a creator’s name on a campaign page, a compact card expands with their bio and social handles right at the moment of decision.

📍 Responsible Location Sharing: Allow creators to safely show local supporters where they are based using only city, state, and country details.

🛠️ Self-Serve Customization: Fundraisers can update their own profiles and link up to six social networks directly from the My Campaigns hub, saving you admin time.

Ready to empower your advocates? Update to Ambassadors 3.3.0 and turn on “Enable Public Creator Page” today!

Improvement Payments

📱 Turn Mobile Scrollers Into Donors: Meet Charitable’s Mollie Upgrade

Losing mobile supporters because they hate typing out long card numbers on their phones? Charitable’s updated Mollie integration features:

⚡ One-Tap Wallet Checkout: Enable donors to complete their gifts instantly using Apple Pay or Google Pay with a simple face scan, fingerprint, or tap.

💰 No Extra PCI Burden: Skip complex domain verification and security compliance since all wallet transactions run safely through Mollie’s hosted checkout.

🛠️ Custom Cancel Routing: Keep the experience predictable by automatically sending donors who back out to your cancellation page, or use developer filters to route them to a custom page.

Visit this page to learn more.