Multiple visibility condition

Support MB Frontend Submission Multiple visibility condition

  • This topic has 3 replies, 2 voices, and was last updated 1 year ago by PeterPeter.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #45148
    YasmineYasmine
    Participant

    I have two visibility conditions and I believe I followed the doc for an and condition: https://docs.metabox.io/extensions/meta-box-conditional-logic/#multiple-conditions

    [
    'name' => 'Show / hide partner association',
    'id' => $prefix . 'control_partner_visibility',
    'type' => 'switch',
    'std' => 1,
    'class' => 'rs_p2',
    'tab' => 'page_2',
    'desc' => 'Hide acknowledgement at bottom',
    'visible' => [
    [ 'partnership_summary', '=', 1 ],
    [ 'select_partner', '!=', '' ],
    ],
    ],

    But it does not hide! Cleared cache etc. Any clue whats going wrong?

    #45155
    PeterPeter
    Moderator

    Hello Yasmine,

    Is the field partnership_summary or select_partner shown/hidden by another conditional logic? Please ensure they are visible on the same page/tab with the field control_partner_visibility and not affected by another conditional logic then check the issue again.

    #45215
    YasmineYasmine
    Participant

    Ah they were actually conditions in a separate field group. Because I toggle it from the admin editor, whereas other fields are from the form - but both have same CPT location. Was that the reason? Do I need to create a hidden field with their value on the form?

    #45220
    PeterPeter
    Moderator

    Hello,

    Those fields can be located in another field group but they need to be available on the same page to make the conditional logic work.

    Can you share the page where I can see the issue?

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.