It would be nice to have a validation rule that provided:

IF
(field componet A value is filled, selected, etc.)
AND
(field component B value is not already required)
THEN
(field component B value is required)

Comments

Liam Morland’s picture

You could use the conditionals in Webform to do something like this. Component B could be hidden unless component A is filled. That wouldn't be exactly the same, since you might want component B to be optional when A is empty and mandatory when filled.

rshannon’s picture

Thanks for a good suggestion. In my current use case, field B doesn't need to be optional even if A is empty, so it is within the scope of your suggestion, in that it's not needed at all until A is filled. But ideally, the user should be able to see that field B may be required if they fill A. Ideally, for my current project the second field would be grayed out, i.e., semi-visible, until the first field is filled -- and then required -- but the original feature request above would do. The mysteries (and project requirements) of the perfect UI are never ending. ;-)

Liam Morland’s picture

That could be a feature request for Webform: In addition to be able to hide items, the conditionals system could conditionally disable them.

Liam Morland’s picture

Category: Feature request » Support request
Status: Active » Fixed

The request can be met with Webform conditionals.

Status: Fixed » Closed (fixed)

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