Home
Support Forums

Form Not Working on Website

Hi,

I’m new to Netlify, as well as using Material UI components in forms, and my trouble is that when I fill out my form and click ‘submit’, I get no notification and when I check my Netlify forms box, I get no message. Something is clearly wrong, and I wondered, is it a code problem (ie: I forgot to add some code somewhere or I accidentally typed in some wonky code) or is it a Netlify issue? Either way, I would greatly appreciate some help so I can ensure the form submissions actually go through.

My website form is here: https://rjscodes.com/contact

Here is my repo link to the contact form: portfolio/contact.js at main · rjschodowski/portfolio · GitHub

Lastly, here is the code for my form, with the data-netlify=“true” attribute in the tag:

Thank you for helping me to identify the problem and how to resolve it. I hope it is a simple fix, perhaps a mistake on my end.

R.J.

Hey @R.J_Schodowski Welcome to Netlify Forums!

It looks like you are missing the name attribute in your form syntax. Netlify needs to know a name of the input to store and show the data collected.

See more about forms setup here:

Hope this helps :slightly_smiling_face:

Kyle.

Thanks for the welcome, Kyle! So I did add in the name=“contact” in the tag…do I need to rename it with a different name, like “myform” or something like that? Is that the issue?

Thanks again for your help!

Sorry for not being clear enough. You need a name attribute for each input field.

See the example below:

<form name="contact" method="POST" data-netlify="true">
  <p>
    <label>Your Name: <input type="text" name="name" /></label>   
  </p>
  <p>
    <label>Message: <textarea name="message"></textarea></label>
  </p>
  <p>
    <button type="submit">Send</button>
  </p>
</form>

:arrow_double_down:

    <label>Your Name: <input type="text" name="name" /></label>   

Thanks a lot, Kyle!!

1 Like