Git Product home page Git Product logo

wagtail-jotform's Introduction

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

Tests

# Install the development environment
poetry install
poetry shell

# Run the tests
coverage run ./runtests.py
coverage report

wagtail-jotform's People

Contributors

kevinhowbrook avatar nickmoreton avatar tomdyson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.