Skip to content

Form Builder

This page is generated from public package documentation in capell-4/packages and the package manifest checked into the source repository.

FieldValue
Composer packagecapell-app/form-builder
Package slugform-builder
Product groupCapell FormBuilder
Tierpremium
Bundleform-builder
Runtime contextsadmin, frontend
Capell version^4.0
Source repositorycapell-app/packages
Source pathpackages/form-builder
Docs sourcepackages/form-builder/docs
Manifestcapell.json

FormBuilder adds form definitions, encrypted submissions, frontend Livewire rendering, validation, and submission status handling to Capell.

  • Package: capell-app/form-builder
  • Namespace: Capell\FormBuilder\
  • Surfaces: Filament admin resource, frontend Livewire, database
  • Service providers: packages/form-builder/src/Providers/FormBuilderServiceProvider.php
  • Capell dependencies: capell-app/admin, capell-app/core, capell-app/frontend
  • Lets editors build and publish forms while the package owns encrypted submissions, validation, notifications, and status handling.
  • Helps owners collect leads, enquiries, and operational requests without custom Livewire work for every form.
  • Gives developers a predictable form/submission model that can connect to Public Actions, Email Studio, and campaign workflows.

FormBuilder adds form definitions, encrypted submissions, frontend Livewire rendering, validation, and submission status handling to Capell.

  • Form and submission models.
  • Admin submissions resource under the reports navigation group.
  • Frontend Livewire form component.
  • Actions for validation, submission creation, archiving, read state, and spam marking.
  • FormSubmitted event.
  • Configurable submission storage and request metadata collection.

For developers: Keeps form schema, settings, submission payload, and metadata in data objects and casts so form handling remains typed across layers.

For teams: Lets editors collect responses from structured websites while keeping submission review inside the Capell admin workflow.

This package makes its Composer dependencies visible because they are part of the value proposition, not just plumbing. When an upstream package has a public repository, its linked preview card points readers back to the maintainers so their work gets proper credit.

Capell packages used here

Open-source packages used here

  • No extra third-party Composer package beyond the Capell package stack is required here.

Screenshots are generated from docs/screenshots.json during package deployment.

  • FormBuilder admin index.
  • Create/edit form schema screen.
  • Submissions index.
  • Frontend form output.
  • Submission detail view.
  • FormBuilderServiceProvider registers the package.
  • Config file: capell-form-builder.php.
  • Migrations create form-builder and submissions.
  • Models: Form and Submission.
  • Livewire component: FormComponent.
  • EncryptedDataCast protects stored submission data.
AreaPathPurpose
Actionspackages/form-builder/src/ActionsDomain operations. Test these directly where possible.
Datapackages/form-builder/src/DataStructured payloads, form state, view models, and integration data.
Enumspackages/form-builder/src/EnumsPersisted states and Filament option values.
Modelspackages/form-builder/src/ModelsEloquent records owned by the package.
Livewirepackages/form-builder/src/LivewireInteractive frontend or admin components.
Providerspackages/form-builder/src/ProvidersRegistration, extension hooks, routes, migrations, and resources.
Resourcespackages/form-builder/resourcesViews, translations, assets, and package resources.
Configpackages/form-builder/configPackage configuration and publishable config.
Databasepackages/form-builder/databaseMigrations, seeders, and settings migrations.
Testspackages/form-builder/testsPackage-level Pest coverage.
  • Livewire: FormComponent.
  • form-builder belongs to sites and stores handle, schema, settings, and active state.

  • submissions belongs to form-builder and sites and stores payload, meta, status, and submitted_at.

  • Submission payload and metadata are represented by data objects.

  • Deletion and retention rules should be verified against the host application policy.

  • Models: Form, Submission.

  • Migrations: 2026_05_10_190849_01_create_form-builder_table.php, 2026_05_10_190849_02_create_submissions_table.php.

  • Config: packages/form-builder/config/capell-form-builder.php.

  • Data objects live in src/Data/; use them for payloads, form state, and view models.

  • Events: FormSubmitted.
  • Register Capell extension points, routes, migrations, settings, render hooks, and resources from service providers.
  • Adds form-builder and submissions tables.
  • Adds frontend Livewire form component.
  • Adds config keys for storing submissions, IP address collection, and user agent collection.
  • No routes are visible in this package.
  • Install with composer require capell-app/form-builder in the host Capell application.
  • Run migrations through the host application package install flow.
  • In this repository, verify package changes with vendor/bin/pest; do not use php artisan.
  • Admin resource: SubmissionResource.
  • Navigation: Form submissions under the reports group.
  • Access is governed by SubmissionPolicy and site-scoped submission queries.
  • Disable IP/user agent collection where privacy policy requires it.
  • Run migrations before rendering form components.
  • Validate field schema before accepting public submissions.

Run package tests from the repository root:

Terminal window
vendor/bin/pest packages/form-builder/tests --configuration=phpunit.xml
  • Treat public routes as untrusted input and keep validation, permission checks, and side effects inside actions or dedicated services.
  • Put behaviour changes in src/Actions/; UI classes, commands, and controllers should call actions instead of owning domain logic.
  • Use package Data classes at boundaries instead of passing anonymous arrays between layers.
  • Use backed enums for persisted values and enum labels for Filament options.