Normally on the form with "preview" option where a mandatory field is not filled out the warning appears (like: please fill out this field"). When the required filed(s) is/are in the fieldset that is not collapsed, warnings are presented but when the fieldset is collapsed and fields are not visible, there are no warnings about mandatory fields. Because the Preview button in such case does not work a user may do not understand why he/she cannot go further with the form preview.

Comments

vooveek created an issue. See original summary.

vooveek’s picture

Title: Collapsed fieldsets hides required fields warning when preview button is pressed » Collapsed fieldsets hide required fields warning when preview button is pressed
DanChadwick’s picture

Category: Bug report » Feature request
Issue tags: -collapsible fieldset, -Required Fields

I would consider it poor UI design to put a required element inside a collapsible fieldset for just this reason. It might be reasonable for Webform to expand fieldsets when there is a validation error, but this would be a feature, not a bug report. Webform acting according to the specifications you gave it, so I don't consider this a bug.

quicksketch’s picture

Yeah I could go either way on this being bug or feature. I think if implemented (either as a bug fix or feature), that we should expand collapsed fieldsets that contain required fields on validation as the default (and probably only) behavior. I agree putting required fields in collapsed fieldsets in the first place may be poor form design, but it's bound to happen.

44sunsets’s picture

I got stung by this recently -- I made some fields required inside a collapsed fieldset, and when you try to submit the form without filling in these fields, nothing happens at all. Very confusing for the user who is given no clues as to what's wrong.

I wrongly assumed that fields which are hidden/collapsed do not undergo validation (as is the case when required fields are conditionally hidden using Webform > Conditionals rules).

I'm going to work around this by setting up some Webform Conditionals rules to show/hide the fields, instead of collapsing the fieldset.