Add/Delete fields in a form based on another field
Hi there!
I made a form with TanStack-Form / React (see video) where I manage the display of two extra fields if I select the "Good Til Time" option in my select list.
For the moment, the fields are flat and not nested, I just hide them and ignore their values in the submit, but it's not ideal.
I haven't found any examples of how to add nested fields properly (I see there's the possibility of manipulating indexes). But if anyone has managed to do an example, I'd love to
.
Thanks a lot and have a nice day guys.
ps: the lib experience so far is great
I made a form with TanStack-Form / React (see video) where I manage the display of two extra fields if I select the "Good Til Time" option in my select list.
For the moment, the fields are flat and not nested, I just hide them and ignore their values in the submit, but it's not ideal.
I haven't found any examples of how to add nested fields properly (I see there's the possibility of manipulating indexes). But if anyone has managed to do an example, I'd love to
Thanks a lot and have a nice day guys.
ps: the lib experience so far is great