Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Formdazzle figures out a lot of things, form element names, form element types and form IDs, and uses those to create theme suggestions. Sometimes it can't figure anything but the form ID. It would be nice if formdazzle adds hidden data to those form elements so that other hooks can add better suggestions.
Proposed resolution
We are already doing this so that a preprocess function can add suggestions for form_element_label. So we just need to extend this code.
API changes
Additional form elements will have a #formdazzle
property set that contains suggestion_suffix
, form_id
, and form_element_name
.
Comment | File | Size | Author |
---|---|---|---|
#2 | 3082554-1.patch | 2.79 KB | JohnAlbin |
Comments
Comment #2
JohnAlbinComment #4
JohnAlbin