Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Forms Laravel Package

revision-ten/forms

A Laravel package for defining, rendering, and managing forms. It helps structure fields and validation in code so form definitions can be reused across Blade views while keeping submission handling consistent.

View on GitHub
Deep Wiki
Context7

Getting Started

Start by confirming the package actually fits your Laravel version before committing to it — with a single star and zero dependents, there is no community trail to follow, so the README and source are your only documentation.

  1. Install and inspect.

    composer require revision-ten/forms
    

    Laravel's package auto-discovery should register the service provider. If it doesn't appear in bootstrap/providers.php (Laravel 11+) or config/app.php, add it manually. Immediately run:

    php artisan vendor:publish --provider="RevisionTen\Forms\FormsServiceProvider"
    

    and read every published file — this is your fastest way to understand the package's config surface, migrations, and any front-end assets it ships.

  2. Read the source, not just the README. For a package this small, open src/ and note:

    • The main service provider (bindings, singletons, route registration).
    • The form "definition" model — likely a Form model storing a JSON schema of fields.
    • The submission model/handler.
    • Any facade or builder entry point (e.g. FormBuilder::make()).
  3. Run migrations and check the schema.

    php artisan migrate
    

    Look at the table structure: it will tell you whether forms are stored as JSON, as relational field rows, or both. This dictates how you seed and version forms.

  4. First real use case: a contact form. The fastest path to validating the package is to build one small form end-to-end:

    • Create a form definition (via a seeder, tinker, or admin route the package registers).
    • Render it in a Blade view using whatever render helper the package exposes.
    • POST it back and confirm a submission row is persisted and validation errors surface.
    • Inspect the stored submission payload.

    If that loop takes more than an afternoon, treat the package as a research spike rather than a dependency.

Implementation Patterns

Treat form definitions as data, not code. The value of a form-builder package is that a non-developer can define forms at runtime. Keep schemas in the database (seeded or admin-created) and reference them by key or ID in your views rather than hardcoding fields in Blade. This keeps you aligned with the package's intended model and makes form evolution a data change, not a deploy.

Wrap rendering in your own Blade component. Don't scatter the package's render calls across views. Create a thin component:

<x-dynamic-form :key="$formKey" :model="$existing ?? null" />

and have it delegate to the package. This gives you one place to swap the renderer, add CSRF/recaptcha/validation-error styling, and control your markup — important when an unmaintained package changes or you need to replace it.

Own the submission pipeline. A common pattern with form builders is: package handles render + request parsing, but you want the post-submit side effect (email, CRM sync, notification) under your control. Listen for whatever submission event the package fires (check src/Events), or override the submit controller/route and call the package's submission service directly, then dispatch your own job. Keeping side effects in queued jobs means a slow integration doesn't break the user's submit experience.

Validate twice. Rely on the package's field-level validation for user feedback, but also validate on your side before persisting business-critical submissions. Store the raw payload and derive typed accessors — this protects you from schema drift when someone edits a form definition and old submissions no longer match.

Multi-step and conditional forms: if the package supports conditional field logic, keep the conditions declarative (in the JSON schema) rather than in JavaScript you maintain separately. Verify what the package actually supports before promising multi-step flows to stakeholders; a form builder's "conditional logic" often means show/hide only, not branching pages.

Integration with Livewire/Inertia: expect friction. A builder tied to server-rendered Blade will usually not drop cleanly into Inertia without an adapter around the submission endpoint. Budget time for a JSON API wrapper (a small controller returning the schema, plus a submit endpoint) if you're in a SPA context.

Gotchas and Tips

  • Adoption risk is the headline gotcha. One star and zero dependents means no Stack Overflow answers, no issue history to mine, and no guarantee of maintenance. Pin the exact version in composer.json ("revision-ten/forms": "x.y.z") and take a tagged release, not dev-main. Fork the repo into your VCS if you depend on it in production.
  • Check the Laravel version constraint first. Run composer why-not revision-ten/forms after install if auto-discovery fails. Small, lightly-maintained packages are often pinned to older Laravel releases and will silently break on new majors.
  • Migration conflicts. Form-builder packages love table names like forms, fields, submissions. Inspect the migration files before running them and rename tables in the published migration if they collide with your schema.
  • Asset publishing is easy to forget. If the package ships config/views/assets, run vendor:publish for each tag (--tag=forms-config, --tag=forms-assets, etc.). Debugging "why is my form unstyled" almost always lands here.
  • Validate the CSRF and route middleware. Check the package's registered routes and middleware group. A submission route outside web won't have sessions or CSRF protection — verify it's intentional and wrapped appropriately.
  • Debugging a failing render: dump the form definition JSON from the DB directly. Most builder bugs are malformed schema (a field type the renderer doesn't know, a missing name), not framework issues. Add a schema sanity check in your seeder.
  • Extension points: look for a contract/interface around field types or a renderer registry. If the package exposes one, register custom field types rather than fork. If it doesn't, wrap the package behind your own service (see the Blade component pattern above) so you can intercept rendering and submission without touching vendor code.
  • Logging submissions: if the package writes submissions but doesn't fire events, add a model observer on the submission model (if it's an Eloquent model) to trigger notifications — a low-risk way to get integrations without forking.
  • Have an exit ramp. Because maintenance is uncertain, keep form schemas exportable (plain JSON) and your rendering/submit logic behind your own thin layer. That way, replacing the package later is a swap of one component plus a migration of stored definitions — not a rewrite.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route