This project has moved. For the latest updates, please go here.

Validation for the fields in wizard

Jun 6, 2016 at 5:40 PM
Hello,
I have used Speasyforms to create the wizard container. it has various field and have applied HighlightBlue and visibility rules. I want to disable Next button if there is validation error.
How do I come to know in javascript that error is present.

Thanks,
Manjushree
Coordinator
Jun 6, 2016 at 9:18 PM
Edited Jun 20, 2016 at 2:52 PM
I don't know of a way to do this. I determine that validation errors are present by creating a PreSaveItem callback and looking for the error labels that Microsoft inserts into the form. But validation in SharePoint forms only occurs when the user hits the submit button (at which time PreSaveItem is call as well). Until then, I know of no way to determine that there is a validation error. That's why the wizard returns the user to the first page with validation errors on submit, that's the best I can do.

Joe
Marked as answer by mcsheaj on 6/6/2016 at 2:18 PM