Hooks
useForm()
A hook for creating forms inside your Attio app.
Parameters
schema : Record<string, FormValue>
A form schema is how you tell Attio about the shape and validation rules of your form data.
initialValues : Record<string, any>
These values must match the type defined by your form schema.
Returns
an object containing:
Functions
change : (path: string, value: any) => void
An imperative function to update a particular value in the form.
submit : () => void
An imperative function to submit the form. It will cause validation to run, and if the validation passes it will call the onSubmit
handler that you have passed to <Form/>
.
Typically you won’t be using this, but will rather render a <SubmitButton />
Components
Was this page helpful?