Pro Forms Conditional Wrapper not working


for the following structure the conditions for the Conditional Wrappers are not working:

  • Radio Wrapper 1
    • Option 1 (Condition for Wrapper 1)
    • Option 2 (Condition for Wrapper 2)
  • Radio Wrapper 2
    • Conditional Wrapper 1
      • Option 1
      • Option 2
      • Option 3
    • Conditional Wrapper 2
      • Option 4
      • Option 5
      • Option 6

Currently both Conditional Wrappers are visible after clicking on one of the options in Radio Wrapper 1.

EDIT: I figured out that even if you wrap radio options with a neutral div-element it won’t be considered anymore.

The Radio Wrapper / Checkbox Wrapper is only accepting radio and checkbox related elements. You cannot use a Conditional Wrapper or DIVs inside those fields, as it will break the HTML structure. (ul > li).

Ok I understand. But now I have an issue with following structure:

  • Radio Wrapper 1
    • Image Radio 1 (Condition 1)
    • Image Radio 2 (Condition 2)
  • Radio Wrapper 2 (Condition 1)
    • Image Radio 1
    • Image Radio 2
  • Radio Wrapper 3 (Condition 2)
    • Image Radio 1
    • Image Radio 2

When I’m selecting all my fields inside “Condition 1” (Radio Wrapper 2) and then I would like to change my selection and switch to “Condition 2” (Radio Wrapper 3) then all the selected fields in “Radio Wrapper 2” are still selected and the value will be still considered in i.e. the live value field or in the WooCommerce Action.

How is it possible to uncheck all selected fields automatically after you leave the condition? Or is there another way to use just the “visible” selection for actions?

Radio Buttons cannot be unchecked in HTML forms. You would need to use JavaScript for that. If you need fields which can be unchecked by the user, you should use checkboxes instead.

But: those “hidden” fields should not be considered server side. If you say that you can see those values in some actions, it may be a bug somewhere. I will try to reproduce it asap and come back to you :slight_smile:

My bad, I didn’t mean unchecked, more like unselected. But has to be radio buttons so the user is limited to select just one option.

In my case I use some “Live Value” fields. Based on conditions I need to show and hide some “Image Radio Fields”. BUT because the “Image Radio” fields have different images I also need to create different “Radio Wrapper” to handle the conditions. Now if I’m switching between the conditions the previous selected radio options still remain in the “Live Value” clearly because they are connected through the ID of the “Radio Wrapper”. Same principle for the “WooCommerce: Add To Cart” action.

Best case would be one “Radio Wrapper” and inside that I can handle some conditions. So the “Radio Wrapper” ID would be the same, just the values and images would be different.

I hope that makes more sense now :see_no_evil:

Thank you for your help!

@Daniele Do you have some news on this?