# createForm

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

Creates a reactive form store from a form configuration. The form store manages form state and provides reactive properties.

```ts
const form = createForm<TSchema>(config);
```

## Generics

- `TSchema` `extends FormSchema`

## Parameters

- `config` `FormConfig<TSchema>`

### Explanation

`createForm` creates a reactive form store that manages form state using the provided Valibot schema. Validation runs when the form is submitted by default, and revalidates on input thereafter, but this can be customized with the `validate` and `revalidate` options.

## Returns

- `form` `FormStore<TSchema>`

## Related

The following APIs can be combined with `createForm`.

### Primitives

[`useField`](/solid/api/useField.md), [`useFieldArray`](/solid/api/useFieldArray.md)

### Components

[`Field`](/solid/api/Field.md), [`FieldArray`](/solid/api/FieldArray.md), [`Form`](/solid/api/Form.md)

### Methods

[`focus`](/methods/api/focus.md), [`getDeepErrors`](/methods/api/getDeepErrors.md), [`getErrors`](/methods/api/getErrors.md), [`getInput`](/methods/api/getInput.md), [`handleSubmit`](/methods/api/handleSubmit.md), [`insert`](/methods/api/insert.md), [`move`](/methods/api/move.md), [`remove`](/methods/api/remove.md), [`replace`](/methods/api/replace.md), [`reset`](/methods/api/reset.md), [`setErrors`](/methods/api/setErrors.md), [`setInput`](/methods/api/setInput.md), [`submit`](/methods/api/submit.md), [`swap`](/methods/api/swap.md), [`validate`](/methods/api/validate.md)
