F
Filament3mo ago
Pooja

How to create toggle without any modal filed name

Toggle::make('any_name');
4 Replies
Dimitar
Dimitar3mo ago
set its label to empty string? Toggle::make('any_name')->label('');
awcodes
awcodes3mo ago
Use ->hiddenLabel() that way it’s still accessible.
Pooja
Pooja3mo ago
I want to keep ::make('') empty because it is not connected to any table. Is this possible?
awcodes
awcodes3mo ago
You have to pass a key for make(). It doesn’t have to exist in the table, then use ->dehydrated(false) to keep it from submitting with the form data.