F
Filament15mo 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 Koch15mo ago
It's normal. We shouldn't update data from disabled fields.
Wiebe
WiebeOP15mo ago
okay, changed since v2 then i guess
Dennis Koch
Dennis Koch15mo ago
Might be. Thought we had this before though.
Wiebe
WiebeOP15mo ago
also for hidden fields?
Dennis Koch
Dennis Koch15mo ago
Yes Hidden fields are not part of the form therefore they should not be saved
awcodes
awcodes15mo ago
It’s an html thing. Elements with disabled attribute are not submitted with form data.

Did you find this page helpful?