Home

Awesome

tests codecov black Total alerts

Wagtail Jotform

Embedable Jotform forms for Wagtail pages.

Wagtail Jotform works by providing a new EmbeddedFormPage page type with a form choice field. Values for this form field are populated from the Jotform API.

Installation

Install from pypi:

pip install wagtail-jotform

Configuration

You will need an API key from Jotform. Add the following variables to your settings:

WAGTAIL_JOTFORM = {
    "API_KEY": "somekey",
    "API_URL": "https://api.jotform.com",
    "LIMIT": 50,
}

LIMIT is the number of results in each result set for form list. Default is 50. Maximum is 1000.

If your Jotform account is in EU safe mode, your JOTFORM_API_URL should be https://eu-api.jotform.com.

Add the following to your INSTALLED_APPS in settings, and note that wagtail_jotform depends on routable_page:

INSTALLED_APPS = [
    ...
    "wagtail_jotform",
    "wagtail.contrib.routable_page",
]

Thank you page

Thank you pages work via Wagtail's RoutablePageMixin.

When a form is created, the Jotform thankurl is set with your created form's thank you page URL, e.g. https://mysite.com/formpage/thank-you. When the form is submitted, the user will be redirected accordingly and be show the 'thank you' data specified on on the form page added.

Overriding templates

Wagtail Jotform has two templates:

You can override these templates in your project by adding them in the following location:

Contributing

We welcome contributions to this project. Please follow the contributing instructions to get started.

Release process

To release a new version, the Release documentation should be followed.