Form Package
Cmash Form — Feature Overview
Manage the input forms that drive your documents. From the admin panel or via API.
What Is Cmash Form?
Cmash Form stores and manages forms: the definitions of which fields a user fills in (text, choices, images, …) before a template turns the answers into a finished document. Forms are described as SurveyJS JSON schemas and are reused by templates, documents and projects. One form can serve many uses, stay multilingual and be kept separate per team.
The schema editor with live preview is provided by the companion package
cmash-surveyjs.

Key Features
Forms in the Admin Panel
- Navigation — entry Configuration → Forms with list, create and edit pages.
- Fields — name, slug (unique), description, languages, group, active flag; UUID and stored form data are shown read-only when editing.
- List — name, slug, language badges, active status, group, creator, origin (Internal/External for API-created), timestamps; ID/UUID/group/creator/origin columns can be toggled on.
- Duplicate — one click creates "Name (Copy)" with a fresh slug.
Reuse and Languages
- One form, many uses — link a form to several templates and documents.
- Multilingual — mark which languages a form contains translations for.
Team-Ready
- Group scope — assign forms to groups (brands); records are filtered by the user's group access.
- Change history — version snapshots for name, slug, description, schema, data, active flag, languages and group.
- Core features — tags, creator tracking and assignees via the CMAsh core.
Integrations & API
Token-secured (Laravel Sanctum) — manage forms from other systems:
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/forms |
List (filters: active, search, per_page, default 15) |
POST |
/api/forms |
Create (name required; slug generated if omitted) |
GET |
/api/forms/{form} |
Show |
PUT |
/api/forms/{form} |
Update |
DELETE |
/api/forms/{form} |
Delete |
GET/PUT/PATCH |
/api/forms/{form}/schema |
Read or replace only the form schema |
Response fields: id, uuid, name, slug, description, schema, data, is_active, languages, timestamps.
Permissions & Dependencies
- Permissions — none defined in this package; access follows the panel's standard resource authorization and the group scope (users see forms of groups they may access). API access requires a Sanctum token.
- Requires PHP 8.3+, Filament 5, Laravel Sanctum,
enobis/cmash>= 1.1.0. - At runtime — the model also uses the CMAsh suite's group, tag and version-history functionality and links to templates and documents.
- Database — table
cmash_forms, created by the package's migrations.
Configuration
This package has no config file and no environment variables. It only registers its API routes and loads its migrations and views.
| Item | Value |
|---|---|
| Config keys | none |
| Environment variables | none |
| Navigation | Configuration → Forms |
| Database table | cmash_forms |
Use Cases
- Shared input forms — one form powering several templates and documents.
- Multilingual data entry — declare the languages each form supports.
- Brand separation — keep each brand's forms in its own group.
- Automation — create and update form schemas from external systems.
- Safe iteration — duplicate a form and restore earlier versions from history.
Cmash Form: define once, fill in everywhere.