I waste much time in solving this problem I want when i submit the form the input fields will clear can some help me with this or can show links about it
thanks guys...
I waste much time in solving this problem I want when i submit the form the input fields will clear can some help me with this or can show links about it
thanks guys...
Have you figure this out? if not you can check this link submitting-and-resetting
In a model-driven form to reset the form we just need to call the function reset() on our myform model.
For our sample form let’s reset the form in the onSubmit() function, like so:
onSubmit() {
if (this.myform.valid) {
console.log("Form Submitted!");
this.myform.reset();
}
}
The form now resets, all the input fields go back to their initial state and any valid, touched or dirty properties are also reset to their starting values.
You can try my example at Tab2 page example