Custom Fields
Re-Envisioned
Support Meta Box Conditional Logic Conditional Logic for hiding conflicts with required fields

This topic contains 5 replies, has 3 voices, and was last updated by  Anh Tran 5 months, 2 weeks ago.

  • Creator
    Topic
  • #10479
    Resolved
    Doug
    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?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #10480

    Anh 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 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 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 Passy
    Participant

    Awesome, is this getting pushed into AIO?

    #11842

    Anh Tran
    Keymaster

    Just pushed to the AIO. Please check it.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.