Conditional Logic for hiding conflicts with required fields

Support MB Conditional Logic Conditional Logic for hiding conflicts with required fieldsResolved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #10479
    DougDoug
    Participant

    I've discovered a conflict when Conditional Logic is used to limit visibility of a meta box to a specific page, and the same meta box contains a required field. For example, meta box is visible when post_ID = 25.

    Editing that specific page is fine. But since Conditional Logic hides the meta box (and its fields) on other pages, those pages can’t be updated, because the required field for those pages has no value.

    Maybe this is by design, since Conditional Logic doesn't truly eliminate the meta box on other pages, it simply hides the meta box from view. (Although checkboxes for hidden meta boxes still show up in 'Screen Options' at the top of the page.)

    For now, I removed the required attribute on any fields in meta boxes that use Conditional Logic for visibility. Is there another way around this?

    #10480
    Anh TranAnh Tran
    Keymaster

    Hi Doug,

    I'm afraid this (removing the required attribute) is the only way to resolve this. The Conditional Logic actually hides/shows elements. It does not removes them completely from the page (cause it doesn't know how to get them back).

    #11508
    Austin PassyAustin Passy
    Participant

    I would consider this a bug, and not a feature. I know there are ways to handle required fields only when visible. Hopefully it's something you can work into in an upcoming release.

    If I had time to work on this I would. Might i suggest looking into Gravity Forms as they integration this into their conditional logic extension in 2011.

    Thanks for the extension.

    #11833
    Anh TranAnh Tran
    Keymaster

    Hey guys,

    Finally we found a solution for this problem. It's added in the version 1.6.0. Please update and let me know if you need anything further.

    #11839
    Austin PassyAustin Passy
    Participant

    Awesome, is this getting pushed into AIO?

    #11842
    Anh TranAnh Tran
    Keymaster

    Just pushed to the AIO. Please check it.

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