Support Forum
Hello!
Since updating to 1.6.6, all of the switches I'm using to toggle metaboxes on/off aren't working. After I save the page, the sections will appear/disappear properly, so the field is getting added to the DB correctly.
Here's a sample of the code I'm using and the JavaScript error I get in the admin.
My code:
array(
'name' => 'Add modal information?',
'id' => 'service_payment_info_select',
'type' => 'switch',
'on_label' => 'Yes',
'off_label' =>'No'
),
array(
'visible' => array('service_payment_info_select', true),
'id' => 'service_modal_info_link_text',
'name' => 'Clickable link text',
'type' => 'text',
),
JS error:
conditional-logic.js?ver=1.5:240 Uncaught TypeError: $scope.hasClass is not a function
at conditional-logic.js?ver=1.5:240
at Array.forEach (<anonymous>)
at isLogicCorrect (conditional-logic.js?ver=1.5:224)
at conditional-logic.js?ver=1.5:205
at Function.s.each.s.forEach (underscore.min.js?ver=1.8.3:1)
at conditional-logic.js?ver=1.5:198
at Function.s.each.s.forEach (underscore.min.js?ver=1.8.3:1)
at runConditionalLogic (conditional-logic.js?ver=1.5:197)
at init (conditional-logic.js?ver=1.5:563)
at conditional-logic.js?ver=1.5:571<code></code>