Adding post submission confirmation page to the export functionality

Does anyone in the Gravity Forms world know how to solve this challenge?

I need to pass the post submission confirmation page status to a custom field in the Gravity Forms export functionality.

To explain further… my form contains 4 different page confirmations that are triggered by conditional logic. I need the result of the form submission (the page URL that loads after the user submits the form) to be added to the export tool so we can see whether the submission is successful or unsuccessful.

So, as I see it, there are two parts to the problem:

  1. Am I able to capture the result of the page (can be URL, page name etc) that the user sees post submission?
  2. Is it possible to then add that result to a new column within the export to determine whether the submission was either successful or unsuccessful?

Any help would be warmly received.

Gravity Forms Entry export feature will only export data saved into the entry.

As you’re using conditional logic to determine which confirmation to use, you should have the value for the field(s) used for your logic available for the export.

If that’s not enough for you use case, assuming that you’re redirecting the user to pages of your own site, here’s one thing that you could do:

  1. Add a Hidden field to your form to store the URL (or any other property of your thank you page).

  2. Using the gform_after_submission hook, you can run your own custom function to get the URL of the page and save it to the Hidden field using GFAPI::update_entry_field.

Doing the above, you could easily include the Hidden field that contains your page URL in the entry export.

Thanks Samuel. Will give that a go and see if it solves the problem.

I’ll leave the topic open for now just in case something doesn’t work, in the meantime, great insight and greatly appreciated.

1 Like

Hey Samuel,

Looked into this but it won’t work. The issue is that I won’t know which page it will be redirected to until the submission is completed. And the conditional logic is quite complex. There are over 30 different types of conditional logic that will direct users to one of four different pages.

Any ideas here?

Assuming there is “something” in query string, page template, hidden html, etc. in the 4 different pages that allow you to identify both which page it is as well as the entry ID that led there, the approach Samuel suggested of GFAPI::update_entry_field to populate back into the entry should be possible to use inside any other WP page action. Perhaps using wp_footer? You’d need a little logic to ensure it is a confirmation page scenario first, then updating the field (which could be administrative for visibility instead of hidden).

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