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.
This project uses Wagtail StreamFields to improve the user experience when creating a form. This feature was included in a plugin at first, but moving it to a built-in feature allows a better integration between plugins and Wagtail StreamFields.
Available plugins:
- conditional fields: make a field appear or not depending on the value of a previous field;
- editable: allow form admins to modify form submissions;
- emails: send multiple emails when a form is submitted;
- file_input: allow users to send a file via the form;
- indexed_results: add an index value in the results (can be used in the templating plugin);
- label: add a new Label field type to put subtitles in forms, in order to split it into sections;
- named_form: add user value in form sumission, allowing to fill the form only once per user;
- nav_buttons: add some buttons for an easier novigation for form admins;
- templating: allow to inject variables in field initial values and emails such as the user name, etc;
- token_validation: add token-validation process via email, useful for public forms.
Each plugin is supposed to work independently.
Usage
You add form plugins with class inheritance. Since there are several classes to extend, a WagtailFormPlugin object can be used for convenience:
from wagtail_form_plugins import plugins
wfp = WagtailFormPlugin(
plugins.ConditionalFields,
plugins.Editable,
plugins.EmailActions,
plugins.FileInput,
plugins.IndexedResults,
plugins.Label,
plugins.AuthForm,
plugins.NavButtons,
plugins.Templating,
plugins.Validation,
)
class CustomFormSubmission(*wfp.form_submission_classes):
pass
class CustomFormBuilder(*wfp.form_builder_classes):
pass
class CustomFormField(*wfp.form_field_classes):
pass
class CustomSubmissionListView(*wfp.submission_list_view_classes):
pass
class CustomFormPage(*wfp.form_page_classes):
pass
class CustomFormFieldsBlock(*wfp.form_block_classes):
pass
See the demo project for further understanding and up-to-date usage.
Installation
This package is published on pypi, so typically:
uv add 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wagtail_form_plugins-0.5.0.tar.gz.
File metadata
- Download URL: wagtail_form_plugins-0.5.0.tar.gz
- Upload date:
- Size: 44.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84d7e9bc83a5a48debaac76624cd05cf9e1825d569a7ee85db74f966e2ab2e91
|
|
| MD5 |
42fac7f2c8db10ecef4f8e512d87e9ce
|
|
| BLAKE2b-256 |
a0d805798f3526ceabcd6ce5c04f4d536dd218caa176b6b07c1d346eab1b60d6
|
File details
Details for the file wagtail_form_plugins-0.5.0-py3-none-any.whl.
File metadata
- Download URL: wagtail_form_plugins-0.5.0-py3-none-any.whl
- Upload date:
- Size: 81.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c34cba5f53bccce710547c87388a5009a8618353636804e4042b3971ddc940d
|
|
| MD5 |
112ae5a75ba35941e360f3f5a9530d91
|
|
| BLAKE2b-256 |
bdfd8b8996b8b6d4f606fb5723651655055db28a3d4c65006e54418a23620e80
|