I've created a multi-page webform where the user first chooses sports that they are interested in from a set of checkboxes (component name is "Sport"). In a later step, I've got multiple sets of radio buttons that are meant to gauge their interest level in the sports that they chose. So, as an example, let's say that the user chooses "tennis" from the first set of checkboxes. I'm wanting them to then only see the radio button set for the tennis question if "tennis" was previously selected. For the radio button component, I have:

Conditional rules:
• Sport
• is one of
• tennis

However, when I begin filling out the form, the later question appears regardless of whether or not the "tennis" checkbox was checked in the initial "Sport" question. Any ideas what I might be doing wrong?

Comments

attheshow’s picture

Strange, this issue doesn't seem to happen on a form with a single page break. It works fine there. I'm going to try rebuilding my form and see if I can discover at what point the conditionals stop working.

attheshow’s picture

Title: Conditional Components Always Display » Conditional Components Always Display When "Multiple" is Used
Component: User interface » Code
Category: support » bug

Ok, I think I've narrowed it down. It looks like the conditionals work unless the "multiple" option is used on a parent select component.

In my example above, the "Sport" component is the parent and it's a set of checkboxes (a.k.a. multiple).

I think this is a bug, so I'm going to mark it as such.

quicksketch’s picture

Thanks attheshow, I think there's a good probability you are correct. I think our comparison is s straight value check, since checkboxes send an array of values instead of a string, it doesn't compare correctly.

attheshow’s picture

Status: Active » Needs review
StatusFileSize
new585 bytes

Ok, I think I found the bug. This got it working for me. (Patch attached to this comment)

machete1’s picture

On a fresh install of beta 5 this patch worked for me as well.

quicksketch’s picture

Thanks guys, I'll give this a review when things calm down at work.

quicksketch’s picture

Status: Needs review » Fixed

Thanks attheshow, you were spot-on. Tested the patch and it works perfectly with both checkboxes and multivalue select lists. Committed to 3.x branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.