madbox-99/filament-form-builder

Embeddable form builder for Laravel with a Filament v5 admin panel. Drop a JS snippet into any HTML page and collect form submissions through the Filament admin.

Maintainers

Package info

github.com/Cegem-360/filament-form-builder

pkg:composer/madbox-99/filament-form-builder

Statistics

Installs: 24

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.2.1 2026-04-23 13:52 UTC

This package is auto-updated.

Last update: 2026-04-23 13:52:35 UTC


README

Embeddable form builder for Laravel with a Filament v5 admin panel.

Drop a <script> tag into any HTML page (WordPress, static site, SPA) and collect form submissions in your Filament admin.

Features

  • Filament v5 resources for forms + submissions
  • Livewire-powered public form renderer (full page, iframe-friendly embed, or one-liner JS widget)
  • Repeater-based field builder in the admin (text, email, phone, number, textarea, select, checkbox, date)
  • Per-form submission actions (save to DB, auto-create lead, notify email addresses)
  • FormSubmissionProcessed event for app-specific side effects (Lead creation, CRM push, Slack notification...)
  • Pluggable multi-tenancy — any Eloquent model with a slug column works
  • Route-served widget JS with ETag cache busting — no publish step

Installation

composer require madbox-99/filament-form-builder
php artisan vendor:publish --tag=filament-form-builder-config
php artisan migrate

Set your tenant model in config/filament-form-builder.php:

'tenant_model' => \App\Models\Team::class,
'tenant_foreign_key' => 'team_id',

Register the plugin in your Filament panel provider:

use Madbox99\FilamentFormBuilder\FilamentFormBuilderPlugin;

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

Embed a form

From the form edit page, copy one of three snippets:

JS widget (recommended — auto-resizes, handles redirects):

<div id="ffb-form-{slug}"></div>
<script src="https://your-app.test/forms/embed.js" data-form="{slug}" async></script>

Iframe:

<iframe src="https://your-app.test/embed/forms/{slug}" width="100%" height="600" frameborder="0"></iframe>

Direct link: https://your-app.test/forms/{slug}

App-side integrations via event

The package dispatches Madbox99\FilamentFormBuilder\Events\FormSubmissionProcessed after every successful submission. Listen to create app-specific records:

use Madbox99\FilamentFormBuilder\Events\FormSubmissionProcessed;

Event::listen(FormSubmissionProcessed::class, function (FormSubmissionProcessed $event) {
    if ($event->actions->createLeadIfHasEmail && !empty($event->formData['email'])) {
        Lead::create([
            'team_id' => $event->form->team_id,
            'email' => $event->formData['email'],
            // ...
        ]);
    }

    if ($event->actions->notifyEmails !== []) {
        Notification::route('mail', $event->actions->notifyEmails)
            ->notify(new FormSubmissionReceived($event->submission));
    }
});

License

MIT