Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

preventdefault not working form submit react

const onSubmit = (e) => {
		e.preventDefault();
		// logic here
	};
// your form here
	<form id="myform" onSubmit={onSubmit /*or any name*/}>
      <div className="form-group">
      </div>
	</form>
 
PREVIOUS NEXT
Tagged: #preventdefault #working #form #submit #react
ADD COMMENT
Topic
Name
9+3 =