Should the predefined value in a hidden Form field be recorded on Form submission?
How To articles are not official guidelines or officially
supporteddocumentation. They are community-contributed content and may
not alwaysreflect the latest updates to Liferay DXP. We welcome your
feedback toimprove How to articles!
While we make every effort to ensure this Knowledge Base is accurate,
itmay not always reflect the most recent updates or official
guidelines.We appreciate your understanding and encourage you to reach
out with anyfeedback or concerns.
Legacy Article
You are viewing an article from our legacy
"FastTrack"publication program, made available for
informational purposes. Articlesin this program were published without a
requirement for independentediting or verification and are provided
"as is" withoutguarantee.
Before using any information from this article, independently verify
itssuitability for your situation and project.
Issue
- I have a form with 2 fields:
- "Visible field"
- "Hidden field" with a predefined value
- The Form has a rule:
- If "Visible field" is not empty, then show "Hidden field"
- Submit 2 form entries, one where the "Hidden field" is hidden and another one where "Hidden field" is visible (with predefined value)
- Go to Content & Data > Forms and view form entries
- The first entry has an empty value for "Hidden field"
- My expectation is that the predefined value should be recorded even if the field stays hidden
Environment
- Liferay DXP 7.1
- Liferay DXP 7.2
Resolution
- The behavior described above is intended.
- If the field is hidden, the user who submits the Form is not aware of its value. Therefore, this field should not be considered when submitting.
Did this article resolve your issue ?