Support Forum
Support › Meta Box Conditional Logic › TAXONOMY FIELD CONDITIONAL DISPLAY USING RADIO NOT WORKING
I feel like I'm going a bit mad, maybe I've missed something obvious?
I can't get a taxonomy field to hide/display based on a radio field called org_previous with Yes/No options. I have tried 'contains' and other operators, as well as yes, Yes, 'Yes' and "Yes" as values. Whatever the options and radio selections, the field just stays put...
Any help much appreciated!
Screenshots:
1. https://capture.dropbox.com/I7KHB5RN2NTqlr7F
2. https://capture.dropbox.com/yLxw1zCQjOCegp1L
3. https://capture.dropbox.com/CCqWLfSHTkjSMyyg
Hi Richard,
Can you please share the code that creates the custom fields on your site? Refer to this documentation https://docs.metabox.io/extensions/meta-box-builder/#getting-php-code
Yes, apoologies, it's here in full:
OR just the two fields in question here...
Hi Richard,
The value used to compare in the conditional logic should be the option value, not the label. In your case, it should be yes
, instead of Yes
.
'hidden' => [
'when' => [['org_previous', '=', 'yes']],
'relation' => 'or',
],
You can see the conditional logic works as well on my local site.
https://monosnap.com/file/d8ZXjUuqZzukS4j19XaeW2jrpZkfII
Thanks Long, but I've tried that (see original post) and it didn't work...
Hi Richard,
Please share your site credentials via this contact form https://metabox.io/contact/, I will help you to check the issue on your site.
Done, thanks!
Hi,
I see the conditional logic works as well on your site, screen record https://monosnap.com/file/5PtzTiusr3lBq8oK41q6jan0LMdrTH
Can you please clear the cache and recheck this?
It sometimes disappears after about 20 seconds, but then never comes back, see:
https://www.loom.com/share/74b89ca52613474499ed660763851de9
It also doesn't work on the submission form, here:
Many thanks for your help!
So, it does come back, but takes about 60 seconds (and still doesn't work on submission form).
I have a 50mb/s internet and decent hosting with same-country host.
Hi,
On the frontend submission form https://radhr.org/submit/
there is an issue with the JS file of the theme Blocksy Child, it is broken and affects the conditional logic of our plugin. I've tried to deactivate all plugins except Meta Box, MB AIO and switch to the standard theme Twenty TwentyTwo then the conditional logic works as well.
On the backend, I do not see the long time to appear/disappear the field like that. You can follow the troubleshooting steps above to recheck this issue.
Screen record https://monosnap.com/file/wkugk1Hdm9LBBZraEkqk6q51MHHpZj