Using Display Rules in Web Form...
I'm working on a form with show/hide fields that use the "Using Display Rule". Displaying some of the fields is dependent on 3 possible scenarios. When I have two the rule works as it should but when I add a third "or" scenario the rule no longer works correctly and only one of the scenarios will cause the hidden field to show.
From what I can tell this is the code in the validation_data.js file that is controlling the field that I want to show:
"item85":{"set":{"operator":"and","rule1":{"set":{"operator":"and","rule1":{"set":{"operator":"and","rule1":{"set":{"operator":"or","rule1":{"set":{"operator":"and","rule1":{"set":{"operator":"and","rule1":{"set":{"operator":"and","rule1":{"set":{"operator":"or","rule1":{"set":{"operator":"and","rule1":{"set":{"operator":"and","rule1":{"set":{"operator":"and","rule1":{"element":{"name":"InvoiceCountry","operator":"is","value":"United States"}},"rule2":{"element":{"name":"DBInfoButton","operator":"is","value":"Yes"}}}},"rule2":{"element":{"name":"DBCountry","operator":"is","value":"United States"}}}},"rule2":{"element":{"name":"InternetDownload","operator":"is","value":"No"}}}},"rule2":{"element":{"name":"InvoiceCountry","operator":"is_not","value":"United States"}}}},"rule2":{"element":{"name":"DBInfoButton","operator":"is","value":"Yes"}}}},"rule2":{"element":{"name":"DBCountry","operator":"is","value":"United States"}}}},"rule2":{"element":{"name":"InternetDownload","operator":"is","value":"No"}}}},"rule2":{"element":{"name":"InvoiceCountry","operator":"is","value":"United States"}}}},"rule2":{"element":{"name":"DBInfoButton","operator":"is","value":"No"}}}},"rule2":{"element":{"name":"DBCountry","operator":"is","value":""}}}},"rule2":{"element":{"name":"InternetDownload","operator":"is","value":"No"}}}}}}'
Here is the URL of the form that is in development, http://www.universalavionics.com/_navda … fault.html
From what I can tell this is the code in the validation_data.js file that is controlling the field that I want to show:
"item85":{"set":{"operator":"and","rule1":{"set":{"operator":"and","rule1":{"set":{"operator":"and","rule1":{"set":{"operator":"or","rule1":{"set":{"operator":"and","rule1":{"set":{"operator":"and","rule1":{"set":{"operator":"and","rule1":{"set":{"operator":"or","rule1":{"set":{"operator":"and","rule1":{"set":{"operator":"and","rule1":{"set":{"operator":"and","rule1":{"element":{"name":"InvoiceCountry","operator":"is","value":"United States"}},"rule2":{"element":{"name":"DBInfoButton","operator":"is","value":"Yes"}}}},"rule2":{"element":{"name":"DBCountry","operator":"is","value":"United States"}}}},"rule2":{"element":{"name":"InternetDownload","operator":"is","value":"No"}}}},"rule2":{"element":{"name":"InvoiceCountry","operator":"is_not","value":"United States"}}}},"rule2":{"element":{"name":"DBInfoButton","operator":"is","value":"Yes"}}}},"rule2":{"element":{"name":"DBCountry","operator":"is","value":"United States"}}}},"rule2":{"element":{"name":"InternetDownload","operator":"is","value":"No"}}}},"rule2":{"element":{"name":"InvoiceCountry","operator":"is","value":"United States"}}}},"rule2":{"element":{"name":"DBInfoButton","operator":"is","value":"No"}}}},"rule2":{"element":{"name":"DBCountry","operator":"is","value":""}}}},"rule2":{"element":{"name":"InternetDownload","operator":"is","value":"No"}}}}}}'
Here is the URL of the form that is in development, http://www.universalavionics.com/_navda … fault.html
Read this post. It should get you where you need to be.
http://www.coffeecup.com/forums/web-for … post229836
http://www.coffeecup.com/forums/web-for … post229836
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Thanks Eric. I can't find a way to reformat my and/or statements like the example in that post. I have 3 scenarios that determine whether a field is displayed. When they are tested individually each one works correctly. When paired using a single "or" statement they work correctly. However, when I put them all together it fails. Here's the code that I used, I added breaks here to make it easier to distinguish the individual scenarios.
( ( ( ( [InvoiceCountry] is "United States" ) and ( [DBInfoButton] is "No" ) ) and ( [DBCountry] is "" ) ) and ( [InternetDownload] is "No" ) )
or
( ( ( ( [InvoiceCountry] is "United States" ) and ( [DBInfoButton] is "Yes" ) ) and ( [DBCountry] is "United States" ) ) and ( [InternetDownload] is "No" ) )
or
( ( ( ( [InvoiceCountry] is_not "United States" ) and ( [DBInfoButton] is "Yes" ) ) and ( [DBCountry] is "United States" ) ) and ( [InternetDownload] is "No" ) )
( ( ( ( [InvoiceCountry] is "United States" ) and ( [DBInfoButton] is "No" ) ) and ( [DBCountry] is "" ) ) and ( [InternetDownload] is "No" ) )
or
( ( ( ( [InvoiceCountry] is "United States" ) and ( [DBInfoButton] is "Yes" ) ) and ( [DBCountry] is "United States" ) ) and ( [InternetDownload] is "No" ) )
or
( ( ( ( [InvoiceCountry] is_not "United States" ) and ( [DBInfoButton] is "Yes" ) ) and ( [DBCountry] is "United States" ) ) and ( [InternetDownload] is "No" ) )
A few users are having issues with the OR statement. The or statement doesn't seem to work past two condition because of how it gets nested. You can't hand code any of the conditions. You can only use the conditional tool and let it set the brackets and nesting for you.

I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Yeah, I saw another post about it.
CC is telling me that it should work and that there is no limit to the OR statements. I'll work on it for a little longer but I don't have much hope because the response from my support ticket was basically suggesting that I should re-work my form.
CC is telling me that it should work and that there is no limit to the OR statements. I'll work on it for a little longer but I don't have much hope because the response from my support ticket was basically suggesting that I should re-work my form.
I don't think it's the OR statement but the mixture of the OR & AND.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.