madbox-99/filament-form-builder 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

madbox-99/filament-form-builder

最新稳定版本:v0.3.1

Composer 安装命令:

composer require 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.

README 文档

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

统计信息

  • 总下载量: 91
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固