Issue
Values from read-only fields on the UI form view are not submitted and therefore they are not persisted to the case if they are updated automatically.
Symptoms and Impact
Values from read-only fields on the UI form view are not submitted. This occurs when form refresh settings are configured to update a field on change of another, and the target field is set to read-only.
Steps to reproduce
-
Create a UI form view with fields ReferencesID, Value 1 and Value 2 .
-
Configure the Value 1 and Value 2 fields with an Edit mode of read-only.
-
Configure a flow action with Form refresh settings option set to update target fields Value 1 and Value 2 when the value of Reference ID changes - use Data Transform UpdateReferencesValues.
-
Update the value of Reference ID
-
Test the form refresh and Submit the form.
-
Values from the read-only fields are not updated or saved.
-
Review the properties in a subsequent view or go back to the original form.
-
Note that the values are blank.
Root Cause
This behavior is currently working as designed. The functionality is the same in both Traditional UI and Constellation, but Constellation uses a new
setting allowing users to set fields dynamically on the form view. The values from read-only fields are not included in the data submitted by the form.Solution
An enhancement request has been logged but has not yet been assigned to a specific release. This Known Issue document will be updated with release details when the enhancement for this issue is available.
To mitigate the problem please use one of the two workarounds below:
Workaround 1
Set the fields to be editable instead of read-only so that the values will be submitted from the form.
Workaround 2
Include a hidden editable Text input for the read-only field in the form in addition to the read-only field.
This solution requires the creation of a simple hidden input DX Component. This allows you to have both the read-only and hidden editable input in the view, which means the value is submitted from the hidden input.
The input component from the Constellation design system supports a type property that can be set to 'hidden' so you can make this component by making this one change to the basic Text Input component that is created by the DX Component Builder.
Input | Pega Constellation design system
Constellation DX components (pega.com)
Related content
Configuring dynamic field behavior
Defining the run-time presentation of Flow Actions
[Constellation] Issue when save auto populated read only fields data in view