Form API

Drupal's Form API (a superset of the Render API) provides a unified way for authoring HTML input forms and handling form validation and submission. Module authors should use the Form API for all forms and user-input processing. Theme developers may use the Form API to make UX changes to forms.

Introduction to Form API

Use Drupal's Form API to consistently and efficiently produce and process forms in a module.

ConfigFormBase with Simple Configuration API

This type of form is used to create forms for configuration pages on your Drupal website. You can set up configuration forms that allow you

ConfirmFormBase To Confirm an Action

Learn to use the ConfirmFormBase class to quickly implement a confirmation dialog.

Form Render Elements

HTML5 and other useful form render elements

Conditional Form Fields

Show or hide, enable, disable or require form fields based on values of other fields using the #states property of form render arrays.

Form API Workflow

What are the stages and workflow of the Form API

Guide maintainers

tunic's picture
amber himes matz's picture
lowfidelity's picture
mdmanouwer's picture
rthornton's picture