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.
It would be really useful if the #compact_forms property on a form could be used to *enable* the behaviour of this module as well as preventing it.
Use case: I am changing a form in a custom hook_form_alter() anyway. Enabling compact forms programmatically here keeps all my changes to the form in one place, and in code rather than configuration.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1276652.compact_forms.programmatically-enable.patch | 721 bytes | joachim |
Comments
Comment #1
joachim CreditAttribution: joachim commentedHere is a quick patch which works for me but which I suspect doesn't handle complex cases where hook_forms() is involved and the $form_id value may not match the CSS id... :/