We are using the Kendo React Form library. Is it possible to reset a single field to the initial value that the form supplies? I see the way to reset the entire form, but we are looking to include a reset button next to each input field that would reset the field to it's initial value and also inform the form that it has not been modified.
5 Answers, 1 is accepted
Yes, this is the correct way to reset the value of a single field.
This can also be done on a Form level, by passing the field name:
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
Second follow up :-).
Is there a way to use promises or something like that to detect a successful form save in order to disable the save button
Regarding the questions:
1) Is there a way to reset the fieldrenderprops so the form sees it as having not been modified or touched - Currently, they will be updated as the field value is indeed modified. If we do not change it, this can lead to wrong information in many cases.
2) Is there a way to use promises or something like that to detect a successful form save in order to disable the save button - The Form save (the request to the server) is made by the developer, which means that the developer can use the callback from the server. The KendoReact Form is not making requests to save the data internally, this is why we have no information when the Form is saved in order to provide such a callback.
In general, we recommend submitting new tickets/forum posts for different questions as for example someone may be searching for the same answer, but it will be difficult to find when it is answered in a different topic.
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.