Skip to main content

Planning Center Help

Table of Contents

Integrate a form onto your website

See also:

You can connect a form to your church website using a direct link or the embed code.

  • A direct link takes the person off the page onto the Church Center app.

  • The embed code displays a pop-up.

Mobile devices don't support pop-ups, so the form will always open in a new browser window.

Tip

For either of the following options, you'll need to replace <your-form-URL> with your form's public URL, which can be found on the settings tab of your form, under "Embed".

Embed code

You can keep people on your website by embedding your form onto your website in a popup. It will look something like this:

form_popup.png

Important

Your website must be encrypted (https) for ChurchCenterModal to work. On http websites, the donation form will always open in a new browser tab.

1. Script tag

Include the ChurchCenterModal script tag on your webpage in the <head> of your document:

          <script src="https://js.churchcenter.com/modal/v1"></script>
        

Sometimes anchor tags with data attributes may not be usable due to other constraints. If a need arises to open the modal programmatically, ChurchCenterModal.open(url) is the perfect escape hatch:

var urlThatWasGeneratedProgramatically = "your-form-URL"

ChurchCenterModal.open(urlThatWasGeneratedProgramatically)

If you're a developer, you may want to interact with the ChurchCenterModal using javascript for more fine-grained control:

  • ChurchCenterModal.open(url) : Opens a link to Church Center in the modal.

  • ChurchCenterModal.close() : Closes the modal.

  • ChurchCenterModal.start() : Attach the global event handler to make data-open-in-church-center-modal="true" links open in a modal. Note: this happens automatically when the script is included.

  • ChurchCenterModal.stop() : Remove the global event handler that makes data-open-in-church-center-modal="true" links open in the modal.