Readonly on 'Select Component'
Is it possible to make the 'Select component' read-only? '->extraInputAttributes(['readonly' => true])' and '->readOnly()' are not working. If I use '->disabled()', it will not save the current item.
4 Replies
up
if you can't change it, why would you like to save in the db?
my code snippet: https://pastebin.com/Lhq7kwkL
i just want to disable the 'Forms\Components\Select::make('roles')' select, because its auto selected, based on selected value on 'Account Type' Select.
kindly check this for more info:
https://pastebin.com/Lhq7kwkL
Pastebin
Forms\Components\Section::make('Account Role Information') ->sch...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
maybe you can mutate the data before saving, instead of using a disabled field
https://filamentphp.com/docs/3.x/panels/resources/creating-records#customizing-data-before-saving