Skip to main content

Formsets inside forms

Project description

Django’s form wizard allows you to have only one form or one formset (since 1.4) per step. Using django-formfield you can have more forms per step. Using this app you can have more formsets per step.

Or maybe you will find other use cases for it :)

Installation

  1. Install django-formsetfield with pip:

    $ pip install django-formsetfield
  2. Add formsetfield to INSTALLED_APPS.

Usage example

from django import forms
from formsetfield.fields import FormSetField


class AdultForm(forms.Form):

    fullname = forms.CharField()
    passport = forms.CharField()


class ChildForm(forms.Form):

    fullname = forms.CharField()
    birth_certificate = forms.CharField()


class PassengersForm(forms.Form):

    adults = FormSetField(formset_factory(AdultForm))
    children = FormSetField(formset_factory(ChildForm))

Contributing

Feel free to fork, send pull requests or report bugs and issues on github.

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

django-formsetfield-0.1.1.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file django-formsetfield-0.1.1.tar.gz.

File metadata

File hashes

Hashes for django-formsetfield-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4115f32a466212e633c72d8c2b9f3b6f317c0b5d713e5b9ab235266d2f4773e2
MD5 5e7457816b537901e23582d23d372dd3
BLAKE2b-256 3b5dc83e324cee23d6716791bf63044466751b64ce619e9a7741cab97222fca3

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