dayne-valourite/form-builder

A Laravel Filament form builder plugin.

v0.0.1 2025-06-27 14:38 UTC

This package is auto-updated.

Last update: 2025-06-27 15:09:43 UTC


README

Form Builder is a Laravel package built on top of Filament v4, allowing you to visually build and manage dynamic forms from your admin panel.
It lets you attach custom forms to any Eloquent model in your application with minimal setup.

✨ Features

  • Built with Filament v4 components
  • Define forms from your Filament panel UI
  • Attach forms to any Laravel model
  • Persist form definitions in the database
  • All form fields are stored in a single model column
  • Supports multiple form versions per model (coming soon)
  • Easily extendable and configurable

πŸ“¦ Installation

Requires Laravel 11+ and Filament 4+

Step 1: Install via Composer

composer require dayne-valourite/form-builder

Or, if you’re developing locally:

composer require dayne-valourite/form-builder --dev

Step 2: Publish and run migrations

php artisan vendor:publish --tag=form-builder-config
php artisan migrate

Step 3: Register the plugin in your Filament panel

In your PanelProvider:

use Valourite\FormBuilder\FormBuilderPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugins([
            FormBuilderPlugin::make(),
        ]);
}

🧩 Usage

  1. Create your own Laravel model, e.g.:
php artisan make:model Client -m
  1. Add a form_fields column to that model's migration:
$table->json('form_fields')->nullable();
  1. Configure allowed models in your config/form-builder.php:
'models' => [
    App\Models\Client::class,
    App\Models\Project::class,
],
  1. Go to your Filament admin panel β†’ Navigate to the Forms resource β†’ Create a form β†’ Assign it to your model (e.g., Client).

  2. The form data will be stored in the form_fields column on each model instance.

πŸ§ͺ Testing & Contributing

Feel free to test, modify, and extend the package! Pull requests, ideas, and improvements are welcome.

🚧 Roadmap

  • Attach forms to any model
  • Store form definitions in DB
  • Save submissions
  • Multi-page form support
  • Field-level validation and logic
  • Live preview / builder editor

πŸ“„ License

MIT Β© Dayne Valourite