# move

> This document is the Markdown version of [formisch.dev/methods/api/move/](https://formisch.dev/methods/api/move/). For the complete documentation index, see [llms.txt](https://formisch.dev/llms.txt).

Moves an item within a field array from one index to another. All items between the old and new positions are shifted accordingly.

```ts
move<TSchema, TFieldArrayPath>(form, config);
```

## Generics

- `TSchema` `extends FormSchema`
- `TFieldArrayPath` `extends RequiredPath`

## Parameters

- `form` `BaseFormStore<TSchema>`
- `config` `MoveConfig<TSchema, TFieldArrayPath>`

### Explanation

The `form` parameter is the form store containing the field array. The `config` parameter specifies the path to the field array and the indices to move the item from and to.

## Related

### Primitives

[`useForm`](/react/api/useForm.md), [`useFieldArray`](/react/api/useFieldArray.md)

### Methods

[`insert`](/methods/api/insert.md), [`remove`](/methods/api/remove.md), [`replace`](/methods/api/replace.md), [`swap`](/methods/api/swap.md)
