H
H
hadaev_ivan2016-08-30 17:23:42
React
hadaev_ivan, 2016-08-30 17:23:42

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>
     )}

From time to time, it adds the login password parameters in the yurl after submitting the form, an error happens occasionally (I couldn’t catch it, but the tester also complained)
...blabla.com?email=blabla&password=111111
What could be the trouble and where to dig?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question