Reputation: 212
I have a custom Google Form i made and an own site. What i need is, after submitting the Google Form, to allow the user access to download a file. This means that you should only be able to access to file if you completed the form.
I have been looking for a way to redirect to a custom URL without showing the URL (so the user cannot copy-paste it and download the file many times) but it is impossible to redirect after the submission (even if the form is embedded).
I even tried to make the form open a pop-up with the file url or something but everything seems impossible to do.
Is there a way to achieve this?
Upvotes: 7
Views: 23585
Reputation: 57
If your embedded form is loaded with a script and the webform can have a redirect on submission i found this answer that worked for me:
This is really a very old thread but if someone needs then can do following workaround:
Create a new HTML page say 'test.html' which will have only code in script tag like as below, please change your HTML page name to final page name in the following code:
window.parent.location.href = 'final.html';In Webform form submission setting please redirect the user on above HTML page
So now when the form submits Podio will redirect to the above temporary HTML page and the temporary page will reload the main parent page with the correct HTML page.
https://help.podio.com/hc/en-us/community/posts/212217608/comments/360001462172
Upvotes: 0
Reputation: 191
<!-- Normal form embed code, add an ID -->
<iframe id="gform" src="https://docs.google.com/forms/d/e/1FAIpQLSeaiWCc598b3beFhYraf4nNsLgG3bXby_Qne93rHy_Mb_8UIA/viewform?embedded=true" width="640" height="487" frameborder="0" marginheight="0" marginwidth="0" style="margin:0 auto; max-width:100%;">Loading…</iframe>
<script type="text/javascript">
var load = 0;
document.getElementById('gform').onload = function(){
/*Execute on every reload on iFrame*/
load++;
if(load > 1){
/*Second reload is a submit*/
document.location = "https://www.google.com/search?q=thanks&tbm=isch";
}
}
</script>
Upvotes: 15