adobe / adobe/aem-core-wcm-components
Form prefill on failed submission loses submitted text value when default present
- Dominant language
- Java
- Stars
- 796
- Forks
- 776
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 8
Description
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]
Contributor guide
Research direction
Reproduce the failed form submission with a text field that has a default value, then trace the form prefill behavior responsible for restoring submitted values. Done means the submitted text value is retained after failure instead of being replaced by the default; the issue does not mention a specific file or test to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100