FilamentF
Filament12mo ago
Hedi

conditionally show editForm in Select

hello, i have a table that holds names, the user_id in the Name might be null which means it's a default Name, but users can create their own names and edit them.

but i don't want the default names to be editable, how can i hide the editForm when the user_id is null? i haven't been able to come up with an idea
Select::make('name_id')
    ->relationship('name', 'name')
    ->editOptionForm([
        Forms\Components\TextInput::make('name')
            ->required(),
    ]),

here's what i have so far, thanks in advance!
Was this page helpful?