Categories
JavaScript Answers

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 add an input without the name attribute.

For instance, we write

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

to add a text input without the name attribute.

The field’s value won’t be submitted without the attribute.

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 *