Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Nov 2009
    Posts
    197
    Thanks
    22
    Thanked 0 Times in 0 Posts

    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
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,084
    Thanks
    23
    Thanked 592 Times in 591 Posts
    Code:
    <form action="https://docs.google.com/spreadsheet/formResponse?formkey=dE02TlBHQ2hnVVdkTE5ya0lBYXhaMlE6MQ&amp;ifq"
    The action attribute sets the destination of the form inputs. Change that to call your 'thank you' page which should be a php file. Read this for starters: http://www.w3schools.com/php/php_post.asp

  • #3
    Regular Coder
    Join Date
    Nov 2009
    Posts
    197
    Thanks
    22
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by sunfighter View Post
    The action attribute sets the destination of the form inputs. Change that to call your 'thank you' page which should be a php file.
    Thanks for the answer, but it prevents the Google form to send the information to the spreadsheet.

  • #4
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,084
    Thanks
    23
    Thanked 592 Times in 591 Posts
    There is no way I know of where you can send one form to two pages.
    But we can use two buttons
    Code:
    <form name="f1" method="POST" id="ss-form" action="https://docs.google.com/spreadsheet/formResponse?formkey=dE02TlBHQ2hnVVdkTE5ya0lBYXhaMlE6MQ&amp;ifq">
    
    <input type='submit' value='Send to thank you page' onclick="f1.action='ThankYou.php'; return true;">
    <input type="submit" name="submit" value="Submit">
    
    </form>
    Notice the addition in red name="f1"
    Last edited by sunfighter; 10-13-2012 at 01:50 AM.


  •  

    Posting Permissions

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