Describe the bug
When the field is added to a form using the following XML:
<row>
<cell type="label" labelfor="id"/>
<cell type="field" id="id" uitype="text" name="id" colspan="5"/>
</row>
…the field is rendered as read-only in the UI. However, if that field is marked as required in the schema configuration, the form cannot be saved even though the user cannot provide input for a read-only field.
To Reproduce
- Configure a form with the XML above to include the "id" field.
- Ensure that the schema config marks "id" as required.
- Attempt to submit the form.
Expected behavior
If the field is rendered as read-only (non-editable), the "required" requirement should not prevent form submission. Required validation should not apply to fields that are not user-editable.
Actual behavior
The form cannot be saved, reporting a missing value for the required "id" field, even though it is read-only.
Additional context
The issue appears to be a mismatch between form rendering (read-only) and schema validation (required), resulting in unfulfillable validation rules.
Reported By
CSIRO in BoldDesk ticket #975
Describe the bug
When the field is added to a form using the following XML:
…the field is rendered as read-only in the UI. However, if that field is marked as required in the schema configuration, the form cannot be saved even though the user cannot provide input for a read-only field.
To Reproduce
Expected behavior
If the field is rendered as read-only (non-editable), the "required" requirement should not prevent form submission. Required validation should not apply to fields that are not user-editable.
Actual behavior
The form cannot be saved, reporting a missing value for the required "id" field, even though it is read-only.
Additional context
The issue appears to be a mismatch between form rendering (read-only) and schema validation (required), resulting in unfulfillable validation rules.
Reported By
CSIRO in BoldDesk ticket #975