Reputation: 41
How to clear validation messages in a dijit form (widgets including validation textboxes, filtering selects, number textboxes etc without resetting the form, ie Data need to be retained but validation messages. I am looking for a kind of flush action retaining the data.
Upvotes: 0
Views: 234
Reputation: 73918
You can use the reset function on the form itself.
reset(e) restores all widget values back to their init values, calls onReset() which can cancel the reset by returning false,. Resource.
Example:
require(["dijit/registry"], function(registry){
var form = registry.byId("yourFormId");
form.reset();
});
Upvotes: 1