If Conditional Logic

By: Peter S | Asked: 03/05/2023
ForumsCategory: Code HelpIf Conditional Logic
Peter S asked 2 years ago

Hi,

I am trying to create a shortcode in my view detail page.

I want it to hide content if:
Current User, Form 1 and contains any entry in form 1 with the value "true".

Does anyone know how to do this?

Thanks!

Michael ClarkMichael Clark replied 2 years ago

If you're using a page builder that supports conditional logic and shortcodes, you could create your view and specify in the conditional logic area to show the content based on the value "true".

Maybe just make a view that filters all fields for "true", and use that view's shortcode in a conditional logic thing on the page.

Another route could be to use Loops and Logic. It's *really* powerful and could serve if you're not using a page builder that supports conditionals and shortcodes.

https://loopsandlogic.com/

Also, maybe Formidable's Nested View functionality would help:

https://formidableforms.com/knowledgebase/advanced-view-concepts/

1 Answers
Rob LeVineRob LeVine answered 2 years ago

One way I've used a lot is frm-condition and have the "source" be a custom shortcode. As long as you can write PHP code, it's pretty easy.

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