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.

Comments

joachim’s picture

Status: Active » Needs review
StatusFileSize
new721 bytes

Here 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... :/