[Documentation Request] Editor Form Button How to?
zecbmo opened this issue · comments
Gary MCCartan commented
Documentation Feature Request:
It would be great if you could add documentation on how to add delegates to the forms onSubmit function.
OnSubmit -> DoSomething
Thanks
Michael Grosser commented
Not really a Syna question. Take a look at javascript event listeners. An event listener can prevent the default function of the button and on submit run a specific function.
Something along the lines of
"document.querySelector(".editor-container").addEventListener("submit", function(e){
if(!isValid){
e.preventDefault();
}
});