aem-core-wcm-components
aem-core-wcm-components copied to clipboard
Form prefill on failed submission loses submitted text value when default present
Bug present as of version: 2.24.7-SNAPSHOT
When a form submission fails, values in text fields should be preserved. They are indeed preserved, unless a text field has a default value specified.
So if I have: Name: [ ] Company: [ ]
and user submits a failed request of
Name: [Brett] Company: [NewCo]
and that request fails, the form is restored as:
Name: [Brett] Company: [NewCo]
But if my form starts as:
Name: [ ] Company: [Adobe]
and user submits a failed request of
Name: [Brett] Company: [NewCo]
the form is restored incorrectly as:
Name: [Brett] Company: [Adobe]