I\'d like two submit buttons on a form i have my team building, one above the fold, and one below. I\'m getting complaints from my tech team about adding it because it requi
If you want to use vanillaJS to do this... here is a generic very long way (with functions for both to be clear what is happening).
html
script
const primary = document.getElementById('primaryButton');
const secondary = document.getElementById('secondaryButton');
function somePrimaryAction(e){
e.preventDefault();
console.log('you clicked the primary button');
}
function clickPrimaryButton(e){
e.preventDefault();
console.log('you clicked the secondary button');
primary.click();
}
primary.addEventListener("click", somePrimaryAction, false);
secondary.addEventListener("click", clickPrimaryButton, false);