Skip to content

Instantly share code, notes, and snippets.

View mcdemidov's full-sized avatar

Mikhail Demidov mcdemidov

View GitHub Profile
@mcdemidov
mcdemidov / gist:cf8c7bde3253bd30bf45
Last active August 29, 2015 14:26 — forked from madysondesigns/gist:3237574
Google Docs Forms
<script type="text/javascript">var submitted=false;</script>
//This is where thank you page/message is loaded. Replace onload function with jQuery hide/show or page redirect to separate page {window.location='thankyou.html';}.
<iframe name="hidden_iframe" id="hidden_iframe" style="display:none;" onload="if(submitted) {$('#formblock').hide(); $('#thankyou').fadeIn('fast');}"></iframe>
//replace form key with actual key from Google Docs
<form action="https://docs.google.com/a/betterment.com/spreadsheet/formResponse?formkey=dGlUczJTRUNjaHExOGtqZkVCYjVtR3c6MQ&amp;ifq" method="post" target="hidden_iframe" id="commentForm" onsubmit="submitted=true;">
<div id="formblock">
//recreate form fields and validation if needed