Hi @mom4i911024
Thanks for response!
You’re right that if your fields are and need to be “scattered” around different pages, the “grouping” solution may not work here because that would require changing the order of the fields (I can see that fields in single page have two or three sets of visiblity conditions).
But I was thinking about how we could simplify that without changing the “flow” and I came up with another idea that seems to do the trick on my end. Take a look please:
https://app.screencast.com/E9FMVVlyXvgeo
This looks rather fast. I’m not sure if it would be the same on your end as there’s always possibility that additional factors are involved (like other plugins on site, overall server load etc) but it is much faster than the original form.
What I did here was:
1. as you said you mostly have same visibility rules set for fields, based on the same “radio-1” field so I looked into that and I noticed that:
a) you indeed have radio fields on each page that have exactly the same rules set, based on the same “radio-1” field
b) and on some pages there are additional fields (like e.g “(Motorgr??e 1800)”) that have rules based on the same “radio-1” field but slightly different set.
2. So I have left those 1b field unchanged with rules as they are, but I made change for the resto of the fields.
– first, I enabled “calculations” option in Settings of the “radio-1” field
– then for each option that are used in one set of visibility rules (so options 1,2,3,4,6,9,11,14) I set calculation value to 1
– and for each option used in second set of visibility rules (so options 5,7,8,10,12,13,15,16) I set calculation value to 2
– then added additional calculation (calculation-2) field to the form and moved it right below radio-1 on first page
– in this calculation field I set formula to be simply {radio-1} and enabled “Hidden” checkbox in “Settings” of that field
– so at this point the calculation=2 field value will always be either 1 or 2 and nothing else, depending on.. what’s selected in radio-1
– and then I’ve set just a single visibility condition for each of the fields 1a – to show it if “calculation-2 is 1” or if “calculation-2 is 2” – depending on the field.
I’m not sure it this is clearly explained but I hope you got the idea. Basically, what we are doing here we are actually grouping but not fields – we are kind of grouping visibility conditions. Ultimately, there’s way way less conditions to check and less data to check. Because
– instead of checking each time which one of the 16 values of “radio-1” is set
– and each time checking if it matches one of 8 rules for one field and one of 8 other rules for another field
now it simply takes already set value of calculation and process a single simple rule for each of those fields.
It seems to be making difference on my end.
I’ve shared modified form for you here
https://pastebin.com/YJQyLRG0
so you could import it to your site (as a copy), test and if it works -review settings to understand how it’s configured. If it helps, then you would want to modify your original form that way too (note: I may have made some mistakes in rules but the general idea is the same).
Best regards,
Adam