Advanced Search

Results 1 to 6 of 6

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

  1. #1
    Join Date
    Nov 2009
    Posts
    179
    Thanks
    31
    Thanked 0 Times in 0 Posts

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

    Here's a Google Docs form:

    Code:
    <form action="https://docs.google.com/spreadsheet/formResponse?formkey=dE02TlBHQ2hnVVdkTE5ya0lBYXhaMlE6MQ&amp;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/...E5ya0lBYXhaMlE

    I wonder how to redirect the form to my own custom 'thank you' page on submission.
    Thanks!

  2. #2
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    47
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    All you have to do is change the form action, so:
    Code:
    <form action="your-page.php" method="POST" id="ss-form">
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
    Anime Views Forums
    Bernie

  3. #3
    Join Date
    Nov 2009
    Posts
    179
    Thanks
    31
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by bernie1227 View Post
    All you have to do is change the form action, so:
    Code:
    <form action="your-page.php" method="POST" id="ss-form">
    Thanks for the answer, but it prevents the Google form to send the information to the spreadsheet.

  4. #4
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    47
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    oh right sorry, try something like:
    Code:
    <script type="text/javascript">var submitted=false;</script>
        <iframe id="redirect" style="display:none;" onload="if(submitted) {window.location='your redirect';}"></iframe>
          <form action="https://docs.google.com/spreadsheet/formResponse?formkey=dE02TlBHQ2hnVVdkTE5ya0lBYXhaMlE6MQ&amp;ifq" method="post" target="redirect" onsubmit="submitted=true;">
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
    Anime Views Forums
    Bernie

  5. #5
    Join Date
    Nov 2009
    Posts
    179
    Thanks
    31
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by bernie1227 View Post
    oh right sorry, try something like:
    Code:
    <script type="text/javascript">var submitted=false;</script>
        <iframe id="redirect" style="display:none;" onload="if(submitted) {window.location='your redirect';}"></iframe>
          <form action="https://docs.google.com/spreadsheet/formResponse?formkey=dE02TlBHQ2hnVVdkTE5ya0lBYXhaMlE6MQ&ifq" method="post" target="redirect" onsubmit="submitted=true;">
    Seems to be working, but there should be a more straightforward approach to such a simple problem.
    Thanks anyway!

  6. #6
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    47
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    That's fine,

    If the thread is finished, please set it to resolved by clicking edit, advanced options and then change prefix
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
    Anime Views Forums
    Bernie

Similar Threads

  1. Replies: 1
    Last Post: 03-22-2011, 11:02 PM
  2. MS Outlook to google docs archive?
    By me_myself in forum Computer hardware and software
    Replies: 0
    Last Post: 07-15-2010, 01:48 PM
  3. Replies: 3
    Last Post: 04-24-2010, 06:39 PM
  4. Replies: 3
    Last Post: 01-29-2009, 11:58 AM
  5. Replies: 0
    Last Post: 06-09-2005, 03:28 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •