Active
Project:
Compact Forms
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Aug 2011 at 09:09 UTC
Updated:
3 Aug 2011 at 09:43 UTC
Compact Forms reacts to a $form['#compact_forms'] = FALSE; allowing you to disable compact forms from with a module's hook_form_alter. I would like to be able to do this from within the theme layer, in mytheme_preprocess_form().
However, mytheme_preprocess_form() gets called after compact_forms_form_alter(), and so setting #compact_forms to FALSE there has no effect.
Comments
Comment #1
mrfelton commentedIn fact, according to #591794: Allow themes to alter forms and page themes can now implement hook_form_alter too. However, this doesn't always work when trying to disable compact forms, since there is no guarantee that my hook_form_alter will run before compact_form's.
Perhaps compact forms should set itself a high module weight, to increase the likelihood of being called after other modules / themes hook_form_alter implementations?
Comment #2
mrfelton commentedActually, theme implementations of hook_form_alter always run after modules, so adjusting the weight would make no difference.