Donations are a critical component of fundraising for nonprofits, and creating effective donation forms is key to generating more donations. Drupal, as a flexible and customizable platform, offers several ways for nonprofits to create custom donation forms. In this article, we will cover the steps required to create a custom donation form in Drupal.
Prerequisites
Before we dive into the process of creating a custom donation form, you'll need to make sure you have a few things in place:- A Drupal website with administrative access
- The Webform module installed and enabled
- A payment processor module installed and configured (e.g. PayPal, Stripe, Authorize.net, etc.)
Steps to Create a Custom Donation Form
-
Create a new webform
Navigate to the Webform page and click "Add webform"
Give the form a name and description
Click "Save"
-
Add donation fields to the webform
Click "Add element" and select "Select options"
Enter a label for the field (e.g. "Donation Amount")
Under "Options", add the donation amounts you want to offer (e.g. $25, $50, $100, etc.)
Under "Validation", select "Required" to ensure that the donor selects a donation amount
Click "Save element"
-
Add personal information fields to the webform
Click "Add element" and select "Textfield"
Enter a label for the field (e.g. "Name")
Under "Validation", select "Required"
Repeat for other required personal information fields (e.g. email, address, etc.) -
Configure the payment processor settings
Click "Form settings"
Under "Submission", select the payment processor module you have installed and configured
Enter the necessary API keys and other settings for the payment processor
Click "Save settings" -
Customize the confirmation message and email
Click "Form settings"
Select "Confirmation"
Customize the confirmation message to thank the donor for their donation
Select "Emails"
Customize the email that will be sent to the donor with their donation information -
Add the webform to your website
Navigate to the page where you want to add the donation form
Click "Add block" and select "Webform"
Select the webform you just created
Click "Save"