Support Forum
I have a set of custom fields using conditional logic to display a group only when a switch is activated. I've used this many times before. A template site I built months ago using this has stopped working. Now, when I activate the switch, the group does not display. Also, on another set of fields I added this feature and it doesn't work either, but in reverse. The field ALWAYS displays, whether the switch is activate or not.
More details here: https://drive.google.com/file/d/1buveXweykCaVyiiNw2OH8QXU20-g6GFC/view
Hello Travis,
Please export the field groups on the site where the conditional logic doesn't work. I will import field groups on my site and see what happens there.
Please follow the documentation https://docs.metabox.io/extensions/meta-box-builder/#export--import
Sorry, I just saw your reply. I have the fields exported and you can download them here: https://drive.google.com/file/d/12TDXfvf8qaY7AgQ5TlniKM0lodLvpV8L/view?usp=sharing
Hello,
The issue occurs due to the wrong field ID format that you add to the conditional logic of the field "blog_switch", screenshot https://imgur.com/jil75AH
I remove that logic and the logic of the group field and CTA switch work properly.
That was it! I didn't even look in the conditional formatting for the switches! Thank you
Well, I have similar approach to show hide fields based on the switch.
I use it on multiple sites. Yesterday I noticed it stopped working on one of them (I had just updated metabox AIO to 1.30.1). I went to another site, which was still on 1.30.0 and everything was working on my site. Just to be sure it was the update, i updated this second site to 1.30.1, and, voilá, all switches conditional logic stopped working.
I don't think the same solution provided for Travis applies.
As above I am also having the same issue with conditional logic after the latest update.
jquery.min.js?ver=3.7.1:2 Uncaught Error: Syntax error, unrecognized expression: ##type_1:not(.rwmb-clone-template ##type_1)
at I.error (jquery.min.js?ver=3.7.1:2:11769)
at Y (jquery.min.js?ver=3.7.1:2:17234)
at re (jquery.min.js?ver=3.7.1:2:20008)
at Function.I (jquery.min.js?ver=3.7.1:2:7520)
at Function.<anonymous> (jquery-migrate.min.js?ver=3.4.1:2:2898)
at e.<computed> [as find] (jquery-migrate.min.js?ver=3.4.1:2:1582)
at ce.fn.init.find (jquery.min.js?ver=3.7.1:2:21991)
at ce.fn.init (jquery.min.js?ver=3.7.1:2:22483)
at e.<computed>.<anonymous> (jquery-migrate.min.js?ver=3.4.1:2:2438)
at new e.<computed> (jquery-migrate.min.js?ver=3.4.1:2:1582)
jquery.min.js?ver=3.7.1:2 Uncaught Error: Syntax error, unrecognized expression: ##type_1:not(.rwmb-clone-template ##type_1)
at I.error (jquery.min.js?ver=3.7.1:2:11769)
at Y (jquery.min.js?ver=3.7.1:2:17234)
at re (jquery.min.js?ver=3.7.1:2:20008)
at Function.I (jquery.min.js?ver=3.7.1:2:7520)
at Function.<anonymous> (jquery-migrate.min.js?ver=3.4.1:2:2898)
at e.<computed> [as find] (jquery-migrate.min.js?ver=3.4.1:2:1582)
at ce.fn.init.find (jquery.min.js?ver=3.7.1:2:21991)
at ce.fn.init (jquery.min.js?ver=3.7.1:2:22483)
at e.<computed>.<anonymous> (jquery-migrate.min.js?ver=3.4.1:2:2438)
at new e.<computed> (jquery-migrate.min.js?ver=3.4.1:2:1582)
Hi RBD, can you please share your meta box code (JSON or PHP) so I can replicate it?
Cheers!