createForm function creates and manages forms in Solid applications using TanStack Form.
Import
Signature
Parameters
A function that returns the configuration object for the form. The function is reactive and will update the form when dependencies change.
Initial values for the form fields.
Callback function called when the form is submitted.
Validation functions for the form.
Validator that runs on every change.
Async validator that runs on change with debouncing.
Validator that runs when the form loses focus.
Validator that runs when the form is mounted.
Return Value
The form API instance with Solid-specific extensions.
A Solid component for rendering individual form fields.
A function for creating and managing individual fields.
A function for subscribing to form state changes.
A component for subscribing to form state.
Function to trigger form submission.
Function to reset the form to its initial state.
Current state of the form including values, errors, and validation status.
Usage Example
Basic Form
Form with Array Fields
Form with useStore
See Also
- createField - Create and manage individual fields
- Field Component - Render form fields declaratively
- FormApi - Core form API documentation