As of now, the "hidden fieldsets" feature is implemented in template_preprocess_node_form() by setting the #access key to TRUE.
This works for hiding the fieldsets but it has the side-effect of empty values for all hidden fields since the form was built earlier and Drupal did not know at the time to use the default field values.

This is extremely annoying is when the publication or author options are hidden as the saved node will always be unpublished and written by an unknown author.

To fix this I set the #access key in a hook_form_alter() implementation instead. That way all the fields in the hidden fieldsets properly have their #access and #(default_)value keys set.

Thanks for an awesome module! It really helps my users focus on the features I want them to use and not be distracted by too many options.

CommentFileSizeAuthor
nodeformcols_hidden_default_values.patch1.61 KBtwod

Comments

swentel’s picture

Been bitten by this one too. Altering the access in form_alter makes sense and this patch fixes the bugs, so +1 from me.

Hugo Wetterberg’s picture

Assigned: Unassigned » Hugo Wetterberg
Priority: Normal » Critical

Thanks for the patch! I'll get this fixed as soon as possible, just got back from my vacation.

Hugo Wetterberg’s picture

Status: Needs review » Fixed

I've applied your patch: http://github.com/hugowetterberg/nodeformcols/commit/64f0c16ddd3474df4d8...
Will get it into cvs and create a release now.

Status: Fixed » Closed (fixed)

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