How to Reset a form on submit

1 Answer 326 Views
Form
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
Grant asked on 04 Aug 2023, 06:23 AM

Hi Team,

My apologies if this question seems stupid, and Im sure just I've missed some kind of key info, but Im having troubling understanding how to clear a form after submitting. I've reviewed the Form Advanced scenarios (as referenced in a few tickets) and I can see how changing the initial values works, but thats not what Im trying to do.

I see there is a onResetForm function but it only exists in the context of the formRenderProps, which is fine if your form renders a 'Clear' button, but mine doesnt.

Please advise.

Thanks,
Grant

1 Answer, 1 is accepted

Sort by
1
Accepted
Konstantin Dikov
Telerik team
answered on 07 Aug 2023, 01:32 PM

Hello Grant,

There are two options for resetting the form;

The second example demonstrates how you can also reset the Form and applying new initial values.

Hope this helps.

 

Regards,
Konstantin Dikov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!

Grant
Top achievements
Rank 3
Iron
Iron
Veteran
commented on 21 Aug 2023, 08:10 AM

Thanks Konstantin, using the ref was really helpful. -G
Tags
Form
Asked by
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
Answers by
Konstantin Dikov
Telerik team
Share this question
or