Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
582 views
Welcome To Ask or Share your Answers For Others

1 Answer

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;">

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...