Selecting checkbox to show/hide images upon Selection
- January 26, 2023
- 3 replies
- 3749 views
I've used similar threads to try and troubleshoot my issue but I can't seem to find the answer.
Im' working on a company form that has multiple product selections. I've made each checkbox the same name with a different export value so the user can't select multiple checkboxes at once.
I created a button field w/ an image icon to show when each checkbox is selected. The script I used is as follows:
this.getField("Image1").display = (event.target.value=="Off") ? display.hidden : display.visible;
The problem is... Even though the user can't select multiple checkboxes at once, multiple images are being shown on the screen. For example, if the user selects the "BOWL 1" checkbox, the correspoding image will appear. But, if the user selects the "BOWL 2" checkbox, the image for "BOWL 1" and "BOWL 2" are being shown even though the "BOWL 1" checkbox is no longer selected. Can someone please tell me what I'm doing wrong?
