edalzell/forma
Forma provides a simple, expressive way to build and manage forms in Laravel applications. Define fields, validation, and layout in code, then render clean markup—keeping form logic organized, reusable, and easy to maintain.
What it is. Forma is a developer-experience library aimed at addon authors, not application developers. It abstracts the repetitive work of building a Control Panel settings screen for a Statamic addon: declare a schema of fields in PHP, get a rendered CP form, and read the persisted values back through a facade. The value proposition is entirely about internal developer velocity, not end-user features.
Architecture fit. Forma only fits one scenario: we are authoring Statamic addons (internal or client-facing) that need editable configuration. It is the wrong tool for application-level settings, tenant configuration, or anything outside the Statamic CP — Statamic's own config cascade, Laravel's config/, and Filament/Nova-style admin panels already cover those. If our roadmap is "ship Statamic addons to clients," this is a plausible accelerant. If our roadmap is "ship a Statamic site," it is irrelevant.
Integration feasibility. Mechanically low-friction: composer require, register the service provider, define a schema, done. It is a runtime dependency of the addon (the CP page is served live), not a dev-only dependency, so it lands in every environment where the addon is installed. The real friction is organizational: it is a dependency our clients never see and therefore never vet, which means its bus factor becomes ours.
Technical risk.
Key questions to answer before adoption.
statamic/cms, laravel/framework, and PHP? Does it support the Statamic major we standardize on?.env overrides?Stack fit. Targets the Statamic 4/5 + Laravel 10/11/12 + PHP 8.1+ band. Confirm the constraint matrix in composer.json against our pinned platform versions before anything else; a mismatch here ends the evaluation cheaply.
Where it belongs in our architecture. As a build-time convenience for our Statamic addon template. It should be treated as infrastructure for our own code, not as a product dependency surfaced to clients. That framing matters: it means a fork is an acceptable outcome, and it means we should isolate it behind our own base addon scaffold so that exactly one place in our codebase imports it.
Migration path. Inventory existing addons that hand-roll a CP settings page (controller + Blade/Vue + save handler + validation + config read). Pick the smallest one — ideally ≤10 fields, single-site, no exotic fieldtypes — and port it. That port doubles as the spike: it will surface the persistence model, the validation story, and any Statamic-version friction in about a day. Do not port a complex addon first.
Compatibility management. Pin with a caret constraint, add the ported addon to the Statamic-major-upgrade test matrix, and record the CP rendering contract as a known upgrade hazard in the addon template's README. Treat a Statamic major as a forced re-evaluation point for Forma, not a routine bump.
Sequencing.
Given the maturity signals, the fork-and-vendor path deserves genuine weight alongside straight adoption — the code is small enough that owning it may cost less than the coordination risk of depending on it.
Maintenance. Low ongoing cost in steady state, but contingent on a single maintainer who is not us. Release cadence is unknown and the last release is recent, which is reassuring but not a track record. Budget for a periodic "is it still compatible?" check at each Statamic minor, and a hard checkpoint at each major. Because the package is MIT and appears small, the worst case is absorbing it — estimate that cost during the spike rather than assuming it.
Support. GitHub issues only, no SLA, no commercial backing. Internal mitigation: keep a short internal note covering where config values live, how to read them at runtime, and what to do when the CP page fails to render. That note is the entire operational knowledge transfer for this dependency.
Scaling. Effectively negligible. Forma is exercised only when an editor opens the addon's settings page; runtime reads of persisted values are cheap and cacheable. It does not sit on any request path for site traffic. The scaling concern is organizational, not technical: as the number of addons adopting it grows, so does the blast radius of a breaking upstream change.
Failure modes to plan for.
Ramp-up. Low for anyone already fluent in Statamic addon structure — realistically half a day to first working settings page, and documentation is README-level, so the learning comes from reading source. For a developer without Statamic addon experience, the ramp-up is dominated by Statamic's addon conventions, not by Forma. Document the schema-to-persistence mapping internally once, during the spike, so the second developer doesn't repeat the work.
How can I help you explore Laravel packages today?