blemli/formsettings-for-filament

rule your forms

Maintainers

Package info

github.com/blemli/formsettings-for-filament

pkg:composer/blemli/formsettings-for-filament

Transparency log

Fund package maintenance!

blemli

Statistics

Installs: 65

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v0.4.1 2026-08-04 14:24 UTC

This package is auto-updated.

Last update: 2026-08-15 06:14:02 UTC


README

rule your forms

Latest Version on PackagistGitHub Tests Action StatusTotal Downloads

A gear on your form pages that lets every user tune the form like the table column selector: reorder the tab order, hide optional fields, pick an autofocus entry point, and choose what the submit button does (save / save & next / save & back, cmd+enter included). Forms that use tabs (or wizard steps) show their fields grouped by tab, and an entry point inside another tab activates that tab on load.

formsettings panel

Installation

composer require blemli/formsettings-for-filament
php artisan formsettings-for-filament:install   # publishes config + migration (only needed with persist())

Usage

use Blemli\FormSettings\FormSettingsPlugin;

$panel->plugin(
    FormSettingsPlugin::make()
        ->persist()    // … settings per user in the DB instead of the session
        ->presets()    // … named presets
        ->publish([Profanity::make()])  // … users can share presets with ohters (requires persist)
        ->ignoreGroups(['English', 'Deutsch'])   // … tabs that should NOT group the panel (e.g. translation tabs)
        ->saveAndBackButton()   // to quickly edit things
        ->learn(after: 5)   // … quiet suggestions inside the panel "you often start in xyz, set as entrypoint?"
        ->except([EditPost::class])   // never show the gear on these pages
        ->showOnMobile()   // by default the gear hides on small screens
        ->perResource()   // one settings record per resource instead of per page
        ->predefined([PostResource::class => ['Quick entry' => ['hidden' => ['tags']]]])   // ship presets with your app
        ->authorize('use-formsettings')   // only show the settings to users which pass this gate
        ->optIn()      // dont show the gear anywhere except on Pages with the HasFormSettings Trait
);

With optIn(), single pages join via the trait:

use Blemli\FormSettings\Concerns\HasFormSettings;

class EditPost extends EditRecord
{
    use HasFormSettings;
}

Lock single fields against hiding and reordering:

TextInput::make('iban')->formSettingsLocked()

Find fields nobody uses (requires persist() + learn()):

php artisan formsettings:graveyard

Uninstall

Uninstall cleanly with php artisan formsettings:uninstall.

License

MIT — see LICENSE.