TanStack

T

TanStack

TanStack is a community of passionate software engineers striving for high-quality, open-source software for web devs

Join

react-query-questions

solid-query-questions

table-questions

virtual-questions

router-questions

react-charts-questions

ranger-questions

vue-query-questions

svelte-query-questions

bling-questions

form-questions

angular-query-questions

start-questions

db-questions

start-showcase

router-showcase

📣-announcements

vicious-gold
vicious-gold1/3/2024

How to manually set an error of the form

Hi guys, I'm look for a way to set error to the field from the backend. I don't see anything in API. Is it something with form.setFieldMeta? In react-hook-form you can do setError("email", {type: "server", message: "Foo"})...
genetic-orange
genetic-orange1/3/2024

Understand the useForm.tsx file

I visited your source code, and I was a bit confused. I noticed that this hook calls useStore inside a function, which violates the React hooks rule, So how it possible to do that, and how it's stable? thanks...
No description
afraid-scarlet
afraid-scarlet1/3/2024

Is it possible to opt out of dot notation or escape dot for field names?

I'm considering migrating a project this library but there are field names containing dots x.y but these aren't to indicate nested fields. Is there a way to opt-out of the path behavior? I do see the value in this feature but could there be a capability to escape the field names perhaps (e.g. x.y.z)? I'm happy to contribute this feature but want to understand if any interest. ...
quickest-silver
quickest-silver12/28/2023

json scheme

Hello, We want to replace a form builder we are using with TS form. 1- How can we implement json scheme support? 2- can these libraries help, or is there a simpler implementation? ...
deep-jade
deep-jade12/6/2023

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....
foreign-sapphire
foreign-sapphire10/19/2023

How to render form fields based on result from an API call that uses value in previous form field ?

I have a form which requires and input domain. When domain is provided, I need to call and API and render other fields based on data received. I thought of using form.Subscribe and then using useEffect in children component, but that throws error....
itchy-amethyst
itchy-amethyst9/18/2023

Appending / Removing Field values

Hello Tanstack friends, I am working on a 'junk drawer' type application (kitchen sink is used elsewhere and well, typically you don't have two kitchen sinks). I am migrating a app I have moved from Remix to Next now to Tanstack's suite of devtools. In Next I made pretty decent use of react hook form. ...
exotic-emerald
exotic-emerald9/14/2023

Form submit help

If my understanding is correct, button elements of type submit that are children of the form.Provider tag should trigger the onSubmit call specified in useForm. I don't know why but I can't seem to trigger this console log... ``` export default function SigninForm({}) { const form = useForm({...
exotic-emerald
exotic-emerald9/14/2023

Basic Questions

Prefacing this with a note that I am new to front end development. Please excuse any terminology misuse. I have some general questions about the docs. For context using react. Take this example from the quickstart docs: https://tanstack.com/form/latest/docs/framework/react/quick-start ...
equal-aqua
equal-aqua9/12/2023

how to disable submit button initially?

Apparently, canSubmit is true initially even if e.g. mandatory fields are empty, because no field validation happened yet. I tried using defaultState like this, but it did not work: ```typescript...
xenial-black
xenial-black5/21/2023

Form types error

Newbie question: I'm getting this type error when using <form.Form>
Property 'Form' does not exist on type 'FormApi{ title: string; }>'.
Property 'Form' does not exist on type 'FormApi{ title: string; }>'.
Also I see here https://codesandbox.io/s/github/tanstack/form/tree/main/examples/react/simple?from-embed you are using <form.Provider> What is the latest usage?...