Empty forms even though fields are required

Site name: jumpingrivers.com
Form: Bottom of the jumpingrivers.com

I’m getting multiple empty forms every day. Even though there are required fields on the form, clicking submit still submits an empty form request.

Filling out the form normally works (i.e. the form comes through with data).

Form code:

<form name="SIGN-UP" method="POST" data-netlify="true" action="/success">
  <input type="hidden" name="signup-form" value="SIGN-UP" />
  <input type="text" name="name" placeholder="Your Name*" required="true" />
  <input type="text" name="email" placeholder="Your Email*" required="true" />
  <input type="submit" value="SIGN UP" />
</form>

required="true" is invalid HTML. It should only be required. You don’t have to submit this form to check. Without all required fields filled, HTML won’t accept the form submissions anyways, so it should work.

1 Like

Thanks!

My guess is that required=“true” triggered the Javascript box to say “please complete”, but as it wasn’t valid HTML, the form was still submitted.


Update: I still seem be having blank forms submitted. The new code is:

  <form name='SIGN-UP' method='POST' action='/success'><input type='hidden' name='form-name' value='SIGN-UP' />
  <input type="hidden" name="signup-form" value="SIGN-UP" />
  <input type="text" name="name" placeholder="Your Name*" required />
  <input type="text" name="email" placeholder="Your Email*" required />
  <input type="submit" value="SIGN UP" />
</form>

hi there,

<input type="submit"> is also not valid html - it should be <button type="submit">text here</button>

(as per https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button)

can you try changing it and seeing if that works better?