OR logic not working

Support MB Conditional Logic OR logic not workingResolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #24915
    sherwin_flightsherwin_flight
    Participant

    I'm using a version of MB that came included with my theme. It also has several plugins, including the Conditional Logic plugin. Looking at the included javascript files it appears it's version 1.6.11 of the Conditional Logic plugin.

    Most things seem to be working fine, with one exception. I'm trying to view/hide fields based on multiple conditions.

    Based on the documentation, I've set my conditions up like this:

    'visible' => array(
        'when' => array(
             array( 'wood_burning_units', true ),
             array( 'main_heat_source', '=', '248' )
         ),
         'relation' => 'or'
    )

    That all seems to be working fine, for the most part.

    However, one of the fields listed in those conditions, "wood_burning_units", is also shown or hidden based on another field. If "wood_burning_units" is hidden then the field shown in my code example above won't be shown either.

    Put simply, if one of the fields the OR conditions is checking is itself hidden, the OR condition fails.

    Examples:

    If {Field A = 1} or {Field B = 1} SHOW Field C = WORKS if either Field A or Field B are equal to 1.

    If {Field A = 1} or {Field B = 1} SHOW Field C = Does NOT work if either Field A or Field B are are hidden, even if the other field is equal to 1.

    I assume the conditions should still run if one of the OR fields is hidden?

    #24922
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Thank you for your reporting.

    I've tested this case again and see that if a statement is hidden then the logic does not work. I will inform the development to check this case and let you know later.

    #24943
    sherwin_flightsherwin_flight
    Participant

    Ok, thank you.

    #28520
    sherwin_flightsherwin_flight
    Participant

    Has there been an update on this?

    #44304
    Aaron KesslerAaron Kessler
    Participant

    I also ran into this, seems not mentioned in the docs.

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