Custom Fields
Support Meta Box Conditional Logic Conditional Logic based on Settings Page value

  • Creator
  • #15310
    Resolved GarySmith

    Since settings values are save as serialized arrays in the options table, how could we use Conditional Logic based on a settings value. I'm wanting to separate all settings options into separate pages to avoid singularly large serialized options. Had issues with s2Member's massive serialized array.

    The issue I'm trying to solve is to create conditional logic on a Settings Page Field based on a different Settings Page Field. (eg: Settings Page 1 has Radio Button. If value = Option 1 Settings Page 2 field will show.)

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
  • #15328
    Anh Tran

    Hi Gary,

    The Conditional Logic extension works only for fields in one page. So if you have a settings page, you can set conditions for the fields inside. But you can't set conditions from another settings page. The purpose of the Conditional Logic extension is make a field visible/hidden in real time, and thus, it has to know the fields in the current page.

    As the settings page is created by you, you can control how many fields are there and can avoid a super large array of settings. WordPress supports quite well for the length of option value in the database.


    I appreciate the info. I've found the hiding operation to be quite slow, I can clearly see the fields when the page first loads even the ones that work well. I can only make comparison against ACF Pro which I have experience with and looking to see about transitioning from. It has the same limitations mentioned here but its conditional hiding mechanism seems much cleaner at least in this regard.

    Anh Tran

    Thanks for your feedback. Regarding the speed, yes, I optimized it several months ago. I'll take a look more about this.

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