Hi there.
I seem to have an issue related to submitting the form, it is working fine, I get an email when I hit submit about the submitted information, but after clicking it, instead of the AJAX response, I get redirected to a new page with the link 'https://script.googleusercontent.com/macros/echo?user_content_key=....'. There it shows something like this:
{"result":"success","data":"{\"honeypot\":[\"\"],\"request\":[\"other\"],\"g-recaptcha-response\":[\"\"],\"subject\":[\"....\"],\"name\":[\"...\"],\"message\":[\"...!!!\"],\"email\":[\"...\"]}"}
I checked all the steps many times. I set the form a long while ago and didn't realize about this issue since.
As some additional info, I have that form-submission-handler.js file and it is linked in the main file, I also removed the comment related to honeypot request. I made the AJAX thankyou div right before the closing form tag.
If there are any suggestions, I would appreciate it. Thanks.
Sounds like the clientside JS is not hooking up to the form. You could put breakpoints in the debugger to see where in the form it is failing. Check our FAQs, as this is a common issue people have run into. Could be that you are using id=gform instead of class=gform or something.
That was indeed the issue. I spent 2 hours going through all the README file and following the steps again. I think I missed that part all this time. Thanks for the suggestion!! :slightly_smiling_face:
@mckennapsean First off great work and thank you for making this. My question is, when you say clientside JS, are you referring to the js file where the form is contained? I have the same problem as @KKasbarian (I am sending emails fine, but I keep redirecting to that script page despite following step 10) except my form is indeed set with class=gform, and I'm not sure what to do. My form file is in a different directory than my index.html, so I'm not sure if that means I need to do something different.
The form is usually contained in HTML. The JS file contains the script which sends the results from the form to our servers. If you use your browser's debugger, you can put breakpoints in the code to see if the code is getting called and actually finding/ hooking into your form.
If you are having the same issues, the script could not be running or not finding the form, thus why you get the JSON text spit out when you submit it.
If the form is not in index.html, then you need to make sure that the clientside JS (a script tag linking to or including the JS code) is loaded on whatever page your form is on.
If there are some unresolved questions/issues, feel free to reopen, but hopefully the questions were answered. :)
Most helpful comment
Sounds like the clientside JS is not hooking up to the form. You could put breakpoints in the debugger to see where in the form it is failing. Check our FAQs, as this is a common issue people have run into. Could be that you are using
id=gforminstead ofclass=gformor something.