HOW TO GET FORM DATA WHEN BUTTON CLICKED code example
Example: html submit form onclick
var form = document.getElementById("form-id");
document.getElementById("your-id").addEventListener("click", function () {
form.submit();
});
var form = document.getElementById("form-id");
document.getElementById("your-id").addEventListener("click", function () {
form.submit();
});