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>
1 Like
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>
perry
January 8, 2021, 7:05pm
4
hi there,
<input type="submit">
is also not valid html - it should be <button type="submit">text here</button>
(as per <button>: The Button element - HTML: HyperText Markup Language | MDN )
can you try changing it and seeing if that works better?
Jakob
May 13, 2024, 11:46pm
5
I just created an account just to tell you that <input type=“submit” absolutely is valid html syntax. Source:
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.