Conditional Logic based on Settings Page value

Support MB Conditional Logic Conditional Logic based on Settings Page valueResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #15310
    GarySmithGarySmith
    Participant

    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.)

    #15328
    Anh TranAnh Tran
    Keymaster

    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.

    #15330
    GarySmithGarySmith
    Participant

    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.

    #15333
    Anh TranAnh Tran
    Keymaster

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

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