Home > shorts > Submit a form with a button located outside of a "form" attribute

Submit a form with a button located outside of a "form" attribute


You can submit a form with a button located outside of a "form" attribute.

<form id="my-name">
    <label for="name">My Name:</label>
    <input type="text" name="name">
</form>

<button type="submit" for="mu-name"Submit></button>
© 2021, Andrew Losseff