Explain the difference between a conditional view and disabling an element, and when you would use each.
Suggested answer
They look similar to a user but behave differently in the data JSON and in validation, which matters at save time.
1. A conditional view removes the element from the rendered script when its condition is false. The element does not display, is not validated, and typically contributes nothing to the data JSON — which is what you want for a question that simply does not apply.
2. Disabling keeps the element visible but not editable. The user can see the value and understand that it is fixed, and any value already held is still part of the data. This suits fields derived from an earlier answer or pre-populated from a record the user may not change.
3. Use a conditional view when the question is irrelevant; use disabling when the answer is known and the user benefits from seeing it.
4. A practical consequence worth knowing: hiding a required element with a conditional view avoids the validation blocking Next, whereas simply styling it away with CSS does not — the element is still live, still required, and the user is stuck with no visible cause.
Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.
Community comments (0)
No comments yet.
Sign in or create a free account to add a comment. Comments are moderated before they appear.