OR condition on View

By: Douglas Potter | Asked: 09/26/2024
ForumsCategory: General questionsOR condition on View
Douglas PotterDouglas Potter asked 3 weeks ago
I want to add a section on a view where    if x = YES or  y= YES  or z =Yes then display  "Requires additional info"     its the OR Condition on not sure how to use.     
1 Answers
Rob LeVineRob LeVine answered 3 weeks ago
There may be an easier way, however, I've always handled it with frm-condition and a custom shortcode. You can pass x,y, and z to the shortcode and return a single value and use that single value to decide if you show the text. You can use this example as a starting point. You frm-condition command would look something like [frm-condition source=need_additional_info equals="Y" x= y= z=]Need additional info[/frm-condition]
Douglas PotterDouglas Potter replied 3 weeks ago

thank you for your response, however iim not really following.

This is what Im doing now, but all I get is a bunch of Yes's - I want if any of them are yes, to just show 1 YES.

Require Additional Info:   [if 1500 equals="YES"]YES[/if 1500][if 1512 equals="YES"]YES[/if 1512][if 1513 equals="YES"]YES[/if 1513][if 1514 equals="YES"]YES[/if 1514][if 1515 equals="YES"]YES[/if 1515][if 1516 equals="YES"]YES[/if 1516][if 1517 equals="YES"]YES[/if 1517][if 1518 equals="YES"]YES[/if 1518][if 1519 equals="YES"]YES[/if 1519][if 1524 equals="YES"]YES[/if 1524][if 1528 equals="YES"]YES[/if 1528][if 1529 equals="YES"]YES[/if 1529][if 1530 equals="YES"]YES[/if 1530][if 1538 equals="YES"]YES[/if 1538][if 1539 equals="YES"]YES[/if 1539][if 1540 equals="YES"]YES[/if 1540][if 1544 equals="YES"]YES[/if 1544][if 1545 equals="YES"]YES[/if 1545][if 1547 equals="YES"]YES[/if 1547][if 1550 equals="YES"]YES[/if 1550]

Rob LeVineRob LeVine replied 3 weeks ago

The theme of my answer still stands, though with so many values, I'd change the shortcode to [myshortcode values="[1500],[1512],[1513]...etc."], return YES or NO from the shortcode PHP program and skip the frm-condition. If, at this point, you don't follow me, I suggest hiring a developer to handle the project. Alternatively, you can a) wait for someone else to give another, less custom answer OR b) contact Formidable support with your question

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right