Hi,
I have the following situation :
- I have 2 forms that use the same data source and are bound to the same valuesManager.
- One of the forms uses StaticTextItem fields to display information (read-only)
- The other form uses TextItem fields to allow user editing the information
- Both forms contain the same fields (let's say name, phone, etc)
Both forms are simultaneously displayed to the user ... When I issue a valuesManager.saveData()
which contain server validation errors, I recuperate those from the response and alter the response.errors
collection to reflect the validation errors, as follows :
My problem is the following :
The DynamicForm with the StaticTextItem fields gets its fields decorated with the error messages,
instead of the other DynamicForm with the TextItem fields.
Is there any way to control this ?
Thanks for your insight,
I have the following situation :
- I have 2 forms that use the same data source and are bound to the same valuesManager.
- One of the forms uses StaticTextItem fields to display information (read-only)
- The other form uses TextItem fields to allow user editing the information
- Both forms contain the same fields (let's say name, phone, etc)
Both forms are simultaneously displayed to the user ... When I issue a valuesManager.saveData()
which contain server validation errors, I recuperate those from the response and alter the response.errors
collection to reflect the validation errors, as follows :
Code:
dsResponse.errors['phone'] = 'My error message ...';
The DynamicForm with the StaticTextItem fields gets its fields decorated with the error messages,
instead of the other DynamicForm with the TextItem fields.
Is there any way to control this ?
Thanks for your insight,
Comment