Zyten
Zyten
FFilament
Created by Zyten on 7/15/2024 in #❓┊help
Using disabledOn('edit') with fieldsets seems to make the fields empty on save
I did the same for a bunch of standard fields (Select, TextInput etc) and they work as expected. My goal is to make everything except two TextInput readonly when on the Edit form. Would also be happy to know if there are other ways to achieve this besides disabledOn('edit'). Thank you
Forms\Components\Fieldset::make('income')
->label('Income')
->schema([
Forms\Components\Select::make('income.bracket')
->required()
->disabledOn('edit')
->placeholder('Select')
->native(false)
->options(IncomeBracketEnum::class)
->selectablePlaceholder(false)
->reactive(),
Forms\Components\TextInput::make('income.amount')
->required()
->disabledOn('edit')
->numeric()
->minValue(0)
->default(0)
->reactive(),
])
Forms\Components\Fieldset::make('income')
->label('Income')
->schema([
Forms\Components\Select::make('income.bracket')
->required()
->disabledOn('edit')
->placeholder('Select')
->native(false)
->options(IncomeBracketEnum::class)
->selectablePlaceholder(false)
->reactive(),
Forms\Components\TextInput::make('income.amount')
->required()
->disabledOn('edit')
->numeric()
->minValue(0)
->default(0)
->reactive(),
])
7 replies