Skip to main content

Wagtail forms in a streamfield

Project description

CircleCI Codecov

Allows you to build forms in the CMS admin area and add them to any StreamField in your site. You can add your own fields along with the vast array of default fields which include the likes of file fields. Form submissions are controlled by hooks that you can add that process the forms cleaned data. Templates can be created which will then appear as choices when you build your form, allowing you to display and submit a form however you want.

Backwards Compatibility

Please note that due to this package being virtually re-written for version 3, you cannot upgrade any existing older version of this package to version 3 and onwards. If you have an existing version installed less than 3 then you will need to completely remove it including tables and any migrations that were applied in the databases django_migrations table.

Older versions:

If you are using a version of wagtail 1.x, then the latest compatible version of this package is 1.6.3:

$ pip install wagtailstreamforms<2

Other wise you must install a version of this package from 2 onwards:

$ pip install wagtailstreamforms>=2

What else is included?

  • Each form is built using a StreamField.

  • Customise things like success and error messages, post submit redirects and more.

  • Forms are processed via a before_page_serve hook. Meaning there is no fuss like remembering to include a page mixin.

  • The hook can easily be disabled to provide the ability to create your own.

  • Form submissions are controlled via hooks meaning you can easily create things like emailing the submission which you can turn on and off on each form.

  • Fields can easily be added to the form from your own code such as Recaptcha or a Regex Field.

  • The default set of fields can easily be replaced to add things like widget attributes.

  • You can define a model that will allow you to save additional settings for each form.

  • Form submissions are also listed by their form which you can filter by date and are ordered by newest first.

  • Files can also be submitted to the forms that are shown with the form submissions.

  • A form and its fields can easily be copied to a new form.

  • There is a template tag that can be used to render a form, in case you want it to appear outside a StreamField.

Documentation

Can be found on readthedocs.

Screenshots

http://wagtailstreamforms.readthedocs.io/en/latest/_images/screen_1.png

Example Front End

http://wagtailstreamforms.readthedocs.io/en/latest/_images/screen_3.png

Form Fields Selection

Example site with docker

Clone the repo

$ git clone https://github.com/labd/wagtailstreamforms.git

Run the docker container

$ cd wagtailstreamforms
$ docker-compose up

Create yourself a superuser

$ docker-compose exec app bash
$ python manage.py createsuperuser

Go to http://127.0.0.1:8000

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

wagtailstreamforms-3.15.tar.gz (35.0 kB view details)

Uploaded Source

Built Distribution

wagtailstreamforms-3.15-py3-none-any.whl (51.5 kB view details)

Uploaded Python 3

File details

Details for the file wagtailstreamforms-3.15.tar.gz.

File metadata

  • Download URL: wagtailstreamforms-3.15.tar.gz
  • Upload date:
  • Size: 35.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for wagtailstreamforms-3.15.tar.gz
Algorithm Hash digest
SHA256 0c37117ccf43aecb19132fbc760b3b85b966cd5beef552edac64e49b6f22737c
MD5 fc3c287452c8728e18e0c0ca93e824c1
BLAKE2b-256 716c226f6701404dde85efbe88c6b5264c08851c7c10b1b5e498b1af1757faa7

See more details on using hashes here.

File details

Details for the file wagtailstreamforms-3.15-py3-none-any.whl.

File metadata

  • Download URL: wagtailstreamforms-3.15-py3-none-any.whl
  • Upload date:
  • Size: 51.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for wagtailstreamforms-3.15-py3-none-any.whl
Algorithm Hash digest
SHA256 e158e489a4ed6f44bee23a1f4f8dbfe52ee9146d446d6161d817f4acf4b59a21
MD5 c7a399e96adca3c5c74f6183875f77ec
BLAKE2b-256 17ba55f7cee86a89a4690f20594857bdfecef666630cf670f3940c34fd2079aa

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