How to add Fundraise Up installation code and elements to a Drupal website
Drupal is a flexible, open-source CMS often used by organizations to build scalable and customizable websites. With just a few configuration steps, you can integrate Fundraise Up to start processing donations directly from your site.
Prerequisites
- Access to your organization’s Fundraise Up account with the Organization Administrator role.
- A web developer or technical team member familiar with the Drupal CMS and its module system
- Drupal version 10 and newer.
Installation steps
- Install the Asset Injector module on your Drupal site.
- Log in to your Fundraise Up account and copy Installation Code.
- In your Drupal admin panel, go to: Configuration → Development → Asset Injector (
/admin/config/development/asset-injector
). - Click JS Injector.
- Click the Add JS Injector button.
- Set Label and paste the installation code into the Code field.
- Check the "Enable to load the script in the header, otherwise it will be loaded in the footer (Drupal default) to improve performance” checkbox.
- Save changes.
Adding elements
- Get the HTML code for your Element.
- Navigate to the page or block where the element should be added.
- Click Edit, then select the “Source” view to access the HTML.
- Paste the element’s code in the appropriate location within the content.
- Save the content to publish your changes.
CKEditor limitations
By default, Drupal uses CKEditor 5 as its content editor. While it's powerful and user-friendly, it automatically filters out certain HTML tags, attributes, and inline styles for security and consistency. This can prevent required Fundraise Up elements—like hidden anchor links or inline scripts—from being saved correctly.
Common issues:
- Empty tags like
<a href="#donate-now" style="display:none"></a>
are removed. - Inline
style
orclass
attributes are stripped out. id
,data-*
, oronclick
attributes are blocked.- HTML structure is altered even after switching to "Source" mode.
Steps to resolve the issue
- Open Configuration → Content authoring → Text formats and editors (
/admin/config/content/formats
). - Click Configure next to the text format used with your content.
- Uncheck the “Limit allowed HTML tags and correct faulty HTML” checkbox.
- Click Save configuration.
This disables CKEditor’s automatic tag and attribute filtering, allowing Fundraise Up elements to be saved properly.