Currently the only way to select which forms will be compacted is by css-id. I'd like to make it possible to disable this on a per form basis.

My motivation is that I have a form that shows in two places: a sidebar block and a whole page. When it's in the sidebar I want compact forms enabled, but when it's on the whole page I don't. I could solve this by creating two forms and building the array of fields in a separate function, but that feels weird.

Comments

greggles’s picture

Status: Active » Needs review
StatusFileSize
new1.53 KB

And here's a patch to provide this.

There's something weird about my patch and Tom's name in the README.txt - sorry for that.

greggles’s picture

StatusFileSize
new1.87 KB

The previous patch was missing one last cleanup from #state to #disabled.

Also patched against head now.

sun’s picture

Status: Needs review » Fixed
StatusFileSize
new1.73 KB
+++ README.txt	12 Jul 2010 21:25:29 -0000
@@ -35,6 +35,13 @@ To submit bug reports and feature sugges
+    $form['compact_forms_state']['#disable'] = TRUE;

Why so complicated an not simply #compact_forms?

Thanks for reporting, reviewing, and testing! Committed attached patch to all branches.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.