foundation-sites: Abide validation statuses triggered twice.
Provided a simple form as the one from Foundation 5 Docs:
<form data-abide="ajax" id="myform">
<div class="name-field">
<label>Your name <small>required</small>
<input type="text" name="users_name" required pattern="[a-zA-Z]+">
</label>
<small class="error">Name is required and must be a string.</small>
</div>
<button type="submit">Submit</button>
</form>
and a simple jQuery piece of code to handle abide validation
$('#myform').on('valid.fndtn.abide', function(e) {
// Handle the submission of the form
console.log(e);
});
THAT console.log is always fired twice!
Did any of you encountered the same issue? Any help please? Thank You.
About this issue
- Original URL
- State: closed
- Created 12 years ago
- Comments: 27 (3 by maintainers)
Commits related to this issue
- bug #3557: Add namespace event check, while abide is fixed in foundation https://github.com/zurb/foundation/issues/5392 — committed to OpenNebula/one by dmamolina 12 years ago
Also having this issue.
As mentioned earlier it is due to the way that jQuery event namespacing works. Simple fix is to check the event namespace.
Like this: