-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clear all selected when submit error, but not clear when submit success??? #37
Comments
yep, I also have this issue. @thearabbit did you ever get around this? |
Oh, How the solution? |
I got around by using selectize. Thought it has exactly the same issue, but at least I could reset it "manually".
Select2 also should have this functionality, but I just couldn't get |
I tried |
This worked for me, although it clears all selects. AutoForm.addHooks(['insertProductForm'], {
onSuccess: function(formType, result) {
$('select').each(function() { //Select2 doesnt clear on its own
$(this).select2('val', '');
});
}
}) |
Look great, it work fine on success hook. |
I Haven't had a chance to test the onError case yet. |
I have the problem when I submit form error, it clear all of selected value.
But when the submit form success, it not clear selected label (value is empty).
The text was updated successfully, but these errors were encountered: