Woo Checkout Editor - Conditional Values not working

Hi there,

I’m struggling with conditional settings for my checkout page. What I would like to accomplish is that a few fields show only when a checkbox is checked.

I made a custom field with the type ‘checkbox’ named “Do you want an invoice?” with the following conditional settings: “If this current field doesn’t have this content” set to “1” (I also tried TRUE) then hide these set to all the address fields (street, place, country, zipcode).

I can’t get this to work (actually I cannot get anything to work, not even the example in the docs). What am I doing wrong?

Thanks in advance!

Here are my settings:

1 Like

Hello @Dagaloni,

Thanks for writing in! A checkbox value can be 1 or true. Clear your browser cache first then test it again. If nothing is helping, provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WordPress Admin username / password

To know how to create a secure note, please check this out: https://theme.co/docs/getting-support

Regards.

Thanks! Unfortunately it doesn’t work. I added a secure not to my first post. Thanks for you help, I really appreciate it!

Hi @Dagaloni,

Could you try it with select or radio type input instead of a checkbox? That condition will only work on inputs that can change its values upon selection. The checkbox is just a checkbox with a single value, uncheck or check it, it will still have the same value.


Thanks!

Hi Rad,

Thanks for the update and thanks for the screenshot! Didn’t know I could check the values that way, thanks!

Couldn’t get it to work with the radio button. Doens’t matter what is selected, nothing changes in the checkout forms.

Hi @Dagaloni,

This seems to be a bug because even if you change the value attribute of the checkbox it will still not work. For now, you need to do this in a hard way and use the text field, with specific instructions to type yes (ja) if they want an invoice.

I’ve submitted this to our issue tracker so the developers will be made aware of it.

Thanks,

Hey Friech,

Thanks for your help and submitting the bug and for the workaround. Nice touch to mention the dutch translation of yes :smile: The only thing with the text-field is that it will only hide the forms after I have entered something in the field. By default all the other fields are shown. Only when I type in something that isn’t ‘yes’ (ja) the fields will hide. I would like to have the fields hide at default and only show when the conditions are met.

You are most welcome!

Wait! I still need some help with this one:

Hi @Dagaloni,

Yes, it’s part of the bug we’re investigating. Somehow, it doesn’t trigger the visibility based condition upon load. There is no temporary workaround at this moment but we’re on it.

Thanks!

Ah great, thanks for your help guys! :smile:

You are most welcome!

Hi @Dagaloni,

Just letting you know that this issue is already fixed on our unreleased version.

Thanks!

Awesome Rad! Thank you for letting me know. Big compliment for the support!

You’re most welcome, @Dagaloni.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.