Netlify form submissions not working

hello! I’m new to coding and would love to be guided in the right direction. iv been following some tutorials on youtube on how to use Netlify. the issue is that for some reason when I do a test submission, the submission doesn’t go through to my email. I basically just received a blank email. has anyone gone through this issue?

here is my code for my form. Did i miss any steps?

  <input type="text" class="email entry" placeholder="Email"/>
  
  <textarea class="message entry" placeholder="Message"></textarea> 
  
  <button class="submit entry" onclick="thanks()">Submit</button>
</form>

Hard to tell with the opening <form> tag cut off. Can you repost the whole code section?

Also, I’ve not used javascript with netlify forms…and if you’re keeping things simple, I wouldn’t recommend it. Just follow the example in the documentation and you should be fine.

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

(BTW - I’m not sure if your class="two words" is going to work the way you expect. I think you should remove the space, and then edit your CSS accordingly.)

1 Like

im not sure why my code cuts off like that. i copied and pasted the whole form.

ddd

This line here is interesting:

<button class="submit entry" onclick="thanks()">Submit</button>

especially the onclick="thanks()". That’s calling some javascript which may conflict with the way netlify handles forms. Could you share the full code for your site (or even a link to your site)?

1 Like

I agree with @funkydan2 there, would love to see the JS function you’re calling. Also can you link us to the live page with the form?