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.tar.gz (5.1 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for django-formsetfield-0.1.tar.gz
Algorithm Hash digest
SHA256 1d7ad1f7fcfcfd988f4403b6ac8940cda02853d184b0aae3076d078fa1ba01db
MD5 88cc4b387bd445e5d8ed4fa665e2cad5
BLAKE2b-256 425cf55ee89fc96ae4ccfc0d9779d6bdfedf4ac533ef03c7801bb606b2b1c5d8

See more details on using hashes here.

Supported by

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