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

Did you find this page helpful?