Sparkling purple text that says “FORMDAZZLE!”

Drupal form theming with less pain

Theming drupal forms can be difficult and time-consuming. This module provides a set of utilities that make form theming easier.

Currently, this module provides theme suggestions for forms that are much more useful than those provided by Drupal core.

  • Theme suggestions for all form elements (including buttons)
  • Theme suggestions for all form element labels
  • All theme suggestions include the form ID and the form element name; e.g. [element-type]--[form-id]--[form-element-name].html.twig
  • New in 2.1.0! Twig debugging comments have been added to all forms for the hidden [form-id].html.twig template.

While Drupal core only provided these two theme suggestions:

input.html.twig
input--textfield.html.twig

Formdazzle adds the following two theme suggestions to the list:

input--textfield--webform-contact.html.twig
input--textfield--webform-contact--first-name.html.twig

There are too many features to describe here, so we've created a Formdazzle documentation guide to describe how to use all of its features.

Supporting organizations: 
Sponsoring co-maintainer + maintenance - smustgrave

Project information

Releases