[ad_1]
Hi, could anyone tell me what is the simplest way to display a text field based on more complex conditional logic? I can easily do it based on one variable, for example a selection from a dropdown by using ‘If selected show fieldname7’. However, I have messages which I need to display depending on more complex logic than that. For example
(function(){
if (fieldname4 == “Bay Window bus” && (fieldname6 == “1968” || fieldname6 == “1969” || fieldname6 == “1970” || fieldname6 == “1971”)) some code to make a text field appear;
})()
I am not sure whether there is a feature built in to do this, which I have not found, or whether it should somehow be done by
I am using this for data validation – to prevent users entering invalid combinations from multiple dropdowns.
I believe a message can probably be inserted based on conditional logic by inserting HTML somehow, but controlling the display of a text field suits my requirement better. Some of the messages I would like to display are quite long (they explain to the user why what they have selected is invalid), so I would ideally like to use the conditional logic to display whether a text field displays or not because of how they can be made to appear a 2 lines with scroll arrows, to a long message doesn’t take up lots of space.
I have searched this forum, and scrolled through 35 pages of it, but not found anything directly relevant. Thank you.
