Site Building

6.8. Concept: Forms and Widgets for Drupal 8, 9, 10, and 11

What are forms and widgets?

The content management system software that your site is running allows administrators to edit content and configure settings online, using various web forms. In particular, content editing forms are used to edit your site’s content entities, and they are configurable by administrators; settings configuration forms are provided by modules and cannot themselves be configured.

The data in your site’s content entities is stored in one or more fields that are attached to the entity type and/or subtype. When you configure the content editing form for each entity subtype, you can:

  • Select a widget for each field. A widget defines the method used to enter the data for the field. For example, a taxonomy term can be chosen using an autocomplete field, a select list, or a tags-style field that lets editors add new tags automatically.
  • Configure widget settings. For example, you can choose the size of a plain-text entry field.
  • Hide one or more fields from the editing form.
  • Reorder the fields.

In principle, you can also have multiple content editing forms available for each entity subtype. This feature is rarely used, however; the only exception in common use is for the user profile fields: you can use different forms for user registration and user editing. For example, you might have a limited set of fields shown when users first register on the site, and more fields shown later on when they edit their profiles.

Drupal User Guide