Download the PHP package packstub/filament-form-builder without Composer

On this page you can find all versions of the php package packstub/filament-form-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-form-builder

Filament Form Builder

![Filament Form Builder — build forms in the panel, render them anywhere](https://raw.githubusercontent.com/packstub/art/main/filament-form-builder/banner.jpg) [![Latest Version on Packagist](https://img.shields.io/packagist/v/packstub/filament-form-builder.svg?style=flat-square)](https://packagist.org/packages/packstub/filament-form-builder) [![Tests](https://img.shields.io/github/actions/workflow/status/packstub/filament-form-builder/tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/packstub/filament-form-builder/actions/workflows/tests.yml) [![Total Downloads](https://img.shields.io/packagist/dt/packstub/filament-form-builder.svg?style=flat-square)](https://packagist.org/packages/packstub/filament-form-builder) [![License](https://img.shields.io/packagist/l/packstub/filament-form-builder.svg?style=flat-square)](https://github.com/packstub/filament-form-builder/blob/main/LICENSE.md) [![Sponsor](https://img.shields.io/badge/sponsor-%E2%9D%A4-ea4aaa?style=flat-square&logo=githubsponsors&logoColor=white)](https://github.com/sponsors/icaliman)

Build forms in your Filament panel, put them on your site with one Blade tag, a Livewire component or a JSON call, and read the submissions where you already work.

Features

Compatibility

Plugin Filament Laravel PHP
1.x 4.x, 5.x 12.x, 13.x 8.3+

Installation

Register the plugin on your panel:

A Forms resource appears in the navigation.

Building a form

Create a form, give it a name, and add fields from the block picker. Each block carries the settings of its type: choices for a dropdown or a checkbox list, a range for numbers and dates, rows for long text, the level of a heading. Keys are derived from labels and kept unique, so values in submissions and exports keep a stable name.

The Settings tab holds the submit button label, the success message or a redirect URL, notification addresses, whether submissions are stored, an opening and closing date, a login requirement and the spam settings. The Embed tab shows the snippets for the form you are editing.

Rendering a form

Blade

A plain HTML form posting to /forms/contact. Without JavaScript the browser posts and comes back to the page with the success message or the errors and the old input. With the small script the component inlines (frontend.enhance), the form submits with fetch and shows the result in place, without reloading.

The component works on pages without a session: errors and old input travel in an encrypted query parameter instead of the session. The submit route runs the web middleware by default; on a session-less site set routes.middleware to [] and rely on the honeypot, the time trap and the rate limit.

Options: :enhance="false" for a plain POST only, :styles="false" when your site ships its own CSS, action and return to override the endpoint and the page to come back to.

Livewire

The fields as Filament components, validated in place. The page needs Filament's frontend assets:

JSON

The definition lists the fields with their type, rules and choices, plus a fresh protection token and the names of the anti-spam fields to send back. The POST answers { "ok": true, "message": "...", "redirect": null, "id": 12 } or 422 with errors keyed by field.

Hosted page

Every form is also served on its own at /forms/{slug} (switch off with routes.page, change the layout with routes.page_layout).

Submissions

Submissions live under the form as a relation manager: the date, a summary of the first values, the page they came from and the channel (web, json, livewire, code). Opening one shows every value and the details, and marks it read. Bulk actions mark as read, export or delete. The CSV export lists the form's current fields, then any key an older submission still carries.

Notifications and sinks

Add addresses to Notify by email and each submission is emailed (queued when a queue is configured). For anything else, write a sink:

Register it in config/packstub-form-builder.php under sinks, or at runtime with FormBuilder::sink(PushToCrm::class). The SubmissionReceived and SpamDetected events are dispatched as well.

Spam protection

Both checks can be tuned per form in its Settings tab. Dropped submissions look like a success to the sender and fire SpamDetected.

Settings

Setting What it does
Active Off: the form renders as closed and rejects submissions
Submit button, success message Shown by every renderer
Redirect after submit Sends the visitor to a URL instead of showing the message
Notify by email One email per submission to each address
Store submissions Off: the submission is only emailed and passed to sinks
Opens at, closes at An availability window
Require a logged-in user Rejects anonymous submissions
Honeypot, minimum seconds Per-form spam settings

Extending

A field type is a class: its id, an icon, the settings it shows in the builder, its validation rules, how it normalises a value, a Blade view and a Filament component.

Register it in the config under field_types, on the plugin with FormBuilderPlugin::make()->fieldTypes([RatingField::class]), or with FormBuilder::registerFieldTypes([...]). Hide built-ins with ->withoutFieldTypes([...]). Name the label in your language file under packstub-form-builder::form-builder.types.rating.

Submit from code:

Theming

The Blade renderer scopes everything under .fb-form and reads these variables, each with a fallback:

Publish the stylesheet and script with php artisan vendor:publish --tag=packstub-form-builder-assets and set frontend.styles / frontend.enhance to false to ship them your own way. Views publish with --tag=packstub-form-builder-views, the language file with --tag=packstub-form-builder-translations.

Configuration

Key Default What it does
tables.*, models.* form_builder_* Table names and model classes
field_types the built-ins Field types offered in the builder
routes.prefix forms URL prefix of the submit, definition and hosted page routes
routes.middleware ['web'] Middleware of the submit and definition routes
routes.page, page_middleware, page_layout on, ['web'], package layout The hosted page
submissions.throttle 10,1 Rate limit per IP; null to disable
submissions.store_ip, store_user_agent true What the submission row records
submissions.queue_notifications true Queue the notification emails
spam.honeypot, honeypot_field, min_seconds, token_field on, _fb_website, 2, _fb_token Spam defaults (per form in the panel)
sinks [] SubmissionSink classes
frontend.styles, frontend.enhance true Inline the stylesheet and the fetch script
navigation.*, gate Navigation group, icon, sort, unread badge; an ability to check

Plugin methods: fieldTypes(), withoutFieldTypes(), resource(), withoutResource(), navigationGroup(), navigationIcon(), navigationSort(), navigationBadge(), authorize().

Documentation

Installation · Building forms · Rendering · Submissions · Spam protection · Extending · Configuration

Testing

Changelog

See CHANGELOG.

Security

Report vulnerabilities to [email protected] rather than the issue tracker.

Credits

License

The MIT License (MIT). See LICENSE.


All versions of filament-form-builder with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
filament/filament Version ^4.0 || ^5.0
illuminate/contracts Version ^12.0 || ^13.0
spatie/laravel-package-tools Version ^1.92
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package packstub/filament-form-builder contains the following files

Loading the files please wait ...