Hide a dropdown field using shortcodes

Hello there,

I started using Gravity Forms and learned about how their shortcodes work. Now I have a use case in which I need to hide (or show) a dropdown field depending on the page the user lands on. My question is: Is it possible to hide/show a dropdown field using shortcodes or the only option is to use the “Hidden” radio in the form’s settings?

Thank you so much for any guidance on this.

To hide/show fields you need to use conditional logic: Enabling Conditional Logic For A Field - Gravity Forms Documentation

For the use case described, what you can do is to add a Hidden field to your form and use the embed post merge tag as Default Value of this hidden field: {embed_post} Merge Tag - Gravity Forms Documentation

From the options available I would recommend you to use {embed_post:ID} as it’s that will never change, ensure you wouldn’t break your logic rules if you use any other (like page title).

Doing this, you would be able to use your Hidden field to configure the conditional logic for your drop down.

Hey Samuel,

Thank you so much for your quick response. I will try a solution using the embed post merge strategy you are suggesting. I really appreciate your help!

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