Help with shortcode for query string output

hey there,
bit of a newbie question - my apologies.
i am successfully passing a query string to a thank you page & my intention is to output a message on the thank you page containing that string.
field data/query string: location={Location:5}
here’s an example of that query string/thank you page url: /youre-booked/?location=Millworks±+Addington
this (in a nutshell) is what i want to output (as text) on the thank you page:
You’re booked! Pack your laptop—see you at {Location:5}.
i’m happy with where to place the shortcode (code) - functions.php but need a bit of a pointer on the actual shortcode itself.
can anyone humour me?
thanks :slight_smile:
Jason

You can’t use Gravity Forms merge tags on a standalone confirmation page like that out of the box as it is outside of the submission flow, the merge tags won’t be replaced with the data.

If you’re already passing along the data via query string to the page like it sounds like you’re doing, you can use a plugin like the following to pull that data out of the query string and into your page content: URL Params – WordPress plugin | WordPress.org

For something more Gravity Forms specific there is also Gravity Wiz’s Post Content Merge Tags perk: Gravity Forms Post Content Merge Tags - Gravity Wiz

Thanks for that Karl, I’ll check out that plug-in. I was aware of the Gravity Wiz option, but felt the cost didn’t justify (what I thought) would be a few lines of code.
I’ll investigate that plug-in tomorrow & report back if I get a successful solution.

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