From #2326757: Conditionals Broken - Select option determines displayed fields
SIDE NOTE: I also noticed that while creating conditions, if, before I select "Save conditions", I select the "+" and create a If foo is empty then hide bar condition, then select "+" to add another condition, the "Is empty" portion will change to "is" every time, without fail. If I select "Save conditions" between the addition of each "Is empty" condition, this does not happen. This also seems to occur when I drag and drop the condition to adjust it's weight, before selecting "Save conditions".
This is consistently reproduced. It may be related to other issues against conditional definition, but I've created this separate issue because it is easily reproduced. When fixed, we can investigate whether it helps other issues.
EDIT: The issue is broader and easier to reproduce. Create a conditional using a select component with any operator. Save. Then edit the operator to a different one and click (+) to add a new conditional. The change you made to the first conditional's operator will be lost.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | webform-adding_a_conditional-2327817-2.patch | 2.63 KB | danchadwick |
Comments
Comment #1
danchadwick commentedComment #3
danchadwick commentedThis patch fixes the above issue by checking to see if, when a change to a source component choice is detected, the appropriate options for the operator are the same as what the conditional already has. If so, then they are not updated (which loses the selection).
This patch also:
I am somewhat hopeful that this fix may address other related issues (yet to be confirmed / tested).