When a component that has a value is hidden by a conditional in the browser, its value should be considered empty, and should trigger any other conditionals that depend upon it.
Steps to reproduce lack of retriggering of condtionals
- Create components A, B, C
- Create conditional IF A=1 THEN SHOW B
- Create conditional IF B=1 THEN SHOW C
- Create submission.
- Set A=1, then B=1, then C=1
- Set A=empty. C should be hidden.
Related, this creates the possibility of an infinite recursion loop, which must be avoided to prevent browser errors. We don't prevent circular references, just warn about them.
Steps to reproduce recursion infinite loop:
- Create components A, B, and C
- Create a conditional: IF A=1 AND B=1 THEN SHOW C
- Create a conditional: IF C=1 THEN SHOW B
- Create a submission.
- Browser may already have a recursion depth error. If not, the set C to 1, causing B to appear. Set B to 1. Set A to 1, triggering the oscillating infinite loop.
Comments
Comment #1
danchadwick commentedComment #2
danchadwick commentedComment #4
danchadwick commentedComment #5
danchadwick commented#4 does not handle fieldsets, where showing the target may show/hide many other fields within the fieldset.
Comment #6
danchadwick commentedClosing this as the solution for this will be addressed in the parent issue.