Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Formsettings For Filament Laravel Package

blemli/formsettings-for-filament

A Filament plugin for managing configurable form settings from your admin panel. Define settings, persist values, and edit them through Filament, making dynamic form configuration simple in Laravel apps.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install via Composer and follow the package’s publish/install steps. If you plan to use ->persist(), publish and run the migration for per-user settings; formsettings:uninstall is the reverse path.
  • Look first at the HasFormSettings trait/contract and the fluent API: ->globally(), ->persist(), ->presets(). Check for a published config file that controls storage/defaults, and review the en/de translation files before hardcoding labels.
  • Smallest useful first case: add HasFormSettings to one form page, show the gear, and let users hide optional fields, drag-reorder tab order, star an entry point, and choose the default submit action. Keep the default session storage for this first pass; switch to ->persist() only when settings must survive sessions.

Implementation Patterns

  • Use the trait per form when only some pages should be customizable; use ->globally() when the gear should appear consistently across all form pages. Keep the choice explicit so users are not surprised by settings appearing where they do not expect them.
  • Choose storage by audience: session storage fits prototypes, anonymous forms, and shared machines; ->persist() fits authenticated users who expect their layout and submit preferences to survive reloads, sessions, and devices. Confirm auth context and migration are in place before enabling persistence.
  • Define a small set of named presets around real workflows, e.g. “Minimal”, “Data entry”, “Review”. Save presets after reorder/hide/entry-point changes, and keep reset-to-defaults as the escape hatch. Avoid a preset explosion; presets are most useful when they map to roles or repeated tasks.
  • Wire the submit action picker into your existing save logic: map save / save & next / save & back to the same controller or Livewire handlers your form already uses. Ensure “next” and “back” have sensible behavior at list boundaries, and make cmd+enter invoke the same validated path as the main button.
  • Treat drag order as tab order, not just visual order. Update DOM order so keyboard and screen-reader users follow the same sequence. Pair reorder with the entry point star so the autofocused field is the one users actually need first.
  • Include accurate field type metadata so the type icons render correctly. For custom fields, verify whether the package exposes an icon/type mapping extension point before overriding views.
  • When allowing optional fields to be hidden, make those fields nullable or conditionally required in validation and skip their processing server-side. Do not allow hiding fields that are required for the form’s business rules.

Gotchas and Tips

  • Hidden fields are removed from the form and skipped. If a hideable field is still required, validation will fail because the value is absent. Make hideable fields optional or adjust rules server-side.
  • cmd+enter triggers the selected action, so test it inside textareas and alongside any custom JS shortcuts. Confirm it does not bypass validation or submit a different action than the visible main button.
  • Session storage is per-session: settings disappear on logout or session expiry. Use ->persist() for durable per-user settings, and test the DB round-trip across pages, reloads, and devices. If multiple forms exist, verify settings are scoped to the right form/page.
  • Presets and reset are destructive to current customizations. Applying a preset overwrites the current state; reset wipes it. Consider a confirmation step for non-technical users, and test how old presets behave when fields are added or removed later.
  • Drag reorder must change DOM/focus order, not just CSS order. Test keyboard tabbing and screen-reader traversal; visual order that diverges from DOM order is an accessibility bug.
  • Entry point autofocus should be limited to one field. On mobile, autofocus can pop the keyboard unexpectedly; test the entry-point star on the devices your users actually use.
  • Only German and English translations ship. Add your own lang files for other locales and avoid hardcoded labels in custom views.
  • formsettings:uninstall is useful for clean removal, but back up persisted settings first and confirm what it drops. This is an initial release: pin the version and review changelogs before upgrading.
  • Debugging: the gear badge count should match persisted state. Inspect the session payload or per-user DB row, check network responses for 200/304, and watch for Livewire/version compatibility issues when the form re-renders. Prefer config, translations, and documented extension points over overriding package internals.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo