How to localise the text of a type="submit" button without changing the value it sends to the server?
I am building a multi-lingual website and want to localise the captions shown on buttons in a form. document.querySelector('form').addEventListener('submit', ev => { ev.preventDefault(); console.log('submitted: %o', Object.fromEntries(new FormData(ev.target, ev.submitter).entries())); }); <form action="check.php" method="post"> <input type="submit" name="action" value="Enter"/> <input type="submit" name="action" value="Cancel"/> </form> When I change the @value, that value is also received on the server. I would like to keep processing of the form simpler by handling only the default language
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.