Skip to main content

Embed Jotform forms in wagtail.

Project description

CircleCI Maintainability Test Coverage

Wagtail Jotform

Embedable Jotform forms for Wagtail pages.

Wagtail Jotform works by providing a new page type, EmbeddedFormPage 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",
}

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

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

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

Thank you page

Thank you pages work via RoutablePageMixin.

When a form is created, the Jotform thankurl is set with your created forms thankyou page url. E.G https://mysite.com/formpage/thank-you. So 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 tempaltes

Wagtail Jotform has 2 templates:

embedded_form_page.html
thank_you.html

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

your_project_root/
  templates/
    wagtial_jotform/
        embed_form_page.html
        thank_you.html

Tests

coverage run ./runtest.py
coverage report

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wagtail-jotform-1.0.3.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distribution

wagtail_jotform-1.0.3-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page