Linked Questions

Popular Questions

I have 2 similar functions

handle_submit1 = (event) => {
    event.preventDefault();
    doSomething();
}
handle_submit2 = (event) => {
    event.preventDefault();
    doSomething();
}

They both are used to handle submit button of two different forms. The thing is that event.preventDefault() works only in the first one function. When I try to submit second form, page refreshes and values of input fields are in a link as a GET parameters. How can I fix it?

Related Questions