Form Builder ============ Form builder is a collection of tools built on top of Page Builder that help with the creation of HTML forms. .. form_builder does actually rely on Html existing. To enable Form Builder, add ``widgy.contrib.form_builder`` to your :django:setting:`INSTALLED_APPS`. .. currentmodule:: widgy.contrib.form_builder.models Installation ------------ Form builder depends on the following packages: * django-widgy[page_builder] * django-extensions * html2text * phonenumbers You can install them manually, or you can install them using the django-widgy package:: $ pip install django-widgy[page_builder,form_builder] Success Handlers ---------------- When a user submits a :class:`Form`, the :class:`Form` will loop through all of the success handler widgets to do the things that you would normally put in the ``form_valid`` method of a :class:`~django:django.views.generic.FormView`, for example. Form Builder provides a couple of built-in success handlers that do things like saving the data, sending emails, or submitting to Salesforce. Widgets ------- .. class:: Form This widget corresponds to the HTML ``
`` tag. It acts as a container and also can be used to construct a Django Form class. .. method:: build_form_class(self) Returns a Django Form class based on the FormField widgets inside the form. .. class:: Uncaptcha .. class:: FormField :class:`FormField` is an abstract base class for the following widgets. Each :class:`FormField` has the following fields which correspond to the same attributes on :class:`django:django.forms.fields.Field`. .. attribute:: label Corresponds with the HTML ``