Closed ghost closed 9 years ago
targetting "canShowErrors" solved it, thanks.
Hi, Good library. If there is a document for how to reset the form in ember, please let me know..
Right now i am using
$('form').find("input, textarea, select").val("");
Thanks.
Excellent library. I'm wondering if there is a way to reset the form validation. I've tried a few things based on the source code, setting the "this.set('errors.field_name', [])" to no avail.
When I enter the route, the controller has multiple properties that work with the form. At this point, there is no initial validation feedback.
I have a case where after save, I need to clear the values. This is because I'm not transitioning after save, but staying on the same route.
For validation, the values must be present (presence set to "true").
However, if I clear the values I would like the form to go back to its initial state without the validation feedback. (styling + message). And this would restart the process again upon saving.
Thanks for any feedback.