Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Old Google Form redirect after submission

I am looking for a solution (code) how to redirect user to a custom thank you page (not default Google's) after submitting the form with Old Google Form.

<iframe name="hidden_iframe"         id="hidden_iframe"         style="display:none;"         onload="if(submitted){window.location='http:/...yourthankyoupage.htm';}"> </iframe> <form action="https://spreadsheets.google.com/formResponse?formkey=....."       method="post"       target="hidden_iframe"       onsubmit="submitted=true;"> 

This code is not working. At least not for me. Any suggestions?

like image 619
Boco Avatar asked May 20 '11 20:05

Boco


People also ask

Can Google Forms redirect after submitting?

Google Forms does not have the option to redirect users to another webpage after submission. You can either customize the confirmation message to include a link so that this link is shown after submission, or use the Formfacade add-on to redirect users automatically to another webpage after submission.

Can you go back to a previous version of a Google Form?

Explanation. In contrary as occurs with Google Documents, Sheets and Slides, Google Forms doesn't have the revision history feature. Unfortunately Google Drive doesn't keep revisions of Google Forms either.


2 Answers

is this a form that you've styled yourself? some good reading here: http://morning.am/tutorials/how-to-style-google-forms/

basically its... replace

<form action="YOUR-EMBEDDED-GOOGLE-SPREADSHEET-LINK" method="POST"> 

with

<script type="text/javascript">var submitted=false;</script>     <iframe name="hidden_iframe" id="hidden_iframe" style="display:none;"      onload="if(submitted) {window.location='whateveryourredirectis.html';}"></iframe>       <form action="YOUR-EMBEDDED-GOOGLE-SPREADSHEET-LINK" method="post" target="hidden_iframe"  onsubmit="submitted=true;"> 
like image 199
tronjavolta Avatar answered Sep 20 '22 02:09

tronjavolta


Sneaky Sheep version 2 can automatically generate the necessary html to embed the form in your website. It preserves the stylesheets of your form.

Or, if you're using the original version of Sneaky Sheep, make sure to append the proper domain name in the styles section to get the stylesheets.

For example, I had to change

<link href='/static/forms/client/css/1234-formview_ltr.css' type='text/css' rel='stylesheet'> 

to

<link href='https://docs.google.com/static/forms/client/css/3904611051-formview_ltr.css' type='text/css' rel='stylesheet'> 
like image 25
Bibek Shrestha Avatar answered Sep 22 '22 02:09

Bibek Shrestha