Nesting Condition frm-condition in Views doesn't seem to work

By: Daveed Flexer | Asked: 12/19/2022
ForumsCategory: Code HelpNesting Condition frm-condition in Views doesn't seem to work
Daveed Flexer asked 1 year ago

I need to have conditions nested in a view eg

[frm-condition ......]
[frm-condition ......] Yes to both [/frm-condition]
[/frm-condition]

This doesn't work. Is there another to have nested frm-condition?

1 Answers
Victor Font answered 1 year ago
There's nothing in the Knowledgebase about nesting this shortcode. It's used for comparing two values only. https://formidableforms.com/knowledgebase/compare-two-values-for-display/. If you need something more complex, you should write your own shortcode.
Daveed Flexer replied 1 year ago

Thank you Victor. In case this helps someone I ended up with a combination of named param and a a simple [if]
It might be easier to create a shortcode, but for now this works.
====
[frm-condition source=param param=actual_number equals=0]
[if 26 like="Yes"]
/// Display
[/if 26]
[/frm-condition]
===

Chris Titus replied 6 months ago

Does this still work for you? I am seeing errors. My [if] statements are displayed on the page.

Daveed Flexer replied 6 months ago

<p><p>Hey @bookclubreading I did this so long ago, but it did end up making it work but I think there was more to just this part. And custom parameters were certainly the answer. I made a bunch of these.</p><pre>Start your code here[frm-condition source=param param=monetary_difference equals=0] [if 27 22="Plaintiff" like="Yes"] [frm-math]([frm-stats id=24 type=total 25="[25]" 22="Defendant"] - [frm-stats id=24 type=total 25="[25]" 22="Plaintiff"])[/frm-math] [/if 27] [/frm-condition]</pre><pre>Start your code here</pre><p>I'll try to look at the rest of the code as soon as I can and see what I can (re)learn.</p></p><p>Not sure why the formatting is messed up</p>

Chris Titus replied 6 months ago

Hi Daveed - Thanks for your response. Unfortunately, it didn't work for me. I need another frm-condition statement to count instances of a field value in another form

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