Submit login form via javascript function
Posted: 2022-01-21 20:06
I would like to submit the login form via a javascript function. I replaced the form's submit button with my own button that calls the javascript function mysubmit(). The function submits the login form BUT almost instantly you see, at the top right of the index.php page, the words "You are not logged in" and it kicks you back to the login form. How can I make this work?
TD
/login.php:
/hooks/header-extras.php (I added an id to the login form - id="login_form")
TD
/login.php:
Code: Select all
<button type="button" class="btn btn-success" id="recaptcha_btn" onclick="mysubmit()">SUBMIT</button>
Code: Select all
function mysubmit(){
document.getElementById("login_form").submit();
}