Jump to content
Rain Lover

Redirect a Google Docs form to your custom 'thank you' page

Recommended Posts

Here's a Google form:

<form action="https://docs.google.com/spreadsheet/formResponse?formkey=dE02TlBHQ2hnVVdkTE5ya0lBYXhaMlE6MQ&ifq" method="POST" id="ss-form"><br><div class="errorbox-good"><div class="ss-item ss-item-required ss-text"><div class="ss-form-entry"><label class="ss-q-title" for="entry_0">First name<span class="ss-required-asterisk">*</span></label><label class="ss-q-help" for="entry_0"></label><input type="text" name="entry.0.single" value="" class="ss-q-short" id="entry_0"></div></div></div><br> <div class="errorbox-good"><div class="ss-item ss-item-required ss-text"><div class="ss-form-entry"><label class="ss-q-title" for="entry_1">Last name<span class="ss-required-asterisk">*</span></label><label class="ss-q-help" for="entry_1"></label><input type="text" name="entry.1.single" value="" class="ss-q-short" id="entry_1"></div></div></div><br><input type="hidden" name="pageNumber" value="0"><input type="hidden" name="backupCache" value=""><div class="ss-item ss-navigate"><div class="ss-form-entry"><input type="submit" name="submit" value="Submit"></div></div></form>

And here's the spreadsheet that it feeds:https://docs.google.com/spreadsheet/ccc?key=0ApjOXzxlxbMhdE02TlBHQ2hnVVdkTE5ya0lBYXhaMlE I wonder how to redirect the form to my own customized 'thank you' page on submission.Thanks!

Share this post


Link to post
Share on other sites

The action of a form tells it where to submit to. You can change the action to your own page, but then your page will be responsible for updating the spreadsheet.

Share this post


Link to post
Share on other sites

You need to create a custom HTML page on your website and copy the code of the Google form from <form to </form> and replace the below mentioned code.

<form action=”Google form link ending with form response target=”_self method=”POST id=”mG61Hd“>

with

<script type=”text/javascript”>var submitted=false;</script> <iframe name=”hidden_iframe” id=”hidden_iframe” style=”display:none;” onload=”if(submitted) {window.location=’http://YOUR-THANK-YOU-PAGE-URL‘;}”></iframe> <form action=”Google form link ending with formresponse” method=”post” target=”hidden_iframe” onsubmit=”submitted=true;”> 

Basically here you are are showing your thank you page on load but still, your form responses are tracked in the spreadsheet.  Also, you need to modify the submit button code. Don't play with the code if you are not good with it as it may break the code and fixing that will be another challenge. This blog for Step by step customizing Google form and getting the spreadsheet will guide you with screenshots and gifs.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×