F
Filamentβ€’17mo ago
Sanchit Patil

Make field not to be saved into the database

Hello, I do not want one field to be saved into the database. just want it to enable other fields. ButtonGroup::make('event_availability') ->label('How do you want to offer your availability for this event type?') ->options([ 'stored' => 'Use an existing schedule', 'custom' => 'Set custom hours', ]) ->gridDirection('column') ->reactive(), is there any way to achieve this? as I am getting a Laravel error while saving the data: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'event_availability' in 'field list' Could you please help me with this?
Solution:
I am not just a follow? To stop saving a field just put:
->dehydrated(true)
->dehydrated(true)
...
Filament
Fields - Form Builder - Filament
The elegant TALL stack form builder for Laravel artisans.
Jump to solution
2 Replies
Solution
toeknee
toekneeβ€’17mo ago
I am not just a follow? To stop saving a field just put:
->dehydrated(true)
->dehydrated(true)
https://filamentphp.com/docs/2.x/forms/fields#disabling
Filament
Fields - Form Builder - Filament
The elegant TALL stack form builder for Laravel artisans.
Sanchit Patil
Sanchit PatilOPβ€’17mo ago
Thank you. This worked with ->dehydrated(false) πŸ˜€
Want results from more Discord servers?
Add your server