Following up on #1215456: Multiple and same-page conditional rules although there is nothing directly related in the thread.

A suggestion to improve the usability is to group targets into a multiple select list, so if 4 or 5 targets all components related to the same condition, so these can be selected in bulk. In my case I have around 30 elements off a single question - "If no skip the next 5 pages", so there are around 30 conditional actions all based off this one condition.

This could be implemented completely on the form itself, grouping identical conditionals together and changing the target to #multiple and then pulling these into individual components again on submit. Or without looking at the code / schema, to make the condition reaction relationship 1 - n, but I guess that would be a lot more work, although it would make things more extendable latter (ie. Group different reactions off one conditional: hide these ones, make these ones required, etc).

Other than this, this feature appears to be working very nicely, so a big big thanks on everyone involved!

Files: 

Comments

Sweet, no more need for select or other either! This is awesome!

"If no skip the next 5 pages", so there are around 30 conditional actions all based off this one condition.

This doesn't entirely solve the original request, but it could make life easier for you: You could select the page breaks to be the target of the conditional instead of the fields, so you would only need 5 conditions instead of 30.

Thanks, this works a treat! Maybe the page break hint could be added as some help text in the admin UI

- Conditionals may be used to hide or show certain components (or entire pages!) based on the value of other components.

+ Conditionals may be used to hide or show certain components (or entire pages by targeting page breaks) based on the value of other components.

or

+ Conditionals may be used to hide or show certain components / pages based on the value of other components. Hide pages by targeting the page break of the page you want to hide.

Leaving open in case someone wants to investigate more with original issue, but happy if this is closed as a won't fix / works as designed.

StatusFileSize
new31.56 KB
new24.72 KB
new15.57 KB
new23.68 KB
new14.93 KB

A little followup to Alan's post (which had some great feature requests).

The way the conditionals work now, you can add a second requirement for the action to take place:

Clicking the "+" gives you:

Would it be possible to add a second set of "-/+"-buttons to a conditional to also add an extra action?

Perhaps something like:

that would either result in

or

?

Yes, yes, yes! This is exactly what we need for Webform...

Title:Conditional UI enhancementMultiple target components for each conditional
Priority:Minor» Normal

Hi guys, yes of course "it's possible" but it's a matter of implementation difficulty. Right now we have a many-to-one relationship between conditionals and actions, and this would require a many-to-many relationship, meaning we'd need to add a 3rd table: webform_conditional, webform_conditional_rules, and (the new table) webform_conditional_targets.

I'm happy to look at patches for this feature, but I probably won't give it a priority for a while.

Thanks @MilOrg for the excellent screenshot demonstrating the desired functionality.

I really need this functionality. Right now I am trying to code an inspection form, so that the user can specify the number of individual locations that need inspection. Each location has the same things that need checked, but the number of locations can range from say 1-60. I need to be able to specify the number of fieldsets based on the number of locations indicated by the user. The only way I think that can work now is if I could add multiple conditions based on a single trigger, rather than the other way around. Or I could create 60 different pages, but that's cumbersome. Unless there's another way, I would love this to work.

Is there any news on this? I too could greatly benefit from this feature.