© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
11 replies
Kaan

Fill Form Data

Greetings!
I want to perform an edit operation on my custom page I created in Filament. However, since this edit operation will be with data from a relational table, I have some difficulty in bringing the data.
If I need to talk about logic briefly:
There is "category_id" in categorySteps. Every data that has this "category_id" comes from the category_steps table. What I want to do here is to call the step_title of the data in the category_steps table associated with this category_id

https://hastebin.skyra.pw/ezupekilon.php
Solution
add $data and statePath
public ?array $data = [];

public function form(Form $form): Form
{
    return $form
        ->schema([
            Repeater::make('categorySteps')
                ->label('Category Steps')
                ->schema([
                    TextInput::make('step_title')
                        ->required(),
                ])
                ->columns(2)
        ])
        ->columns(1)
        ->statePath('data');
}
public ?array $data = [];

public function form(Form $form): Form
{
    return $form
        ->schema([
            Repeater::make('categorySteps')
                ->label('Category Steps')
                ->schema([
                    TextInput::make('step_title')
                        ->required(),
                ])
                ->columns(2)
        ])
        ->columns(1)
        ->statePath('data');
}
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

mutate form data before fill
FilamentFFilament / ❓┊help
3y ago
Form does not fill with data
FilamentFFilament / ❓┊help
2mo ago
Fill form data from from Controller
FilamentFFilament / ❓┊help
2y ago
Fill form data via emitted action
FilamentFFilament / ❓┊help
3y ago