Skip to main content

The Create Page

The Create page displays a form for creating new records. When you generate a resource, Filament creates a CreateCustomer.php page class:
packages/panels/src/Resources/Pages/CreateRecord.php

Form Definition

The create form is defined in your resource’s form() method. This is typically referenced from a separate schema file:
In the form schema file:

Validation

Validation is handled automatically through field rules:
Validation runs when the form is submitted, before beforeCreate() hook.

Lifecycle Hooks

Hooks allow you to execute code at specific points in the creation process:
packages/panels/src/Resources/Pages/CreateRecord.php

Mutating Data

Modify form data before saving:
packages/panels/src/Resources/Pages/CreateRecord.php

Customizing Creation Process

Override how records are created:
packages/panels/src/Resources/Pages/CreateRecord.php
For custom creation logic:

Redirects After Creation

By default, users are redirected to the Edit page (or View page if it exists).

Redirect to List Page

Redirect to View Page

Redirect to Previous Page

Global Redirect Configuration

Set a default redirect for all resources:

Success Notifications

Customize the success notification:
packages/panels/src/Resources/Pages/CreateRecord.php
For complete customization:
To disable notifications:

Create Another

The “Create & create another” button allows users to create multiple records quickly.

Disabling Create Another

Or dynamically:

Preserving Form Data

Keep some fields filled when creating another record:
packages/panels/src/Resources/Pages/CreateRecord.php
To preserve all data:

Halting Creation

Stop the creation process at any point:

Wizards

Transform the create page into a multi-step wizard:
1

Add the trait

packages/panels/src/Resources/Pages/CreateRecord.php
2

Define steps

3

Allow skipping (optional)

Custom Actions

Add custom buttons to the form:

Header Actions

Form Actions

Moving Create to Header

Authorization

Users can access the Create page if the create() method of the model policy returns true: