Skip to main content

Embed Jotform forms in wagtail.

Project description

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:

  • 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/
      • wagtail_jotform/
        • embed_form_page.html
        • thank_you.html

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.

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-2.2.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

wagtail_jotform-2.2.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file wagtail-jotform-2.2.0.tar.gz.

File metadata

  • Download URL: wagtail-jotform-2.2.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for wagtail-jotform-2.2.0.tar.gz
Algorithm Hash digest
SHA256 4662da302b9f427c0ec5774ad9cf9e59c81d0d201755daeb49a691775851a62a
MD5 83a8a2da67efb41e5cf83c59be08020c
BLAKE2b-256 ef05ec7e4bda4b5b0baac1e8ff431189e6577284965f6bbcb228a4ad7b027e8d

See more details on using hashes here.

File details

Details for the file wagtail_jotform-2.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wagtail_jotform-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d211790ffd0612af49e91236a8dcfb79f4afca440d65fe75c7f87391803497f
MD5 51526c17736fbb1c7569867673027cf2
BLAKE2b-256 485e264d3bc0316494f3e94f21638970d9bf4bf591875c66c4f391a636aa7ee1

See more details on using hashes here.

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