Created
February 10, 2010 14:38
-
-
Save jakearchibald/300363 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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