For some reason submit event
is not working for a simple form using the semantic ui package.
This is my form.
<form class="ui form register-form">
<h4 class="ui dividing header">Create your AC Account</h4>
<div class="">
<div class="required field">
<div class="ui icon input">
<input type="text" placeholder="Username">
</div>
</div>
</div>
<div class="ui submit button register-button">Register</div>
</form>
So how the submit event should look?
Template.example.events({
'submit .register-button' : function() {
console.log("submited")
}
})
NOTE: also im truing with the form class name .register-form
Your form has no submit button. Only a
div
formatted as a button with the class ofsubmit
. You'll either need to add a click handler to thediv
or switch to an actual button.