Sen descrición

vaeringjar 16aaa6d881 Added a comment about the name. %!s(int64=7) %!d(string=hai) anos
root d3d87e0de9 Added the typical prompt to only submit the form once for when no javascript. When javascript enabled, it hides the prompt because the form script disallows multiple submissions, at least from the button. %!s(int64=7) %!d(string=hai) anos
.gitignore 4639bc7a9a init %!s(int64=7) %!d(string=hai) anos
README.md 16aaa6d881 Added a comment about the name. %!s(int64=7) %!d(string=hai) anos

README.md

bad-form-peter

About

This repo will contain the basic necessities, if not best practices, to submit forms with some validation and prompts back to the user.

Project Name

The name derives from a line from a movie named Hook by the character Captain Hook.

License

Right now to begin with, since so much of this will reuse from public information:

vaeringjar 2017 CC0

References

Form validation and submission

Relative brute force by explicitly checking each field

  1. http://www.the-art-of-web.com/javascript/ajax-validate/
  2. https://www.w3schools.com/js/js_validation.asp

Less brute force by using css as tags

  1. https://stackoverflow.com/questions/18495310/checking-if-an-input-field-is-required-using-jquery/30159900#30159900

Reading the attribute

  1. https://stackoverflow.com/questions/18495310/checking-if-an-input-field-is-required-using-jquery/18495401#18495401
  2. https://stackoverflow.com/questions/25311923/javascript-validation-for-all-field-with-required-attribute/25312572#25312572

Less common javascript use cases

  1. select a label for an element