> ## Agent Instructions
> Write for Filament/Laravel developers buying Flex Forms.
> Be precise: every setting documents what it does and how it works.
> Use Help Center components richly: Steps, Cards, Callouts, Tabs, CodeGroup, Mermaid, Badge for Pro.
> Never invent APIs; match the real Flex Forms package behavior.
# Insights pipeline
Source: https://flexforms.bjanczak.com/architecture/insights-pipeline
How fill events become Insights panels — beacons, today buffer, and rollups.
Understanding the pipeline helps you trust the numbers and choose Redis when traffic grows.
## Flow
```mermaid theme={}
flowchart LR
Fill[Fill_or_embed] --> Beacon[Analytics_beacon]
Beacon --> Today[Today_buffer]
Today --> Events[(Raw_events)]
Today --> Redis[(Optional_Redis_hashes)]
Events --> Job[Daily_rollup_job]
Job --> Daily[(Daily_tables)]
Redis --> UI[Insights_UI]
Daily --> UI
```
## Pieces
| Piece | Role |
| - | - |
| Beacon | Browser sends interaction batches from fill |
| Today buffer | Fast path for “today” metrics |
| Raw events | Source of truth for detailed / filtered queries |
| Daily rollups | Pre-aggregated history for snappy ranges (one queued job per day on multi-day catch-up) |
| Redis (optional) | HLL uniques + today hashes under load |
## What you configure
* Form-level: nothing required — Insights works out of the box after publish + traffic
* Global settings: Insights Redis mode, connection, prefix, HLL, today hashes — see [Redis scaling](/features/insights/redis-scaling)
* App schedule: Flex Forms registers a nightly rollup; multi-day catch-up (`--from` / `--to`) queues one job per date so workers can parallelize and retry safely
* GeoIP: CDN headers by default; optional local MaxMind. External ip-api Pro HTTPS is opt-in only (`FLEX_FORMS_GEO_IP_EXTERNAL_API` + API key) — see [Config & env](/developers/config-env)
Before a launch campaign, walk through the [Redis production checklist](/guides/redis-production).
Related: [Insights overview](/features/insights/overview) · [OpenAPI beacon](/developers/openapi-beacon)
# License flow
Source: https://flexforms.bjanczak.com/architecture/license-flow
How purchase, Composer install, domain activation, and Studio unlock work.
Flex Forms licensing has a clear customer path: buy → install with Composer → activate domain → build.
## End-to-end
```mermaid theme={}
sequenceDiagram
participant Buyer
participant Checkout as Checkout
participant Portal as License_portal
participant Registry as composer.bjanczak.com
participant App as Filament_app
Buyer->>Checkout: Purchase_Flex_Forms
Checkout-->>Buyer: Lemon_license_key
Buyer->>Portal: Register_account
Portal-->>Buyer: cmp_token_and_pk_forms
Buyer->>Registry: auth_cmp_plus_composer_require
Registry-->>Buyer: Package_download
Buyer->>Portal: Register_hostname
Buyer->>App: Paste_pk_forms
App->>Portal: Domain_check
Portal-->>App: Plan_and_allow
```
## Lemon key statuses
| Status | What it means for you |
| - | - |
| Inactive | Paid / valid, no domains activated yet — add a hostname in the portal |
| Active | At least one domain is activated |
| Expired / Disabled | Your license is no longer valid — renew or contact support |
Removing every domain returns the key to **inactive**. You can still add domains again and Composer access remains available while the purchase is valid.
## If the subscription expires or is cancelled
| Surface | What happens |
| - | - |
| Studio (edit / publish) | Blocked until you renew |
| Public fill & new submissions | Paused |
| Composer downloads (`cmp_…`) | Stopped |
| Data already in your database | **Kept** — never deleted by Flex Forms |
Renew or restore entitlement in the [License Portal](https://license.bjanczak.com/flex-forms/panel) / Lemon Squeezy, then re-check the domain. See [Activate license](/get-started/activate-license) and [Plans](/plans/overview).
## What you use day to day
| Artifact | Purpose |
| - | - |
| Lemon license key | Create / relink portal account only |
| Composer token `cmp_…` | Download / update from `composer.bjanczak.com` |
| Public key `pk_forms_…` | Stored in Global settings for Studio unlock |
| Portal domain list | Which hostnames may run the product |
| Plan (Standard / Pro / …) | Feature flags such as hide branding |
Follow [Installation](/get-started/installation) — repository + `cmp_…` auth + `composer require`.
Follow [Activate license](/get-started/activate-license).
Use Studio freely on activated hosts.
If something is locked, it is almost always a hostname mismatch or a missing public key in Global settings — not a Composer problem.
Related: [License Portal](/plans/license-portal) · [Plans](/plans/overview) · [Hide branding](/plans/hide-branding) · [Support](/resources/support)
# How Flex Forms fits together
Source: https://flexforms.bjanczak.com/architecture/overview
Product architecture for builders — Studio, fill, submissions, Insights, and license checks.
This page explains how the **product** works inside your Filament app. It is for teams shipping forms — not for packaging internals.
## Big picture
```mermaid theme={}
flowchart TB
subgraph panel [Filament_panel]
Studio[Studio_builder]
Settings[Form_and_global_settings]
Inbox[Submissions_inbox]
InsightsUI[Insights]
Contacts[Contacts]
end
subgraph public [Public_surface]
Fill[Fill_pages]
Embed[Embed_widget]
ShareInsights[Shared_Insights_links]
end
Studio -->|publish| Fill
Studio --> Embed
Fill --> Inbox
Fill --> InsightsUI
Fill --> Contacts
InsightsUI --> ShareInsights
Settings --> Studio
Settings --> Fill
```
## Studio → publish → fill
1. You design pages and fields in **Studio** (draft schema).
2. **Publish** promotes the schema so public fill routes use it.
3. Respondents open the **fill link** or an **embed**; answers become **submissions**.
4. **Insights** aggregates visits, answers, and drop-offs; **Contacts** consolidates respondents.
```mermaid theme={}
sequenceDiagram
participant Admin
participant Studio
participant Fill as Public_fill
participant DB as Database
Admin->>Studio: Drag_fields_and_logic
Admin->>Studio: Publish
Fill->>DB: Submission_and_events
Admin->>Studio: Read_Insights_and_inbox
```
## Why this architecture
| Surface | What you get |
| - | - |
| Studio | Canvas + left field settings + Logic / calculated / design — autosaves drafts |
| Form hub | Insights · Submissions · Share · Integrations — ops without leaving Filament. Form settings open from Studio as a modal. |
| Fill / embed | Dedicated runtime assets (not panel bloat), access gates, CAPTCHA, partials |
| Insights | Beacon → today buffer → rollups; optional Redis for uniques under load |
| License | Hostname + public key checked at runtime before Studio mutations and live submits |
That split is intentional: **builders** stay in Studio, **operators** stay in the hub, **respondents** hit a lean fill surface, and **your DB** remains the source of truth.
## Insights path (high level)
```mermaid theme={}
flowchart LR
Fill[Fill_embed] --> Beacon[Analytics_beacon]
Beacon --> Today[Today_buffer]
Today --> Events[(Raw_events)]
Today --> Redis[(Optional_Redis)]
Events --> Rollup[Daily_rollup_job]
Rollup --> Daily[(Daily_tables)]
Redis --> UI[Insights_UI]
Daily --> UI
UI --> Share[Public_share_links]
```
Beacons from fill feed a today buffer (optionally Redis), then daily rollups power Answers / Visits / Drop-offs. Details: [Insights pipeline](/architecture/insights-pipeline) and [Redis scaling](/features/insights/redis-scaling).
## License gate (runtime)
On each request Flex Forms checks whether this hostname is allowed for your public key. Allowed apps get the full product; denied apps cannot mutate Studio data or accept live submissions.
See [Activate license](/get-started/activate-license) and [License flow](/architecture/license-flow).
## Where to go next
Builder, logic, design, publish.
Drop forms on any website.
Push submissions to your stack.
Events, FieldMapper, custom integrations, Connections, actions.
Optional published configuration.
# Public API
Source: https://flexforms.bjanczak.com/developers/PUBLIC_API
Stable Flex Forms extension points for host applications — models, plugin hooks, integrations, events, and routes.
# Flex Forms public API
Stable extension points for host applications integrating with Filament Flex Forms.
## Model customization
* `Bjanczak\FilamentFlexForms\FlexForms`
* `useFormModel()`, `useSubmissionModel()`, `useConnectionModel()`, `useDeliveryModel()`
* `formModel()`, `submissionModel()`, `connectionModel()`, `deliveryModel()`
## Filament plugin
* `Bjanczak\FilamentFlexForms\FilamentFlexFormsPlugin`
* `registerIntegration(string|IntegrationDriver $driver)`
* `discoverIntegrations(string $path)`
* `registerPostSubmitAction(string $class)`
* `configureFormsTable(Closure $callback)` / `getConfigureFormsTable()`
* `configureSubmissionsTable(Closure $callback)` / `getConfigureSubmissionsTable()`
* `modifyFormsEloquentQueryUsing(Closure $callback)` / `getModifyFormsEloquentQueryUsing()`
* `modifySubmissionsEloquentQueryUsing(Closure $callback)` / `getModifySubmissionsEloquentQueryUsing()`
* `modifyConnectionsEloquentQueryUsing(Closure $callback)` / `getModifyConnectionsEloquentQueryUsing()`
* `resolveConnectionTenantIdUsing(Closure $callback)` / `resolveConnectionTenantId()`
* `pushSubmissionMiddleware(string $class)`
## Integrations
* `Bjanczak\FilamentFlexForms\Integrations\IntegrationRegistry`
* `register(IntegrationDriver|string $driver)`
* `registerMany(iterable $drivers)`
* `discover()`
* `all()`, `get(string $key)`, `has(string $key)`
* `Bjanczak\FilamentFlexForms\Integrations\Contracts\IntegrationDriver`
* `Bjanczak\FilamentFlexForms\Integrations\Contracts\SupportsInboundWebhooks`
* `Bjanczak\FilamentFlexForms\Integrations\Contracts\SupportsScheduledSync`
* Generic driver bases:
* `Bjanczak\FilamentFlexForms\Integrations\Support\Generic\GenericApiIntegrationDriver`
* `Bjanczak\FilamentFlexForms\Integrations\Support\Generic\GenericOAuthIntegrationDriver` (PKCE S256 by default)
* `Bjanczak\FilamentFlexForms\Integrations\Support\Generic\GenericSignedWebhookDriver`
* `Bjanczak\FilamentFlexForms\Integrations\Support\Generic\VerifiesFlexFormsInboundSignature`
* Field mapping:
* `Bjanczak\FilamentFlexForms\Integrations\Mapping\FieldMapper`
* `Bjanczak\FilamentFlexForms\Integrations\Mapping\FieldMapping`
* `Bjanczak\FilamentFlexForms\Integrations\Mapping\LegacyFieldMappingAdapter`
* `Bjanczak\FilamentFlexForms\Integrations\Mapping\FieldTransformRegistry`
* OAuth helpers:
* `Bjanczak\FilamentFlexForms\Integrations\Support\OAuth\OAuthTokenData`
* `Bjanczak\FilamentFlexForms\Integrations\Support\OAuth\OAuthTokenManager`
* `Bjanczak\FilamentFlexForms\Integrations\Support\OAuth\DeviceCodeOAuthFlow`
* HTTP / auth helpers:
* `Bjanczak\FilamentFlexForms\Integrations\Support\Http\GraphQlClient`
* `Bjanczak\FilamentFlexForms\Integrations\Support\Saml\SamlAssertionConsumer`
* `Bjanczak\FilamentFlexForms\Integrations\Support\ConnectionCredentialResolver`
* `Bjanczak\FilamentFlexForms\Integrations\Support\InboundWebhookResult`
* Credential mode enum:
* `Bjanczak\FilamentFlexForms\Integrations\Support\CredentialMode`
## Post-submit actions
* `Bjanczak\FilamentFlexForms\Contracts\PostSubmitAction`
* `Bjanczak\FilamentFlexForms\Support\PostSubmit\PostSubmitActionRegistry`
Form schema hook:
```php theme={}
'schema' => [
'thank_you' => [
'post_submit_actions' => ['your_action_key'],
'post_submit_action_configs' => [
'your_action_key' => ['url' => 'https://example.com'],
],
],
],
```
## Submission pipeline
* `Bjanczak\FilamentFlexForms\Contracts\SubmissionMiddleware`
* `Bjanczak\FilamentFlexForms\Support\Pipeline\SubmissionPipeline`
## Submission context
* `Bjanczak\FilamentFlexForms\Support\SubmissionContext`
## Events
* `Bjanczak\FilamentFlexForms\Events\FormSubmissionCompleted`
* `Bjanczak\FilamentFlexForms\Events\FormSubmissionPartialSaved`
* `Bjanczak\FilamentFlexForms\Events\FormSubmissionDeleted`
* `Bjanczak\FilamentFlexForms\Events\FormCreated`
* `Bjanczak\FilamentFlexForms\Events\FormUpdated`
* `Bjanczak\FilamentFlexForms\Events\FormDeleted`
* `Bjanczak\FilamentFlexForms\Events\FormPublished`
* `Bjanczak\FilamentFlexForms\Events\FormUnpublished`
* `Bjanczak\FilamentFlexForms\Events\IntegrationDispatchSucceeded`
* `Bjanczak\FilamentFlexForms\Events\IntegrationDispatchFailed`
* `Bjanczak\FilamentFlexForms\Events\IntegrationDeliveryReplayed`
* `Bjanczak\FilamentFlexForms\Events\IntegrationInboundReceived`
* `Bjanczak\FilamentFlexForms\Events\IntegrationInboundFailed`
* `Bjanczak\FilamentFlexForms\Events\PostSubmitActionSucceeded`
* `Bjanczak\FilamentFlexForms\Events\PostSubmitActionFailed`
* `Bjanczak\FilamentFlexForms\Events\PaymentCaptured`
* `Bjanczak\FilamentFlexForms\Events\PaymentFailed`
* `Bjanczak\FilamentFlexForms\Events\PaymentRefunded`
## Artisan
* `flex-forms:upgrade` — `Bjanczak\FilamentFlexForms\Commands\UpgradeCommand`
* `flex-forms:make-integration {name} {--api} {--oauth} {--webhook} {--inbound}` — scaffold host integration drivers
* `flex-forms:sync-integrations {--driver=} {--connection=}` — run scheduled remote sync for drivers implementing `SupportsScheduledSync`
## Testing helpers
* `Bjanczak\FilamentFlexForms\Testing\IntegrationDriverTestCase`
* `Bjanczak\FilamentFlexForms\Testing\AssertsIntegrationDriverContract` (Pest-friendly trait)
## Configuration
`config/filament-flex-forms.php`:
```php theme={}
'extensibility' => [
'submission_middleware' => [],
'integrations' => [
'drivers' => [],
'discover' => [],
'allow_override' => false,
'redact_keys' => [], // extra delivery-context keys always redacted
],
],
```
## OAuth / inbound routes
* `GET /flex-forms/connections/oauth/redirect/{connection}` (`flex-forms.connections.oauth.redirect`, auth required)
* `GET /flex-forms/connections/oauth/callback` (`flex-forms.connections.oauth.callback`; connection id in signed state)
* `POST /flex-forms/integrations/{driver}/webhook` (`flex-forms.integrations.inbound.webhook`) — drivers implementing `SupportsInboundWebhooks`
# Admin customization
Source: https://flexforms.bjanczak.com/developers/admin-customization
Customize Filament admin — navigation, Studio branding, forms table columns, and permission overrides via FilamentFlexFormsPlugin.
Flex Forms registers Filament resources for the legacy forms list and submissions inbox. Most hosts customize the **plugin** (navigation + Studio chrome) and optionally the **forms table** for tenant-specific columns.
## FilamentFlexFormsPlugin
Register in your panel provider:
```php theme={}
use Bjanczak\FilamentFlexForms\FilamentFlexFormsPlugin;
use Bjanczak\FilamentFlexForms\Support\Permissions\StudioAbility;
->plugin(
FilamentFlexFormsPlugin::make()
->navigationLabel('Lead capture')
->navigationGroup('Marketing')
->navigationSort(12)
->navigationIcon('heroicon-o-clipboard-document-list')
->brandLogo('/brand/studio-square.svg')
->brandName('Acme Studio')
->authorizeAbilityUsing(function (StudioAbility $ability, $user, $form): ?bool {
// Return true/false to decide, or null to fall through to Spatie/Gate
return null;
})
)
```
| Method | Effect |
| - | - |
| `navigation()` | Show/hide sidebar entry |
| `navigationLabel()` / `navigationGroup()` / `navigationSort()` / `navigationIcon()` | Sidebar presentation |
| `brandLogo()` / `brandName()` | Studio left-rail home mark |
| `authorizeAbilityUsing()` | Override Studio RBAC per ability |
Config/env fallbacks when plugin methods are unset: [Config & env](/developers/config-env) → **Filament navigation** and **Studio branding**.
Hide Flex Forms on a panel:
```php theme={}
FilamentFlexFormsPlugin::make()->navigation(false)
```
## configureFormsTable
Add columns, filters, and row actions to the Filament **Forms** resource table without forking the package:
```php theme={}
FilamentFlexFormsPlugin::make()
->configureFormsTable(function (\Filament\Tables\Table $table): \Filament\Tables\Table {
return $table
->columns([
...$table->getColumns(),
\Filament\Tables\Columns\TextColumn::make('team.name')
->label('Team')
->toggleable(),
])
->filters([
\Filament\Tables\Filters\SelectFilter::make('team_id')
->relationship('team', 'name'),
]);
});
```
The callback receives the default `Table` configuration — spread existing columns when you only append.
Related hooks (same plugin):
```php theme={}
->configureSubmissionsTable(fn ($table) => $table->…)
->configureFormForm(fn ($schema) => $schema->…) // rare — Studio is the primary editor
```
Use `configureFormsTable` for admin-only metadata (`team_id`, `external_id`). Do not duplicate Studio builder fields here.
## Permissions
Full RBAC guide: [Studio permissions](/developers/studio-permissions).
Quick strict mode for SaaS:
```bash theme={}
FLEX_FORMS_PERMISSIONS_STRICT=true
```
## Multi-panel setups
Register the plugin on every panel that should host Studio. License checks use **hostname**, not panel ID — register each hostname in the [License Portal](https://license.bjanczak.com/flex-forms/panel).
Different panels can use different `navigationGroup()` / `brandLogo()` chains on separate `FilamentFlexFormsPlugin::make()` instances.
The primary form editor is **Studio** (`/{record}/studio`), not the Filament resource form schema. Keep table customization focused on list/inbox ergonomics.
**Next:** [Configuration](/get-started/configuration) · [Studio permissions](/developers/studio-permissions) · [Custom models](/developers/custom-models)
# Config & env
Source: https://flexforms.bjanczak.com/developers/config-env
Every published config key in filament-flex-forms.php — uploads, builder limits, Insights, and license signing.
Publish the config to override any default:
```bash theme={}
php artisan vendor:publish --tag=filament-flex-forms-config
```
This writes `config/filament-flex-forms.php`. Keys listed below can also be set via `.env` without publishing (unless noted otherwise).
## License
License check, portal, and purchase URLs are **fixed in the package** (same endpoints Studio uses). They are not config or `.env` settings — changing them is not supported.
`license.signing_public_key` is loaded from the bundled public Ed25519 JWK at `resources/license/signing-public-key.json`, not an env var — you should not need to touch it.
## Security
When `true`, every form encrypts submission answers at rest (same as Global Settings → Security → Require encryption on all forms, but locked by env). Env: `FLEX_FORMS_FORCE_SUBMISSION_ENCRYPTION`. See [Multi-tenancy](/developers/multi-tenancy) and [General Settings](/features/settings/general).
## Localization (i18n)
Host overrides for Studio / Fill JS catalogs. Full workflow (publish PHP + JSON, add languages, RTL): [Localization & RTL](/get-started/languages-rtl).
Absolute or app-relative root for published JS locale JSON (`studio/{locale}.json`, `fill/{locale}.json`). Env: `FLEX_FORMS_I18N_JS_PATH`. Leave empty to use Laravel `lang_path('vendor/filament-flex-forms/js')`.
## Uploads
Disk for logo/cover/social images — must be **publicly readable** so crawlers can render link previews. Env: `FLEX_FORMS_DESIGN_DISK`.
Disk for respondent file uploads — kept **private**, served via signed URLs. Env: `FLEX_FORMS_SUBMISSIONS_DISK`.
Root path prefix inside each disk.
Compression quality for optimized images (WebP default **80**, JPEG **85**). Env: `FLEX_FORMS_WEBP_QUALITY`, `FLEX_FORMS_JPEG_QUALITY`.
Long-edge limits for Studio design assets. Cover writes a normal + thumb pair; logo fits a 500×500 box; social/OG is center-cropped to 16:9 JPEG. Images are never upscaled.
Public fill field images: normal max **1500px**, thumb max **350px** (WebP). Non-image uploads (PDF, video, audio, …) stay as a single original file.
Storage driver for design assets **and** public fill field uploads: `disk` (default) or `spatie`. When `spatie`, Media Library is the primary store (conversions + URLs). Env: `FLEX_FORMS_MEDIA_DRIVER`.
Optional Spatie disk override. When null, Flex Forms uses the purpose-aware design / submissions disks. Env: `FLEX_FORMS_SPATIE_DISK`.
Prefix for Spatie media collections (e.g. `flex-forms-design-cover`). Env: `FLEX_FORMS_SPATIE_COLLECTION_PREFIX`.
Generate Spatie responsive srcsets for cover/field `normal` conversions. Env: `FLEX_FORMS_SPATIE_RESPONSIVE`.
Queue Spatie conversions (needs a worker). Default `false` so Studio/fill get URLs immediately. Env: `FLEX_FORMS_SPATIE_QUEUE_CONVERSIONS`.
Rejects images above this resolution before processing.
Per-IP upload rate limit on Studio design uploads.
How long a signed private-file URL stays valid.
Total upload quota per form across all submissions.
**Required for multi-tenant apps.** `fn (?Authenticatable $user, FlexForm $form, string $ability): bool` — without it, any authenticated panel user can upload/view files for *any* form.
When `true`, uploads/views are denied unless `uploads.authorize` is set — flip this on for SaaS hosts to fail closed instead of open.
```php title="config/filament-flex-forms.php — multi-tenant authorization" theme={}
'uploads' => [
'authorize' => fn ($user, $form) => $user?->can('update', $form) ?? false,
'require_authorize_callback' => true,
],
```
```bash title=".env — disks, quotas, optional Spatie" theme={}
FLEX_FORMS_DESIGN_DISK=public
FLEX_FORMS_SUBMISSIONS_DISK=s3
FLEX_FORMS_QUOTA_BYTES_PER_FORM=1073741824
FLEX_FORMS_SIGNED_URL_TTL=30
FLEX_FORMS_WEBP_QUALITY=80
# Optional — requires composer require spatie/laravel-medialibrary
FLEX_FORMS_MEDIA_DRIVER=disk
# FLEX_FORMS_MEDIA_DRIVER=spatie
# FLEX_FORMS_SPATIE_DISK=
# FLEX_FORMS_SPATIE_COLLECTION_PREFIX=flex-forms
# FLEX_FORMS_SPATIE_RESPONSIVE=true
# FLEX_FORMS_SPATIE_QUEUE_CONVERSIONS=false
```
## Builder
Maximum number of pages a form can have in Studio. Env: `FLEX_FORMS_MAX_PAGES`.
## Filament navigation
Sidebar item for the Forms resource. Prefer the fluent plugin API in your panel provider; config / env are fallbacks.
```php theme={}
FilamentFlexFormsPlugin::make()
->navigationIcon('heroicon-o-envelope')
->navigationLabel('Forms')
->navigationGroup('Flex Forms')
->navigationSort(10);
```
Filament sidebar group. Env: `FLEX_FORMS_NAVIGATION_GROUP`.
Sidebar label. Env: `FLEX_FORMS_NAVIGATION_LABEL`.
Heroicon (or other Blade icon) for the Forms item. Env: `FLEX_FORMS_NAVIGATION_ICON`.
Sort order inside the group. Env: `FLEX_FORMS_NAVIGATION_SORT`.
## Studio branding
Left-rail branding shown inside Studio itself (not the public fill page) — override programmatically with `FilamentFlexFormsPlugin::make()->brandLogo()->brandName()`, or via `FLEX_FORMS_STUDIO_BRAND_LOGO` / `FLEX_FORMS_STUDIO_BRAND_NAME`.
## Studio account menu
The Studio left rail shows a Filament-style account avatar **below Global Settings**. Items are cloned from the current panel’s `userMenuItems()` (profile, logout, and any custom entries). Nested `children` in config extras render as nested submenus.
If your panel only customizes logout with `MenuItem::make()->icon(...)` (no URL), Studio still exposes **Log out** as a POST to Filament’s logout route.
Env: `FLEX_FORMS_STUDIO_USER_MENU`.
Env: `FLEX_FORMS_STUDIO_USER_MENU_EMAIL`.
Optional auth guard and expected Authenticatable FQCN (defaults to the Filament panel user). Env: `FLEX_FORMS_STUDIO_USER_MENU_GUARD` / `FLEX_FORMS_STUDIO_USER_MENU_MODEL`.
Attribute names or `fn (Authenticatable $user)` callbacks. When null, Flex Forms uses Filament’s name/avatar helpers and the user’s `email`.
Filament menu keys to hide in Studio (e.g. `['profile']`).
Extra menu entries merged after Filament’s. Each item may include `key`, `label`, `url`, `method` (`get`|`post`), `icon`, `color`, `sort`, `group`, `openInNewTab`, and nested `children` for submenus.
Per-user menu payload cache via FlexFormsCache (Redis when Insights Redis scaling is enabled, otherwise Laravel cache) plus an in-request memo. Invalidation is **TTL-only** — profile/menu changes are not bumped; wait for `cache_ttl` or disable cache in local/dev. Env: `FLEX_FORMS_STUDIO_USER_MENU_CACHE` / `FLEX_FORMS_STUDIO_USER_MENU_CACHE_TTL`.
## Submission emails (HTML)
Publish Blade templates to customize HTML visually:
```bash theme={}
php artisan vendor:publish --tag=filament-flex-forms-mail
```
Fallback accent when the form design has no accent color. Env: `FLEX_FORMS_MAIL_ACCENT`.
When true, respondent receipts include the answers table (also forced on when “Include answers receipt” is checked). Env: `FLEX_FORMS_MAIL_RESPONDENT_ANSWERS`.
Blade view names for team alerts, respondent receipts, and plain-text fallback.
## Studio permissions (optional Spatie)
Spatie is **not required**. See the full guide: [Studio permissions (RBAC)](/developers/studio-permissions).
Master switch. Env: `FLEX_FORMS_PERMISSIONS_ENABLED`.
When true and `spatie/laravel-permission` is installed, enforce mapped Gate names **only if** that permission exists in your DB. Env: `FLEX_FORMS_PERMISSIONS_SPATIE`.
Deny when no authorize callback and no registered Spatie permission. Env: `FLEX_FORMS_PERMISSIONS_STRICT`.
`fn (Authenticatable $user, StudioAbility $ability, ?FlexForm $form): ?bool` — return null to continue the chain.
Maps each Studio ability (e.g. `createForm`) to a Gate / Spatie name (e.g. `Create:FlexForm`).
## Insights
How long raw analytics events are kept before pruning.
Hard cap on filtered raw-event cursor rows. When exceeded, the scan stops and `meta.filtered_scan_capped` is set. Global Insights with filters on ranges longer than 31 days also clamps the scan window and sets `meta.filtered_range_clamped` (separate from the row-budget flag). Env: `FLEX_FORMS_INSIGHTS_FILTERED_SCAN_MAX_ROWS`.
Seconds an Insights query result is cached — see [Redis production checklist](/guides/redis-production).
Force Redis scaling on/off, or leave unset to auto-detect connectivity. Env: `FLEX_FORMS_INSIGHTS_SCALING_REDIS`.
Named Redis connection and key namespace.
Country/city for Insights maps. Defaults: CDN headers, optional local MaxMind. External `ip-api` Pro HTTPS is **opt-in** (`enable_external_api` + `api_key`) — visitor IPs are personal data; keep off unless you have a DPA and disclose the processor. Plain HTTP is never used.
Soft per-form × IP event budget for the analytics beacon (in addition to the route throttle). Env: `FLEX_FORMS_BEACON_EVENTS_PER_FORM_IP`.
User-agent substrings, referrer substrings, and regexes used to exclude bots/crawlers from traffic and drop-off numbers.
Class names implementing `SubmissionMiddleware`, run around submission ingest. Also push via `FilamentFlexFormsPlugin::pushSubmissionMiddleware()`. See [Events & hooks](/developers/events-hooks).
Extra `IntegrationDriver` classes registered at boot. Prefer `FilamentFlexFormsPlugin::registerIntegration()` for panel-scoped apps. See [Custom integrations](/developers/custom-integrations).
Absolute paths scanned for `*.php` driver classes (e.g. `app_path('FlexForms/Integrations')`).
When false, host drivers cannot replace shipped keys like `mailchimp`.
Extra delivery-context keys always redacted before persistence (e.g. `ssn`, `nip`).
Full Redis-specific tuning (connection, prefix, HyperLogLog, today-hashes) is covered end to end in [Redis production checklist](/guides/redis-production).
No — every key has a sane default and can be overridden purely with env vars. Publish only if you need PHP-level overrides like `uploads.authorize`.
Any authenticated panel user can view/upload files for any form's Studio — set `uploads.authorize` and `require_authorize_callback` before going to production with more than one tenant. Step-by-step: [Multi-tenancy](/developers/multi-tenancy).
**Next:** [Multi-tenancy](/developers/multi-tenancy) · [Upload disks](/developers/upload-disks) · [Extensibility overview](/developers/extensibility-overview) · [Upgrading](/get-started/upgrading) · [Redis production checklist](/guides/redis-production) · [Webhooks](/developers/webhooks)
# Custom integrations
Source: https://flexforms.bjanczak.com/developers/custom-integrations
End-to-end cookbooks for Generic API, OAuth (PKCE), and signed webhooks — scaffold, register, map fields, test, and ship.
Ship a first-party feed for your internal API or a niche SaaS tool by implementing an **integration driver**. Drivers appear under **Integrations** (global credentials / Connections) and attach per form as feeds.
## IntegrationDriver contract
Every driver implements `Bjanczak\FilamentFlexForms\Integrations\Contracts\IntegrationDriver`:
| Method | Purpose |
| - | - |
| `key()` / `name()` / `description()` / `category()` | Identity in Studio |
| `globalConfigFields()` / `connectionConfigFields()` | Panel-wide vs Connection-tier credentials |
| `credentialMode()` | `GlobalOnly`, `ConnectionOnly`, or `GlobalOrConnection` |
| `driverSchemaVersion()` | Bump when feed/connection JSON shape changes |
| `formFeedFields()` | Per-form options (list ID, mapping, endpoint) |
| `normalizeGlobalConfig()` / `normalizeFormFeed()` | Sanitize saved JSON |
| `isConfigured()` / `testConnection()` | Integrations rail health check |
| `dispatch(..., ?FlexFormIntegrationConnection $connection = null)` | Send payload on submission |
Extend `AbstractIntegrationDriver` for shared HTTP helpers, or start from:
* `GenericApiIntegrationDriver` — JSON POST + bearer + SSRF guard + redacted delivery meta
* `GenericOAuthIntegrationDriver` — OAuth authorize/callback with **PKCE S256** + Connections
* `GenericSignedWebhookDriver` — HMAC-signed outbound webhooks
## Register drivers (3 ways)
### 1. Config (explicit)
```php title="config/filament-flex-forms.php" theme={}
'extensibility' => [
'integrations' => [
'drivers' => [
\App\FlexForms\Integrations\AcmeCrmDriver::class,
],
'discover' => [],
'allow_override' => false,
],
],
```
### 2. Discovery folder
```php theme={}
'discover' => [
app_path('FlexForms/Integrations'),
],
```
### 3. Plugin `boot()`
```php theme={}
FilamentFlexFormsPlugin::make()
->registerIntegration(\App\FlexForms\Integrations\AcmeCrmDriver::class);
```
## Artisan scaffold
```bash theme={}
php artisan flex-forms:make-integration AcmeCrm --api
php artisan flex-forms:make-integration AcmeHub --oauth
php artisan flex-forms:make-integration AcmeHook --webhook
```
Creates:
* `app/FlexForms/Integrations/{Name}Driver.php`
* `tests/Feature/FlexForms/{Name}DriverTest.php` (skip with `--no-test`)
The Pest stub registers the driver and extends `IntegrationDriverTestCase` (key slug, credential mode, normalize helpers).
***
## Cookbook 1 — REST list API (end-to-end)
`php artisan flex-forms:make-integration AcmeList --api`
Override `endpoint()` (HTTPS public URL only — SSRF guarded) and `buildPayload()` from FieldMapper output. Optionally override `testConnectionRequest()` to return a health URL so **Test connection** performs a real GET ping.
Add the class to `extensibility.integrations.drivers` (or discovery).
Open **Integrations**, paste the API key (encrypted at rest). For Connection-tier drivers, create a Connection instead.
Enable the feed → Advanced field mapping (`email` → `email`, transforms like `trim` / `phone_e164`). Save + publish.
Use **Send test** — delivery ledger shows `source=sandbox` with redacted secrets. Submit a live response and confirm a `succeeded` delivery row.
Extend `IntegrationDriverTestCase` and add `Http::fake()` coverage for a 200 dispatch and a 429 retryable failure if your driver surfaces that status.
```php title="app/FlexForms/Integrations/AcmeListDriver.php" theme={}
final class AcmeListDriver extends GenericApiIntegrationDriver
{
public function key(): string { return 'acme_list'; }
public function name(): string { return 'Acme List'; }
protected function endpoint($form, $submission, array $globalConfig, array $feed): string
{
return 'https://api.acme.example/v1/subscribers';
}
protected function testConnectionRequest(array $config): ?string
{
return 'https://api.acme.example/health';
}
protected function buildPayload(array $mapped, $form, $submission, array $feed): array
{
return [
'email' => $mapped['email'] ?? null,
'tags' => $mapped['tags'] ?? [],
'source' => 'flex-forms',
];
}
}
```
***
## Cookbook 2 — OAuth CRM with PKCE (end-to-end)
Flex Forms OAuth Connections use **authorization code + PKCE (S256)** by default.
`php artisan flex-forms:make-integration AcmeHub --oauth`
Implement `getOAuthAuthorizeUrl()`, `getTokenUrl()`, `getClientId()`, `getClientSecret()`, `getOAuthScopes()`. Keep `usesPkce()` at default `true` unless the provider rejects PKCE.
In the provider console set redirect URI exactly to
`https://your-domain/flex-forms/connections/oauth/callback`.
**Integrations → Connections → Create → Connect**. Redirect builds `code_challenge`; callback exchanges `code` + `code_verifier` (one-time cache, bound to admin user) and returns to the Connections tab.
Set `connection_id` on the feed (Studio Connections picker). Tokens refresh via `OAuthTokenManager` (mutex + `needs_reauth` on failure).
**Test connection**, then **Send test**. Confirm deliveries never store raw `client_secret` / bearer tokens.
Override `usesPkce(): false` only for legacy providers. Prefer fixing the provider registration over disabling PKCE.
***
## Cookbook 3 — Signed partner webhook (end-to-end)
`php artisan flex-forms:make-integration AcmeHook --webhook`
Store `webhook_secret` on the Connection (or global config). Outbound body is HMAC-SHA256 signed.
Set `request_url` to an HTTPS public endpoint. Private / metadata hosts are rejected (SSRF guard).
Map nested fields, enable the feed, **Send test**, inspect the submission ledger (`source=sandbox`, redacted context).
***
## Field mapping + transforms
Host transforms:
```php theme={}
use Bjanczak\FilamentFlexForms\Integrations\Mapping\FieldMapper;
FieldMapper::extend('acme_code', fn (mixed $value): mixed => strtoupper((string) $value));
```
Built-ins include `trim`, `uppercase`, `merge_template`, `split_name`, `phone_e164`, `file_url`, and more — see [Field mapping](/developers/field-mapping).
## Isolation & safety checklist
* Use `AbstractIntegrationDriver::httpClient()` (timeouts, no open redirects)
* Expect delivery `context` to be redacted (`Authorization`, `api_key`, tokens)
* Scope Connections in multi-tenant apps via `modifyConnectionsEloquentQueryUsing()` — [Multi-tenancy](/developers/multi-tenancy)
* Run `php artisan flex-forms:upgrade` after package updates
## Platform helpers (sealed)
GraphQL HTTP helpers, device-code OAuth, SAML assertion verification, inbound webhook receivers, and scheduled remote sync are first-class SDK surfaces — see [Public API](/developers/PUBLIC_API), [Inbound webhooks](/developers/inbound-webhooks), and the sections below in this cookbook.
**Next:** [OAuth integrations](/developers/oauth-integrations) · [OAuth token management](/developers/oauth-token-management) · [Field mapping](/developers/field-mapping) · [Integrations catalog](/integrations/overview)
# Custom models
Source: https://flexforms.bjanczak.com/developers/custom-models
Swap FlexForm, submission, connection, and delivery Eloquent models with FlexForms::useFormModel and related registrars.
Default Flex Forms models work for single-tenant Filament apps. Multi-tenant or white-label hosts often need extra columns (`team_id`, `organization_id`), global scopes, or separate connection tables — register subclasses **early** in `AppServiceProvider::register()`.
## Registrar API
```php theme={}
use Bjanczak\FilamentFlexForms\FlexForms;
use App\Models\TenantFlexForm;
use App\Models\TenantFlexFormSubmission;
use App\Models\TenantIntegrationConnection;
use App\Models\TenantIntegrationDelivery;
public function register(): void
{
FlexForms::useFormModel(TenantFlexForm::class);
FlexForms::useSubmissionModel(TenantFlexFormSubmission::class);
FlexForms::useConnectionModel(TenantIntegrationConnection::class);
FlexForms::useDeliveryModel(TenantIntegrationDelivery::class);
}
```
Each class **must extend** the package base model:
| Registrar | Base class |
| - | - |
| `useFormModel()` | `Bjanczak\FilamentFlexForms\Models\FlexForm` |
| `useSubmissionModel()` | `Bjanczak\FilamentFlexForms\Models\FlexFormSubmission` |
| `useConnectionModel()` | `Bjanczak\FilamentFlexForms\Models\FlexFormIntegrationConnection` |
| `useDeliveryModel()` | `Bjanczak\FilamentFlexForms\Models\FlexFormIntegrationDelivery` |
Invalid classes throw `InvalidArgumentException` at registration time.
## Example: tenant-scoped form
```php title="app/Models/TenantFlexForm.php" theme={}
namespace App\Models;
use Bjanczak\FilamentFlexForms\Models\FlexForm;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
final class TenantFlexForm extends FlexForm
{
protected static function booted(): void
{
static::addGlobalScope('tenant', function (Builder $query): void {
if ($teamId = auth()->user()?->current_team_id) {
$query->where('team_id', $teamId);
}
});
}
public function team(): BelongsTo
{
return $this->belongsTo(Team::class);
}
}
```
Add migrations for new columns on the same tables (`flex_forms`, `flex_form_submissions`, `flex_form_integration_connections`, …) — do not rename tables unless you override `$table` consistently.
## Resolving models in your code
Use the registrar instead of hard-coded class names:
```php theme={}
$formClass = FlexForms::formModel();
$submissionClass = FlexForms::submissionModel();
$formClass::query()->where('slug', $slug)->first();
```
Package internals (ingestor, integration manager, policies) resolve through the same API — custom models participate everywhere once registered.
## Connections and deliveries
When swapping connection/delivery models:
* Keep `credentials` encrypted cast for OAuth tokens — [OAuth token management](/developers/oauth-token-management)
* Scope Connections per tenant the same way as forms
* Delivery rows power admin replay UI — preserve foreign keys to submissions
## Policies and authorization
Register policies on your subclass if Filament resolves `$record` as the custom model:
```php theme={}
Gate::policy(TenantFlexForm::class, TenantFlexFormPolicy::class);
```
Combine with [Multi-tenancy](/developers/multi-tenancy) (`uploads.authorize`, `authorizeAbilityUsing`).
Call registrars before Flex Forms boots ( `register()`, not `boot()` ). Late registration leaves cached resolves pointing at default models.
**Next:** [Multi-tenancy](/developers/multi-tenancy) · [OAuth integrations](/developers/oauth-integrations) · [Admin customization](/developers/admin-customization)
# Embed widget API
Source: https://flexforms.bjanczak.com/developers/embed-api
The real data attributes, query flags, and loader script behind every Flex Forms embed.
Installation and Composer auth are covered in [Installation](/get-started/installation). This page is the reference for developers wiring embeds into custom platforms, SPAs, or CMS templates beyond copy-pasting the Share snippet.
## Assets
`embed.js` runs on the **host page** (your website); `embed-child.js` runs **inside the fill iframe** and reports things like content height back to the parent for auto-resize. Both are registered `loadedOnRequest()` — they never load globally in the Filament admin panel.
## Standard iframe embed
The full public fill URL for the form, including the `/embed` suffix and any query flags. This is what `embed.js` reads to lazily set `src` on load.
```html title="Minimal iframe embed" theme={}
```
```js title="Manually (re)scan the page for embeds" theme={}
// Call after injecting new iframes dynamically (e.g. client-side routing)
window.FlexForms.loadEmbeds();
```
## Query flags (iframe src)
Flag
Type
Effect
hideTitle
1
Hides the form title inside the fill page
alignLeft
1
Left-aligns content instead of centering
transparentBackground
1
Removes the fill page's background so your page shows through
dynamicHeight
1
Iframe reports content height to the parent for auto-resize (default on for embeds)
formEventsForwarding
1
Forwards fill lifecycle events to the host page via postMessage
## Popup mode (button or link trigger)
```html title="Button trigger" theme={}
```
```html title="Link trigger (hash-based)" theme={}
Open form
```
Attribute (or hash key)
Values
data-flex-form-open
The form's slug
data-flex-form-layout
modal
data-flex-form-width
200–1200 (pixels)
data-flex-form-position
e.g. bottom\_right
data-flex-form-hide-title
1
data-flex-form-align-left
1
data-flex-form-overlay
1 (dim the page behind the popup)
data-flex-form-auto-close
0 (disable auto-close on submit)
data-flex-form-custom-form-url
Override base URL (advanced/self-hosted proxies)
```html theme={}
```
Always resolve the exact host, slug, and script URL from your own app's Share tab or `FormEmbedBuilder` output — the samples above use placeholder hosts and will 404 as-is.
Content on this page is for developers wiring Flex Forms into custom platforms, SPAs, and CMS templates in production Filament apps.
**Next:** [Query params](/developers/query-params) · [Embed on any platform](/guides/embed-platforms) · [OpenAPI beacon](/developers/openapi-beacon)
# Events & hooks
Source: https://flexforms.bjanczak.com/developers/events-hooks
Listen for FormSubmissionCompleted, queue listeners, submission pipeline middleware, and client-side embed events.
Flex Forms dispatches Laravel events at clear lifecycle points. Use **events + listeners** (or queued listeners) for server-side reactions — not Eloquent observers on submission models.
## FormSubmissionCompleted
Fired after a **full** (non-partial) submission is ingested and persisted — in the same `afterCommit` callback that queues `FinalizeSubmissionSideEffectsJob`. Partial saves dispatch `FormSubmissionPartialSaved` instead.
**Ordering (important):** the event runs **before** outbound integrations and Studio post-submit actions. Those run asynchronously in the finalize job. Do **not** assume CRM delivery rows exist when your listener runs. If you need “after integrations,” listen for `IntegrationDispatchSucceeded` / `PostSubmitActionSucceeded`, or queue work that polls delivery status.
The event carries:
* `$event->form` — `FlexForm` instance
* `$event->submission` — `FlexFormSubmission` instance
* `$event->context` — typed `SubmissionContext` (`source`, `formId`, `submissionId`, optional safe `meta`) — never answers or secrets
```php theme={}
$event->context->source; // e.g. "ingest"
$event->context->formId;
$event->context->submissionId;
$event->context->toArray(); // array shape for logs
```
### Basic listener
```php title="app/Listeners/SyncSubmissionToCrm.php" theme={}
namespace App\Listeners;
use Bjanczak\FilamentFlexForms\Events\FormSubmissionCompleted;
final class SyncSubmissionToCrm
{
public function handle(FormSubmissionCompleted $event): void
{
// $event->submission->answers, $event->form->slug, …
}
}
```
Register in `AppServiceProvider` or an event service provider:
```php theme={}
use Bjanczak\FilamentFlexForms\Events\FormSubmissionCompleted;
use App\Listeners\SyncSubmissionToCrm;
use Illuminate\Support\Facades\Event;
Event::listen(FormSubmissionCompleted::class, SyncSubmissionToCrm::class);
```
Or use Laravel's attribute discovery (`#[ListensTo(FormSubmissionCompleted::class)]`) if your app uses it.
### Queued listener
Offload slow work (CRM API, enrichment) to the queue:
```php theme={}
use Bjanczak\FilamentFlexForms\Events\FormSubmissionCompleted;
use Illuminate\Contracts\Queue\ShouldQueue;
final class NotifySlackOnSubmission implements ShouldQueue
{
public string $queue = 'integrations';
public function handle(FormSubmissionCompleted $event): void
{
// …
}
}
```
Integrations, mail, and Insights side effects already use queues in production. Your listeners should assume a queue worker is running.
## Other server events
| Event | When |
| - | - |
| `FormSubmissionPartialSaved` | Partial / save-later progress stored |
| `FormSubmissionDeleted` | Submission removed from inbox |
| `FormCreated` / `FormUpdated` / `FormDeleted` | Studio create, schema save, delete |
| `FormPublished` / `FormUnpublished` | Publish state changed in Studio |
| `IntegrationDispatchSucceeded` / `IntegrationDispatchFailed` | Per-feed outbound result |
| `IntegrationDeliveryReplayed` | Admin replayed a failed delivery |
| `PostSubmitActionSucceeded` / `PostSubmitActionFailed` | Per Studio post-submit action |
| `PaymentCaptured` / `PaymentFailed` / `PaymentRefunded` | Stripe payment block lifecycle |
Use these when you need observability beyond a single `FormSubmissionCompleted` hook.
Submission events are **not** `ShouldBroadcast` by default. Real-time admin dashboards are out of scope for this package — broadcast from your own listener if you need WebSockets.
## Submission pipeline middleware
Pipeline middleware is registered once (config + `push()`). Duplicate class names are ignored so Octane/long-lived workers do not stack the same middleware repeatedly.
For logic that must run **before** answers are saved (validation, enrichment, blocking spam), implement `SubmissionMiddleware` instead of listening after the fact.
```php title="app/FlexForms/BlockDisposableEmails.php" theme={}
namespace App\FlexForms;
use Bjanczak\FilamentFlexForms\Contracts\SubmissionMiddleware;
use Bjanczak\FilamentFlexForms\Support\Pipeline\SubmissionPipelinePayload;
use Closure;
final class BlockDisposableEmails implements SubmissionMiddleware
{
public function handle(SubmissionPipelinePayload $payload, Closure $next): SubmissionPipelinePayload
{
$email = $payload->answers['email'] ?? null;
if (is_string($email) && str_ends_with(strtolower($email), '@mailinator.com')) {
return $payload->abort('Please use a work email address.');
}
return $next($payload);
}
}
```
Register in config:
```php theme={}
'extensibility' => [
'submission_middleware' => [
\App\FlexForms\BlockDisposableEmails::class,
],
],
```
Or push at runtime from `AppServiceProvider`:
```php theme={}
use Bjanczak\FilamentFlexForms\Support\Pipeline\SubmissionPipeline;
app(SubmissionPipeline::class)->push(\App\FlexForms\BlockDisposableEmails::class);
```
Check `$payload->isAborted()` downstream; aborted submissions surface the message to the respondent.
Do **not** attach Eloquent observers to `FlexFormSubmission` for ingest side effects. The ingestor owns persistence order; observers race integrations and encryption. Use events or pipeline middleware instead.
## Client-side embed events
For marketing sites and SPAs, forward fill lifecycle events to the host page with `formEventsForwarding=1` on the embed URL. The parent receives `postMessage` payloads like `FlexForms.FormSubmitted`.
Full attribute list and event names: [Embed widget API](/developers/embed-api).
```html theme={}
```
```js theme={}
window.addEventListener('message', (event) => {
if (typeof event.data !== 'string') return;
const message = JSON.parse(event.data);
if (message.event === 'FlexForms.FormSubmitted') {
// GTM, analytics, close modal, …
}
});
```
**Next:** [Field mapping](/developers/field-mapping) · [Post-submit actions](/developers/post-submit-actions) · [Webhooks](/developers/webhooks)
# Extensibility overview
Source: https://flexforms.bjanczak.com/developers/extensibility-overview
Map of Flex Forms extension points — events, submission pipeline, field mapping, integrations, connections, post-submit, models, and admin hooks.
Flex Forms is built for Laravel hosts that need more than no-code feeds — custom CRMs, tenant-scoped models, OAuth-backed connections, and server-side logic on every submission.
This page is the map. Each child page covers one extension surface with copy-paste examples.
```mermaid theme={}
flowchart TB
Fill[Respondent submits form]
Fill --> Pipeline[Submission pipeline middleware]
Pipeline --> Ingest[Persist answers]
Ingest --> Event[FormSubmissionCompleted]
Event --> Integrations[Integration feeds]
Event --> Custom[Your listeners]
Integrations --> Map[Field mapping]
Integrations --> Conn[Connections OAuth tokens]
Integrations --> PostSubmit[Post-submit actions]
```
## Extension surfaces
Canonical stable surface — prefer these classes over anything marked `@internal`.
Listen for `FormSubmissionCompleted`, integration dispatch events, and form publish lifecycle. Prefer events over Eloquent observers.
Laravel-style middleware on answers **before** persistence — validate, enrich, or abort with a message.
Map form answers to integration payloads with transforms, nested paths, and static values.
Register drivers for your API — config, discovery folder, or Artisan generator.
Two-tier model: OAuth driver + reusable **Connections** that store tokens per account.
Redirect/callback routes, refresh lifecycle, encrypted credential storage.
Server-side actions after a completed submission — alongside feeds and listeners.
Swap `FlexForm`, submission, connection, or delivery models for multi-tenant schemas.
Navigation, Studio branding, forms table columns, and permission overrides via the plugin.
## Config entry point
Publish config to register pipeline middleware and integration drivers:
```php title="config/filament-flex-forms.php" theme={}
'extensibility' => [
'submission_middleware' => [
\App\FlexForms\EnrichSubmissionMetadata::class,
],
'integrations' => [
'drivers' => [
\App\Integrations\AcmeCrmDriver::class,
],
'discover' => [
app_path('Integrations/FlexForms'),
],
'allow_override' => false,
],
],
```
Full env and config reference: [Config & env](/developers/config-env).
## Stability & deprecation
Public extension points are listed in [`PUBLIC_API.md`](/developers/PUBLIC_API). Classes outside that list may change without a major version bump — prefer documented APIs. When we deprecate a public method or event, we keep it working for **at least one minor release** and document the replacement in Upgrading notes and the changelog.
## Related developer docs
| Topic | Page |
| - | - |
| Embed `postMessage` events | [Embed widget API](/developers/embed-api) |
| Outbound webhook payload | [Webhooks](/developers/webhooks) |
| Insights pipeline | [Insights pipeline](/architecture/insights-pipeline) |
| Multi-tenant recipe | [Multi-tenancy](/developers/multi-tenancy) |
| RBAC | [Studio permissions](/developers/studio-permissions) |
**Start here:** [Events & hooks](/developers/events-hooks) for listeners, or [Custom integrations](/developers/custom-integrations) if you are shipping a new feed driver.
# Field mapping
Source: https://flexforms.bjanczak.com/developers/field-mapping
Map form answers to integration payloads with FieldMapping, FieldMapper, transforms, nested paths, static values, and preview.
Integration feeds (CRM, webhooks, spreadsheets) rarely accept raw form field names. Flex Forms **field mapping** renames keys, applies transforms, injects static values, and supports nested target paths — the same engine powers Studio mapping UI and programmatic dispatch.
```mermaid theme={}
flowchart LR
Answers[Submission answers] --> Mapper[FieldMapper]
Mapping[FieldMapping DTO] --> Mapper
Transforms[FieldTransformRegistry] --> Mapper
Mapper --> Payload[Outbound payload]
```
## How mapping works
1. **Field mappings** — `{ "source_field": "target_key" }` pairs copy values from answers to the output.
2. **Transformations** — optional per-source transform applied before the value is written.
3. **Static values** — constants merged into the output (campaign IDs, record types, tags).
4. **Unmapped fields** — optionally include remaining answers under a prefix.
Sources use dot notation for nested answers (`address.city`). Targets use dot notation for nested output (`contact.address.city`).
## Built-in transforms
| Transform | Effect |
| - | - |
| `none` | Pass through (default) |
| `trim` | Trim strings |
| `uppercase` / `lowercase` | Case change |
| `string` / `number` / `integer` / `boolean` | Type coercion |
| `date_iso` / `date_us` / `date_eu` | Format dates (`Y-m-d`, `m/d/Y`, `d/m/Y`) |
| `json` | Encode array → JSON string, or decode JSON string → array |
| `comma_separated` | Join array values with commas |
| `first_item` / `last_item` | Pick from array |
| `count` | Count array elements |
| `slug` | Laravel `Str::slug()` |
| `md5` / `sha256` | Hash scalar values |
| `empty_to_null` | `''` or `[]` → `null` |
| `merge_template` | Replace `{{field}}` tokens from answers |
| `split_name` / `join_name` | Split/join first+last name |
| `phone_e164` | Digits / `+` normalization |
| `file_url` / `file_name` | Prefer upload array `url` / `name` |
Chain transforms with `|` (e.g. `trim|lowercase`).
Register custom transforms:
```php theme={}
use Bjanczak\FilamentFlexForms\Integrations\Mapping\FieldMapper;
use Bjanczak\FilamentFlexForms\Integrations\Mapping\FieldTransformRegistry;
FieldMapper::extend('acme_code', fn (mixed $value): mixed => /* … */ $value);
// or
app(FieldTransformRegistry::class)->extend('acme_code', fn (mixed $value): mixed => $value);
```
## Conditions
Optional `conditions` on `FieldMapping`:
* **Global** (no `source`): if any fail, only `staticValues` are returned.
* **Per-source** (`source` matches a mapped field): skip that row when the condition fails.
Operators: `filled`, `empty`, `equals`, `not_equals`, `truthy`, `falsy`.
## FieldMapping DTO
```php theme={}
use Bjanczak\FilamentFlexForms\Integrations\Mapping\FieldMapping;
$mapping = new FieldMapping(
fieldMappings: [
'email' => 'contact.email',
'full_name' => 'contact.name',
'company' => 'account.name',
],
transformations: [
'email' => 'lowercase|trim',
'full_name' => 'trim',
],
staticValues: [
'source' => 'flex-forms',
'pipeline.stage' => 'new',
],
includeUnmappedFields: false,
unmappedPrefix: 'extra_',
);
// From feed JSON stored on the form:
$mapping = FieldMapping::from($feed['mapping'] ?? []);
```
## FieldMapper::map example
```php theme={}
use Bjanczak\FilamentFlexForms\Integrations\Mapping\FieldMapper;
$answers = [
'email' => ' Jane@Example.com ',
'full_name' => 'Jane Doe',
'plan' => ['pro', 'support'],
'address' => ['city' => 'Gdansk'],
];
$mapped = app(FieldMapper::class)->map($answers, $mapping);
/*
[
'contact' => ['email' => 'jane@example.com', 'name' => 'Jane Doe'],
'account' => ['name' => null],
'source' => 'flex-forms',
'pipeline' => ['stage' => 'new'],
]
*/
```
### Nested paths
```php theme={}
$mapping = new FieldMapping(
fieldMappings: [
'address.city' => 'properties.city',
'address.postcode' => 'properties.zip',
],
);
```
`Arr::get` / `Arr::set` power both sides — deep paths work out of the box.
### Static values
Static values are written **after** field mappings and can define nested keys:
```php theme={}
staticValues: [
'tags' => ['web-form', 'enterprise'],
'owner.id' => '005xx000001234',
],
```
### Preview
Use the same mapper for admin previews and tests:
```php theme={}
$preview = app(FieldMapper::class)->preview($sampleAnswers, $mapping, $formSchema);
```
`preview()` is an alias of `map()` — pass the form schema when a transform needs block metadata from `$context['schema']`.
Conditional feeds in Studio can attach mapping per branch. See [Conditional feeds](/integrations/conditional-feeds).
**Next:** [Custom integrations](/developers/custom-integrations) · [Webhooks](/developers/webhooks) · [Post-submit actions](/developers/post-submit-actions)
# Inbound webhooks
Source: https://flexforms.bjanczak.com/developers/inbound-webhooks
Accept provider → Flex Forms webhooks with signature verification, idempotency, and custom drivers.
# Inbound webhooks
Outbound feeds push on submit. **Inbound webhooks** let a provider call Flex Forms when something changes in their system (CRM contact update, signed relay, etc.).
## Endpoint
```
POST /flex-forms/integrations/{driver}/webhook
```
Named route: `flex-forms.integrations.inbound.webhook`.
Optional query: `?connection={id}` to resolve Connection-tier credentials.
## Contract
Implement `SupportsInboundWebhooks` on your `IntegrationDriver`:
* `inboundRouteKey()` — must match the `{driver}` segment
* `verifyInbound(Request, config, ?Connection)` — throw `RuntimeException` on bad signatures
* `handleInbound(payload, Request, config, ?Connection): InboundWebhookResult`
Flex Forms stores idempotency rows in `flex_form_inbound_webhook_events` keyed by `driver_key` + `provider_event_id`.
## Shipped references
| Driver | Signature | Effect |
| - | - | - |
| **Webhooks** | `X-Flex-Forms-Signature` HMAC-SHA256 (same as outbound signed webhooks) | Accept + ledger |
| **HubSpot** | `X-HubSpot-Signature` / `X-HubSpot-Signature-v3` | Sync matching `FlexFormContact` name fields + last seen by email |
| **Slack** | `X-Slack-Signature` (+ `url_verification` challenge) | Accept signed events; configure **Signing Secret** on Catalog / Connection |
Configure secrets under Integrations → Catalog / Connections. Other catalog drivers stay outbound-first unless you implement `SupportsInboundWebhooks` on a custom driver.
## Scaffold
```bash theme={}
php artisan flex-forms:make-integration AcmeRelay --inbound
```
Uses `VerifiesFlexFormsInboundSignature` by default.
## Events
* `IntegrationInboundReceived`
* `IntegrationInboundFailed`
Stripe payment webhooks stay on `flex-forms.stripe.webhook` (payment ledger), not this generic route.
# Integration SDK helpers
Source: https://flexforms.bjanczak.com/developers/integration-sdk-helpers
GraphQL, device-code OAuth, and SAML helpers for custom Flex Forms drivers — not shipped ACS/IdP or product SSO.
# Integration SDK helpers
These classes are **helpers for custom integration drivers** you register yourself. They are not a shipped ACS, IdP, or product SSO stack, and no first-party catalog driver uses them out of the box for device-code or SAML login.
Use them when you implement a driver that needs GraphQL HTTP, RFC 8628 device-code OAuth, or SAML assertion claim extraction for a Connection.
## GraphQL
```php theme={}
use Bjanczak\FilamentFlexForms\Integrations\Support\Http\GraphQlClient;
$client = new GraphQlClient('https://api.example.com/graphql');
$data = $client->dataOrFail(
query: 'query ($id: ID!) { node(id: $id) { id } }',
variables: ['id' => '1'],
bearerToken: $accessToken,
);
```
Endpoint URLs are SSRF-hardened: **HTTPS public hosts only** (no private/link-local/metadata ranges). The helper uses the shared outbound HTTP client (timeouts, no open redirects).
## Device-code OAuth
No first-party driver ships device-code yet. The Studio **Authorize device** button appears only when your driver implements `SupportsDeviceCodeOAuth`.
```php theme={}
use Bjanczak\FilamentFlexForms\Integrations\Support\OAuth\DeviceCodeOAuthFlow;
$flow = new DeviceCodeOAuthFlow($driver);
$start = $flow->start('https://provider.example/device/code');
// Show $start['user_code'] + $start['verification_uri'] in Studio Connections
$token = $flow->poll($start['device_code']); // throws authorization_pending until approved
```
Device and token endpoint URLs follow the same SSRF rules (HTTPS public only). Authorization-code + PKCE remains the default via `GenericOAuthIntegrationDriver`.
## SAML assertion helper
`SamlAssertionConsumer` is for custom Connection auth in a driver — **not** Filament panel SSO. Keep host IdP login outside Flex Forms.
**Requirements:** you must pass the IdP signing certificate PEM. The consumer verifies XML digital signatures (XML-DSig) against that PEM, then checks Audience / Recipient (and related) claims.
```php theme={}
use Bjanczak\FilamentFlexForms\Integrations\Support\Saml\SamlAssertionConsumer;
$claims = (new SamlAssertionConsumer)->consume(
$assertionXml,
audiences: ['https://your-app.example'],
recipient: 'https://your-app.example/acs',
idpCertificatePem: $pem, // required — signature verified against this IdP PEM
);
```
# Multi-tenancy
Source: https://flexforms.bjanczak.com/developers/multi-tenancy
Recommended recipe for Filament multi-tenant hosts — authorize Studio uploads, Studio abilities, and optional forced submission encryption.
Flex Forms does not ship a separate tenancy engine. On Filament multi-tenant panels you keep using **your** tenant model and policies — then wire three package hooks so one tenant never reads another tenant’s forms, files, or exports.
```mermaid theme={}
flowchart TD
Tenant[Filament_tenant] --> Policy[Form_policy]
Policy --> Uploads[uploads.authorize]
Policy --> Studio[Studio_permissions]
Global[Global_Settings_or_env] --> Encrypt[Require_answer_encryption]
```
## 1. Scope forms to the tenant
Store forms under the tenant the same way you store other Filament resources (global scopes, `team_id`, Filament tenancy relationship, etc.). Studio list/edit already go through your panel auth — make sure `FlexForm` queries cannot cross tenants.
## 2. Lock uploads & signed file URLs
Without `uploads.authorize`, any authenticated panel user can upload/view files for **any** form. For SaaS hosts, fail closed:
```php title="config/filament-flex-forms.php" theme={}
'uploads' => [
'authorize' => fn ($user, $form) => $user?->can('update', $form) ?? false,
'require_authorize_callback' => true,
],
```
Env equivalent: `FLEX_FORMS_REQUIRE_AUTHORIZE=true`. Details: [Upload disks](/developers/upload-disks) · [Config & env](/developers/config-env).
## 3. Gate Studio actions
Use Spatie / Shield permission names, or:
```php theme={}
FilamentFlexFormsPlugin::make()
->authorizeAbilityUsing(function (StudioAbility $ability, $user, $form): ?bool {
if ($form === null) {
return null;
}
return $user?->can('update', $form) ? null : false;
});
```
Full ability map: [Studio permissions](/developers/studio-permissions).
## 4. Scope Integration Connections
Connections store encrypted credentials. Scope them the same way you scope forms:
```php theme={}
FilamentFlexFormsPlugin::make()
->resolveConnectionTenantIdUsing(fn () => (string) Filament::getTenant()?->getKey())
->modifyConnectionsEloquentQueryUsing(function ($query) {
$tenantId = (string) Filament::getTenant()?->getKey();
return $query->where('tenant_id', $tenantId);
});
```
`created_by` is set automatically from the authenticated panel user when a Connection is created.
## 5. Require encrypted answers (optional hard policy)
For forms that collect sensitive data, enable **Encrypt submission answers** per form (Form Settings → General).
For organization-wide compliance, turn on **Require encryption on all forms** under **Global Settings → Security**, or set:
```bash theme={}
FLEX_FORMS_FORCE_SUBMISSION_ENCRYPTION=true
```
When either is on, every form stores answer payloads encrypted at rest (Laravel `Crypt` / `APP_KEY`) — including both answer rows and the submission `payload` JSON. Studio, exports, and emails decrypt for display. See [General Settings](/features/settings/general) and [Privacy](/resources/privacy).
Rotating `APP_KEY` after encryption is enabled makes existing sealed answers unreadable. Treat key rotation like a data-migration event.
## Checklist before production
* [ ] Tenant-scoped `FlexForm` queries / policies
* [ ] Tenant-scoped Integration Connections (`modifyConnectionsEloquentQueryUsing`)
* [ ] `uploads.authorize` + `require_authorize_callback`
* [ ] Studio ability grants for multi-admin teams
* [ ] Encryption policy decided (per form vs global / env)
**Next:** [Config & env](/developers/config-env) · [Studio permissions](/developers/studio-permissions) · [Upload disks](/developers/upload-disks)
# OAuth integrations
Source: https://flexforms.bjanczak.com/developers/oauth-integrations
Two-tier OAuth model — integration driver plus reusable Connections that supply auth to feeds.
Some providers (CRM suites, spreadsheets, help desks) expect **OAuth 2.0** instead of a static API key pasted into Global Settings. Flex Forms uses a **two-tier** model:
1. **Integration driver** — defines scopes, token URLs, feed fields, and dispatch logic.
2. **Connection** — a saved OAuth account (tokens + metadata) admins authorize once and reuse across forms.
```mermaid theme={}
flowchart TB
Admin[Admin clicks Connect]
Admin --> Redirect[OAuth redirect route]
Redirect --> Provider[Provider consent screen]
Provider --> Callback[Callback route]
Callback --> Connection[(FlexFormIntegrationConnection)]
Feed[Form feed] --> Driver[OAuth driver]
Driver --> Connection
Driver --> API[Provider API]
```
## Why two tiers?
| Layer | Stores | Reused by |
| - | - | - |
| **Driver** | How to talk to the API (endpoints, mapping shape, required scopes) | All Connections of that `driver_key` |
| **Connection** | Encrypted tokens, account label, health status | Many form feeds pointing at the same account |
Admins connect **once** under **Integrations → Connections** (hub tab), then pick that connection on each form feed — no re-pasting refresh tokens per form.
## Auth from a Connection
In `dispatch()` and `testConnection()`, resolve credentials from the linked connection instead of inline global config:
```php theme={}
public function dispatch(
FlexForm $form,
FlexFormSubmission $submission,
array $globalConfig,
array $feed,
): IntegrationDispatchResult {
$connection = $this->connectionFromFeed($feed); // your helper
$token = app(OAuthTokenManager::class)->accessToken($connection);
$client = $this->httpClient(bearerToken: $token);
// …
}
```
Global config fields on OAuth drivers typically shrink to:
* **Client ID** / **Client secret** (app registration)
* Optional **default scopes**
* **Connection picker** on the form feed (required)
Legacy manual token fields remain supported for air-gapped installs — OAuth Connections are the recommended path.
## Driver responsibilities
OAuth drivers extend the same `IntegrationDriver` contract with:
* `getOAuthConfig()` — authorize URL, token URL, scopes, redirect URI, `uses_pkce` (never includes `client_secret`)
* `oauthClientId()` / `oauthClientSecret()` — read credentials for token exchange / storage only
* `usesPkce()` — default `true` (S256); override only for legacy providers
* `exchangeOAuthCode($code, $connectionId, $codeVerifier = null)` — token exchange
* Tokens refresh via `OAuthTokenManager` (mutex + `needs_reauth`)
Built-in examples in the Help Center: [Google Sheets](/integrations/google-sheets), [Salesforce](/integrations/salesforce), [Help Scout](/integrations/helpscout).
## Studio UX
1. Admin registers the OAuth app (client ID/secret) under **Integrations**.
2. Clicks **Connect account** → redirect flow → new row in **Connections**.
3. On a form feed, selects **Connection: Marketing Hub ([user@company.com](mailto:user@company.com))**.
4. Field mapping and conditional rules behave like any other feed.
Connections are panel-wide. Scope them to tenants in multi-tenant apps via custom connection models — see [Custom models](/developers/custom-models).
**Next:** [OAuth token management](/developers/oauth-token-management) · [Custom integrations](/developers/custom-integrations)
# OAuth token management
Source: https://flexforms.bjanczak.com/developers/oauth-token-management
OAuth redirect and callback routes, OAuthTokenManager lifecycle, refresh, and encrypted credential storage.
Flex Forms owns the OAuth **redirect/callback** loop so your driver code stays focused on API calls. Tokens are stored encrypted on `flex_form_integration_connections` and refreshed automatically before dispatch when possible.
## Routes
| Method | Path | Name | Purpose |
| - | - | - | - |
| GET | `/flex-forms/connections/oauth/redirect/{connection}` | `flex-forms.connections.oauth.redirect` | Start authorize flow for a connection |
| GET | `/flex-forms/connections/oauth/callback` | `flex-forms.connections.oauth.callback` | Provider redirects here with `code` |
Both routes use the `web` + `auth` middleware stack — only logged-in Filament users can connect accounts.
### Redirect
`{connection}` is the `FlexFormIntegrationConnection` ID (draft or reconnect). The controller:
1. Loads the connection's `driver_key` and resolves the driver
2. Builds the provider authorize URL (scopes, encrypted OAuth state with one-time nonce, **PKCE S256** `code_challenge` when the driver enables PKCE — default on for `GenericOAuthIntegrationDriver`)
3. Redirects the admin browser to the provider
Register the callback URL in your OAuth app exactly as:
```
https://your-app.test/flex-forms/connections/oauth/callback
```
Use your real production hostname in the provider console — wildcards are rarely accepted.
### Callback
The callback route:
1. Validates encrypted `state` + one-time nonce (and initiating user id)
2. Exchanges `code` for tokens — includes `code_verifier` when PKCE was used on redirect
3. Persists tokens via `OAuthTokenManager`
4. Sets connection `status` to `connected`, clears `last_error`
5. Redirects back to **Integrations → Connections** (`?tab=connections` — fixed admin URL, never an open redirect)
Errors (denied consent, invalid code, missing PKCE verifier) mark the connection `needs_reauth` with `last_error` text admins can read in Studio.
### PKCE
`GenericOAuthIntegrationDriver` enables PKCE by default (`usesPkce(): true`):
* Redirect stores a high-entropy `code_verifier` in cache with the OAuth nonce
* Authorize URL includes `code_challenge` + `code_challenge_method=S256`
* Token exchange posts `code_verifier`
Override `usesPkce(): false` only for legacy providers that reject PKCE.
## OAuthTokenManager
Central service for token lifecycle:
```php theme={}
use Bjanczak\FilamentFlexForms\Integrations\OAuth\OAuthTokenManager;
use Bjanczak\FilamentFlexForms\Models\FlexFormIntegrationConnection;
$manager = app(OAuthTokenManager::class);
// Read (auto-refresh if expired within skew window)
$accessToken = $manager->accessToken($connection);
// After callback
$manager->storeTokens($connection, [
'access_token' => '…',
'refresh_token' => '…',
'expires_at' => now()->addHour(),
]);
// Force refresh (dispatch retry, admin "Test connection")
$manager->refresh($connection);
```
Design rules:
* **Never** log raw tokens
* Refresh uses the driver's `oauthConfig()` token URL and client credentials from global integration config
* Missing refresh token → connection marked `reconnect_required`; admin must run redirect again
## Encrypted storage
`FlexFormIntegrationConnection` casts `credentials` as `encrypted:array`. At rest you store:
```json theme={}
{
"access_token": "…",
"refresh_token": "…",
"expires_at": "2026-08-12T10:00:00+00:00",
"scope": "read write"
}
```
Laravel uses your app `APP_KEY` — rotating `APP_KEY` without re-encrypting breaks stored credentials. Plan key rotation with a maintenance window and force reconnect.
Non-secret `meta` (account ID, hub ID, workspace name) lives in the plain `meta` JSON column for Studio labels.
## Health and testing
* **Test connection** on a Connection row calls `OAuthTokenManager::accessToken()` then the driver's `testConnection()` with resolved auth.
* Failed refresh surfaces in `last_error` and blocks dispatch until reconnect.
* Queue workers use the same manager — no separate token cache that could desync.
Treat OAuth client secrets like production database passwords. Store them in global integration config (encrypted settings row) or env — not in form feed JSON.
**Next:** [OAuth integrations](/developers/oauth-integrations) · [Custom integrations](/developers/custom-integrations) · [Config & env](/developers/config-env)
# OpenAPI beacon
Source: https://flexforms.bjanczak.com/developers/openapi-beacon
The analytics beacon endpoint that powers Insights — request contract, allowed event types, and rate limits.
Every fill page (direct link, embed, or popup) sends batched analytics events to a single endpoint. This is what powers [Reading Insights](/guides/reading-insights) — you generally never call it directly, but it's useful to understand if you're debugging traffic numbers or building a custom fill client.
This endpoint is also published as OpenAPI — open the interactive playground to send a real request against your app.
## Request
Route throttle 60 requests/minute per client, plus a per-form × IP event budget (default 120 events/minute). `web` middleware, no auth required (public fill pages are anonymous). Only **active** forms accept events.
A UUID identifying the visitor's fill session.
Numeric form ID. Either this or `form_slug` is required.
The form's public slug, if `form_id` isn't known client-side.
1–20 event objects per batch.
### Event object
One of: `visit_start`, `page_view`, `page_leave`, `field_interact`, `started_answering`, `submit`, `heartbeat`.
Which page/block the event refers to.
ISO timestamp within **now − 5 minutes … now + 2 minutes**. Outside that window the batch is rejected (422). Omitted timestamps use server time.
0 to 86,400,000 (24h ceiling).
Parsed client hints, sent as plain strings.
ISO-2 country code and city, when geo IP resolution is enabled.
Standard UTM parameters captured from the visit.
A hashed key used to de-duplicate a respondent across events without exposing PII.
```json title="Request body" theme={}
{
"form_slug": "contact-us",
"session_id": "6f1e2c2a-9b3d-4e6a-8b2b-9d7c0a1e2f33",
"events": [
{ "event": "visit_start", "occurred_at": "2026-08-01T14:00:00Z" },
{ "event": "page_view", "page_id": "page_1" },
{ "event": "field_interact", "block_id": "email_field" },
{ "event": "submit", "duration_ms": 42311 }
]
}
```
```bash title="curl" theme={}
curl -X POST "https://your-app.test/flex-forms/analytics/beacon" \
-H "Content-Type: application/json" \
-d '{
"form_slug": "contact-us",
"session_id": "6f1e2c2a-9b3d-4e6a-8b2b-9d7c0a1e2f33",
"events": [{ "event": "page_view", "page_id": "page_1" }]
}'
```
## Response
`true` when the batch was accepted and queued for processing.
Number of events accepted from the batch.
```json theme={}
{ "ok": true, "queued": 4 }
```
```json theme={}
{
"message": "Invalid analytics payload.",
"errors": { "form_id": ["A form_id or form_slug is required."] }
}
```
```json theme={}
{ "message": "Form not found." }
```
```json theme={}
{ "message": "Too many analytics events." }
```
Events are queued for asynchronous processing (`RecordAnalyticsEventsJob`) — a `200` response means the batch was accepted, not that Insights has been recomputed yet. Bot/crawler traffic is flagged and excluded from Insights KPIs during processing, not at ingestion time.
This endpoint intentionally accepts unauthenticated requests from any public fill page. Don't rely on it as a general-purpose event pipe for your own app — it only accepts the fixed event vocabulary above, scoped to an active form.
**Next:** [Reading Insights](/guides/reading-insights) · [Public Insights URLs](/developers/public-insights) · [Config & env](/developers/config-env)
# Post-submit actions
Source: https://flexforms.bjanczak.com/developers/post-submit-actions
Run server-side logic after a completed submission — integration feeds, queued jobs, listeners, and pipeline-adjacent hooks.
"Post-submit" means anything that happens **after** a respondent finishes a form (not partial save). Flex Forms runs side effects in a predictable order so you can choose the lightest hook.
```mermaid theme={}
sequenceDiagram
participant Fill as Fill page
participant Pipe as Submission pipeline
participant DB as Database
participant EVT as FormSubmissionCompleted
participant FX as FinalizeSubmissionSideEffectsJob
participant INT as Integration feeds
participant PSA as Post-submit actions
Fill->>Pipe: POST answers
Pipe->>DB: Persist submission
DB->>EVT: afterCommit event
Note over EVT: Host listeners (may queue)
DB->>FX: Queue finalize job
FX->>INT: Dispatch enabled feeds
FX->>PSA: Ordered Studio actions (sync handle)
```
## Choose the right hook
| Approach | Best for | Runs |
| - | - | - |
| **Integration feed** | CRM, email, webhook, spreadsheet | Queued finalize job; retries + delivery log |
| **`FormSubmissionCompleted` listener** | App-specific workflows (Slack internal, ERP) | After persist, **before** integrations; use `ShouldQueue` on the **listener** |
| **Studio post-submit action** | Ordered thank-you actions | Sync `handle()` inside finalize job — do **not** implement `ShouldQueue` on the action class |
| **Custom driver `dispatch()`** | Reusable productized outbound API | With other feeds; recorded in delivery table |
| **Submission pipeline middleware** | Block or mutate **before** save | Synchronous during submit — not post-submit |
Partial submissions (`save later`) skip full post-submit integrations unless a feed explicitly allows partials. Completed submissions always run the finalize job.
`FormSubmissionCompleted` fires before integrations. If your listener needs CRM side effects to have finished, listen for `IntegrationDispatchSucceeded` instead.
## Integration feeds (built-in post-submit)
Configure under **Form → Integrations** in Studio. Each feed:
* Normalizes answers (optionally through [field mapping](/developers/field-mapping))
* Respects conditional feed rules — [Conditional feeds](/integrations/conditional-feeds)
* Records success/failure for inbox replay
No-code options: [Webhooks](/integrations/webhooks), [Zapier](/integrations/zapier), CRM catalog under [Integrations](/integrations/overview).
## Queued listener example
```php theme={}
use Bjanczak\FilamentFlexForms\Events\FormSubmissionCompleted;
use Illuminate\Contracts\Queue\ShouldQueue;
final class CreateHelpDeskTicket implements ShouldQueue
{
public function handle(FormSubmissionCompleted $event): void
{
if ($event->form->slug !== 'support') {
return;
}
// HelpDeskApi::createTicket(…)
}
}
```
Register with `Event::listen` or Laravel discovery. Use a dedicated queue name (`integrations`) in production.
## Custom post-submit driver
When multiple forms share the same outbound system, implement a driver ([Custom integrations](/developers/custom-integrations)) instead of duplicating listeners:
* Admins configure feeds in Studio
* Deliveries appear in the integration log with replay
* OAuth Connections supply auth — [OAuth integrations](/developers/oauth-integrations)
## Idempotency and retries
Post-submit actions should tolerate duplicate delivery attempts:
* Key external creates on `submission_id`
* Use `IntegrationDispatchSucceeded` / `IntegrationDispatchFailed` for alerting, not primary business logic
* Replay from the admin UI re-runs `dispatch()` with the same submission snapshot
## What not to do
Avoid long synchronous HTTP in pipeline middleware when the work can wait — it blocks the respondent. Prefer feeds or queued listeners.
* Do not use Eloquent observers on `FlexFormSubmission` — see [Events & hooks](/developers/events-hooks)
* Do not assume `sync` queue in production — run a worker
**Next:** [Events & hooks](/developers/events-hooks) · [Webhooks](/developers/webhooks) · [Field mapping](/developers/field-mapping)
# Public Insights URLs
Source: https://flexforms.bjanczak.com/developers/public-insights
The share-token routes behind Share Insights — request shape, password auth, and the JSON response.
Every [Share Insights](/guides/share-insights) link resolves to a token-scoped route that renders an HTML report by default, or JSON with `?format=json` / an `Accept: application/json` header.
## Routes
Method
Path
Purpose
GET
/flex-forms/insights/share/
Render the shared report (HTML or JSON)
POST
/flex-forms/insights/share//unlock
Submit a password to unlock a protected share for the current session
Both routes are rate-limited (60 requests/minute) and public — no auth token or cookie is required beyond the share token itself and, if set, the password.
```bash title="Fetch a JSON payload" theme={}
curl "https://your-app.test/flex-forms/insights/share/TOKEN?format=json&range=30d"
```
```bash title="Unlock a password-protected share" theme={}
curl -X POST "https://your-app.test/flex-forms/insights/share/TOKEN/unlock" \
-H "Content-Type: application/json" \
-d '{"password": "the-password"}'
```
```bash title="Or pass the password directly on a JSON GET" theme={}
curl "https://your-app.test/flex-forms/insights/share/TOKEN?format=json" \
-H "X-Insights-Password: the-password"
```
A preset range key (e.g. `7d`, `30d`) or use with `from`/`to` for a custom range.
Custom range start (ISO date), used together with `to`.
Custom range end (ISO date).
The same Insights filter shape used in the Filament panel (device, country, referrer, UTM, …).
`token`, `allowed_tabs` (subset of `answers`/`visits`/`dropoffs`), `expires_at`, `password_protected`.
`id` and `name` of the source form.
Only the KPIs relevant to `allowed_tabs` are populated — everything else is zeroed/emptied server-side, not just hidden client-side.
```json theme={}
{
"kpis": { "visits": 0, "starts": 0, "submissions": 128, "conversion_rate": 0 },
"answers": [
{ "field_key": "plan", "label": "Which plan?", "kind": "choice", "answers_count": 128 }
],
"series": [],
"breakdowns": { "devices": [], "browsers": [], "countries": [] },
"funnel": [],
"share": { "token": "TOKEN", "allowed_tabs": ["answers"], "expires_at": null, "password_protected": false },
"form": { "id": 42, "name": "Customer feedback" }
}
```
Passwords are never accepted via the query string — only a JSON/form body field, the `X-Insights-Password` header, or an `Authorization: Bearer` header. Failed attempts are rate-limited per token + IP and return `429` once exceeded.
An invalid or expired token always returns `404` — Flex Forms does not distinguish "wrong token" from "expired token" in the response, to avoid leaking which is the case.
Yes, for the browser session that unlocked it (cookie-based). A fresh `curl` request or a different session must supply the password again.
Yes — the JSON shape is stable per allowed tab; poll it on an interval or fetch it server-side and cache it yourself.
**Next:** [Share Insights](/guides/share-insights) · [Reading Insights](/guides/reading-insights) · [OpenAPI beacon](/developers/openapi-beacon)
# Query params
Source: https://flexforms.bjanczak.com/developers/query-params
Prefill fields from your host page's URL on embed and popup routes, plus the reserved embed flags.
Any query string parameter whose key matches a field's **name** on the form prefills that field — no configuration needed on the form itself. This works on the `embed` and `popup` routes; the plain (non-embed) fill link does not read prefill params.
```mermaid theme={}
flowchart LR
Url[Host_page_URL] --> Query[Query_string] --> Match{Key_matches_a_field_name}
Match -->|Yes_and_not_reserved| Prefill[Field_prefilled]
Match -->|Reserved_key| Skip[Used_for_embed_behavior_instead]
Match -->|No_match| Ignore[Ignored]
```
```html title="Prefill email + a UTM-style field from the host page" theme={}
```
```js title="Building the URL from your own page's UTM params" theme={}
const url = new URL('https://your-app.test/forms/demo-request/embed');
const params = new URLSearchParams(window.location.search);
['utm_source', 'utm_medium', 'utm_campaign', 'plan'].forEach((key) => {
if (params.has(key)) url.searchParams.set(key, params.get(key));
});
document.querySelector('iframe[data-flex-form-src]').dataset.flexFormSrc = url.toString();
```
The field's **name** is the internal machine name you see in Studio field settings — not its display label. Only scalar (string) values are accepted; anything else is ignored.
## Reserved keys
These keys always control embed behavior and are never treated as field names, even if a field happens to share the name:
Key
Purpose
hideTitle
Hide the form title
alignLeft
Left-align content
transparentBackground
Transparent iframe background
dynamicHeight
Auto-resize the iframe to content height
preview
Request preview mode (requires a valid signed URL or authenticated Studio viewer; otherwise ignored / draft stays 404)
popup
Internal popup-routing flag
formEventsForwarding
Forward fill lifecycle events via postMessage
Prefill values arrive as plain query-string text with no server-side validation against the field's own rules until the respondent submits — treat prefill as a convenience, not a trusted input channel. Never rely on it to pass secrets or values you haven't sanitized on your own page first.
Want UTM values to also show up in [Insights → Visits](/guides/reading-insights) rather than just prefilling a field? Those are captured automatically from the visit's referrer/query string by the analytics beacon — no extra wiring needed.
Prefill-from-query only runs for the embed and popup routes (`isEmbed` in the fill component). If you need prefill on a direct link, wrap it in a Standard embed instead.
Yes — a field can be prefilled and simultaneously hidden via [Logic](/guides/logic-and-calculated), which is a common pattern for tagging submissions with a UTM source without showing it to the respondent.
Yes, as long as the query value exactly matches one of the field's option values.
**Next:** [Embed widget API](/developers/embed-api) · [Embed on any platform](/guides/embed-platforms) · [Logic & calculated fields](/guides/logic-and-calculated)
# Studio permissions (RBAC)
Source: https://flexforms.bjanczak.com/developers/studio-permissions
Optional Spatie / Gate roles for every Studio action — create, edit, publish, export, Insights, Contacts, integrations, and more.
Flex Forms Studio ships with enterprise RBAC. **Spatie Permission is optional** — you never have to install it. Without it (or before you seed permission rows), authenticated panel users keep full Studio access, exactly as before.
Every sensitive action is enforced on the **server** (Livewire, policies, export routes). The UI only hides buttons so teammates never see actions they cannot perform.
***
## What you can gate
| Area | Examples |
| - | - |
| Forms | View list, open Studio, create, rename, duplicate, delete, publish, design uploads |
| Submissions | View inbox, delete one / bulk, export CSV |
| Contacts | View directory, delete, export |
| Transactions | View payment ledger, export CSV, refund |
| Insights | View analytics, share links, export events |
| Integrations | Open rail, change configs |
| Workspace | Global Settings, Support, Global Stats |
Permission names default to Filament Guardian style (`Create:FlexForm`, `Export:FlexFormSubmission`, …). Remap them in config if your Shield / custom roles use different strings.
**Multi-admin hosts:** Without Spatie permission rows or an `authorize` callback, every authenticated panel user keeps full Studio access on the **server** (BC default). The Studio UI fails closed for missing permission keys in the bootstrap payload. For teams with more than one admin, configure Spatie / Shield (or `FilamentFlexFormsPlugin::authorizeAbilityUsing`) and consider `FLEX_FORMS_PERMISSIONS_STRICT=true` so missing grants deny instead of allow.
***
## Three ways to authorize
Install [`spatie/laravel-permission`](https://github.com/spatie/laravel-permission) if you want it, seed the mapped permission names, and assign them to roles.
Flex Forms only enforces a Spatie name **after that permission exists in your database**. Until you seed Flex Forms permissions, nothing locks out your team (safe rollout).
```bash theme={}
# Optional — turn the Spatie path off entirely
FLEX_FORMS_PERMISSIONS_SPATIE=false
```
Best for multi-tenant apps — decide per user / form without Spatie:
```php theme={}
use Bjanczak\FilamentFlexForms\FilamentFlexFormsPlugin;
use Bjanczak\FilamentFlexForms\Support\Permissions\StudioAbility;
FilamentFlexFormsPlugin::make()
->authorizeAbilityUsing(function (StudioAbility $ability, $user, $form): ?bool {
if ($ability === StudioAbility::ManageSettings) {
return $user->isAdmin();
}
// null = continue to Spatie / default allow
return null;
});
```
Same idea via `config/filament-flex-forms.php`:
```php theme={}
'permissions' => [
'authorize' => fn ($user, $ability, $form) => /* ?bool */,
],
```
***
## Strict mode (SaaS fail-closed)
When you need “deny unless explicitly allowed”:
```bash theme={}
FLEX_FORMS_PERMISSIONS_STRICT=true
```
Then every ability must pass your authorize callback **or** a registered Spatie/Gate permission. Missing both → deny.
Turn the whole system off (every authenticated user allowed):
```bash theme={}
FLEX_FORMS_PERMISSIONS_ENABLED=false
```
***
## Resolution order
1. Guest → deny
2. `permissions.enabled = false` → allow authenticated
3. Plugin / config `authorize` callback (non-null wins)
4. Optional Spatie/Gate name **if that permission row exists**
5. Default allow — unless `strict`
Bootstrap payloads include a full `permissions` map so Studio React can hide Create, Publish, Export, and rail items in one shot — with request-level memoization so checks stay cheap.
### Transactions (Spatie / Shield names)
| Studio ability | Default Gate / Spatie name |
| - | - |
| `viewTransactions` | `ViewAny:FlexFormTransaction` |
| `exportTransactions` | `Export:FlexFormTransaction` |
| `refundTransactions` | `Refund:FlexFormTransaction` |
Seed those rows (or remap in `config/filament-flex-forms.php` → `permissions.map`) and assign them to roles. Until they exist in the DB, the optional Spatie path stays open (BC); with `FLEX_FORMS_PERMISSIONS_STRICT=true` missing grants deny.
**Also see:** [Config & env](/developers/config-env) · [Access gates (respondent security)](/guides/access-gates) · [Installation](/get-started/installation) · [Stripe](/integrations/stripe)
# Upload disks
Source: https://flexforms.bjanczak.com/developers/upload-disks
Two disks, two visibility models — design assets are public, submission files are private and signed.
Flex Forms deliberately splits uploads across **two disks** with opposite visibility defaults, because they serve opposite purposes.
```mermaid theme={}
flowchart TD
Upload{What_is_uploaded} -->|Logo_cover_social| Design[design_disk_public]
Upload -->|Respondent_file_field| Sub[submissions_disk_private]
Design --> Crawler[Readable_by_crawlers_link_previews]
Sub --> Signed[Served_via_signed_URL_only]
Signed --> Ttl[Expires_after_signed_url_ttl_minutes]
```
Design assets
Submission uploads
Config key
uploads.design\_disk
uploads.submissions\_disk
Default disk
public
local
Visibility
Public — crawlers need to read OG images
Private — served via time-limited signed URLs
Directory
flex-forms/design
flex-forms/submissions
Used for
Logo, cover image, social/OG image
Any file-upload field a respondent fills in
If your app already has `public` and `local` disks configured (the Laravel default), no changes are needed.
Set `FLEX_FORMS_DESIGN_DISK` and/or `FLEX_FORMS_SUBMISSIONS_DISK` to any disk name defined in `config/filesystems.php` — S3, DigitalOcean Spaces, or your own driver.
`FLEX_FORMS_SIGNED_URL_TTL` (minutes, default 15) controls how long a link to a private submission file stays valid before it needs to be re-signed.
`FLEX_FORMS_QUOTA_BYTES_PER_FORM` (default 500 MB) caps total storage per form across all submissions — uploads beyond the quota are rejected.
Set `uploads.authorize` to a callback and `FLEX_FORMS_REQUIRE_AUTHORIZE=true` so a panel user can only view/upload files for forms they actually own — full recipe: [Multi-tenancy](/developers/multi-tenancy) · [Config & env](/developers/config-env).
```bash title=".env — S3 for both disks" theme={}
FLEX_FORMS_DESIGN_DISK=s3
FLEX_FORMS_SUBMISSIONS_DISK=s3-private
FLEX_FORMS_DESIGN_VISIBILITY=public
FLEX_FORMS_SUBMISSIONS_VISIBILITY=private
```
```php title="config/filesystems.php — a dedicated private disk" theme={}
'disks' => [
's3-private' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_SUBMISSIONS_BUCKET'),
'visibility' => 'private',
],
],
```
## Orphan cleanup
Interrupted uploads (a failed atomic commit, an abandoned multi-page fill) can leave unreferenced blobs behind. A scheduled command prunes them automatically based on age:
Setting
Default
Why
design\_orphan\_ttl\_minutes
120
Design uploads are quick; short grace period
submission\_orphan\_ttl\_minutes
1440 (24h)
A respondent may leave a multi-page fill mid-way and return later
```bash title="Runs hourly via the scheduler — no manual setup needed" theme={}
php artisan flex-forms:prune-design-orphans
```
Do not point `submissions_disk` at a publicly readable bucket/ACL — respondent uploads (IDs, contracts, photos) are only meant to be reachable through the package's signed-URL controller, which enforces the TTL and, when configured, your `uploads.authorize` callback.
## Image variants
Uploaded **images** are optimized automatically (never upscaled). Non-image field uploads stay as a single original file.
Asset
Variants
Limits
Cover
normal + thumb (WebP)
normal max 1500px long edge; thumb max 400px
Logo
single (WebP)
fit in a 500×500 box
Social / OG
single (JPEG)
center-crop 16:9, max 1500px long edge
Field upload — image
normal + thumb (WebP)
normal max 1500px; thumb max 350px
Field upload — other
single original
PDF, video, audio, documents — no image pipeline
Default WebP quality is **80** (`FLEX_FORMS_WEBP_QUALITY`). Schema keys such as `cover_path` / `cover_url` always point at the **normal** file; thumbs are derived beside it.
## Optional Spatie Media Library
Flex Forms stores files on disk by default. If your app already uses [spatie/laravel-medialibrary](https://github.com/spatie/laravel-medialibrary), you can make Spatie the **primary** media driver:
```bash theme={}
composer require spatie/laravel-medialibrary
# publish & run Spatie migrations as usual for your app
```
```bash title=".env" theme={}
FLEX_FORMS_MEDIA_DRIVER=spatie
# optional:
# FLEX_FORMS_SPATIE_DISK=
# FLEX_FORMS_SPATIE_COLLECTION_PREFIX=flex-forms
# FLEX_FORMS_SPATIE_RESPONSIVE=true
# FLEX_FORMS_SPATIE_QUEUE_CONVERSIONS=false
```
When `FLEX_FORMS_MEDIA_DRIVER=spatie` **and** Media Library is installed:
* Design assets and respondent uploads are stored as Spatie media (schema paths use `ffmedia:{uuid}` tokens; URLs come from Spatie conversions).
* Images get native Spatie conversions (`normal` / `thumb`) with **Fit::Max** (never upscale), WebP quality from config, then the **original is deleted**.
* Cover + field `normal` conversions can generate **responsive image** srcsets (`FLEX_FORMS_SPATIE_RESPONSIVE`, default on).
* Social / OG images are cropped to 16:9 without upscale before attach (JPEG for crawlers).
* Non-image field uploads stay a single original (no conversions).
* Form delete / purpose clear **purge** Spatie media collections.
If Media Library is missing or the driver is `disk`, Flex Forms keeps the built-in disk pipeline — no Global Settings UI is required.
Yes, as long as visibility is handled correctly — Flex Forms writes design assets as public and submissions as private regardless of whether they share a physical disk, but using two disks makes bucket-level policies simpler to reason about.
Logo fits in 500×500, cover normal ≤1500px (thumb ≤400px), social/OG ≤1500px at 16:9 JPEG, and respondent images ≤1500px (thumb ≤350px). Smaller images are never upscaled.
**Next:** [Config & env](/developers/config-env) · [Design & branding](/guides/design-pro) · [Webhooks](/developers/webhooks)
# Webhooks
Source: https://flexforms.bjanczak.com/developers/webhooks
Outbound HTTPS payload shape, headers, merge tags, and the SSRF protections on every webhook feed.
The **Webhooks** integration sends a completed (or, if configured, partial) submission to any HTTPS endpoint you control — method, body format, headers, and field mapping are all configurable per form, with SSRF protection built in.
```mermaid theme={}
flowchart LR
Submit[Submission_completed] --> Notifier[FormSubmissionNotifier]
Notifier --> Manager[IntegrationManager]
Manager --> Driver[WebhooksDriver]
Driver --> Guard[WebhookUrlGuard_sanitize]
Guard -->|Safe| Send[HTTPS_request_sent]
Guard -->|Unsafe| Fail[Dispatch_failed_no_request_sent]
```
## Configure a feed
On a form, add a **Webhooks** feed from the integrations panel.
HTTPS only. Supports `{{field_name}}` merge tags for dynamic paths (e.g. `https://example.com/hooks/{{plan}}`).
`POST` (default), `GET`, `PUT`, `PATCH`, or `DELETE`. `POST`/`PUT`/`PATCH` send `json` or `form` (`application/x-www-form-urlencoded`) bodies; `GET`/`DELETE` always send data as query params.
One `HEADER=value` per line. Values support the same `{{field_name}}` merge tags. `Host`, `Content-Length`, and `Transfer-Encoding` are always stripped for transport safety.
**All fields** sends every answer keyed by field name, optionally with submission meta (`form_id`, `form_title`, `submission_id`, `submitted_at`). **Select fields** sends only the `KEY=field_name` (or literal) pairs you list.
## Payload shape
```http title="POST — all fields, JSON" theme={}
POST /hooks/inbound HTTP/1.1
Host: example.com
Content-Type: application/json
User-Agent: FilamentFlexForms-Webhooks/1.0
{
"full_name": "Jane Doe",
"email": "jane@acme.com",
"plan": "enterprise",
"form_id": "42",
"form_title": "Demo request",
"submission_id": "1091",
"submitted_at": "2026-08-01T14:03:00+00:00"
}
```
```http title="POST — select fields, FORM body" theme={}
POST /hooks/inbound HTTP/1.1
Content-Type: application/x-www-form-urlencoded
email=jane%40acme.com&name=Jane+Doe&source=flex-forms
```
```http title="GET — data appended to the query string" theme={}
GET /hooks/inbound?email=jane%40acme.com&plan=enterprise HTTP/1.1
```
Field type in payload
Serialized as
Text / choice / number
Its scalar value, stringified
Boolean
"1" / "0"
File upload
Original filename (or URL/path if no name is available)
Multi-select / array
Comma-joined string of scalar values
## SSRF protection
Every resolved URL — after merge-tag interpolation — is validated before a request is sent:
Only `https://` is accepted, on port `443` or `8443`. Any other scheme or port is rejected.
URLs containing a userinfo component (`https://user:pass@host/...`) are rejected outright.
`localhost`, `*.local`, `*.localhost`, cloud metadata hosts (`metadata.google.internal`, `kubernetes.default`, …), and any hostname or literal IP that resolves to a private/reserved range (RFC1918, loopback, link-local) are rejected.
A hostname's resolved A/AAAA records are checked at sanitize time — a public-looking hostname that resolves to a private IP is still blocked. Immediately before the HTTPS request, Flex Forms re-resolves and, when curl is available, pins those public IPs via `CURLOPT_RESOLVE` so the connect prefers the audited addresses.
If the resolved URL fails validation, the webhook dispatch fails immediately with **"Webhook URL rejected"** — no request is ever sent to a disallowed host. This applies even when the base URL is set via a `{{merge_tag}}` that resolves to something unsafe at submit time.
**Residual TOCTOU:** Pinning reduces DNS-rebinding risk but cannot eliminate a theoretical race between the second resolve and the TCP handshake if an authoritative DNS answer changes in that window. Prefer allowlisted, stable HTTPS endpoints you control.
Need typed, versioned events instead of a raw generic payload? Most CRMs, spreadsheets, and Slack are available as first-class [integrations](/integrations/overview) — reach for a generic webhook when you're posting to your own backend or an automation tool without a dedicated Flex Forms integration.
**Next:** [Integrations overview](/integrations/overview) · [Emails & PDF](/guides/emails-and-pdf) · [Config & env](/developers/config-env)
# Address Autocomplete Block
Source: https://flexforms.bjanczak.com/features/blocks/address-autocomplete
Structured addresses via Mapbox search.
Requires a ready [Mapbox](/integrations/mapbox) connection under left-rail **Integrations**. The **Address autocomplete** block (`address_autocomplete`) suggests places as the respondent types and stores a structured address.
Related: [Map](/features/blocks/map).
See the [Blocks overview](/features/blocks/overview) for the full catalog.
# Audio Block
Source: https://flexforms.bjanczak.com/features/blocks/audio
Audio media field for uploads or playback.
The **Audio player** / audio field (`audio`) handles audio media. For in-browser recording, use [Voice note](/features/blocks/voice-note).
See the [Blocks overview](/features/blocks/overview) for the full catalog.
# Flex Checklist Block
Source: https://flexforms.bjanczak.com/features/blocks/checkbox
Multi-select checklist — Studio catalog label: Flex checklist (`flex_checklist`).
In Studio this block is **Flex checklist**. Answers are always a JSON array, even for a single selection.
The **Flex checklist** block shows every option on screen and allows any combination — ideal for “select all that apply”.
## Business Use Cases
"I agree to the Terms of Service" and "I agree to the Privacy Policy" (using exact selections).
"Which dietary requirements do you have?" (e.g., Vegan, Gluten-Free, Halal).
"Select your top 3 favorite tools" (enforcing a max selection of 3).
***
## Configuration & Usage
Drag the **Checkboxes** block from the Component Catalog onto the Canvas.
Add your options (Values and Labels).
If you ask "Select your top 3 features," use the Inspector to set the **Max Selections** and **Min Selections** to exactly 3.
***
## Technical Configuration Schemas
The size of the checkboxes and accompanying text. Available options are `sm`, `md`, and `lg`.
An associative array mapping option keys to Heroicon names, displaying an icon next to specific checkboxes.
An associative array mapping option keys to secondary description strings, adding sub-text below specific checkboxes.
The list of checkbox options, defined as key-value pairs (Value and Label).
An array of option keys that should be rendered as disabled (grayed out and unclickable).
Strict validation rule enforcing the minimum number of checkboxes the user must tick.
Strict validation rule enforcing the maximum number of checkboxes the user is allowed to tick.
Strict validation rule enforcing an exact required number of selections (e.g., "Select exactly 3").
***
## Data Payload Architecture
The selected checkboxes are saved as a JSON **array** of strings representing the keys (values) of the ticked boxes.
```json Webhook Payload (JSON) theme={}
{
"submission_id": "sub_611",
"data": {
"dietary_restrictions": ["vegan", "gluten_free"],
"consent_agreed": ["tos_2024"]
}
}
```
```php Database Storage (PHP) theme={}
[
'dietary_restrictions' => ['vegan', 'gluten_free'],
'consent_agreed' => ['tos_2024'],
]
```
***
## Deep Dive: Validation Control
Checkboxes are prone to bad data if left unchecked. If you ask "What are your 2 favorite colors?", a user could easily click all 10 options just to get through the form faster.
By using the **Exact Selections** or **Max Selections** validation rules, the form will literally lock down and physically prevent the user from clicking a 3rd box, flashing an error state until they correct their behavior. This guarantees your data matches your intent.
***
## Best Practices & FAQs
If your list of Checkboxes exceeds 10 items, it creates a massive wall of text that is intimidating to users. At that scale, switch to a [Dropdown](/features/blocks/dropdown) with **Multiple** enabled to condense the interface into a searchable menu.
**Next Steps:** [Dropdown](/features/blocks/dropdown) · [Multiple Choice](/features/blocks/multiple-choice)
# Choice Cards Block
Source: https://flexforms.bjanczak.com/features/blocks/choice-cards
Single-select options as visual cards.
The **Choice cards** block (`choice_cards`) shows mutually exclusive options as cards with optional icons and descriptions.
See the [Blocks overview](/features/blocks/overview) for the full catalog.
# Choice Checkbox Cards Block
Source: https://flexforms.bjanczak.com/features/blocks/choice-checkbox-cards
Multi-select options as visual cards.
The **Choice checkbox cards** block (`choice_checkbox_cards`) allows multiple selections presented as cards.
See the [Blocks overview](/features/blocks/overview) for the full catalog.
# Color Swatch Block
Source: https://flexforms.bjanczak.com/features/blocks/color
Pick a color from swatches.
The **Color swatch** block (`color`) lets respondents pick from predefined swatches.
See the [Blocks overview](/features/blocks/overview) for the full catalog.
# Color Picker Block
Source: https://flexforms.bjanczak.com/features/blocks/color-picker
Free-form color picker control.
The **Color picker** block (`flex_color_picker`) opens a full picker for custom colors.
See the [Blocks overview](/features/blocks/overview) for the full catalog.
# Content Blocks
Source: https://flexforms.bjanczak.com/features/blocks/content
Plain text (display) and Rich text (answers) — pick the right content block.
Flex Forms separates **display copy** from **answerable rich text**:
Instructions and body copy on the form. Not stored as an answer.
WYSIWYG answer field for formatted respondent input.
# Country Selector Block
Source: https://flexforms.bjanczak.com/features/blocks/country
A fast, optimized country selection dropdown with native flag support and internationalization options.
💡 **UX Tip:** Enable `browser_locale_sort_first` to magically float the user's home country to the top of the list!
The **Country** block is a specialized dropdown that automatically handles the list of 195+ global countries. It eliminates the need for you to manually build a massive list of options, and provides built-in search, flags, and international dialing codes out of the box.
## Business Use Cases
Determine which country the user wants an item shipped to, restricting access to unsupported regions.
Collect clean, standardized nationality data for your analytics dashboards.
Determine if a user resides in the EU to automatically trigger GDPR compliance flows.
***
## Configuration & Usage
Drag the **Country** block from the Component Catalog onto the Canvas.
If most of your users are from a specific region, configure the **Default Country** (e.g., `US` or `GB`) so they don't have to scroll to find themselves.
Scrolling through 195 items is tedious on mobile. Always toggle the **Searchable** switch on so users can just type "Canada".
***
## Technical Configuration Schemas
The visual size of the country dropdown. Available options are `sm`, `md`, and `lg`.
The visual style variant of the field.
Displays the 2-letter ISO country code (e.g., "US") next to the country name in the dropdown list.
Displays the international dialing prefix (e.g., "+1") next to the country name in the dropdown list.
If enabled, users can search for a country by typing its name in a search bar within the dropdown list.
Attempts to automatically select the default country based on the user's browser language or geolocation settings.
Pins the country corresponding to the user's browser locale to the very top of the dropdown list for easy access.
The ISO 3166-1 alpha-2 country code (e.g., `US`, `GB`) selected by default.
An array of allowed country codes. When provided, the dropdown will only show these specific countries (whitelist).
An array of country codes to hide from the dropdown (blacklist).
***
## Data Payload Architecture
The Country block guarantees that no matter what the user sees on their screen (in their local language), your database receives the exact, pristine **ISO 3166-1 alpha-2** code.
```json Webhook Payload (JSON) theme={}
{
"submission_id": "sub_332",
"data": {
"shipping_country": "US",
"nationality": "PL"
}
}
```
```php Database Storage (PHP) theme={}
[
'shipping_country' => 'US',
'nationality' => 'PL',
]
```
***
## Deep Dive: Data Standardization
Why don't we just use a regular Dropdown and let users type their country?
If you let users type, they will write "United States", "USA", "U.S.A", and "America". When you try to sync this data to HubSpot or another CRM, the integration can fail because those systems expect exactly `US`.
**Integration Ready:** By outputting standardized ISO codes, the Country block maps cleanly into CRM and marketing tools that expect `US`, `PL`, `DE`, and similar codes.
***
## Best Practices & FAQs
If you are building an order form but only ship to North America, use the **Countries** array to whitelist just `US`, `CA`, and `MX`. This physically prevents users from other regions from submitting an order you cannot fulfill.
Flags are rendered natively by the operating system using standard emoji tables. If a flag appears as letters (like `US` instead of 🇺🇸), it means the user's operating system (like some versions of Windows) does not support flag emojis natively.
**Next Steps:** [Map & Address Block](/features/blocks/map)
# Credit Card Block
Source: https://flexforms.bjanczak.com/features/blocks/credit-card
Collect card-number style inputs for reference — not a payment gateway.
**Not a payment processor.** This block only captures card-like fields into *your* submission payload. For real charges, connect [Stripe](/integrations/stripe) and add the **Stripe Payment** block (Payment Element).
The **Credit card** block (`credit_card`) is an input UI for collecting card details when you need them for offline processing or a custom backend — for example last-four display in Submissions.
## Security
* Treat stored values as **sensitive PII**. Prefer private disks and strict access policies.
* Do **not** use this block as a substitute for a PCI-compliant payment form.
* In **Submissions**, the table shows only the last four digits. Opening the answer asks you to confirm, then shows the full card number, name, and expiry. CVV is never shown in Studio.
## Configuration
Drag **Credit card** from the catalog onto the canvas only if you truly need card-number capture.
Collect only what your process requires. Prefer asking for last four + brand elsewhere when full PAN is unnecessary.
Related: [Access & security](/features/settings/access) · [File upload](/features/blocks/file-upload)
# Currency Block
Source: https://flexforms.bjanczak.com/features/blocks/currency
Collect money amounts with ISO currency codes and minor-unit storage.
Prefer **Currency** over Number whenever the answer is money. Amounts are stored in **minor units** (e.g. cents) for clean math and CRM mapping.
The **Currency** block (`currency`) collects a monetary amount. You can lock a single ISO currency or let respondents pick from an allowed list.
## Configuration
Drag **Currency** from the Number category onto the canvas.
Choose the default ISO code (for example `PLN`, `USD`, `EUR`) and optional min/max in major units.
Enable a currency picker when respondents may choose among allowed codes.
## Storage
Answers are stored as integer **minor units**, or as `{{amount, currency}}` when a picker is enabled. Submissions and CSV export format them for humans (e.g. `999,00 PLN`).
Related: [Number](/features/blocks/number) · [Price range](/features/blocks/price-range) · [Flex slider](/features/blocks/flex-slider)
# Date, Time & Duration
Source: https://flexforms.bjanczak.com/features/blocks/date-time
Three catalog blocks — Date, Time, and Duration — with Mode settings for datetime, month, year, and ranges.
💡 **UX Tip:** Prefer the **Date** block and set **Mode** instead of hunting for separate Month / Year / Date range tiles.
Date & time in Studio is three catalog tiles:
| Block | Modes |
| - | - |
| **Date** | Date · Date & time · Month · Year · Date range |
| **Time** | Time · Time range |
| **Duration** | Length (`HH:MM:SS`), not a clock time |
## Business Use Cases
Use **Date** with Mode **Date & time**, set a minimum of today.
Use **Date** Mode **Date** with a maximum of today.
Use **Duration** when you need how long something lasts, not what time it starts.
***
## Configuration & Usage
Drag **Date**, **Time**, or **Duration** onto the Canvas.
On Date / Time, open settings and set **Mode** (e.g. Date range, Date & time, Time range).
Set Minimum / Maximum, size, variant, and time options (hour cycle, seconds) when the mode includes time.
***
## Technical Configuration Schemas
`date` · `date_time` · `month` · `year` · `date_range`
`sm` · `md` · `lg`
Visual shell variant.
Earliest allowed value (ISO-style string).
Latest allowed value.
Shown for Date & time: `12` or `24`.
`numeric` · `short` · `long`
`time` · `time_range`
`segmented` · `dropdown`
`12` or `24`
Minute snap interval for dropdown / segments.
Include seconds in the duration segments.
Minimum duration.
Maximum duration.
***
## Data Payload
Single modes store a string. Range modes store `{ "start": "…", "end": "…" }`.
**Next Steps:** [Field settings](/features/studio/field-settings) · [Logic](/features/studio/logic-board)
# Select Block
Source: https://flexforms.bjanczak.com/features/blocks/dropdown
Dropdown select — Studio catalog label: Select (`select`). Supports single or multiple chips.
In Studio this block is **Select**. Enable **Searchable** for long lists and **Multiple** for chip multi-select.
The **Select** block (`select`) is the compact menu for choice questions — single by default, or multiple chips when enabled.
## Business Use Cases
Ask users to categorize their support ticket (e.g., Billing, Tech Support, Sales).
Determine a user's job title or industry during a B2B onboarding flow.
Enable **Multiple** so respondents can pick several topics or skills as chips.
***
## Configuration & Usage
Drag the **Select** block from the Component Catalog onto the Canvas.
On the canvas, add option rows (label per row). Each option stores a stable value under the hood.
In settings, leave **Multiple** off for one answer, or turn it on for multi-select chips.
If your list has more than 10 items, toggle **Searchable** so users can filter by typing.
In settings, turn on **Default value** and pick an option by its label (with **Multiple**, pick one or more).
***
## Technical Configuration Schemas
The visual size of the dropdown field. Available options are `sm`, `md`, and `lg`.
The aesthetic style of the dropdown wrapper. Options: `bordered`, `flat`, `soft`, `faded`, `underlined`.
Color of selected chips when **Multiple** is enabled.
Adds a clear control so the respondent can empty the field.
Allows selecting more than one option. Answers are stored as a list of values.
Enables a search bar at the top of the dropdown list, allowing users to quickly filter through hundreds of options.
Renders the field as non-interactive (preview / locked state).
The list of choices presented to the user. Each option is a key-value pair (Value => Label).
***
## Data Payload Architecture
Single-select saves one **Value**. With **Multiple** enabled, the field saves an array of values.
```json Webhook Payload (JSON) theme={}
{
"submission_id": "sub_419",
"data": {
"support_department": "dept_billing",
"interests": ["php", "react", "design"]
}
}
```
```php Database Storage (PHP) theme={}
[
'support_department' => 'dept_billing',
'interests' => ['php', 'react', 'design'],
]
```
***
## Deep Dive: Labels vs. Values
When configuring a Dropdown, you must define a Label and a Value for every option.
* **Label:** What the human user sees on the screen (e.g., "Senior Software Engineer").
* **Value:** The raw data saved to the database (e.g., `role_eng_snr`).
By separating the Label and Value, you can change the visual text at any time without breaking your database schemas, Zapier workflows, or internal reporting logic. The Value acts as an immutable primary key.
**Pro Tip:** Always use lowercase, snake\_case strings for your Values to ensure maximum compatibility with external APIs.
***
## Best Practices & FAQs
Leave **Multiple** off when exactly one answer is required. Turn it on when respondents should pick several options — selections appear as chips.
If you have 4 or fewer options and need a single answer, use a [Multiple Choice (Radio)](/features/blocks/multiple-choice) block instead. Hiding 3 options behind a click adds unnecessary friction. Use Dropdowns when you have 5+ options, or when you need multi-select chips.
**Next Steps:** [Multiple Choice](/features/blocks/multiple-choice) · [Checkboxes](/features/blocks/checkbox)
# Email Block
Source: https://flexforms.bjanczak.com/features/blocks/email
Collect securely validated email addresses. Learn how Primary routing drives integrations and CRM synchronization.
💡 **New Feature:** You can now automatically sync the Primary Email to the global Contacts Hub!
The **Email** block is the absolute cornerstone of digital identity and lead generation. It inherently enforces structural validation (ensuring the input contains an `@` symbol and a valid domain format) before allowing submission. Without a verified email, your CRM workflows, marketing automations, and transactional receipts cannot function.
## Business Use Cases
Act as the primary unique identifier for account creation and password resets.
Route order confirmations, digital downloads, and shipping receipts to the customer.
Gate valuable content (like PDFs) behind a required email capture for newsletter drip campaigns.
***
## Configuration & Usage
Deploying the Email block is straightforward, but its power lies in its deep integration with the rest of the Flex Forms ecosystem.
Drag the **Email** block from the Component Catalog onto the Canvas.
Define the **Label** (e.g., *"Work Email"*). You can also inject a **Placeholder** (e.g., *"[jane@company.com](mailto:jane@company.com)"*) to guide the respondent.
Email blocks are typically the most critical piece of data. Toggle the **Required** switch to prevent anonymous submissions.
***
## Technical Configuration Schemas
Customize the email block using the advanced configuration options in the Inspector. We have broken these down into logical categories.
The main text displayed above the field.
The empty state placeholder (e.g., `you@example.com`).
Muted instructional text displayed below the input.
Hides the main field label, keeping only the input and the placeholder visible. Useful for minimal landing pages.
If enabled, the form cannot be submitted unless a valid email address is provided.
Validates against your database to ensure this email hasn't been submitted previously to this form (useful for limiting "one entry per person" giveaways).
Determines if the field is visible on the screen.
Pre-fill the email if you already know it (e.g., via URL query parameters).
***
## Data Payload Architecture
When a form containing an Email block is submitted and sent via Webhook to an external service (like Zapier or Make), the payload looks like this:
```json Webhook Payload (JSON) theme={}
{
"submission_id": "sub_987654321",
"form_id": "frm_123456789",
"data": {
"email_primary": "jane.doe@acmecorp.com"
},
"metadata": {
"ip_address": "192.168.1.1",
"submitted_at": "2026-08-02T10:00:00Z"
}
}
```
```php Database Storage (PHP) theme={}
[
'email_primary' => 'jane.doe@acmecorp.com',
]
```
***
## Deep Dive: The "Primary Email" Concept
If your form contains multiple Email blocks (e.g., *Personal Email* and *Manager's Email*), the system must know which one identifies the respondent. This is handled by the **Primary** toggle.
**Automatic Promotion:** Flex Forms intelligently promotes the first Email block you add to the Canvas to be the **Primary**.
### Why Primary Matters:
1. **The Contacts Directory:** The Primary email is used as the unique identifier when creating or updating profiles in the global [Contacts Hub](/features/contacts/overview).
2. **Notification Routing:** If you configure the form to send an auto-responder or receipt, the system dispatches it to the Primary address.
3. **CRM Integration:** Third-party feeds (like Mailchimp or Zapier) prioritize the Primary email field when syncing lead data.
You can manually change which block is designated as Primary within the block's field settings.
***
## Best Practices & Troubleshooting
If you are emailing an existing database, you already know their email. Use [Query Parameter Prefilling](/features/share/query-params) (e.g., `?email=known@user.com`) so they don't have to type it again. You can even combine this with the **Hide Label** setting for a frictionless flow.
Consider using the **Help Text** setting to gently remind users to double-check their spelling, as this address will be used for critical communications.
While the Email block validates structural integrity (e.g., requires an `@` and a `.com`), it cannot verify if the inbox actually exists. For high-security environments, you should implement a double-opt-in workflow where the user must click a confirmation link sent to the provided address before granting access.
**Next Steps:** [Query Parameter Prefilling](/features/share/query-params) · [The Contacts Directory](/features/contacts/overview)
# File Upload Block
Source: https://flexforms.bjanczak.com/features/blocks/file-upload
Securely collect documents, images, and attachments directly into your cloud storage.
🚨 **Security Notice:** Never deploy a File Upload block without setting a `max_size_kb` limit. Without it, an attacker could upload gigabytes of data and spike your cloud storage bill.
The **File Upload** block provides a powerful drag-and-drop interface for users to submit files. It includes robust security limits, automatic image optimization, and multi-file support, seamlessly routing files directly to your configured storage disks (like AWS S3 or Google Cloud Storage) without stressing your primary web server.
## Business Use Cases
Collect resumes and cover letters by enforcing PDF-only uploads.
Allow field workers to take photos of broken equipment directly via their mobile device's camera.
Securely upload copies of passports or driver's licenses to a private S3 bucket.
***
## Configuration & Usage
Drag the **File Upload** block from the Component Catalog onto the Canvas.
Define which `disk` and `directory` the uploaded files should be saved to (e.g., `s3` in the `customer_resumes` folder).
To prevent malicious uploads, always set the **Accepted Types** (e.g., just PDFs) and a strict **Max Size (KB)** limit.
***
## Technical Configuration Schemas
The Laravel storage disk where the files should be saved (e.g., `s3`, `public`, `local`).
The specific folder inside the disk where the files will be placed.
Sets the ACL visibility on S3-compatible storage (e.g., `private` or `public-read`).
If enabled, the user can select and upload multiple files at once.
The maximum file size allowed for **each individual file**, specified in kilobytes (e.g., `5120` for 5MB).
An array of allowed MIME types (e.g., `['application/pdf', 'image/jpeg']`). The browser will restrict the file picker to these extensions.
A quick-preset that automatically restricts uploads to standard document formats (PDF, DOCX, TXT).
A quick-preset that restricts uploads to image formats (JPG, PNG, WEBP).
Legacy block-level toggle. Flex Forms also applies package-wide image optimization on public fill uploads (see below).
Automatically resizes images that exceed this width (in pixels).
Automatically resizes images that exceed this height (in pixels).
***
## How Flex Forms stores respondent files
* **Images** are converted to WebP (quality 80 by default) with a **normal** variant (max 1500px long edge) and a **thumb** (max 350px). Smaller images are never upscaled; the original upload is discarded after variants exist.
* **Everything else** (PDF, Word, video, audio, …) is stored as a **single original file** — no forced WebP, no thumb.
* Storage uses your configured submissions disk by default. If you set `FLEX_FORMS_MEDIA_DRIVER=spatie` and install [spatie/laravel-medialibrary](https://github.com/spatie/laravel-medialibrary), Spatie becomes the **primary** store: native conversions, responsive images (optional), `ffmedia:{uuid}` path tokens, and originals deleted after conversions. Details: [Upload disks](/developers/upload-disks).
***
## Data Payload Architecture
Flex Forms handles the heavy lifting of uploading the file to your cloud storage. When the form submits, it passes the *path* to the file, not the raw binary data.
```json Webhook Payload (Single File) theme={}
{
"submission_id": "sub_909",
"data": {
"resume_upload": "customer_resumes/john_doe_resume.pdf"
}
}
```
```json Webhook Payload (Multiple Files) theme={}
{
"submission_id": "sub_909",
"data": {
"inspection_photos": [
"inspections/photo_1.jpg",
"inspections/photo_2.jpg"
]
}
}
```
**Generating URLs:** To view these files, you will need to generate a URL based on your disk configuration (e.g., `https://my-s3-bucket.s3.amazonaws.com/customer_resumes/john_doe_resume.pdf`).
***
## Deep Dive: Image Optimization
When asking for photos (e.g., a profile picture or an inspection photo), modern smartphones often upload 10MB to 20MB raw images. If 1,000 users upload a 15MB photo, you will rapidly burn through your cloud storage and bandwidth budget.
By enabling **Optimize Images** and setting a **Max Width/Height** (e.g., 1920px), the File Upload block intercepts the massive file on the server, resizes it, and compresses it down to \~500KB *before* saving it to S3.
***
## Best Practices & FAQs
Always specify a `directory` (e.g., `form_uploads/campaign_x`). If you leave it blank, all files dump into the root of your storage disk, making it a nightmare to manage later.
**Next Steps:** [Signature Block](/features/blocks/signature)
# Flex Slider Block
Source: https://flexforms.bjanczak.com/features/blocks/flex-slider
Pill-rail slider with optional two-handle range for min–max picks.
The **Flex slider** (`flex_slider`) is a branded pill rail with a capsule thumb. Enable **Range (two handles)** when respondents should pick a min–max band (budget, age range, quantity band).
## Configuration
Drag **Flex slider** from the Number category onto the canvas.
Set min, max, step, size, step dots, track fill, and value placement in field settings.
Turn on **Range (two handles)** for a pair of values instead of a single number.
Related: [Slider](/features/blocks/slider) · [Number](/features/blocks/number) · [Currency](/features/blocks/currency) · [Price range](/features/blocks/price-range)
# Image Block
Source: https://flexforms.bjanczak.com/features/blocks/image
Image upload or display depending on configuration.
The **Image** block (`image`) handles image media on the form. Configure accepted types and size limits like other uploads. Related: [File upload](/features/blocks/file-upload).
See the [Blocks overview](/features/blocks/overview) for the full catalog.
# Textarea Block
Source: https://flexforms.bjanczak.com/features/blocks/long-text
Multi-line text — Studio catalog label: Textarea (`flex_textarea`).
In Studio this block is **Textarea** (not “Long Text”). Enable autosize to avoid inner scrollbars.
The **Textarea** block collects open-ended paragraphs — reviews, bug reports, biographies. For formatted HTML answers use [Rich text](/features/blocks/rich-text); for static instructions use [Plain text](/features/blocks/plain-text).
## Business Use Cases
Collect rich, qualitative reviews and testimonials from users about your service.
Provide a large canvas for users to describe the steps required to reproduce a technical bug.
Ask candidates open-ended questions like "Why do you want to work here?" and enforce minimum word counts.
***
## Configuration & Usage
Drag the **Long Text** block from the Component Catalog onto the Canvas.
Define the prompt in the **Label**. For long text, a good **Placeholder** (e.g., *"Describe the issue in detail..."*) is highly recommended to set expectations.
Toggle **Animated Autosize** in the Inspector to ensure the field grows seamlessly as the user types.
***
## Technical Configuration Schemas
Fine-tune the textarea experience using these settings in the Inspector.
The visual size of the textarea. Available options: `sm`, `md`, and `lg`.
The initial number of rows (height) of the textarea before the user starts typing.
When enabled, the textarea automatically and smoothly expands its height as the user types multiple lines.
The maximum height of the textarea when `animated_autosize` is enabled (e.g., `300px`). After reaching this height, the field will start scrolling.
Adds a dictation microphone button to the textarea, enabling speech-to-text.
Embeds a native emoji picker button within the textarea interface.
Displays a live character count below the textarea.
The minimum number of characters required for a valid submission.
The maximum number of characters allowed.
***
## Data Payload Architecture
Long text submissions maintain their formatting via invisible newline characters (`\n`). When passing this data to other systems, ensure they support multiline strings.
```json Webhook Payload (JSON) theme={}
{
"submission_id": "sub_881",
"data": {
"bug_description": "When I click the save button, nothing happens.\n\nI have tried restarting my browser."
}
}
```
```php Database Storage (PHP) theme={}
[
'bug_description' => "When I click the save button, nothing happens.\n\nI have tried restarting my browser.",
]
```
***
## Deep Dive: Managing Constraints
When asking for open-ended feedback, users can sometimes write entirely too much, or conversely, give a useless one-word answer like "good."
You can forcefully curate the quality of your responses using the **Minimum Length** and **Maximum Length** settings combined with the **Character Counter**.
**UX Tip:** If you set a Minimum Length of 100 characters, *always* enable the Character Counter. Users need visual feedback on how close they are to satisfying the requirement.
***
## Best Practices & FAQs
If you expect a long story, set the `rows` parameter to `5` or `6`. A larger empty box psychologically encourages the user to write more. A small box implies you only want a quick sentence.
If you need the user to submit text with bolding, italics, or bullet points, use the [Rich Content Block](/features/blocks/content) instead of Long Text.
**Next Steps:** [Rich Content Block](/features/blocks/content)
# Map & Address Block
Source: https://flexforms.bjanczak.com/features/blocks/map
Collect perfectly structured, geocoded locations using interactive maps and Mapbox autocomplete.
⚠️ **Requirement:** You must provide a valid Mapbox Token in the Settings panel for this block to function.
The **Map & Address** block (`MapPickerField`) is a heavyweight component that completely replaces standard text fields for address collection. Users can drop a pin on a visual map, or type an address into an autocomplete search bar that automatically drops the pin at the correct location, ensuring perfectly structured geographical data.
## Business Use Cases
Ensure drivers get exact coordinates (`lat/lng`) instead of misspelled street names that cause failed deliveries.
Allow users to drop a pin on plots of land or rural properties that do not have standard postal addresses.
Collect exact geolocation data from franchisees to build accurate internal routing and search tools.
***
## Complete Integration Guide: Mapbox API
To power the autocomplete search and render the visual map tiles, you must integrate Flex Forms with Mapbox. This is a one-time setup.
Go to [Mapbox.com](https://www.mapbox.com/) and create a free account. Mapbox provides an incredibly generous free tier (usually up to 100,000 requests per month).
Navigate to your Mapbox Account Dashboard. Under the **Access Tokens** section, click `Create a token`.
*Name it something recognizable, like `Flex_Forms_Production`.*
For security, you must restrict the token so it can only be used on your domain. Under the token settings, add your app's URLs (e.g., `https://my-app.com/`) to the **URL Restrictions** list.
Copy the generated Public Token (starts with `pk.`).
Open **Integrations** in the Flex Forms left rail, and paste the token into the Mapbox API Key field.
***
## Technical Configuration Schemas
Once integrated, you have massive control over how the map behaves and what users are allowed to search for.
Use **Layout** in Studio to switch between **Search input** (`address_autocomplete`) and **Map picker** (`map_picker`). Shared search settings apply to both.
`input` (address search only) or `map` (map canvas + optional search). Changing layout switches the block type while keeping shared search config.
Displays a search bar above the map (map layout) or powers the autocomplete input (input layout).
The `[latitude, longitude]` coordinates where the map is centered when it first loads (e.g., `[51.5074, -0.1278]` for London). Map layout only.
The initial zoom level of the map (usually between 1 and 20). Map layout only. Studio defaults to `12` when you switch a block to map layout without a zoom set.
`auto` uses your app locale / Mapbox default. `manual` uses the `language` code you set.
Result language code when `language_mode` is `manual` (e.g., `pl`, `en`, `es`).
What respondents may find: `all`, `address` (street only), `cities`, `regions`, `countries`, `admin` (admin areas without street), `poi` (general points of interest), or `custom` (raw Mapbox types).
`global` searches worldwide. `countries` limits results to the ISO codes in `countries`.
ISO country codes (e.g., `['US', 'CA']`) when `search_area` is `countries`. Leave empty for worldwide.
Used when `search_scope` is `custom` — Mapbox place types such as `address`, `place`, `poi`, `region`.
Delay in milliseconds before search runs after typing stops.
Forces specific address components (e.g., `['city', 'postcode']`) when a location is present.
How location data is saved: `structured` (object with configured fields) or `string` (formatted via `string_format`).
***
## Data Payload Architecture
If you use a standard Long Text box to ask for an address, a user might type: "123 Apple st NY". This unstructured string is useless for routing or shipping APIs.
With **store format → Structured**, the answer is a normalized object (street, city, postcode, country, and — on map layout — `lat` / `lng`).
```json Webhook Payload (store_format: structured) theme={}
{
"submission_id": "sub_123",
"data": {
"delivery_address": {
"place_name": "123 Apple Street, New York, NY 10001, USA",
"lat": 40.7128,
"lng": -74.0060,
"street": "Apple Street",
"city": "New York",
"postcode": "10001",
"country": "US"
}
}
}
```
```json Webhook Payload (store_format: string) theme={}
{
"submission_id": "sub_123",
"data": {
"delivery_address": "123 Apple Street, New York, NY 10001, USA"
}
}
```
> Mapbox Geocoding does not filter POIs by venue category (restaurant vs cafe). Use the **Points of interest** scope for general landmarks/shops, or street/city scopes for postal addresses.
***
## Best Practices & Troubleshooting
Set **What to search** to **Street addresses only**, and optionally require fields like `street` and `postcode`. Broad regions and POIs will be rejected.
Raise **Search debounce** (advanced) so Mapbox is not called on every keystroke.
If the map renders as a gray box, your Mapbox Token is either missing, invalid, or blocked by **URL Restrictions** in the Mapbox dashboard. Open the browser console (F12) for the exact 403 from Mapbox.
**Next Steps:** [Short Text Block](/features/blocks/short-text)
# Matrix Choice Block
Source: https://flexforms.bjanczak.com/features/blocks/matrix
A powerful grid-based question type for collecting bulk responses or evaluating items on a common scale.
💡 **Mobile Optimization:** Matrix blocks automatically transform from a desktop grid into stacked mobile cards, ensuring perfect responsiveness on phones.
The **Matrix Choice** block (`MatrixChoiceField`) allows you to group multiple related questions into a single, cohesive table. It is perfect for Likert scale surveys (e.g., "Rate the following aspects of our service from 1 to 5") or bulk product selections.
## Business Use Cases
"How satisfied are you with..." (Rows: Support, Product, Pricing | Cols: 1 to 5).
"Select your uniform sizes." (Rows: Small, Medium, Large | Cols: Red, Blue, Green).
"Rank these features by importance." (Rows: Features | Cols: Must Have, Nice to Have, Do Not Build).
***
## Configuration & Usage
Drag the **Matrix Choice** block from the Component Catalog onto the Canvas.
Configure the **Rows** (the subjects or items being evaluated) and the **Columns** (the scale, answers, or rating options).
Decide if the user can pick only one answer per row (`Radio` mode) or multiple answers per row (`Checkbox` mode).
***
## Technical Configuration Schemas
The list of items to evaluate. Each row is defined as a key-value pair (e.g., `cleanliness` => "Cleanliness of the room").
The scale or choices available for each row. Defined as a key-value pair (e.g., `5` => "Excellent", `1` => "Poor").
Defines the selection logic:
* `radio`: Only one choice can be made per row.
* `checkbox`: Multiple choices can be selected per row.
The visual size of the matrix table. Available options are `sm`, `md`, and `lg`.
The accent color used to highlight selected cells in the grid.
An array mapping column keys to Heroicon names. This displays an icon inside the column header (e.g., a star icon).
An array of row keys that are grayed out and unclickable.
An array of specific cells that cannot be selected (e.g., `row_key:column_key`).
A dynamic ruleset to lock a cell based on another answer within the matrix.
***
## Data Payload Architecture
Because a Matrix is fundamentally a grid of questions, the data is saved as a JSON object where the keys are the rows, and the values are the selected columns.
```json Webhook Payload (Radio Mode) theme={}
{
"submission_id": "sub_719",
"data": {
"hotel_survey": {
"room_cleanliness": "5_stars",
"staff_friendliness": "4_stars",
"food_quality": "3_stars"
}
}
}
```
```json Webhook Payload (Checkbox Mode) theme={}
{
"submission_id": "sub_719",
"data": {
"tshirt_order": {
"size_large": ["color_red", "color_blue"],
"size_small": ["color_green"]
}
}
}
```
***
## Deep Dive: Complex Cell Locking
The Matrix Choice field supports complex, cell-level locking logic to prevent impossible combinations.
If you are using a Matrix for an order form (Rows = Shirt Sizes, Columns = Colors), but you are out of stock for "Small Red" shirts, you can use the `disabled_cells` parameter to explicitly block the coordinate `size_small:color_red`.
This prevents users from ordering inventory that doesn't exist, maintaining data integrity without having to delete the row or column entirely.
***
## Best Practices & FAQs
**UX Rule:** Do not add more than 7 columns to a Matrix. Anything beyond that becomes cognitively overwhelming for the user and visually cluttered on tablets, forcing horizontal scrolling.
**Next Steps:** [Rating & NPS Block](/features/blocks/rating-nps)
# Flex Radiolist Block
Source: https://flexforms.bjanczak.com/features/blocks/multiple-choice
Single-choice radio list — Studio catalog label: Flex radiolist (`flex_radiolist`).
In Studio this block is **Flex radiolist**. Prefer it over Select when you have roughly five or fewer options.
The **Flex radiolist** block (`flex_radiolist`) shows every option at once for mutually exclusive answers.
## Business Use Cases
"Which plan would you like?" (e.g., Basic, Pro, Enterprise) where all options need to be compared simultaneously.
"Are you currently a student?" (Yes / No).
"How was your experience?" (Good / Neutral / Bad) using custom icons for each choice.
***
## Configuration & Usage
Drag the **Multiple Choice** block from the Component Catalog onto the Canvas.
Add your options. Remember, users can only select exactly one of these choices.
Use the Inspector to assign **Icons** or sub-text **Descriptions** to individual options to make them easier to understand.
***
## Technical Configuration Schemas
The size of the radio buttons and accompanying text. Available options are `sm`, `md`, and `lg`.
Changes the visual style of the radio list. For example, rendering them as standard circles or bordered pill buttons.
The accent color used when a radio button is selected (active state).
An associative array mapping option keys to Heroicon names. This renders a beautiful icon next to the corresponding radio option.
An associative array mapping option keys to a secondary description string. This allows you to add smaller, muted explanatory text below specific choices.
The list of radio options, defined as key-value pairs (Value and Label).
An array of option keys that should be rendered as disabled (grayed out and unclickable). Useful for indicating out-of-stock items or unavailable timeslots.
***
## Data Payload Architecture
Because radio buttons restrict the user to a single choice, the output payload is a simple, flat string containing the selected Value (key).
```json Webhook Payload (JSON) theme={}
{
"submission_id": "sub_551",
"data": {
"subscription_tier": "tier_pro",
"is_student": "yes"
}
}
```
```php Database Storage (PHP) theme={}
[
'subscription_tier' => 'tier_pro',
'is_student' => 'yes',
]
```
***
## Deep Dive: The Power of Context
Radio buttons are often used for pricing plans or critical tier selections. A simple word like "Pro" might not be enough context for a user to make a decision.
By utilizing the **Descriptions** and **Icons** parameters, you can transform a boring list of radio circles into a rich feature comparison.
**UX Rule:** Radio buttons inherently require the user to evaluate all options before clicking. Adding icons and descriptions drastically reduces the cognitive load required to make that choice.
***
## Best Practices & FAQs
If your Multiple Choice list exceeds 5 or 6 items, it takes up too much vertical screen real estate, especially on mobile. At that point, you should switch to a [Dropdown Block](/features/blocks/dropdown) to save space.
If you offer a seminar on 3 different dates, and one date sells out, do not delete the option! Add its key to `disabled_options`. This creates scarcity and shows future users that your events are highly sought after.
**Next Steps:** [Dropdown Block](/features/blocks/dropdown) · [Checkboxes Block](/features/blocks/checkbox)
# Name Block
Source: https://flexforms.bjanczak.com/features/blocks/name
Composite first / optional middle / last name fields in one block.
The **Name** block (`name`) is a Studio composite for person names. Fill renders the configured parts as text inputs; submissions store structured name parts for Contacts and CRM mapping.
## Configuration
Drag **Name** from the Text category (it leads the text catalog).
Toggle **Last name**, optional **Middle name**, labels, and whether last name is required.
Prefer Name over separate Text inputs when you want consistent Contacts identity and CRM first/last mapping.
Related: [Email](/features/blocks/email) · [Contacts](/features/contacts/overview) · [Text input](/features/blocks/short-text)
# Number Block
Source: https://flexforms.bjanczak.com/features/blocks/number
Safely collect numeric data, enforce boundaries, and trigger proper mobile keyboards.
💡 **UX Tip:** Using the Number block automatically triggers the numeric keypad on iOS and Android devices, significantly speeding up form completion.
The **Number** block (`integer` in the schema, labeled **Number** in Studio) is for mathematical and quantitative data. Prefer it over Text input when you need numeric keyboards, min/max bounds, and clean analytics. For stepping UI, use [Number stepper](/features/blocks/number-stepper). For money, use [Currency](/features/blocks/currency).
## Business Use Cases
Ask for a user's age and strictly enforce a minimum limit (e.g., must be > 18).
Collect salary expectations or donation amounts using float (decimal) steps.
Use the built-in stepper buttons (`+` and `-`) to let users quickly adjust order quantities.
***
## Configuration & Usage
Drag the **Number** block from the Component Catalog onto the Canvas.
Define the **Minimum** and **Maximum** values. For example, if you are asking for "Age", set the minimum to `18` to legally restrict submissions.
By default Number accepts whole numbers only. Enable **Allow decimals** when you need fractional values (e.g. weight). Adjust **Step** if you use a stepper UI.
***
## Technical Configuration Schemas
The visual size of the number stepper field. Available options are `sm`, `md`, and `lg`.
Customizes the heroicon used for the `+` (increment) button on the stepper.
Customizes the heroicon used for the `-` (decrement) button on the stepper.
The absolute minimum numeric value the user is allowed to enter (e.g., `18`).
The maximum numeric value the user is allowed to enter (e.g., `100`).
The incremental step for the stepper buttons.
* A step of `1` enforces integers.
* A step of `0.01` or `0.5` allows floats/decimals.
***
## Data Payload Architecture
The Number block guarantees that the data saved is a true programmatic number type, not a string masquerading as a number. This is crucial for APIs that expect strict types.
```json Webhook Payload (JSON) theme={}
{
"submission_id": "sub_777",
"data": {
"user_age": 28,
"donation_amount": 150.50
}
}
```
```php Database Storage (PHP) theme={}
[
'user_age' => 28, // Saved as integer
'donation_amount' => 150.50 // Saved as float
]
```
***
## Deep Dive: When NOT to use the Number Block
It is a common mistake to use the Number block for things that *look* like numbers but are actually *identifiers*.
**Do NOT use the Number block for:**
* Phone Numbers
* Zip / Postal Codes
* Credit Card Numbers
* Social Security Numbers
**The Rule of Thumb:** If you would never add, subtract, or multiply the data, it is not a Number. Use a [Short Text Block](/features/blocks/short-text) with a Custom Mask instead!
***
## Best Practices & FAQs
By default the Number block accepts whole numbers only. Turn on **Allow decimals** in the block settings when you need fractional values (e.g. weight `12.5`). For money amounts, prefer the Currency block instead.
If you don't want the `+` and `-` buttons appearing inside the input (e.g., for collecting Salary), simply leave the `increment_icon` and `decrement_icon` blank, and standard browsers will hide them.
## Related numeric blocks
* [Number stepper](/features/blocks/number-stepper) — `+` / `-` control for quantities
* [Currency](/features/blocks/currency) — money amounts with ISO currency
* [Slider](/features/blocks/slider) — single-value track
* [Flex slider](/features/blocks/flex-slider) — pill rail, optional two-handle range
* [Price range](/features/blocks/price-range) · [Traffic split](/features/blocks/traffic-split)
**Next Steps:** [Short Text Block](/features/blocks/short-text)
# Number Stepper Block
Source: https://flexforms.bjanczak.com/features/blocks/number-stepper
Quantity input with increment and decrement controls.
The **Number stepper** (`number_stepper`) is a dedicated quantity control with `+` / `-` buttons. Use it for order counts and inventory-style inputs. For a plain numeric field without steppers, prefer [Number](/features/blocks/number) (`integer`).
## Configuration
Set min, max, step, and optional icons for the increment/decrement buttons.
Related: [Number](/features/blocks/number) · [Currency](/features/blocks/currency)
# Block Overview
Source: https://flexforms.bjanczak.com/features/blocks/overview
Catalog of Studio blocks — text, numbers, choices, media, and specialized fields.
Blocks are the fields and content pieces you drag onto the Studio canvas. Flex Forms builds on Filament Flex Fields so every block is responsive, configurable, and export-ready.
CAPTCHA is **not** a canvas block — configure one provider under [Form Settings → Access](/features/settings/access).
## Catalog
[Name](/features/blocks/name), [Email](/features/blocks/email), [Phone](/features/blocks/phone), [Text input](/features/blocks/short-text), [Textarea](/features/blocks/long-text), [URL](/features/blocks/url), [Rich text](/features/blocks/rich-text)
[Plain text](/features/blocks/plain-text) for instructions — not an answer field.
[Number](/features/blocks/number), [Number stepper](/features/blocks/number-stepper), [Currency](/features/blocks/currency), [Slider](/features/blocks/slider), [Flex slider](/features/blocks/flex-slider), [Price range](/features/blocks/price-range), [Traffic split](/features/blocks/traffic-split)
[Select / Dropdown](/features/blocks/dropdown), [Multiple choice](/features/blocks/multiple-choice), [Checkbox / checklist](/features/blocks/checkbox), [Toggle](/features/blocks/toggle), [Segment control](/features/blocks/segment-control), [Choice cards](/features/blocks/choice-cards), [Tags](/features/blocks/tags), [Country](/features/blocks/country), [Timezone](/features/blocks/timezone)
[Date / Time / Duration](/features/blocks/date-time), [Map](/features/blocks/map), [Address autocomplete](/features/blocks/address-autocomplete) (Mapbox)
[File upload](/features/blocks/file-upload), [Image](/features/blocks/image), [Video](/features/blocks/video), [Audio](/features/blocks/audio), [Voice note](/features/blocks/voice-note), [Signature](/features/blocks/signature)
[Matrix](/features/blocks/matrix), [Rating & NPS](/features/blocks/rating-nps), [Social links](/features/blocks/social-links), [Color](/features/blocks/color), [Credit card](/features/blocks/credit-card) (input only — not a gateway), [Stripe Payment](/features/blocks/stripe-payment). For keys, webhooks, and refunds see [Stripe](/integrations/stripe) and [Transactions](/features/transactions/overview).
***
## Field settings
Click a block on the canvas to open **field settings** in the **left** dock (replacing the component catalog). Set the internal **Name**, public **Label**, validation, and type-specific options. See [Field settings](/features/studio/field-settings).
***
## Best practices
Use Phone for phones, Currency for money, Email for emails — not generic Text input.
Integrations and query prefills use the internal **Name**, not the visible label. See [Name & label](/get-started/name-label-fields).
**Next:** [Name](/features/blocks/name) · [Currency](/features/blocks/currency) · [Voice note](/features/blocks/voice-note) · [Form settings](/features/settings/overview)
# Phone Number Block
Source: https://flexforms.bjanczak.com/features/blocks/phone
Collect pristine international phone numbers with built-in country flags and E.164 standardization.
🚨 **Important:** SMS gateways (like Twilio or AWS SNS) will instantly reject phone numbers that are not formatted to the E.164 standard. This block guarantees E.164 compliance out of the box.
The **Phone Number** block is an advanced input field that abstracts away the complexity of global phone formats. It automatically handles country dialing codes, validates number lengths based on the selected country, and standardizes the output for your CRM or SMS gateways.
## Business Use Cases
Collect verified mobile numbers to send promotional blasts or event reminders.
Ensure your sales team gets perfectly formatted international numbers to dial right from their CRM.
Capture mobile-only numbers required for sending 2FA security codes.
***
## Configuration & Usage
Drag the **Phone** block from the Component Catalog onto the Canvas.
Set your **Default Country**. This determines which flag and dialing code (e.g., `+1` for US) is selected when the user opens the form.
If you only do business in Europe, use the **Countries** array to whitelist specific nations, preventing users from submitting numbers from unsupported regions.
***
## Technical Configuration Schemas
The visual size of the phone input. Available options are `sm`, `md`, and `lg`.
The ISO 3166-1 alpha-2 country code (e.g., `US`, `PL`, `GB`) selected by default.
Enables a search bar inside the country flag dropdown, allowing users to quickly find their nation.
If enabled, the field enforces the `+` prefix natively in the UI.
An array of allowed country codes. If defined, the user can only select a country flag from this specific list (whitelisting).
An array of country codes to hide from the dropdown. Use this to block specific countries (blacklisting) while allowing the rest of the world.
Strict validation constraint. If true, the field will reject landline (fixed-line) phone numbers.
Strict validation constraint. If true, the field will only accept landline phone numbers.
Advanced type allow-list (for example `MOBILE`, `VOIP`). When set, overrides mobile-only / fixed-line-only sugar.
When true, the number must be valid specifically for the selected country (not only valid as an international number).
How the national value is stored after validation: `national` (formatted) or `digits` (digits only). Default stays formatted.
Optional extra stored keys such as `international` and `rfc3966`.
Optional enrichment keys such as `carrier`, `geo`, `timezones`, and `type` (server-side only).
***
## Data Payload Architecture
Regardless of how messy the user types their number, the Phone block strips all formatting and converts it into the globally recognized **E.164 standard**.
```json Webhook Payload (JSON) theme={}
{
"submission_id": "sub_902",
"data": {
"customer_phone": "+48123456789"
}
}
```
```php Database Storage (PHP) theme={}
[
'customer_phone' => '+48123456789',
]
```
***
## Deep Dive: E.164 Standardization
Phone numbers are notoriously messy. Users might type `(555) 123-4567`, `5551234567`, or `+1 555-123-4567`.
If you attempt to send an SMS via Twilio or sync this data to Salesforce, formatting inconsistencies will cause catastrophic failures.
**E.164 Guarantee:** Because Flex Forms handles this normalization before the data is saved, your integrations will never fail due to a malformed phone number.
***
## Best Practices & FAQs
If your workflow involves sending a 2FA code or marketing SMS after submission, you must enable **Mobile Only**. This prevents users from entering a landline number that cannot receive text messages, which would break your flow.
If you allow all global countries (not whitelisting), always enable **Searchable**. Scrolling through 195+ flags on a mobile device is a terrible user experience.
**Next Steps:** [Country Selector](/features/blocks/country)
# Plain Text Block
Source: https://flexforms.bjanczak.com/features/blocks/plain-text
Display-only body copy on the form — not an answer field.
The **Plain text** block (`plain_text`) is **content**, not an answer. Use it for instructions, legal blurbs, and section intros between questions.
Respondents cannot type into it. For answerable formatted text, use [Rich text](/features/blocks/rich-text).
## Configuration
Edit the body copy in field settings. Place Plain text blocks between question blocks on the canvas.
Related: [Rich text](/features/blocks/rich-text) · [Blocks overview](/features/blocks/overview)
# Price Range Block
Source: https://flexforms.bjanczak.com/features/blocks/price-range
Collect a numeric price band or range.
The **Price range** block (`price_range`) captures a priced band for budgets and filters. For free-form money amounts, prefer [Currency](/features/blocks/currency); for visual rails, see [Flex slider](/features/blocks/flex-slider).
See the [Blocks overview](/features/blocks/overview) for the full catalog.
# Rating & NPS Block
Source: https://flexforms.bjanczak.com/features/blocks/rating-nps
Collect user satisfaction scores using interactive Star Ratings or standard Net Promoter Score scales.
💡 **UX Tip:** When using NPS, toggle **Color Coded** on. Visual cues (Red for low, Green for high) subconsciously help users process the scale faster.
The **Rating & NPS** block combines two distinct visual interfaces to evaluate user sentiment. Depending on your configuration, it renders either a standard 5-star rating component or a comprehensive 0-10 Net Promoter Score (NPS) scale, making it essential for feedback forms.
## Business Use Cases
Use NPS (0-10) to determine if your customers are Detractors, Passives, or Promoters.
Use a 5-star rating scale to collect quick product quality feedback for an e-commerce store.
After a support ticket is closed, ask the user to rate the agent's helpfulness.
***
## Configuration & Usage
Drag the **Rating & NPS** block from the Component Catalog onto the Canvas.
By default, it renders as a Star Rating. If you are trying to calculate customer loyalty, switch the mode to **NPS** in the Inspector.
Adjust the colors and icons. For example, change the stars to "Hearts" and the color to "Red" for a more affectionate feedback loop.
***
## Technical Configuration Schemas
The maximum number of stars available to select. Set to `10` for a 10-star scale.
The color of the filled icons (e.g., gold/yellow for stars).
Overrides the default star with a custom Heroicon (e.g., `heart`, `hand-thumb-up`).
Displays the numeric equivalent of the selection next to the stars (e.g., "4 / 5").
Visual template: `pills`, `segments`, or `emojis`. Emojis always use five mood slots (images stay fixed); you can rename the five labels under each emoji.
Highest number on a 0–N scale for **pills** and **segments** (slider from 5 to 10). Hidden when `variant` is `emojis`.
Five captions under the emoji moods. Only shown for the **Emojis** variant.
The text displayed below the lowest number (e.g., "Not likely at all").
The text displayed below the highest number (e.g., "Extremely likely").
Applies standard NPS color coding automatically (Red/Yellow/Green).
Control size: `sm`, `md`, or `lg`.
***
## Data Payload Architecture
Whether you use Star Ratings or NPS, the final selection is always evaluated and saved as a standard `integer`.
```json Webhook Payload (JSON) theme={}
{
"submission_id": "sub_299",
"data": {
"product_rating": 4,
"brand_nps": 9
}
}
```
```php Database Storage (PHP) theme={}
[
'product_rating' => 4,
'brand_nps' => 9,
]
```
***
## Deep Dive: Why use NPS?
Net Promoter Score is a highly standardized metric used globally by companies to measure customer experience. The core question is always: *"On a scale of 0 to 10, how likely are you to recommend us to a friend?"*
Because Flex Forms natively supports NPS and standardizes the output as an integer, you can instantly pipe this data into tools like Mixpanel, Salesforce, or Zendesk, which have built-in dashboards specifically looking for this exact 0-10 data structure to calculate your Promoters vs Detractors.
***
## Best Practices & FAQs
**UX Best Practice:** Always utilize `min_label` and `max_label` when using NPS mode. Numbers lack context on their own. "0 = Never, 10 = Absolutely" guides the user's psychology.
**Next Steps:** [Matrix Choice Block](/features/blocks/matrix)
# Rich Text Block
Source: https://flexforms.bjanczak.com/features/blocks/rich-text
Answerable WYSIWYG text with formatting toolbar.
Rich text answers may contain HTML. Sanitize before rendering submissions on public pages.
The **Rich text** block (`rich_text`) lets respondents submit formatted answers (bold, lists, links) with a toolbar.
For static instructions that are not answers, use [Plain text](/features/blocks/plain-text) instead.
Related: [Textarea](/features/blocks/long-text) · [Plain text](/features/blocks/plain-text)
# Segment Control Block
Source: https://flexforms.bjanczak.com/features/blocks/segment-control
Compact mutually exclusive options in a segmented control.
The **Segment control** block (`segment_control`) presents a small set of mutually exclusive options in a compact control — ideal for short enums (Plan A / B / C).
See the [Blocks overview](/features/blocks/overview) for the full catalog.
# Text Input Block
Source: https://flexforms.bjanczak.com/features/blocks/short-text
Single-line text — Studio catalog label: Text input (`flex_text_input`).
In Studio this block is **Text input** (not “Short Text”). It supports masking and speech dictation.
The **Text input** block collects single-line answers: titles, codes, and free text. Prefer the [Name](/features/blocks/name) block for first/last name composites.
## Business Use Cases
The standard input for collecting First Names, Last Names, and Company Titles.
Use Custom Masking to force users to correctly type License Plates, Coupon Codes, or Serial Numbers.
Use URL prefixes to guarantee users submit clean links to their LinkedIn or Twitter profiles.
***
## Configuration & Usage
Drag the **Short Text** block from the Component Catalog onto your canvas.
Set the **Label** and **Placeholder**. Use the Inspector to activate advanced visual modes like the **Emoji Picker** or **Speech Dictation**.
If you need specific data (like a postal code or license plate), select a **Mask Preset** to format the user's input automatically as they type.
***
## Technical Configuration Schemas
Unlock the full power of the short text block with these Inspector configurations.
The visual size of the input field. Options: `sm`, `md`, `lg`.
The UI variant styling applied to the input field.
The name of a Heroicon to display at the beginning of the input field.
A static string prepended to the input (e.g., `https://`).
A static string appended to the input (e.g., `.com`).
Enables a microphone icon inside the input, allowing users to dictate their answer using native speech-to-text.
The locale code for speech dictation (e.g., `en-US` or `pl-PL`).
Adds a native emoji picker button directly inside the text input.
Applies an automatic formatting mask as the user types. Available presets: `date`, `time`, `phone`, `card`, `postal`, `custom`.
If `mask_preset` is set to `custom`, this string defines the exact mask pattern (e.g., `99-999`).
Displays a live character count below the input field.
The minimum number of characters the user must type.
The maximum number of characters the user is allowed to type.
***
## Data Payload Architecture
Because the Short Text block collects simple strings, the resulting JSON payload is straightforward, but it automatically trims leading and trailing whitespace.
```json Webhook Payload (JSON) theme={}
{
"submission_id": "sub_404",
"data": {
"first_name": "Alexander",
"custom_license_plate": "WJ-4921"
}
}
```
```php Database Storage (PHP) theme={}
[
'first_name' => 'Alexander',
'custom_license_plate' => 'WJ-4921',
]
```
***
## Deep Dive: Input Masking
Input masking solves the problem of messy data. If you ask for a license plate number without a mask, you might get `ABC 1234`, `abc1234`, or `ABC-1234`.
By applying a **Custom Mask** (e.g., `AAA-9999`), the field physically prevents the user from typing anything else and automatically inserts the hyphen, ensuring your database remains perfectly clean.
**Masks vs. Validation:** A mask controls *how* the user types, but it does not validate the underlying logic. For example, a date mask `99/99/9999` will accept `99/99/9999`, which is not a real date. Use the [Date & Time Block](/features/blocks/date-time) for genuine date collection.
***
## Best Practices & FAQs
Enable dictation when you expect users to fill out the form on mobile devices while on the go (e.g., field workers submitting inspection reports). It drastically reduces typing friction.
If you want a user to submit their website, use the **Prefix** feature to lock in `https://`. This prevents them from typing `www.` or `http://`, standardizing your data output so you don't have to clean it up later.
**Next Steps:** [Long Text Block](/features/blocks/long-text)
# Signature Block
Source: https://flexforms.bjanczak.com/features/blocks/signature
Collect hand-drawn electronic signatures from respondents on any device.
💡 **UX Tip:** Enable fullscreen so mobile users get a dedicated signing canvas without fighting page scroll.
The **Signature** block gives respondents an interactive canvas (mouse, trackpad, or touch). The stroke is smoothed and stored as a compact **SVG string** in the submission payload — not as a separate upload file. Optional download (SVG / WebP) is for the respondent’s browser only; it does not write to your media disk.
## Business Use Cases
Collect an embedded signature on NDAs, service agreements, or B2B contracts.
Allow customers to sign a tablet upon receiving a high-value shipment.
Require an electronic signature before participation.
***
## Configuration & Usage
Drag the **Signature** block from the Component Catalog onto the Canvas.
Adjust pen color, width, and optional guidelines to match your brand.
Raise **Min Strokes** so a single accidental tap cannot pass validation.
***
## Technical Configuration Schemas
HEX ink color (e.g. `#000000`).
Stroke thickness.
Canvas background. Leave empty for transparent SVG.
Full-screen signing mode on small screens.
Smooth stroke paths for a more natural look.
Minimum separate strokes before the signature is accepted.
Optional browser download format (`svg` or `webp`). Does **not** change what is stored in the submission.
Filename prefix for the optional download.
***
## Data Payload Architecture
Unlike File Upload / Voice Note, signatures are **not** staged to disk. The answer is the SVG markup string inside the submission payload (same on webhooks and in the database).
```json Webhook Payload (JSON) theme={}
{
"submission_id": "sub_883",
"data": {
"liability_signature": ""
}
}
```
```php Database Storage (PHP) theme={}
[
'liability_signature' => '',
]
```
***
## Best Practices & FAQs
Set **Min Strokes** to at least `2` so a single tap cannot pass as a signature.
Transparent SVG (empty background) overlays cleanly onto contract lines in generated PDFs. A solid background color makes overlays harder.
**Next Steps:** [File Upload Block](/features/blocks/file-upload)
# Slider Block
Source: https://flexforms.bjanczak.com/features/blocks/slider
Single-value range slider with optional track label and live value.
The **Slider** (`range_slider`, labeled **Slider** in Studio) lets respondents pick a single numeric value on a track — faster than typing for ratings-like quantities that are still linear.
## Configuration
Configure min, max, step, optional track label, suffix, and live value output in field settings.
Related: [Flex slider](/features/blocks/flex-slider) · [Number](/features/blocks/number) · [Rating & NPS](/features/blocks/rating-nps)
# Social Links Block
Source: https://flexforms.bjanczak.com/features/blocks/social-links
Collect social profile URLs in a structured control.
The **Social links** block (`social_links`) gathers profile URLs in a structured way for CRM enrichment.
See the [Blocks overview](/features/blocks/overview) for the full catalog.
# Stripe Payment
Source: https://flexforms.bjanczak.com/features/blocks/stripe-payment
Once-per-form Payment Element block — fixed, product options, custom, or field-driven amounts with Stripe.
The **Stripe Payment** block is the only block that charges cards (and other Stripe methods) on public fill and embeds.
Connect keys under **Integrations → Stripe** first. Configure amount, currency, capture, and billing **on this block** — not on Form Settings → Integrations.
## Limits
* **At most one** Stripe Payment block per form
* Available in the Studio catalog under **Payments** after Stripe is **Ready**
* Works on fill + embed; skipped for real confirm in **Preview** (no charge, no transaction)
## What to configure
See the full field-by-field guide: [Stripe Integration → Payment block settings](/integrations/stripe#payment-block-settings-studio).
Quick checklist:
1. **Required** on/off (optional donations vs must-pay)
2. **Payment type** — fixed / product options / customer amount / from field
3. **Currency** + capture mode
4. **Payment methods** — Automatic (Dashboard methods) or Cards only
5. Billing / shipping / receipt email options
## Not this block
| Block | Role |
| - | - |
| [Credit card](/features/blocks/credit-card) | Collects card-*like* text into the submission — **not** a gateway |
| [Currency](/features/blocks/currency) / [Number](/features/blocks/number) | Can feed **From a form field** amounts into Stripe Payment |
## After publish
Successful charges appear in **[Transactions](/features/transactions/overview)**. Refunds happen there (or via Stripe + webhook sync).
**Deep dive:** [Stripe Integration](/integrations/stripe) · [Transactions](/features/transactions/overview) · [Preview & Publish](/features/studio/preview-publish)
# Tags Block
Source: https://flexforms.bjanczak.com/features/blocks/tags
Free-form or curated tag chips.
The **Tags** block (`tags`) collects one or more tags as chips — curated lists, free tags, or both depending on field settings.
See the [Blocks overview](/features/blocks/overview) for the full catalog.
# Timezone Block
Source: https://flexforms.bjanczak.com/features/blocks/timezone
Pick a timezone from a searchable directory.
The **Timezone** block (`timezone`) collects an IANA timezone identifier — useful for scheduling demos and routing by region.
See the [Blocks overview](/features/blocks/overview) for the full catalog.
# Toggle Block
Source: https://flexforms.bjanczak.com/features/blocks/toggle
Boolean on/off switch.
The **Toggle** block (`toggle`) stores a true/false answer. Prefer it over checkboxes when there is a single yes/no decision.
See the [Blocks overview](/features/blocks/overview) for the full catalog.
# Traffic Split Block
Source: https://flexforms.bjanczak.com/features/blocks/traffic-split
Numeric split control for allocation-style answers.
The **Traffic split** block (`traffic_split`) collects allocation-style numeric answers (for example share of budget or attention). Pair with logic when downstream routing depends on the split.
See the [Blocks overview](/features/blocks/overview) for the full catalog.
# URL Block
Source: https://flexforms.bjanczak.com/features/blocks/url
Validated website / link input.
The **URL** block (`url`) validates that respondents enter a well-formed link. Use it for company websites, portfolio links, and social profiles when you need stricter validation than Text input.
See the [Blocks overview](/features/blocks/overview) for the full catalog.
# Video Block
Source: https://flexforms.bjanczak.com/features/blocks/video
Video media field for uploads or playback contexts.
The **Video** block (`video`) collects or presents video media. Enforce max size and MIME types in field settings. Related: [File upload](/features/blocks/file-upload).
See the [Blocks overview](/features/blocks/overview) for the full catalog.
# Voice Note Block
Source: https://flexforms.bjanczak.com/features/blocks/voice-note
Let respondents record short audio answers in the browser.
The **Voice note recorder** (`voice_note`) captures short spoken answers in the browser and stores them as uploads — ideal for support notes, accessibility, and mobile-first surveys.
## Configuration
Drag **Voice note recorder** from the Media category onto the canvas.
Configure max duration / size and accepted formats in field settings so recordings stay within your storage budget.
Open Submissions to play recordings inline. Voice notes use an audio player in the inbox, not a static file icon.
Recording requires microphone permission in the respondent’s browser. Always provide a text alternative (or make the field optional) for accessibility.
Related: [File upload](/features/blocks/file-upload) · [Audio](/features/blocks/audio) · [Upload disks](/developers/upload-disks)
# The Contacts Directory
Source: https://flexforms.bjanczak.com/features/contacts/overview
A centralized, automatically deduplicated CRM built directly from your form submissions.
The **Contacts Directory** is a powerful, cross-form CRM that Flex Forms builds for you completely autonomously.
Instead of treating every submission as an isolated event in a spreadsheet, Flex Forms intelligently scans incoming payload data, identifies the human identity behind the submission, and builds a rich, deduplicated profile mapping their entire lifecycle across all of your forms.
```mermaid theme={}
flowchart LR
Submit["Form submission"] --> Identify["Primary email / name field detected"]
Identify --> Match{"Existing contact\nwith this email?"}
Match -- "Yes" --> Update["Update last seen, bump submission count"]
Match -- "No" --> Create["Create new contact profile"]
Update --> Directory["Unified Contacts CRM"]
Create --> Directory
```
***
## How Contacts are Created
The directory is populated entirely without manual data entry. It operates on a strict, predictable trigger: **The Primary Email**.
When a form is submitted, the backend engine intercepts the payload before it is written to the database. If the form contains an [Email Block](/features/blocks/email) explicitly marked as **Primary** in the Inspector, the engine extracts that email to perform a CRM lookup.
The engine queries the global Contacts Directory. If `sarah@enterprise.com` already exists in your CRM, the engine seamlessly connects this new submission to her existing profile, avoiding duplicate rows.
If the form also contained a **Name** block (or Text input fields for first/last name), the engine can update the contact’s display name on the global profile.
The engine increments Sarah's total **Submission Count** and updates her **Last Seen** timestamp.
***
## The Contact Schema Architecture
When you open the Contacts Directory from the main navigation, you are presented with a high-level, sortable view of your most engaged leads.
The schema for a Contact profile contains the following strictly managed fields:
**The Identity Key (Email)**
The absolute, unique identifier that binds their cross-form activity together. A single email can only exist once in the Contacts Directory.
**Enriched Name**
Sourced automatically if a text block on your form successfully captured name data.
**Engagement Metric**
The total volume of submissions this specific person has made across your *entire* form ecosystem.
*(Example: If Sarah fills out your "Contact Us" form twice, and your "Webinar RSVP" form once, her count is 3).*
**Joined (First Seen)**
The exact timestamp of their very first interaction with any of your forms.
**Last Seen**
The timestamp of their most recent form submission. Sort by this column to find your most currently active leads.
***
## Technical Edge Cases & Data Hygiene
**The Form-vs-Person View:** If Sarah submits 3 different forms, she will appear as 3 separate rows in 3 separate *Submissions Inboxes*. However, in the *Contacts Directory*, she appears as a **single** consolidated row providing a bird's-eye view of her engagement.
**Data Deletion Disconnect:**
The Contacts Directory is a living ledger designed to track human identity, while Submissions are designed to track specific events. If you manually delete a spam row from a form's Submissions Inbox, it does **not** retroactively decrement the Submission Count on the Contact profile. The Contacts Directory represents a lifetime historical record of interaction that is immune to form-level data purging.
**Next Steps:** [Exporting the CRM](/features/contacts/search-export) · [Configuring Primary Emails](/features/blocks/email)
# Search & Export Contacts
Source: https://flexforms.bjanczak.com/features/contacts/search-export
Instantly locate specific respondents and export your deduplicated CRM data to a spreadsheet.
The Contacts Directory is designed to handle thousands of leads effortlessly. To make sense of massive datasets, Flex Forms provides a lightning-fast search engine and robust export capabilities.
## The Search Engine
You don't need to craft complex SQL queries to find a lead. The global search bar at the top of the Contacts Directory executes a fuzzy search across multiple data vectors simultaneously.
Type `jane@company.com` for an exact match, or just `@company.com` to pull up an entire corporate account roster.
Type `Jane` to instantly find anyone named Jane, Janet, or any email containing the word "jane".
Investigating spam? Type a partial IP prefix (e.g., `203.0.113`) to identify all contacts originating from a specific network.
***
## Sorting & Navigation
Click any column header (e.g., **Last Seen** or **Submissions**) to instantly sort the directory. Click it again to reverse the order. This is incredibly useful for instantly identifying your most highly engaged "whale" leads.
**Cursor Pagination:** Unlike traditional systems that slow down as you jump to "Page 400", Flex Forms uses advanced cursor-based pagination. Navigating through massive datasets using the **Next** and **Previous** buttons remains blisteringly fast, regardless of directory size.
***
## Exporting the Directory
You can extract your pristine, deduplicated CRM data for use in Mailchimp, Salesforce, or external BI tools via the Export engine.
Use the search bar or the **Form Filter** dropdown (which restricts the view to contacts who have submitted a *specific* form) to isolate the exact cohort you want to export.
Click **Export**, choose **CSV** or **Excel (.xlsx)**, optional joined-date range, then download. The file streams directly (up to 10 000 rows) with `id`, `email`, `name`, `ip_address`, `submissions_count`, `joined_at`, and `last_seen_at`.
**Performance Caps:** To protect your server from memory exhaustion, massive directories are subject to an export row cap. If your directory exceeds this limit, the export will safely truncate and display a notification. Simply use the search or form filters to export the data in smaller, manageable cohorts.
Yes. If you need to purge test data or comply with GDPR "Right to be Forgotten" requests, select multiple rows using the checkboxes and click the bulk Delete action in the toolbar. Note: This deletes the *directory profile*, it does not hunt down and delete their underlying submissions in the form inboxes.
A profile gets a Name when the form includes a [Name](/features/blocks/name) block (preferred) or clear first/last Text input fields.
**Related Actions:** [Understanding the Directory](/features/contacts/overview) · [Exporting Raw Submissions](/features/submissions/export-csv)
# Manage Form Lifecycles
Source: https://flexforms.bjanczak.com/features/forms/create-rename-duplicate
Master the fundamental operations: Create, Rename, Duplicate, and Delete forms safely without data loss.
The **Forms Hub** provides robust lifecycle management. Every action is designed to protect your data while maximizing operational velocity.
```mermaid theme={}
flowchart LR
Create["Create"] --> Draft["Initialize Draft"]
Draft --> Studio["Launch Studio"]
Row["Existing Form"] --> Duplicate["Duplicate"]
Duplicate --> Copy["Clone Schema & Assets"]
Row --> Delete["Delete"]
Delete --> Gone["Purge Configuration & Submissions"]
```
***
## 1. Create a New Form
Click **Create Form** in the top right of the Forms Hub (or from the Studio rail).
Enter a human-readable title (e.g., `Q3 Customer Feedback`). Flex Forms instantly generates a URL-safe slug from this title.
You are redirected into the visual Studio. The form is created in a **Draft (Unpublished)** state, guaranteeing no external traffic hits it prematurely.
Want a branching funnel, scored quiz, or lead qualifier? Follow the logic recipes: [PulseFit](/features/studio/logic/recipes/pulsefit) · [Harbor Quiz](/features/studio/logic/recipes/harbor-quiz) · [Apex Qualifier](/features/studio/logic/recipes/apex-qualifier).
***
## 2. Rename a Form
Renaming alters the internal display name and the default header shown to respondents. **It never alters the public URL slug**, ensuring your live links remain intact.
Use the context menu in the Hub, or click the title directly in the Studio's top navigation bar.
If editing in the Studio, the new title is captured during the next auto-save cycle.
***
## 3. Duplicate an Existing Form
Duplication is the ultimate growth hack. It allows you to clone complex architectures—perfect for A/B testing, seasonal campaigns, or multi-language deployments.
Select **Duplicate** from the form's row menu in the Hub.
Flex Forms clones the entire schema: Pages, Blocks, Logic Rules, Calculated Fields, and Settings.
Uploaded logos and cover images are physically copied to new storage paths, preventing asset breakage if the original form is deleted.
The cloned form is named ` (copy)` and receives a unique slug. **It is always created as an unpublished Draft.**
**Integration Feed Warning:** If the original form had active integrations (e.g., Zapier, Mailchimp), they are copied and enabled on the duplicate. Always review your feeds before publishing to prevent test submissions from polluting production systems.
***
## 4. Delete a Form
Deletion is absolute. It purges the configuration and cascades through your data.
Check the specific rows in the Hub and click **Delete** (or use the single-row action menu).
Confirm the destruction dialog. Submissions specifically tied to this form are removed. There is no undo.
No. The respondents themselves are stored in the global **Contacts Directory**. Only the raw submissions linked to the deleted form are purged.
Simply click **Unpublish** in the Studio. The URL shows Flex Forms’ branded 404, but all data and configuration remain safely stored for future use.
**Next Steps:** [Understand Fill Links & Slugs](/features/forms/fill-link) · [Enter the Studio](/features/studio/overview)
# Fill Link & Slug Architecture
Source: https://flexforms.bjanczak.com/features/forms/fill-link
Understand how public URLs are generated, how to safely modify slugs, and the mechanics of the publish state.
The **Fill Link** is the public-facing URL your respondents use to access your form. It is dynamically constructed from your global configuration, your form's specific slug, and its current publish state.
## URL Anatomy
```text theme={}
https://your-app.com/forms/contact-sales
└──┬─┘ └───┬───────┘
prefix slug
```
Determined in **Global Settings**. (e.g., `/forms/`, `/s/`). Changes here affect *all* forms.
Determined per form. Auto-generated from the title, but fully customizable in the Share settings.
The URL only resolves to the form if it is actively **Published**. Drafts and unknown slugs show Flex Forms’ branded **404** page (HTTP 404) — not your Laravel app’s default error screen.
***
## Safe Slug Modification
You can customize a form's slug to match marketing campaigns or SEO requirements.
From the Forms Hub, click **Share** on your target form.
Locate the **Public URL Slug** field. You may use lowercase letters, numbers, and hyphens. Invalid characters are stripped automatically.
Click **Update Slug**. Flex Forms automatically checks the database to ensure the slug is globally unique across your installation.
**Breaking Change Alert:** Changing a slug instantly breaks all existing URLs. There are no automatic redirects. Update your external marketing links, QR codes, and embeds immediately after saving. The old slug is released back into the pool.
***
## The Publish State Gate
```mermaid theme={}
flowchart LR
URL[Fill URL Requested] --> Gate{Is Form Published?}
Gate -->|Yes| Live[Renders the Form UI]
Gate -->|No| CheckAdmin{Signed or Studio preview?}
CheckAdmin -->|Yes| RenderPreview[Renders Preview Mode]
CheckAdmin -->|No| NotFound[Branded Flex Forms 404]
```
New forms and duplicated forms always start in a **Draft** (unpublished) state.
* The standard Fill Link returns Flex Forms’ branded 404 page (status `404`) to external traffic — including wrong slugs and unpublished forms.
* You can safely review the form using the **Preview** button in the Studio (temporary signed URL — not a public `?preview=1` bypass).
When you click **Publish**, the gate opens and the slug becomes active.
***
## Link Distribution Channels
Once live, your Fill Link powers multiple distribution methods:
Copy the link and distribute it via SMS, email campaigns, or social media. Configure your Open Graph tags in the Share menu for beautiful link previews.
Power Standard, Popup, or Full-Page embeds. The underlying Javascript securely loads the form via this specific slug. [Learn about Embeds](/features/share/embed-modes).
Pass dynamic data via query parameters on **embed** or **popup** URLs (e.g., `/forms/contact/embed?email=jane@co.com`). The plain fill link does not prefill. [Learn about Prefilling](/features/share/query-params).
**Deep Dive:** [Managing Form Lifecycles](/features/forms/create-rename-duplicate) · [The Share Dashboard](/features/share/overview)
# The Forms Hub
Source: https://flexforms.bjanczak.com/features/forms/overview
Your centralized dashboard for managing, creating, duplicating, and archiving your form fleet.
The **Forms Hub** is the nerve center of your Flex Forms ecosystem. It provides a bird's-eye view of every form in your workspace, allowing you to seamlessly manage lifecycles from a single table.
## Hub Capabilities
Instantly spin up a new draft form and jump straight into the visual Studio.
Update internal display titles without affecting your live production URLs.
Clone complex architectures (logic, blocks, and design) into a new slug for rapid A/B testing.
Take a draft live or pull a fill link offline from the row **⋯** menu — no need to open Studio.
Under Global Settings, open your avatar for **profile**, **log out**, and any Filament panel user-menu links your host app registered.
Safely delete obsolete forms. Flex Forms manages the underlying data cleanup according to your compliance rules.
***
## Architectural Workflow
```mermaid theme={}
flowchart TD
List[Forms Hub Table] --> Create[Create New Form]
List --> Open[Enter Studio]
List --> Share[Access Share Links]
List --> Insights[View Analytics]
List --> Subs[Process Submissions]
Create --> Open
```
Locate **Forms** in your Filament sidebar under the Flex Forms navigation group.
Click a row to edit its schema in the Studio, or use the action buttons (Insights, Share, Submissions) to dive into the data.
Use the context menu (three dots) on any row to Rename, Duplicate, or Delete that specific form.
***
## Mastering the Fill Link
Every form generates a unique, SEO-friendly **public slug**. Altering this slug breaks existing links, so plan your routing carefully. For a deep dive into URL architecture, review the [Fill Link & Slug documentation](/features/forms/fill-link).
**Next Steps:** [Lifecycle Actions in Depth](/features/forms/create-rename-duplicate) · [Enter the Studio](/features/studio/overview)
# Answers, Visits & Drop-offs
Source: https://flexforms.bjanczak.com/features/insights/answers-visits-dropoffs
Master the three core analytical panels: question-by-question distributions, traffic KPIs, and the abandonment funnel.
The Insights Dashboard is segmented into three specialized tabs. Understanding how to read these panels is critical for optimizing your form's conversion rate and extracting actionable data.
## 1. The Answers Panel
The **Answers** tab is designed for qualitative and quantitative research. It generates a visual card for every block on your form, displaying exactly how respondents answered.
For Choice blocks (Dropdowns, Radios, Checkboxes), the panel renders beautiful bar charts showing the percentage breakdown of each selected option.
For Text and Number blocks, it calculates summary statistics (e.g., Average, Min, Max) and provides a randomized sample of recent raw text entries for quick sentiment analysis.
**Intelligent Grouping:** If a Dropdown block has 100 possible options, rendering a 100-bar chart would ruin the UX. The engine intelligently caps the chart at the top most-selected options, grouping the rest into an "Other" category to maintain readability.
***
## 2. The Visits Panel
The **Visits** tab provides high-level traffic metrics and demographic breakdowns, independent of whether the visitor actually filled anything out.
### Core KPIs
* **Visits:** Total number of times the form was loaded.
* **Submissions:** Total number of completed entries.
* **Conversion %:** The holy grail metric (Submissions ÷ Visits).
* **Duration:** The average time it takes a user to complete the form.
Below the KPIs, the engine renders demographic cards detailing the traffic's **Device Types**, **Browsers**, **Referrers**, and **Geographic Origins** (Country/City).
**Trend Indicators:** Every KPI displays a small delta arrow (e.g., `↑ 12%`). This automatically compares the current date range against the immediately preceding period of equal length, allowing you to spot traffic trends instantly.
***
## 3. The Drop-offs Panel
The **Drop-offs** tab is a diagnostic tool used to fix leaky funnels. It visualizes the exact moment users abandon your form.
The top summary shows total Visitors vs. total Form Starts vs. total Completes.
Below the summary, every single question is visualized as a bar, showing how many people viewed it, answered it, and dropped off on it.
Look for the question with the highest red "Drop Rate" percentage. This is your friction point. To increase conversions, consider rewriting the question, making it optional, or moving it to the end of the form.
**Next Steps:** [Segmenting with Filters](/features/insights/filters-live) · [Sharing the Dashboard](/features/insights/public-share)
# Filters & date ranges
Source: https://flexforms.bjanczak.com/features/insights/filters-live
Slice Insights by date range and traffic cohorts from the Filters side panel.
A global dashboard is useful, but the real power of Insights lies in segmentation. Filters let you isolate specific cohorts of traffic to see how different demographics behave.
## Date ranges
Every Insights tab is scoped to the active date range in the toolbar.
Pick common ranges such as **Today** or **Last 7 days**.
Choose **Custom range**, then set the start and end dates in the date range control. The calendar opens in a popover so the toolbar does not push the layout down.
***
## Cohort filters (Visits, Drop-offs & Global Stats)
On form **Insights** (**Visits** / **Drop-offs**) and workspace **Global Stats**, open **Filters** next to the date range (same control pattern as Contacts). A panel slides in from the right with the traffic dimensions for the current range.
Filter by **Device**, **Country**, **City**, **Browser**, or **OS**. *Example: Are mobile users dropping off faster than desktop?*
Filter by **Referrer** or `utm_source` / `utm_medium` / `utm_campaign`. *Example: Which campaign converts better?*
Active filters appear as chips under the toolbar so you can clear one dimension at a time, or clear all from the drawer footer.
***
## Export & share
From the Insights header (before **Edit**):
* **Export events CSV** — download raw events for the current range and filters
* **Share insights** — create password-optional public dashboard links
**Next:** [Answers, Visits & Drop-offs](/features/insights/answers-visits-dropoffs) · [Public share](/features/insights/public-share)
# The Insights Engine
Source: https://flexforms.bjanczak.com/features/insights/overview
Transform raw form data into actionable decisions. Visualize traffic, answer distributions, and pinpoint exact conversion drop-offs.
The **Insights Dashboard** is a built-in, real-time analytics suite. Instead of forcing you to export CSVs to third-party BI tools, Flex Forms automatically processes fill events, traffic volume, and abandonment rates into beautiful, presentation-ready visualizations.
```mermaid theme={}
flowchart LR
Fill[Fill_events] --> Buffer[Today_buffer]
Buffer --> Rollups[Daily_rollups]
Rollups --> UI[Insights_UI]
UI --> Share[Public_share_links]
```
***
## The Three Pillars of Insights
The dashboard is divided into three distinct panels, each answering a different strategic question about your form's performance.
Provides visual distributions (bar charts, pie charts) for every individual question on your form. Essential for visualizing survey results or quiz scores at a glance.
Aggregates traffic volume, conversion rates, geographic origins, and device types. Crucial for understanding campaign performance.
Generates a step-by-step funnel visualization, showing exactly which question caused respondents to abandon the form. Critical for optimizing completion rates.
***
## The Analytical Workflow
From your Form Hub, click the **Insights** tab to load the real-time engine.
Use the Date Picker in the toolbar to isolate specific timeframes (e.g., *"Last 7 Days"*, or a custom range matching a specific marketing campaign).
Apply [Live Filters](/features/insights/filters-live) to narrow the data down to a specific cohort (e.g., *"Show me only Mobile users from the United Kingdom"*).
Create a secure [Public Share Link](/features/insights/public-share) to distribute a read-only version of the dashboard to external clients or stakeholders.
***
## Enterprise-Grade Scaling
If you are running a high-traffic campaign (e.g., a viral giveaway or a global product launch), Flex Forms automatically leverages **Redis** to ensure the Insights dashboard remains perfectly responsive, even when thousands of users are submitting concurrently.
**Deep Dives:** [Understanding the 3 Panels](/features/insights/answers-visits-dropoffs) · [Redis Scaling Architecture](/features/insights/redis-scaling)
# Public Share Links
Source: https://flexforms.bjanczak.com/features/insights/public-share
Generate secure, read-only dashboard links to present form performance to external stakeholders and clients.
Form performance shouldn't be locked inside your admin panel. **Public Share Links** allow you to generate a secure, read-only version of the Insights Dashboard that can be distributed to marketing teams, executives, or external clients—without requiring them to have a Filament login.
## Generating a Share Link
Click the **Share Insights** button located in the top toolbar of the dashboard.
You have granular control over what the stakeholder can see. Check or uncheck the **Answers**, **Visits**, and **Drop-offs** tabs.
*(Example: You might want a client to see traffic Visits, but hide the raw Answers to protect respondent privacy).*
Enter a password in the security field to lock the dashboard. The client will be prompted to enter this password before the data loads.
Click **Create Share**. The system generates a unique, cryptographic URL and copies it to your clipboard.
***
## The Stakeholder Experience
When a stakeholder opens the link, they are presented with a beautiful, branded, read-only environment.
While they **cannot** edit the form or view raw PII in the Submissions Inbox, they **can** manipulate the Date Ranges and Filters within the shared dashboard, allowing them to interactively explore the data you permitted them to see.
***
## Managing Active Links
You retain complete control over all distributed links. Below the creation panel, you will see a list of every active share link currently in circulation.
See exactly which links are active, whether they are password protected, and which tabs they expose.
Click **Revoke** to immediately destroy the link. Anyone attempting to visit the URL will instantly receive an "Expired" message.
**Automatic Expiration:** For security, all public share links automatically expire 30 days after creation. If a client needs permanent access, you must generate a new link for them.
**Next Steps:** [Understanding the Dashboard Panels](/features/insights/answers-visits-dropoffs)
# Redis Scaling Architecture
Source: https://flexforms.bjanczak.com/features/insights/redis-scaling
Understand how Flex Forms autonomously leverages Redis to ensure real-time analytics during massive traffic spikes.
The Insights Dashboard is engineered to remain instantaneous, whether you are receiving 10 submissions a day or 10,000 submissions a minute.
To achieve this, Flex Forms can hook into your Laravel **Redis** instance for Insights acceleration when available. Defaults usually stay on **Auto** in [Global Settings → Insights](/get-started/global-settings); you can force On/Off there or via environment — see [Redis production](/guides/redis-production).
Insights Redis **no longer owns** the shared Flex Forms plugin cache (`FlexFormsCache`) by default. TodayBuffer / HyperLogLog still use Insights Redis when Insights mode resolves to **On**. To restore shared Redis for Studio menus, integration catalogs, fill resolvers, and similar plugin keys, set `FLEX_FORMS_CACHE_REDIS_MODE=follow_insights` (or `on`).
## How Autonomous Scaling Works
When the Flex Forms engine boots, it checks Global Settings and your environment. If Insights Redis mode allows it and a reachable Redis connection exists, heavy analytical workloads (TodayBuffer, HLL uniques) move off the primary SQL database onto Redis. Plugin cache stays on the default Laravel cache store unless you opt in with `FLEX_FORMS_CACHE_REDIS_MODE`.
Analytical Workload
Standard Mode (SQL)
Redis Accelerated Mode
**Unique Visitor Counting**
Computed via expensive `COUNT(DISTINCT)` queries on raw events.
Utilizes Redis *HyperLogLog* probabilistic counters for instant, memory-efficient cardinality.
**Live "Today" Metrics**
Recomputes the entire day's raw events on every dashboard load.
Maintains live, constantly updated integer increments in Redis Hashes.
***
## Infrastructure Considerations
If your form receives standard traffic (a few hundred hits a day), the Standard SQL Mode is perfectly fine. The dashboard will feel instant, and Redis is not strictly required.
If you anticipate a massive traffic spike (e.g., a SuperBowl ad or a massive influencer campaign), you **must** ensure Redis is active. Attempting to run massive live analytics entirely on a SQL database can cause locks and degrade the respondent's form-filling experience.
**Data Durability:** Redis is used purely for *acceleration*. Flex Forms always writes the permanent, durable rollups to your primary SQL database. If your Redis instance crashes or is flushed, you do not lose any historical insights data. The system simply falls back to SQL mode seamlessly.
**Technical Implementation:** Pass this document to your DevOps team and review the [Redis Production Checklist](/guides/redis-production).
# Access & Security Gates
Source: https://flexforms.bjanczak.com/features/settings/access
Password, CAPTCHA, close form, entry caps, scheduling, duplicates, and closed messages — every Access control in Settings.
Open **Studio → Form settings (gear) → Access**. Gates are enforced server-side on fill — not only in the browser.
```mermaid theme={}
flowchart TD
Req[Fill_request] --> Closed{close_form?}
Closed -->|Yes| MsgClosed[Closed_message]
Closed -->|No| Sched{Inside_schedule?}
Sched -->|No| MsgWait[Waiting_or_expired]
Sched -->|Yes| Cap{Entry_cap?}
Cap -->|Hit| MsgCap[Max_entries_message]
Cap -->|OK| Pw{Password?}
Pw -->|Yes| Unlock[Password_gate]
Pw -->|No| Captcha{CAPTCHA?}
Unlock --> Captcha
Captcha -->|Fail| Block[Reject]
Captcha -->|OK| Form[Render_form]
Form --> Dup{Duplicate_rule?}
Dup -->|Hit| RejectSubmit[Reject_submit]
Dup -->|OK| Accept[Accept_submission]
```
## Controls (1:1 with Settings UI)
### Password
Require a password before the schema is shown. Stored hashed — enter a new password only to replace an existing one.
### CAPTCHA (one provider)
Visible only when [reCAPTCHA](/integrations/recaptcha) and/or [Turnstile](/integrations/turnstile) are connected under left-rail **Integrations**.
`none` | `recaptcha` | `turnstile`. Exactly **one** provider per form — never both. Not a Studio canvas block.
### Close form
Immediate kill switch — no new responses.
### Max entries
Cap volume with `max_submissions` + frequency (total / day / week / month / per user options from the UI) and a custom `max_submissions_message`.
### Scheduling
Timezone, weekday checkboxes, start/end datetimes, waiting message, expired message.
### Closed message
Custom copy when the form is manually closed (separate from schedule / cap messages).
### Duplicate prevention
Identify repeats by IP or by a chosen form field (e.g. primary email). Second submit is rejected server-side. Prefer a field (email) when possible. IP mode needs correct [trusted proxies](/get-started/installation#trusted-proxies-production) behind a CDN/load balancer; private/reserved IPs are ignored so a misconfigured proxy cannot lock the form for all visitors.
Guide: [Access gates](/guides/access-gates) · Integrations: [reCAPTCHA](/integrations/recaptcha) · [Turnstile](/integrations/turnstile)
# Behavior & UX
Source: https://flexforms.bjanczak.com/features/settings/behavior
Auto-jump, save-for-later, and Submit / Next / Back button labels in Form Settings → Behavior.
Open **Studio → Form settings (gear) → Behavior**. Save with the Settings bar when dirty.
```mermaid theme={}
flowchart TD
Answer[Respondent_answers] --> Logic{Logic_jump?}
Logic -->|Yes_and_auto_jump| Instant[Instant_page_transition]
Logic -->|Yes_manual| NextBtn[Wait_for_Next]
Answer --> Local{Save_for_later?}
Local -->|On| LS[Browser_localStorage]
Local -->|Off| Ephemeral[Lost_on_tab_close]
Submit[Submit_click] --> Label[Custom_submit_label]
NextBtn --> NextLabel[Custom_next_label]
```
## Controls (1:1 with Studio)
When a [Logic Board](/features/studio/logic-board) rule jumps to another page, skip the manual **Next** click and transition immediately after the answer syncs. Best on single-question pages; on dense pages it can feel abrupt. **Next** and **Back** stay available as fallback; **Submit** still appears only on the last page.
Writes progress to the respondent’s **browser `localStorage`**. Closing the tab and returning restores answers. Data never hits your server — for server-side abandoned leads use [Partial submissions](/features/settings/general).
Final button label on the last page (e.g. `Get my quote`, `Register`). You can also edit it from the gear icon next to Submit on the builder canvas.
Multi-page **Next** button label. Edit from Form Settings → Behavior or the gear icon beside Next on the canvas (when the form has more than one page).
Multi-page **Back** button label. Same editing surfaces as Next.
Related: [Logic Board](/features/studio/logic-board) · [Partials guide](/guides/partials-save-later) · [General](/features/settings/general)
# Automated Emails & PDFs
Source: https://flexforms.bjanczak.com/features/settings/emails-pdf
Deploy instant auto-responders, team alerts, and branded HTML receipts directly from the form engine.
The **Emails** engine automates communication the moment a form is completed. It handles two pathways: notifying your internal team, and thanking the respondent — both as polished, client-safe HTML emails (with a plain-text fallback).
## 1. Internal Team Alerts (Self Notifications)
Never miss a hot lead or an urgent support ticket.
In Form Settings → Email notifications, toggle **Notify me** on.
Specify one or multiple addresses (e.g. `sales@acme.com, ceo@acme.com`).
Set the **Subject** and **Message**. Flex Forms dispatches a branded HTML team alert (hero artwork plus your message and submission answers). Optional merge tags: `{form_title}`, `{form_name}`, `{submission_id}`, `{submitted_at}`.
***
## 2. Auto-Responders (Respondent Notifications)
Confirm submissions instantly.
Toggle **Notify respondent** on.
Choose which [Email Block](/features/blocks/email) holds the respondent address, and/or enter a fixed **To** address.
Write a confirmation (e.g. *"Thanks — we will review within 24 hours."*). Toggle **Attach PDF of answers** to include their answers in the HTML receipt **and** attach a PDF file of the answers.
***
## 3. Customize the HTML templates
Every notification uses publishable Blade views — edit the HTML visually however you like without forking the package:
```bash theme={}
php artisan vendor:publish --tag=filament-flex-forms-mail
```
This writes files under `resources/views/vendor/filament-flex-forms/mail/`:
| File | Purpose |
| - | - |
| `submission-admin.blade.php` | Team alert layout |
| `submission-respondent.blade.php` | Respondent receipt |
| `submission-text.blade.php` | Plain-text fallback |
| `partials/*` | Shared chrome + answers table |
Accent color defaults to your form design accent (or `FLEX_FORMS_MAIL_ACCENT`).
Team alerts use the optional **email logo** from Global Settings → Mail when uploaded; otherwise the **site name** from Appearance is shown as text in the header and footer.
Emails are **queued** so respondents are not blocked waiting on SMTP. Ensure your Laravel queue worker is running in production.
These emails use your Laravel mail driver (SMTP, Postmark, SES, …). You do not need Mailchimp or Zapier for basic receipts.
**Next Steps:** [Integrations](/features/settings/integrations) · [Config & env](/developers/config-env)
# General Settings
Source: https://flexforms.bjanczak.com/features/settings/general
Form title, slug, language, wizard stepper, redirects, partials, branding, and data retention — matching the Studio form settings modal.
Open **Studio → Form settings (gear) → General**. Changes apply after you click **Save** in the modal footer.
```mermaid theme={}
flowchart LR
Studio[Studio_form_settings] --> General[General_section]
General --> Identity[Title_slug_language]
General --> UX[Wizard_redirect]
General --> Lifecycle[Partials_retention_branding]
Identity --> Fill[Public_fill]
UX --> Fill
Lifecycle --> Inbox[Inbox_and_purge_jobs]
```
## Identity & localization
Form title — used as the public heading and in Studio lists.
Public URL segment (e.g. `/forms/enterprise-contact`). Use **Update slug** to commit. Changing a live slug breaks existing links and embeds.
Fill UI language (Submit, errors, upload hints). Selecting Arabic or Hebrew also sets **text direction** to RTL automatically. Customize or add locales via [Localization & RTL](/get-started/languages-rtl).
`ltr` or `rtl`. Shown when direction control is enabled for the form language set.
***
## Redirect & wizard
When on, respondents leave the thank-you screen and hard-redirect to `redirect_url` after submit.
Destination URL when redirect is enabled.
Multi-page chrome (only when the form has **more than one page**):
* `tiles` — discrete step tiles
* `bar` — continuous progress bar through the wizard
* `none` — hide the stepper
With **Jump to page** / branching, both styles use the **visited path** for progress. In tiles mode, unvisited branch pages are hidden so respondents only see the path they are on. See [Wizard Stepper](/get-started/progress-bar-wizard).
Accent color for active wizard rails / bar when stepper is not `none`.
***
## Partials, branding, retention, encryption
Persist incomplete answers server-side so abandoned fills appear in the Inbox. Distinct from [Save for later](/features/settings/behavior) (browser `localStorage` only).
Encrypts the full answer payload at rest (Laravel `Crypt` / your `APP_KEY`) — both `flex_form_submission_answers` rows **and** the submission `payload` JSON column. Use when the form collects sensitive data. Studio, exports, integrations, and notification emails still show decrypted values to authorized users / configured destinations.
Organization-wide policy: **Global Settings → Security → Require encryption on all forms**, or `FLEX_FORMS_FORCE_SUBMISSION_ENCRYPTION=true`. Either option locks this toggle on for every form — see [Multi-tenancy](/developers/multi-tenancy).
Show the “Powered by Flex Forms” footer on the public fill page. A Pro badge next to the label explains that hiding branding is available on **Pro** and above; otherwise the toggle stays locked on.
Automatically purge submissions after a retention window.
How long to keep submissions when retention is on (paired with `data_retention_unit`).
`day`, `week`, `month`, or `year`.
# Form-Level Integrations Settings
Source: https://flexforms.bjanczak.com/features/settings/integrations
Connect a form to Mailchimp, HubSpot, webhooks, and more — map fields and route submissions from the form hub Integrations tab.
Your form data shouldn't sit in a silo. Flex Forms routes completed submissions into your marketing and sales tools as soon as a respondent finishes.
This page covers **per-form** feeds. API keys and OAuth live under **Integrations** in the Flex Forms left rail — not inside [Global Settings](/get-started/global-settings). See the [Integrations catalog](/integrations/overview).
**Stripe** is different: connect keys under the left-rail Integrations page, then configure every payment option on the **Stripe Payment** block in Studio — Stripe does not appear on this form Integrations tab. See [Stripe](/integrations/stripe).
## Two tiers
Admins open **Integrations** in the left rail. Use the **Catalog** tab to enable providers and paste global API keys. Use the **Connections** tab for reusable OAuth / named accounts (for example multiple Salesforce orgs). Credentials stay encrypted for the whole panel.
On each form, open the hub **Integrations** tab to enable feeds, pick a Connection when required, choose lists/pipelines, and map blocks to CRM fields.
***
## Configure a form feed
From the Flex Forms list, open the form. Use the top hub tabs (Insights, Submissions, Share, **Integrations**).
Select the **Integrations** hub tab. You will see every provider that is already connected globally.
Turn on the provider you need (for example HubSpot). If it is missing entirely, an administrator still needs to add credentials under the left-rail **Integrations** page.
Pick the list, audience, or pipeline. Map each form block to the provider’s property keys (API names, not display labels).
Save, then submit a real test on the fill URL to confirm the payload arrives correctly.
***
## Enterprise options
Many CRMs reject contacts without an email. If a feed needs identity, add an [Email](/features/blocks/email) block and mark it primary before enabling the feed.
Use [Conditional integrations](/integrations/conditional-feeds) so only matching submissions leave Flex Forms (for example Department = Sales → HubSpot).
For tools without a native driver, use [Webhooks](/integrations/webhooks) to `POST` the full submission JSON to your endpoint.
# Form Settings
Source: https://flexforms.bjanczak.com/features/settings/overview
Configure access gates, automated emails, behavior, and general options for each form from the Studio settings modal.
While the Studio canvas controls *what* data is collected, **Form Settings** control who can access the form, what happens after submit, and how the fill experience behaves.
Every form has its own settings. Configuring a locked internal request form never changes your public marketing surveys.
Open settings from the Studio gear icon (Form settings modal). Settings open in a **modal** with sections on the left: General, Access & Scheduling, Language, Notifications, and Behavior. There is no Settings tab on the form hub — hub tabs are Insights, Submissions, Share, and Integrations.
```mermaid theme={}
flowchart TD
Settings["Form settings modal"] --> General["General"]
Settings --> Access["Access & Scheduling"]
Settings --> Language["Language"]
Settings --> Emails["Notifications"]
Settings --> Behavior["Behavior"]
```
Third-party CRM and webhook feeds are **not** inside Settings — use the hub **Integrations** tab. See [Form-level integrations](/features/settings/integrations).
***
## Sections
URL slug, redirects, branding, and data retention.
Fill UI language and text direction for respondents.
Auto-jump, partials / save-for-later, and fill experience toggles.
Passwords, entry caps, schedules, duplicate prevention, and CAPTCHA.
Respondent receipts and team alerts, with optional PDF attachments.
Mailchimp, HubSpot, Zapier, webhooks, and conditional feeds — configured on the form hub Integrations tab.
**Save explicitly:** Form Settings use **Save** in the modal footer when something is dirty. Studio canvas autosave is separate — changing Settings does not apply until you save.
**Next:** [General Settings](/features/settings/general) · [Access](/features/settings/access) · [Integrations](/features/settings/integrations)
# Website Embedding
Source: https://flexforms.bjanczak.com/features/share/embed-modes
Deploy your forms directly into your own website using zero-code HTML snippets.
You don't need to send users away to a standalone URL. Flex Forms generates robust, copy-and-paste HTML snippets allowing you to embed the form directly into your WordPress, Webflow, Shopify, or custom-built website in seconds.
## The Three Embed Modes
Depending on your UX goals, you can choose between three distinct embed architectures directly from the Share screen.
The most common approach. The form renders directly within the flow of your existing webpage, exactly like an embedded YouTube video.
Define a base pixel height. We strongly recommend leaving **Dynamic Height** enabled. This allows the form to automatically communicate with your website to stretch or shrink its height as the user navigates between pages or triggers conditional logic, eliminating ugly internal scrollbars.
Copy the generated `