Skip to main content

A set of plugins used to customize and improve the Wagtail form builder in a modular way.

Project description

Wagtail Form Plugins

A set of plugins used to customize and improve the Wagtail form builder in a modular way.

  • streamfield: improve the user experience of the form app, using StreamFields;
  • conditional fields: make a field appear or not depending on the value of a previous field;
  • templating: allow to inject variables in field initial values and emails such as the user name, etc;
  • file_input: allow users to send a file via the form;
  • indexed_results: add an index in the results (can be used in the templating plugin);
  • named_form: allow to fill the form only once per user;
  • emails: send multiple emails when a form is submitted;
  • datepickers: add date and datetime input types to make the browser datepicker appear.

Each plugin is supposed to work independently.

Usage

Plugins are Python mixins, you add them with class inheritance:

from wagtail_form_plugins import models as wfp_models

class AbstractFormPage(
    wfp_models.TemplatingFormMixin,
    wfp_models.FileInputFormMixin,
    wfp_models.ConditionalFieldsFormMixin,
    wfp_models.StreamFieldFormMixin,
    wfp_models.NavButtonsFormMixin,
    wfp_models.IndexedResultsFormMixin,
    FormMixin,
    Page,
):

See the demo project for further understanding.

Installation

This package is published on pypi:

poetry add wagtail_form_plugins

or:

pip install wagtail_form_plugins

Contribution

You are welcome to make pull requests to add you own plugins if you think they can be useful for others.

This project is currently in beta: feedback is more than welcome, expect some API-breaks in minor releases.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wagtail_form_plugins-0.4.2-1-py3-none-any.whl (41.3 kB view details)

Uploaded Python 3

File details

Details for the file wagtail_form_plugins-0.4.2-1-py3-none-any.whl.

File metadata

File hashes

Hashes for wagtail_form_plugins-0.4.2-1-py3-none-any.whl
Algorithm Hash digest
SHA256 62c089b73a1363cbf9c8460c87c281290802dc0d265e9b223f8fcd93848d02fe
MD5 d566c99cd1685c7cc1fd2859774361d1
BLAKE2b-256 e0f0a5267d65b601c86dd770188ea846a5e55eff6b32abb313aa7f5bccb71a62

See more details on using hashes here.

Supported by

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