Hello,
I’d like to ask for a help with forms issue. I have two different forms on my site (https://safarikovi-v2.netlify.app/) and I’m not receiving any submissions from it. I went through the forums and the forms debugging guide, but no luck. So far here is what I have tried:
I removed the redirect from action (previously had action=‘/success/’ and the end slash was forcing the redirect
I checked the markup, I can see the form there, data-netlify tag is gone
I manually added a hidden input: because I didn’t see it rendered on the page
I’m using data-netlify=“true”
all my input fields have unique name attribute
form itself has a name attribute
Netlify console correctly detected both of my forms (with names voucher and course), I can see both forms in my UI, just no submissions are there
when I submit the form, I see the POST request to the success page. POST request has all required fields in body, including the form-name field
Hi @clarnx,
thanks a lot for your reaction. I have read the article and also several posts here on the forums about debugging the forms issue, but so far no luck.
The section linked explains what to look for when the form submits properly, but nothing shows on the UI. If you could give that a read and see if the solutions provided solve the issue.
Hi @milosturek in addition to the resource shared by @Melvin , also change your form inputs to an uncontrolled input.
What I mean is that remove all the onChange props on the inputs to turn it to an uncontrolled input to see if it works.
The article does not use onChange props. However if you want to use onChange props and set the state for each input field then you have to submit the form using the JavaScript / Ajax method to submit the form.
If you still want to use the JavaScript method to submit the form then kindly check the link below.
Hi @clarnx and @Melvin,
thank you both for your help. The solution was indeed to implement submitting in TypeScript, as mentioned in one of the guides. I could not remove onChange handlers because I need it for validation.