The [give_form] shortcode allows you to insert a donation form anywhere shortcodes are supported on your website. You can either manually create the shortcode or use the shortcode builder included with the classic editor in WordPress. This article clarifies how to build the shortcode either way.

Why use the GiveWP Form Shortcode?

When you create a donation form on your site, by default GiveWP creates its own page for that form to be accessible to site visitors. The GiveWP Form shortcode is how you can display your forms on other pages, posts and widget areas on your website, giving you more control over the overall style of the page where the donation form is.

Each GiveWP donation form you create has a unique ID which the [give_form] shortcode uses to select the appropriate content to insert. If the ID parameter is missing nothing will output (or you will see an error message if you have WP debug mode turned on).

Note: GiveWP has a powerful Give Form Block if you are using the WordPress block editor

Using the Shortcode Builder

Using the shortcode builder is the easiest way to embed a donation form on a page or post. To begin using the GiveWP shortcode builder first navigate to the page or post you wish to insert the shortcode into.

You will see the following button above the main editor:

The "Add Donation Form" Button
The “Add Donation Form” Button
Select a Form to Insert
Select a Form to Insert

Once you’ve chosen your form from the list, you have several options to customize the display of this form on your page.

screenshot of the modal for adding Give forms to pages or posts,
Shortcode Generator Options in GiveWP

GiveWP Form Shortcode Attributes

Here are the options in the shortcode builder, and their corresponding attributes if you are manually building a shortcode. Also, none of these options have any effect on the Multi-Step Form Template.

Other than the Form selection, the rest of the attributes and selections are optional.

  • Select a Form: Selecting a form to display is mandatory.
    • Shortcode attribute: [id]
    • Attribute values: a numeric value of the Form ID.
  • Form Title: This enables/disables displaying the form title.
    • Shortcode attribute: [show_title]
    • Attribute values: true (default), false
  • Form Goal: Shows the progress bar of the form, if a goal has been enabled in the form.
    • Shortcode attribute: [show_goal]
    • Attribute values: true (default), false
  • Show Content: This allows you to display the form with or without the content. The default is whatever is set in the form’s settings for forms with content enabled meaning that it will show the content unless you set this value to “none”.
    • Shortcode attribute: [show_content]
    • Attribute values: above (default, shows the form content above the donation options), below (shows the form), none (hides the form content)
  • Display Style: This allows you to override the method of displaying the form’s payment/additional fields. If you do not declare a parameter here, it will default to the option selected in the form’s display settings.
    • Shortcode attribute: [display_style]
    • Attribute values: onpage (default, displays all the fields on the page), modal (shows the form in a modal window), reveal (displays the fields on the page after a click), button (displays only a button with no additional fields)
  • Button Title: This enables the modal, button, and reveal button’s text to be customized, per shortcode. If not declared, it will default to the text set in the form’s display options and if that text is not customized, will default to “Donate Now.”
    • Shortcode attribute: [continue_button_title]
    • Attribute values: Any text, accepts only alpha-numeric characters.