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