Form submission not showing

Hey I have a form here:

Which unfortunately is not showing in the submissions log after sending.

My submission function looks like this:

const onSubmit = (values, event) => {
event.preventDefault()
setIsSubmitting(true)

fetch("/", {
  method: "POST",
  headers: { "Content-Type": "application/x-www-form-urlencoded" },
  body: encodeFormSubmission({ "form-name": "contact", ...values }),
})
  .then(() => {
    setSuccess(true)
    setIsSubmitting(false)
    event.target.reset()
  })
  .catch(err => {
    console.log(err)
    setSuccess(false)
  })

}

Hiya, sorry you are having trouble getting your forms to work.

This Support Guide is the first port of call to debug any forms issues. There are also many other Support Guides for forms - you can find them here: #Netlify-support:support-guides

We also recommend trying to search the forums or look at topics tagged Netlify forms if you haven’t already - it’s likely your question was already asked by someone else!

If you are still having problems, please provide more information such as what you have already tried, and a link to your live form. :slight_smile:

1 Like