0

Is there a way to put Gravity Forms merge tags in template.php files or other sections of the website? A plugin maybe? I need to retrieve a field value from one of my Gravity Forms and use it in the post that is created with the form.

I'm having a hard time figuring out how to actually retrieve the data submitted from the Gravity Form and using it in other places on my site. I'm hoping this is possible as it seems like it would be a very basic feature of the Gravity Forms plugin.

1

The ability to use Gravity Forms' merge tags in your post content might be helpful to you here:

http://gravitywiz.com/gravity-forms-post-content-merge-tags/

If you need more specific control, you can fetch an entry like so:

$entry = GFAPI::get_entry( $entry_id );

And echo out a specific field's value from that entry like so:

echo $entry[1]; // replace "1" with your desired field ID
  • Do I put the latter code into my functions.php or right into the content template file? – user304165 Nov 3 '15 at 1:09
  • You would put it in your template file. You'll need to know the entry ID you want to fetch. – David Nov 3 '15 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.