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

Did you find this page helpful?