Second block instance is inheriting conditional logic from first block instance

Support MB Conditional Logic Second block instance is inheriting conditional logic from first block instanceResolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #35729
    TGHPTGHP
    Participant

    Hi,
    I have a block with a select field with two options ('default' & 'mega'). It contains a text field, which is set visible when the 'default' option is selected ('visible' => ['block_title_style', '=', 'default']). When a second instance of the block is added to a page, and the first instance is in 'edit' mode (i.e. not in 'preview' mode), the second instance is inheriting the conditional logic of the first instance.
    To put it simply, when both instances are in 'edit' mode, and I toggle the select field in the first block instance, the text field is visibly showing/hiding in both blocks on the page.
    Thankfully, this isn't an issue when the first instance is in 'preview' mode, otherwise it would create a big problem as you would not be able to configure the second block instance differently to the first.

    #35743
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Thanks for your feedback.

    The extension MB Conditional Logic uses jQuery to check the field ID and value to match the condition. So if there are two or more IDs that are the same on a page, the condition will apply to all blocks or not work properly. You can move the edit mode to the sidebar to avoid this issue.

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