TanStackT
TanStackโ€ข3y agoโ€ข
6 replies
radical-lime

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
Was this page helpful?