Description
Discussed in #1223
Originally posted by Ali-Zmn April 4, 2022
I have a fairly complex form with over 250 fields. When a user starts to fill out the fields, it will generate suggestions for other fields with the predefined sequence
. But as it is not mandatory, the user can change it to something else and then save the form. Next time the user opens the form, I get all saved values from my API and supply it to the FormRenderer
as initialValues
(I hope it is the right approach) but after loading the form, the same initial sequence
would replace the user value to the default value!
I think I'm missing something and wondering if there is a workaround to achieve this.
Example:
I have 3 text fields, when I type steve
in the first one, and jobs
in the second one, it'll set the 3rd to CEO but I want to changed to retired
, so I type in retired
and save it. Next time it will load the retired
and supply it as initialValues
but sequence will set to CEO again!
codesandbox: https://codesandbox.io/s/react-data-driven-mwdfc5?file=/src/App.jsx:2553-2566