© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
1 reply
GHOST-117

Delete option inside select field

Select::make('roles')
                // ->createOptionForm(function(Form $form){
                //   return RoleResource::form($form);
                // })
                ->editOptionForm(function(Form $form){
                  return RoleResource::form($form);
                })
                // ->manageOptionActions(function(){
                //   return [
                //     DeleteAction::make('delete')
                //   ];
                // })
                // ->getEditOptionActionForm()
              ->label(__('Role'))
              ->relationship('roles', 'name')
              // ->multiple()
              ->preload()
              ->searchable()
              ->options(function () {
                return Role::all()->pluck('name', 'id')->map(function ($role) {
                  return ucwords(str_replace('_', ' ', $role));
                })->toArray();
              }),
Select::make('roles')
                // ->createOptionForm(function(Form $form){
                //   return RoleResource::form($form);
                // })
                ->editOptionForm(function(Form $form){
                  return RoleResource::form($form);
                })
                // ->manageOptionActions(function(){
                //   return [
                //     DeleteAction::make('delete')
                //   ];
                // })
                // ->getEditOptionActionForm()
              ->label(__('Role'))
              ->relationship('roles', 'name')
              // ->multiple()
              ->preload()
              ->searchable()
              ->options(function () {
                return Role::all()->pluck('name', 'id')->map(function ($role) {
                  return ucwords(str_replace('_', ' ', $role));
                })->toArray();
              }),

is there a way i can add a delete option inside the select filed or remove that
i got the edit action working but wont find any solution for remove
Screenshot_from_2024-03-14_10-55-36.png
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

add option inside the select field
FilamentFFilament / ❓┊help
3y ago
Null option for Select Field
FilamentFFilament / ❓┊help
3y ago
Filament Select Field Option Display Issue
FilamentFFilament / ❓┊help
11mo ago
dynamic select option on hidden field
FilamentFFilament / ❓┊help
2y ago