September 10, 2014: Fixed issue where init() was not a static function.
Stop! There's a better way.
This snippet is available as a plugin with Gravity Perks, a suite of over 47 premium Gravity Forms plugins!
Are you interested in adding a quick pre-submission confirmation page to your forms where users can preview their entered data before it is submitted? Gravity Forms does not provide any way to do this by default; however, with a bit of custom code and a few simple form configuration instructions, you’ll have pre-submission confirmations working like magic!
One of the big things missing from the our old Simple Pre-submission Confirmation Snippet was support for Gravity Form merge tags. With some recent changes to Gravity Forms, supporting this in HTML fields became a lot easier.
Let’s dig in!
Step 1: The Code
The following code can be copied and pasted into your theme’s functions.php file.
This code provides the ability to use Gravity Form merge tags in an HTML field on the final page of your form, allowing users to preview their data before submission. Since you can now use merge tags, there is no need for the old shortcode method from the previous version of this snippet.
Step 2: The Form
With the code in place, it’s time to configure the form. The first thing we’ll need to do is add a page at the end of the form for the pre-submission confirmation. You can do this using the Page Break field type.
Next add an HTML field from the “Standard Fields” section. I renamed my HTML field “Confirmation”. Your page should now look something like this:

Go ahead and select the HTML field for editing. The “Content” setting of this field now supports all merge tags like {Name (First):4}
, {Question:5}
, and even more advanced merge tags like {all_fields}
. How about that!
You can see exactly what this content generates by submitting the demo form here.
Summary
Let me know how this new code works out for you!
Did this resource help you do something awesome with Gravity Forms?
Then you'll absolutely love Gravity Perks; a suite of 47+ essential add-ons for Gravity Forms with support you can count on.
Hey this worked perfectly for me. Copy-paste into my functions.php and I was able to display all fields with {all_fields} on page 4 of my 6 page form.
Thanks!
Glad to help, Jasper. :)
Just tried this and it broke my site. Won’t even let me in to the admin dashboard now. Let me know if you can help
Hi Max, this will help: https://gravitywiz.com/documentation/snippet-troubleshooting/
Hi! I have a form with 8 pages, a large one. I have put Merge tags in a HTML field and in a DIV that is position:fixed; to the top right corner and hidden. I then use jQuery to slide this up and down when a link is clicked in the meny. This HTML field is on every page.
All this is working great BUT, the merge tags does not display anything on the first page even if I go to page two and then back to the first page. I have “Total Price”, “Tax”, “Discount” details as merge tags.
Another problem; when I am on a page and the total is $100, another product is chosen and the total becomes $150 on the Gravity Total field, but the Merge tags stays at the same number until next page. Can I get the marge tags to update at the same time s the total field?
Thank you for a great plugin! Fredrik
Hi Frederick, currently merge tags only update on page refresh (aka submitting from one page to the next). We have plans to add support for this to the plugin version. For now, you might consider this plugin.
This plugin is causing a 500 error with ajax-admin.php when using the partial entries option in gravity forms and an SSL certificate. It took me a while to troubleshoot it being your code. The URL of our form is https://iink.biz/endorsement, however I have removed your code because of the error.
Hi Ryan, we’re no longer making updates to this snippet to support new Gravity Forms features. This problem has been resolved in the plugin version of this snippet.
Hi David,
Thanks so much for this snippet (why isn’t this part of GFs core?!).
An issue I encountered —which seems to be present in the paid plugin demo— was with multi-select checkboxes. The input value is displayed in the preview instead of the friendly label value.
I can’t seem to track down the code used to send notifications in the core which sends the label value, any guidance would be most appreciated.
Regards, Jennifer
Hi Jennifer, we’re having a particularly busy period right now so we’ve having to limit our support to Gravity Perks customers. If you’re a Gravity Perks customer you can request support here.
Thanks for the reply. The company I work for is tiny, so we currently cannot make use of the Perks at a level that justifies buying.
I’ve since come up with a workaround/hack that solves the problem.
Cheers!
I’m using this Free Better Pre-Submission Confirmation plugin and it’s been working great. Recently when someone goes to the cart the bottom section has an overlay and the loading icon spins and spins…..goes nowhere. When I tested plugin conflicts, if I disable this plugin the cart works fine. If I enable it, it doesn’t anymore.
What can I do about this?
I know a better (?) supported version is included in Gravity Perks.
Will this take care of the problem?
If I do that, will the transition to using the paid plugin be seamless and work without modifications?
THANKS
Hi Mad Dog,
Upgrading to the perk-version is as simple as uninstalling the existing snippet and installing the Gravity Perks plugin + the GF Preview Submission perk. No additional configuration is required. If you find it still does not work, we’ll be happy to provide support via the support form.
Can the confirmation section be ajaxed?
Can you elaborate on what you mean?
I see in the screenshot that there is a page break. Can we use this without the page break so it’s all on one page? So the fields would automatically be populated. Including an image upload?
Not yet but if you’d like to commission this functionality, we’d love to discuss it. Get in touch.
Wow – thank you! I have a love/hate relationship with Gravity Forms and today I was definitely stuck on hate. Why wouldn’t this be a standard feature? Another indication that the developers do not use the product… In what real world scenario are you able to charge credit cards without a pre-submission checklist? Standard operating procedure for ordering a pizza even!
Your post saved the day. Much obliged!
Glad we help, Clay. :)
Hi David,
Could you please confirm that the plugin is working with the latest versions and is there support for me if I install it and have issues? Thanks
This was working, and since the last wordpress and plugin updates it isnt sending any data through after submitting. I can see preview but the data disappears on submit and i receive a blank form. Any ideas please? Thank you in anticipation.
Hi Tessa, this snippet is provided as is. We recommend the plugin version which is well supported. :)
https://gravitywiz.com/documentation/gp-preview-submission/
Hi David,
Could you please confirm that the plugin is working with the latest versions and is there support for me if I install it and have issues? Thanks
Yes and yes. :)
Worked! ’nuff said!
Glad we could help. :)
Make sure to check out the plugin-version of this too! It’s part of Gravity Perks which includes auto-updates right in your WordPress admin, insanely helpful support, and access to a suite of 25 (as of Jan 5, 2017; we keep adding more!) Gravity Forms add-ons.
Hello, I would like to know if you have as a user to download a pdf form before sending, because I can not make the user after filling some of his data in a form he can print and upload and then send! Thank you!
Hi Erick, I’m not sure I understand. Could you provide more details about what you’re trying to accomplish?
I have a form where the customer has 3 steps to complete a registration, the first step he will fill in his personal data, the second step I wanted to print in pdf in a pdf template I created the data he filled in the first step. .. I realized that I am generating the pdf for the client after it fully saves the form, but I want it to print in step 2 before saving the form … it’s possible? Thank you!
To better understand the form: http://www.vigilancia-to.com.br/testes/
It might be possible; however, this snippet does not handle any PDF generation. You might try asking the support teams at Gravity2PDF or GravityPDF.
Ok, tanks!
Okay so I’ve gotten the confirmation page to show up but don’t know how to display all the entries which the user has made. Specifically, in the HTML Block, I don’t know what to input so it displays my form.
By the way, I am doing this for my own business and setting it up entirely myself, I don’t know anything about coding etc and have been learning on the fly. I would really appreciate if you could help me out.
Kind Regards, Amir
Hi Amir, you would add an HTML field to your form and then include the desired field merge tags to the Content setting of that field. The snippet doesn’t automatically populate the merge tag button with all available merge tags; however, GP Preview Submission does. It’ll be easier to use if you’re new to WordPress, Gravity Forms or site management in general.
Hi there! I think this is the solution i’m looking for, but just curious. Do I still have to add the snippet to the functions.php file if I purchase and install the Gravity Perks plugin, or does the plugin do that automatically. Just want to confirm. Thanks!
Hi Che, you will not need this snippet once you have Gravity Perks and the GP Preview Submission perk installed. Plug and play. :)
Hi David,
I have licences version of gravity perks bought for http://petsure.pelloloans.com.au/quote/. I installed it and I want to display preview submission confirmation but only for few fields, not whole form. I added HTML block and selected few fields from content dropdown, it’s not showing anything. Only {all_fields} is working. Please guide me asap.
regards Kushal
I just tried, it’s working for normal fields but not for the fields under repeater block. Please tell me how to display those fields?
Hi Kushal, you can receive Gravity Perks support here: https://gravitywiz.com/support/
Pretty slick! Thank you.
Glad you like it, Ed. :)
Is there an easy way to use the all_fields tag, but omit certain fields?
Yup, another GF dev has a snippet for this: https://gist.github.com/richardW8k/6947682
Hi david!
great snippet!!
i have two questions for you.
1) are you able to customize the table that is shown on the pre-submission page? is it a specific php file that creates the table? if so, which file?
2) Are you able to have the pre-submission above your form, so you can see the pre-submission on top of the form when you click submit, instead of going to the next page?
// Jannik
Hi Jannick,
1 – We have a solution for this coming soon(ish). 2 – A “live” preview of the submission is on our radar for GP Preview Submission but no official ETA. It is not possible at the moment.
Thanks for your answer David. Much appreciated!
I have another question for you though. i use the {all_fields} to provide data to the pre-submission page. It all puts the data into a table. Is it possible to change the structure of the table? so what data will go into which rows and so on?
// Jannik
I have a solution available to Gravity Perks license holders by request. Feel free to pick up a copy of Gravity Perks and drop us a line via the support form.
Hi David,
You have done a really good work.
Now I’ve need to use the other abilities of merge tags like :description and :title . How can I do that?
And then I’ve seen that your code doesn’t support multiple file upload fields. How can I add this features?
Thanks.
Hey there, GP Preview Submission (which is essentially the “pro” version of this snippet) does support multi-file uploads. GF doesn’t offer :description or :title modifiers, but it’s a great idea. I’ve added it to the feature request list for this perk. :)