Support Forum
Support › Meta Box Conditional Logic › Conditional Logic not working properly (over and over again !!)Resolved
Hi there
You really need to improve the conditional logic functionality. I don't know how man hours I already spent on this only because it's not working properly. Now againg I after more than 1 hour trying to get this work I need to discover that it works when another field group is disabled. But this other field group does not contain the same field name. And even if, we still have the prefix which should make a difference. But as I said this time the field ID is different and its a simple field group without nesting etc.
Please see video - and I'm sorry if the video is a bit emotional, I'm really p..off again with these conditions over and over again. They are so important and need to work properly.
https://vento.so/view/d27eb55a-e4d3-4669-98aa-f4b428f1adbc?utm_medium=share
Thanks in advance for a solution - or let me if I am doing something wrong.
Best regards
Hello,
In the screen record, I only see the field settings query_terms_img
, nothing more. So I don't understand the issue. Please share the code that registers the custom fields (both field groups) and screen record of the issue again.
Thanks for your patience.
Hello, I've sent you an email with instant login and some direct links
Hello
I now tried to add the prefix manually and this seems to work.
Why is this necessary in this case?
I want to understand so I'll not loose more time in future.
(...I remember in other cases even with prefix thing were not working properly).
Thanks, François
Hello,
The field ID prefix should be added to the conditional logic. The issue without prefix could be fixed in a new update. Can you please recheck this issue with other field groups?
Hi, I don't understand exactly what you mean. Do I need to use the prefix or not? ...in 90% of cases it works without, but sometimes not, especially when working with group fields. But in this case I cannot see any reason why it's not working. Did you inspect my install?
Hello,
I check the field ID prefix again on my demo site and see that with or without the prefix, the conditional logic still works. The conditional logic uses jQuery to search for the field ID and match the condition. The field ID with a prefix has the format prefix_fieldID
so if you add the exact field ID to the condition including the prefix, you will see it works accurately.
I think there is another field that has a similar ID and cause the issue. I don't receive the site credentials. Please share it again via this contact form https://metabox.io/contact/
I will take a look.
Thank you.
Hi you dont credientiels, use just the link in the Email, it's an instant login. thx.
Hi Peter
Thanks for analyzing.
I understand this in this case. As far I can remember, it was another field which was has not the same id, but unfortunately I can't remember and in my video the mouse was not visible so I can't figure out anymore, sorry for that.
But now I started to add the prefix in all conditions, then it works, although it's anoying (and then you can't just copy field groups and reuse them without adapting all conditions).
Kind regards
François