> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# Function: useSetFieldValue()

> **useSetFieldValue**(): (`formName`: `string` | `undefined`, `componentType`: `string` | `undefined`, `name`: `string`, `value`: `unknown`, `shouldTriggerSaveCallback?`: `boolean`) => `void`

获取用于更新表单字段值的 setFieldValue 函数。

## Returns

(`formName`: `string` | `undefined`, `componentType`: `string` | `undefined`, `name`: `string`, `value`: `unknown`, `shouldTriggerSaveCallback?`: `boolean`) => `void`

## Example

```tsx
const setFieldValue = useSetFieldValue();
<input onChange={(e) => setFieldValue("contactForm", "Input", "name", e.target.value, false)} />
```
