Closed andonimichael closed 4 months ago
That is how HTML works, you can add hidden fields for hold the values you don’t want editable, or switch to the json datatype
Ah I see this in the dataType docs:
This also means that the disabled attribute, which normally prevents input fields from being submitted, will not have that effect. Everything in $form will be posted when dataType is set to 'json'.
Thank you.
Description
When pre-populating a form with data, any disabled form fields are not forwarded to the server in the POST request. This is a common use case e.g. when allowing users to edit their settings or profile, but not allowing them to edit their email address or primary key. Because the disabled field's value is not sent in the request, the schema fails to validate the POST request.
Minimum Reproducible Example
Example use case: