aem-core-wcm-components icon indicating copy to clipboard operation
aem-core-wcm-components copied to clipboard

Form prefill on failed submission loses submitted text value when default present

Open HitmanInWis opened this issue 1 year ago • 0 comments

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]

HitmanInWis avatar Jul 02 '24 23:07 HitmanInWis