# setInput

Sets input values for the form or a specific field programmatically.

```ts
setInput<TSchema>(form, config);
setInput<TSchema, TFieldPath>(form, config);
```

## Generics

- `TSchema` <Property {...properties.TSchema} />
- `TFieldPath` <Property {...properties.TFieldPath} />

## Parameters

- `form` <Property {...properties.form} />
- `config` <Property {...properties.config} />

### Explanation

The `form` parameter is the form store to set input on. The `config` parameter specifies the path to the field and the new input values to set.

> `setInput` updates the **current input** (what the user is editing), but it does not change the **initial input** (the baseline used for `isDirty`). If your baseline data changes (e.g. after refetching from the server), prefer <Link href="../reset/">`reset`</Link> with a new `initialInput`.

## Related

### Primitives

<ApiList items={[{ text: 'createForm', href: '/solid/api/createForm/' }]} />

### Methods

<ApiList
  items={[
    { text: 'getInput', href: '../getInput/' },
    { text: 'reset', href: '../reset/' },
  ]}
/>
