Metadata-Version: 2.1
Name: wagtail_form_plugins
Version: 0.4.2
Summary: A set of plugins used to customize and improve the Wagtail form builder in a modular way.
Home-page: https://github.com/laas/wagtail-form-plugins
License: BSD-3-Clause
Keywords: wagtail,form,plugins
Author: Nathanaël Jourdane
Author-email: njourdane@laas.fr
Requires-Python: >=3.10,<4.0
Classifier: Framework :: Wagtail
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: django (>=5,<6)
Requires-Dist: wagtail (>=6,<7)
Project-URL: Repository, https://github.com/laas/wagtail-form-plugins
Description-Content-Type: text/markdown

# 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:

```py
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](https://pypi.org/project/wagtail_form_plugins/):

    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.

