Conditionals with AND not working

By: Shawn Fawcett | Asked: 06/21/2022
ForumsCategory: General questionsConditionals with AND not working
Shawn Fawcett asked 2 years ago

Hello, I am having difficulty trying to find a conditional statement that will give me the following results. Any ideas?
When 108 is blank, the response should be yes.
When 108 is 0, the response should be yes.
When 108 is 1, the response should be no.
When 108 is 10 (or any other number. May contain hyphens such as 1-40), the response should be no. 

[if 108 not_equal="0" equals=""]yes [else]no[/if 108]

1 Answers
Bobby Clapp answered 2 years ago
Woudn't it be [if 108 equals="1"]No[else]Yes[/if 108]
Shawn Fawcett replied 2 years ago

1 is just an example. Sorry. It is actually a unique number. It could be 1, 5, 555, etc.

Bobby Clapp replied 2 years ago

That's a little harder to answer, but I'm guessing you might instead need to use a more advanced type of conditional statement like https://formidableforms.com/knowledgebase/compare-two-values-for-display/

Do you have some standard logic that can help define what is yes and what is no based on the potential dynamic number sequence you listed?

Shawn Fawcett replied 2 years ago

Basically 108 is an ownerID. It starts off as blank. If someone claims it, their userID is filled in. If they no longer need it the field 108 goes to 0.
There only need to be 2 states. Available (empty or 0) or unavailable (with the userID).

Bobby Clapp replied 2 years ago

userID as in a formidable user ID field value or the standard wordpress user ID (numerical)?

Shawn Fawcett replied 2 years ago

standard formidable: text

Bobby Clapp replied 2 years ago

Is there shortcode that is capturing the userID value in this field when they submit?

Shawn Fawcett replied 2 years ago

It is in a conditional statement in a view

Bobby Clapp replied 2 years ago

Is it exactly as in the opening post and/or can you share a screenshot?

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