Introduction
A Laravel package for building dynamic forms with a Vue 3 frontend
What is Polyform?
Polyform handles all the boring parts of building forms in Laravel: defining fields, validating input, collecting submissions, and rendering everything with Vue. You get a full form system without having to build it from scratch.
rjp2525/polyform27+ Field Types
Text inputs, selects, matrix fields, repeaters, signatures, rich text editors and more. Every field type includes built-in validation and is configurable out of the box.
Multi-Step Forms
Split long forms into steps with progress indicators, conditional step visibility and autosave. Works well for surveys, onboarding flows and anything that would overwhelm users as a single page.
Drag-and-Drop Builder
A visual form builder with live preview, field reordering and inline editing. Lets non-developers create and modify forms without writing code.
Dynamic Options
Populate select, radio and checkbox fields from PHP enums, Eloquent models or custom resolvers. Options load asynchronously and support search, pagination and dependencies between fields.
Validation
Each field type has its own validator, and you can register custom ones. Supports required, min/max, regex, file validation and custom rules. Errors show inline next to the relevant field.
Webhooks & Events
Webhooks fire on form submissions via queued jobs with HMAC signing, automatic retries and configurable timeouts. Useful for syncing submissions to external services in real-time.
Data Exports
Export submissions to CSV, JSON or Excel with customizable columns and filtering. Handy for reporting or migrating data out.
Conditional Logic
Show or hide fields based on other field values. Supports multiple operators, complex conditions and nested logic.
Requirements
- PHP: 8.4 or higher
- Laravel: 12.x
- Frontend: Vue 3 + Inertia.js (for form rendering and builder)
- Database: MySQL, PostgreSQL, SQLite or SQL Server
Architecture Overview
Polyform follows standard Laravel package conventions with a few opinions baked in:
- Single-action invokable classes for all business logic
- String-backed enums with rich behavior methods
- Interface-driven extensibility for validators, file handlers and option sources
- Observer pattern for side effects (cache busting, file cleanup)
- Event-driven webhooks with queued jobs and HMAC signing
- Dynamic table names via config to avoid naming conflicts
- Polymorphic relationships for attaching forms to any model
Next Steps
Ready to get going? Here's where to head next:
Installation
Install via Composer and run the init command to publish config and migrations.
Quickstart
Build your first form in a few minutes with the end-to-end walkthrough.