F
Filament13mo ago
Pooja

How to create toggle without any modal filed name

Toggle::make('any_name');
4 Replies
Dimitar
Dimitar13mo ago
set its label to empty string? Toggle::make('any_name')->label('');
awcodes
awcodes13mo ago
Use ->hiddenLabel() that way it’s still accessible.
Pooja
PoojaOP13mo ago
I want to keep ::make('') empty because it is not connected to any table. Is this possible?
awcodes
awcodes12mo 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.

Did you find this page helpful?