Categories
HTML

How to stop an input field in a form from being submitted with HTML?

Spread the love

To stop an input field in a form from being submitted with HTML, we remove the name attribute from the input.

For instance, we write

<input type="text" id="in-between" />

to add an input without the name attribute to stop it from being submitted.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *