Answer the question
In order to leave comments, you need to log in
React, form(method="POST"), why does it add parameters to url after submit?
...
handleSubmit(event) {
event.preventDefault();
event.stopPropagation();
const email = this.refs.email.value;
const password = this.refs.password.value;
const remember_me = this.refs.remember_me.value;
return this.props.onSubmitLoginForm({email, password, remember_me}) && false;
},
render() {
return (
<form onSubmit={this.handleSubmit} action="#" method="post">
<input type='email' name='email' ref='email' placeholder='Email'/>
<input type='password' name='password' ref='password' autoComplete='off' placeholder='Password'/>
<input type='checkbox' name='remember_me' ref='remember_me'/>
<button type='submit'>log in</button>
</form>
)}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question