© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
6 replies
Bagus A

Using formatStateUsing on Select relationship

How can we, for example format a date with the source coming from a relationship? I've tried using formatStateUsing but it doesn't seem to work.

    public function form(Form $form): Form
    {
        return $form
            ->schema([
                Forms\Components\Select::make('bucket_id')
                    ->relationship(name: 'bucket', titleAttribute: 'date')
                    ->required()
                    ->preload()
            ]);
    }
    public function form(Form $form): Form
    {
        return $form
            ->schema([
                Forms\Components\Select::make('bucket_id')
                    ->relationship(name: 'bucket', titleAttribute: 'date')
                    ->required()
                    ->preload()
            ]);
    }
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Pivot Select using Relationship
FilamentFFilament / ❓┊help
7d ago
default select on relationship
FilamentFFilament / ❓┊help
3y ago
Select Relationship Modify Query Using
FilamentFFilament / ❓┊help
2y ago
Updating TextEntry using formatStateUsing
FilamentFFilament / ❓┊help
6mo ago