Skip to main content

Introduction

Actions can open modals before executing, allowing you to collect additional information from users or require confirmation for important operations. Modals can contain forms, wizards, custom content, and action buttons.

Confirmation modals

The simplest modal is a confirmation dialog that asks users to verify their intent before executing a destructive action:
Confirmation modals are not available when using url() instead of action(). If you need to redirect to a URL after confirmation, do so within the action() closure.

Customizing confirmation text

You can customize the modal’s heading, description, and submit button label:

Form modals

You can render a form inside a modal to collect data from users before the action executes:

Disabling form fields

Make all form fields read-only using disabledForm():

Wizard modals

Create multi-step workflows inside modals using wizards:

Allowing step navigation

By default, users must complete each step in order. Allow free navigation with skippableSteps():

Custom modal content

You can render custom Blade views inside your modals:

Passing data to views

Pass data to your custom views using a closure:

Nested actions

You can open child action modals from parent actions:
Use cancelParentActions() to close parent modals when a child action completes. You can pass a specific parent action name to only cancel that action and its children.

Closing behavior

Control how users can close the modal:
Make the header and footer always visible:

Disabling autofocus

Prevent the modal from automatically focusing the first field:

Advanced techniques

Conditionally hiding modals

Show or hide the modal based on conditions:

Executing code on modal open

Run code when the modal opens:

Optimizing performance

Tell Filament a modal exists to skip the existence check:

Extra HTML attributes

Add custom attributes to the modal window: