© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
12 replies
Albert Lens

Error getEditOptionActionFormData when using editOptionForm in Select without a relationship

Hello.
I have a select:
Select::make('decedent_id')
Select::make('decedent_id')

with the createOptionForm() working correctly now, and I also need the user to be able to edit, so I added the code for the edit:

->editOptionForm([
     DatePicker::make('date_of_death')
                  ->displayFormat('d M Y')
                  ->required()
                  ->minDate(now()->subYears(120))
                  ->maxDate(now()->subDays(1))
                  ->label(__('date_of_death'))
                  ->placeholder(__('date_of_death'))
                  ->columnSpan(4),
  ])
->editOptionForm([
     DatePicker::make('date_of_death')
                  ->displayFormat('d M Y')
                  ->required()
                  ->minDate(now()->subYears(120))
                  ->maxDate(now()->subDays(1))
                  ->label(__('date_of_death'))
                  ->placeholder(__('date_of_death'))
                  ->columnSpan(4),
  ])

But when I select one existing data from the dropdown it thows the error:
Filament\Forms\Components\Select::getEditOptionActionFormData(): Return value must be of type array, null returned

Any ideas of how to solve this? I suppose it is not a problem to enable both the createOption and the editOption at the same time. Is it that way?

Thanks.
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

Select filter throwing error when using relationship
FilamentFFilament / ❓┊help
3y ago
make select without relationship
FilamentFFilament / ❓┊help
2y ago
Problem - unknown column when using relationship in select
FilamentFFilament / ❓┊help
9mo ago
Error on create with select and editOptionForm
FilamentFFilament / ❓┊help
3y ago