F
Filament13mo ago
Wiebe

No data from disabled inputs

Is this normal or a bug? when i've got this:
TextInput::make('name')->required()->disabled();
TextInput::make('name')->required()->disabled();
The name is not there in
$data = $this->form->getState();
$data = $this->form->getState();
6 Replies
Dennis Koch
Dennis Koch13mo ago
It's normal. We shouldn't update data from disabled fields.
Wiebe
WiebeOP13mo ago
okay, changed since v2 then i guess
Dennis Koch
Dennis Koch13mo ago
Might be. Thought we had this before though.
Wiebe
WiebeOP13mo ago
also for hidden fields?
Dennis Koch
Dennis Koch13mo ago
Yes Hidden fields are not part of the form therefore they should not be saved
awcodes
awcodes13mo ago
It’s an html thing. Elements with disabled attribute are not submitted with form data.
Want results from more Discord servers?
Add your server