Forms 2.0 - How To
caution
This page is preliminary and subject to change as Forms 2.0 continues to be developed.
The How To section walks through common Forms 2.0 use cases end to end - rather than describing a single screen or setting, each guide here is organized around a goal, pulling together whatever fields, settings, and Form Builder screens are needed to accomplish it. For settings and field-by-field lookups, see Reference instead.
Guides in this section:
- Create my first form - add the module, open the Form Builder, add a few fields, save, and view it live.
- Validate user input - attach and configure Field Validators, including conditional validation.
- Populate a dropdown from a data source - pull a field's options from a static list, an Entity, a SQL query, or an external API.
- Let users add repeating entries - use a Repeater to collect multiple entries of the same group of fields.
- Localize a form - enable Localization, export/import translations, and preview other languages.
- Build a reactive form - show, hide, enable, or disable fields based on other fields' values.
- Add fields dynamically at runtime - use a Dynamic Container and the
Add Fieldactions to insert fields as the form runs. - Build a responsive, multi-column layout - arrange fields with Layout Containers and preview at different widths.
- Recover in-progress work with Autosave - enable Auto Save Drafts and clear drafts on successful submission.
- Migrate a classic form to Forms 2.0 - use the classic Form module's Migration Plan to bring an existing form into Forms 2.0.
- Build a multi-step form - split a form into steps or pages.