I dont think we need onclick js to submit the form. Just changing the type of button to submit should do ?