Open History to see the last commit
1---
2id: FormApiFieldMethods
3title: FormApiFieldMethods
4---
5β
6Defined in: [FormApi/FormApiFieldMethods.types.public.ts:85](https://github.com/TanStack/form/blob/main/packages/form-core/src/FormApi/FormApiFieldMethods.types.public.ts#L85)
7β
8Type-safe methods for reading, updating, and resetting individual field
9values.
10β
11## Extended by
12β
13- [`FormApi`](FormApi.md)
14β
15## Type Parameters
16β
17### TFormData
18β
19`TFormData`
20β
21Library-managed. Do not specify explicitly.
22β
23## Properties
24β
25### getFieldValue
26β
27```ts
28getFieldValue: GetFieldValueFn<TFormData>;
29```
30β
31Defined in: [FormApi/FormApiFieldMethods.types.public.ts:114](https://github.com/TanStack/form/blob/main/packages/form-core/src/FormApi/FormApiFieldMethods.types.public.ts#L114)
32β
33Reads the current value at a field path.
34β
35This is a read-only operation and does not create a `FieldApi` for the path.
36β
37#### Example
38β
39```ts
40const name = formApi.getFieldValue('profile.name')
41```
42β
43#### Returns
44β
45The current value at the path, or `undefined` when the path cannot
46be resolved at runtime.
47β
48***
49β
50### resetField
51β
52```ts
53resetField: ResetFieldFn<TFormData>;
54```
55β
56Defined in: [FormApi/FormApiFieldMethods.types.public.ts:131](https://github.com/TanStack/form/blob/main/packages/form-core/src/FormApi/FormApiFieldMethods.types.public.ts#L131)
57β
58Restores a field path from `defaultValues` and resets state for its field
59subtree.
60β
61Existing `FieldApi` instances at or below the path remain mounted.
62Form-wide dirty history remains unchanged; use `formApi.reset()` to clear
63it.
64β
65#### Example
66β
67```ts
68formApi.setFieldValue('profile.name', 'Grace')
69formApi.resetField('profile.name')
70// `profile.name` is restored from `defaultValues`.
71```
72β
73***
74β
75### setFieldValue
76β
77```ts
78setFieldValue: SetFieldValueFn<TFormData>;
79```
80β
81Defined in: [FormApi/FormApiFieldMethods.types.public.ts:99](https://github.com/TanStack/form/blob/main/packages/form-core/src/FormApi/FormApiFieldMethods.types.public.ts#L99)
82β
83Updates the current value at a field path.
84β
85The next value may be supplied directly or calculated from the current
86value. By default, the update marks the field as touched and dirty,
87notifies change listeners, and runs change validation.
88β
89#### Example
90β
91```ts
92formApi.setFieldValue('profile.name', 'Ada')
93formApi.setFieldValue('visitCount', (count) => count + 1)
94```