If I have a template like this
<template name="my_form">
<form name="my_form">
<input name=" ....
</form>
</template>
I would like to listen to the send event "my_form".
I tried this:
Template.my_form.events({
'submit form': function( event ){
console.log( 'Submitting form!' );
event.preventDefault();
event.stopPropagation();
return false;
}
});
But no luck. It looks like the event handler is not being logged. Is something missing?
ps I know that I can handle the "view" form by listening to the submit button click event, but I need to use the form submit event in this particular scenario.
source
share