Conditional logic bases on page id [RESOLVED]

I’d like to show a field on my form only on a specific page. The conditional logic based on the page only seems to work with the page title as value. This might change over time, so I’d rather use the page id. Is there a way to do that?

You might want to check out the {embed_post:ID} merge tag

Essentially, you would need two forms. In the first form, you would add the embed post id merge tag inside the form in a hidden field. You would also add one HTML field which should have the second form’s shortcode added to it.

The second form would be the actual form you want users to complete.

You can then show or hide using conditional logic the HTML field which includes the second form based on the page id.

Note: you will want to disable the first forms submit button since your second forms submit button will be the actual one used.

Thanx for that trick Derek, might come in handy, but it hides/shows the entire form right? I only have 1 field in the form i’d like to show only on a page with a specific id.

Just use the merge tag and the modifier to get your page Id then use that field for your other field condition.

Of course, thanx.

1 Like