TAXONOMY FIELD CONDITIONAL DISPLAY USING RADIO NOT WORKING
Support › MB Conditional Logic › TAXONOMY FIELD CONDITIONAL DISPLAY USING RADIO NOT WORKING
- This topic has 10 replies, 2 voices, and was last updated 2 years, 8 months ago by
Long Nguyen.
-
AuthorPosts
-
August 21, 2022 at 5:31 PM #37952
Richard Hawkins
ParticipantI 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/CCqWLfSHTkjSMyygAugust 22, 2022 at 9:28 PM #37969Long Nguyen
ModeratorHi 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
August 22, 2022 at 10:03 PM #37971Richard Hawkins
ParticipantYes, apoologies, it's here in full:
OR just the two fields in question here...
August 23, 2022 at 10:09 PM #37988Long Nguyen
ModeratorHi 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 ofYes
.'hidden' => [ 'when' => [['org_previous', '=', 'yes']], 'relation' => 'or', ],
You can see the conditional logic works as well on my local site.
https://monosnap.com/file/d8ZXjUuqZzukS4j19XaeW2jrpZkfIIAugust 23, 2022 at 10:52 PM #37993Richard Hawkins
ParticipantThanks Long, but I've tried that (see original post) and it didn't work...
August 24, 2022 at 12:41 PM #38004Long Nguyen
ModeratorHi 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.
August 24, 2022 at 3:20 PM #38009Richard Hawkins
ParticipantDone, thanks!
August 24, 2022 at 11:56 PM #38025Long Nguyen
ModeratorHi,
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?
August 25, 2022 at 12:24 AM #38026Richard Hawkins
ParticipantIt 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!
August 25, 2022 at 12:30 AM #38027Richard Hawkins
ParticipantSo, 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.
August 25, 2022 at 12:47 PM #38035Long Nguyen
ModeratorHi,
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
-
AuthorPosts
- You must be logged in to reply to this topic.