So, I have a client that wants to use Google Forms for a form on their website. They also want the user to be able to download some resources after successfully submitting the form. The problem is that the Google form has to be embedded with an iframe, so I can't find a way to check if the form has been submitted since it's happening within the iframe.
The mark up would be like this:
<div>
<iframe
src="
YeVFUNY0slXBP4kQ/viewform?embedded=true" id="googleForm" width="760" height="500" frameborder="0" marginheight="0" marginwidth="0">Loading...
</iframe>
</div>
My question is: is there any way at all to check if the form was submitted, via jQuery, plain Javascript or anything else? Or, is there any script, or settings I can use within Google Forms to feed the user custom HTML after submitting the form?
So, I have a client that wants to use Google Forms for a form on their website. They also want the user to be able to download some resources after successfully submitting the form. The problem is that the Google form has to be embedded with an iframe, so I can't find a way to check if the form has been submitted since it's happening within the iframe.
The mark up would be like this:
<div>
<iframe
src="https://docs.google./forms/d/e/1FAIpQLSdtWuGTwEZEoqJAo0TXJt0LIMSO4g0Mot
YeVFUNY0slXBP4kQ/viewform?embedded=true" id="googleForm" width="760" height="500" frameborder="0" marginheight="0" marginwidth="0">Loading...
</iframe>
</div>
My question is: is there any way at all to check if the form was submitted, via jQuery, plain Javascript or anything else? Or, is there any script, or settings I can use within Google Forms to feed the user custom HTML after submitting the form?
Share Improve this question asked Oct 7, 2017 at 3:04 Clay WhaleyClay Whaley 431 gold badge1 silver badge7 bronze badges2 Answers
Reset to default 1So the solution that I found came from this post: https://codepen.io/learningcode/post/customize-a-google-form-for-your-website
What you do is make your own form, and then add in the form actions from the Google Form (basically; I'm not positive on how it works but it does).
For example, the beggining of the form would look like this:
<form action="https://docs.google./forms/d/e/someotherlettersfromthegoogleform/formResponse">
<label for="FNAME">First Name</label>
<input name="entry.1499702011" type="text" id="FNAME" />
<label for="LNAME">Last Name</label>
<input name="entry.738838864" type="text" id="LNAME" />
</form>
Now, the Google Form is actually on the website, not embedded with an iframe, so I should be able to find a way to redirect the page or use a pop or something with the download links. I hope this answer can help out someone else who runs into this.
I'm not exactly sure what your client is trying to achieve but the only thing that es to my mind is to use dedicated download links with landing page that triggers some action on your client website with AJAX. Well I know it's not the same as knowing whether client only submitted or submitted and downloaded the file but there's not much you can do anyway. Please correct me if im wrong.