Multi-Step Forms
Creating and managing multi-step forms with progress indicators, step navigation and conditional step logic.
Overview
The FormStep model lets you break long forms into logical sections with progress tracking. Steps support conditional display, custom icons, per-step validation and flexible navigation. When a form has steps, it automatically renders in multi-step mode.
Core Properties
Creating Multi-Step Forms
Use the FormBuilder's addStep() method to define steps and assign fields:
addStep() are automatically assigned to that step. Fields without steps are rendered as single-page forms. Step Navigation Settings
Control multi-step behavior through form settings:
Conditional Steps
Steps can be shown or hidden based on field values from earlier steps:
Relationships
- form - BelongsTo Form (parent form)
- fields - HasMany FormField (fields in this step)
Frontend Usage
The PolyformMultiStepRenderer component handles the multi-step UI out of the box:
The usePolyformSteps composable gives you reactive step state and navigation methods.
Programmatic Step Creation
You can also create steps directly via Eloquent:
Step Validation
With validate_on_step_change enabled, only the current step's fields are checked before navigation. On final submission, all steps are validated together.
Draft Submissions
Turn on allow_save_draft to let users save progress and come back later:
- Draft submissions have status
STARTED - Users can resume from their last completed step
- Drafts are scoped to the authenticated user (requires login)
- Final submission changes status to
SUBMITTED
Best Practices
- Keep steps to 3-7 fields each for a good user experience
- Use clear step titles that tell users what to expect
- Enable validation on step change to catch errors early
- Group related fields together (e.g., Contact Info, Preferences, Review)
- Think about mobile users when planning the step flow
- Show a progress bar for forms with more than 3 steps