Closed bruno-talkshoplive closed 2 months ago
Hey @bruno-talkshoplive! The thing is that disabled inputs should not be sent to the server as per HTML spec: https://www.w3.org/TR/REC-html40-971218/interact/forms.html#h-17.12.1
When set, the disabled attribute has the following effects on an element:
Disabled controls do not receive focus. Disabled controls are skipped in tabbing navigation. Disabled controls cannot be successful.
What you probably want is readonly
attribute if you want to keep sending it but make it not editable.
Hidden input is a bit different thing and you can read this discussion to get more info https://github.com/heartcombo/simple_form/issues/1728
Precheck
Environment
Current behavior
When a radio_buttons field is disabled the field value is not being posted.
Param request
The form generates a hidden field, but it doesn't set the value to it.
Expected behavior
It should continue posting the param, I think the problem is caused by when the field is disabled the hidden field start to be preferred.
Workaround