Howto show a menu button if a checkbox (formidable) is checked?

Hi team,

I am aware, that this question could be out of your scope and support. But may be you have an idea and can point me in a direction.

Basically I want to show a menu button (header builder) in a check box is checked. This check box is in a formidable form.
The first idea was to write a shortcode. I check the database if “check == true” and than … well, that’s the point where I stuck.
Any ideas? Can I set a variable or something like that and do ca conditional statement in Header Builder?

Thank you,
Michael

Hi Michael,

You need to do some custom PHP code that will check the shortcode specific parameter value and will return true or false based on that.

If you need more help on this, I would suggest you hire a developer who can assist you to do the customization or you can avail of our newly launched service called One, where we answer the questions beyond normal theme support.

Thanks

Thank you @tristup,

I have written a shortcode, which checks this. But how can I check the value with Header Builders condition?
So I set a variable(?) to “1” and how can I look up for this variable? What does a syntax look like in PRO’s condition?

thank you,
Michael

Hello Michael,

Thanks for writing to us.

In cae you want to set the condition, I would suggest you please have a look at our doc to learn more about how to set conditions using operators.

Thanks

To be honest: I know this two pages and they are to basic to help me.

I did my homework:

add_shortcode(‘gdpr’, ‘gdpr_funct’);
function gdpr_funct($atts) {
global $wp_query;
$wp_query->set( ‘gdpr’, 1 );
//get_template_part(‘my-form-template’);
//echo “active
”;
//var_dump($wp_query->query_vars);
}

var_dump($wp_query->query_vars); shows me my variable string(4) "DESC" ["gdpr"]=> int(1)
But if I set up the condition

{{dc:query:query_var key=“gdpr”}} [is] 1

The condition seams to be "false "and I don’t see my content.

I would be really appreciate any help.
Thank you,
Michael

Hello Michael,

To set the condition you need a dynamic content code, I would suggest you please create a custom dynamic content code. Please have a look at this thread for reference to learn about how to create custom dynamic content code.

Now depending upon your dynamic code output you need to select a condition for example Number or String and then enter the dynamic content code in the Number/String field and select the operator.

Test-Page-Builder-Pro (48)

Hope it helps
Thanks for understanding

@prakash_s:

Great! That’s the information I was looking for.
Thank you so much. I really appreciate this :slight_smile:

Best,
Michael

Hi Michael,

Glad that we are able to help you.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.