Defined in: FormApi/FormApiFieldMethods.types.public.ts:85
Type-safe methods for reading, updating, and resetting individual field values.
TFormData
Library-managed. Do not specify explicitly.
getFieldValue: GetFieldValueFn<TFormData>;Defined in: FormApi/FormApiFieldMethods.types.public.ts:114
Reads the current value at a field path.
This is a read-only operation and does not create a FieldApi for the path.
const name = formApi.getFieldValue('profile.name')The current value at the path, or undefined when the path cannot be resolved at runtime.
resetField: ResetFieldFn<TFormData>;Defined in: FormApi/FormApiFieldMethods.types.public.ts:131
Restores a field path from defaultValues and resets state for its field subtree.
Existing FieldApi instances at or below the path remain mounted. Form-wide dirty history remains unchanged; use formApi.reset() to clear it.
formApi.setFieldValue('profile.name', 'Grace')
formApi.resetField('profile.name')
// `profile.name` is restored from `defaultValues`.setFieldValue: SetFieldValueFn<TFormData>;Defined in: FormApi/FormApiFieldMethods.types.public.ts:99
Updates the current value at a field path.
The next value may be supplied directly or calculated from the current value. By default, the update marks the field as touched and dirty, notifies change listeners, and runs change validation.
formApi.setFieldValue('profile.name', 'Ada')
formApi.setFieldValue('visitCount', (count) => count + 1)