I wrote an input form that has input elements with the required attribute set.
So when pressing an <input type="submit" /> button, empty fields (and other violations) are complained about.
However when I use an <input type="button" onClick="something()" /> button, the function is called even if the required input is empty.
Example input field:
<input id="customer-name" type="text" name="i.user.name" size="25" maxlength="40" placeholder="Name" pattern="^[^ ]..+$" required="required" />
Is there a way to execute what a submit button would do without adding a submit button? I mean not repeating the logic in JavaScript as indicated in https://stackoverflow.com/a/11380269/6607497.
Basically while testing I wrote the code (HTML, CSS, JavaScript) in a local file, loaded in a browser. So an actual submit button would be tricky at least (IMHO).