Skip to content

Instantly share code, notes, and snippets.

@jakearchibald
Created February 10, 2010 14:38
Show Gist options
  • Save jakearchibald/300363 to your computer and use it in GitHub Desktop.
Save jakearchibald/300363 to your computer and use it in GitHub Desktop.
var editform = new glow.forms.Form("#editform", {
// make avalidation method
onValidate: function(results) {
// if the form is submitting and there's no errors
if (results.eventName == 'submit' && !results.errorCount) {
if ( /* decide if you want to submit here */ ) {
editform.formNode[0].submit();
}
}
else {
// defer to Glow's default form error reporting
return glow.forms.feedback.defaultFeedback.apply(this, arguments);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment