I have a google form embedded into my home site. How to I get users to redirected to a thank you page after having submitted?
I have tried using the code below but it cannot load after i submit the form.
<iframe id="gform"
src="google form link" width="640" height="422" frameborder="0" marginheight="0" marginwidth="0">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 = "thank you page link";
}
}
</script>```