Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I was going to suggest that you reach out to the plugin author, but I see you already did that at https://github.com/awran5/CMB2-conditional-logic/issues/2

    We don’t maintainn the plugin ourselves, so we really don’t have an answer for that readily available.

    dkurth

    (@dkurth)

    Assuming your issue is just about displaying. I found a simpler solution if it helps. No Javascript involved. Use the ‘show_on_cb’ within the field and then use your conditions checks to hide display of the data. The field is still there, but you just do not see it.

    Thread Starter moacirsantana

    (@moacirsantana)

    Thanks @dkurth !

    That seems to be very useful for other situations on my site, but the example doesn’t work: https://github.com/CMB2/CMB2-Snippet-Library/blob/master/conditional-display/show-if-matching-meta-value.php

    Nothing happens when I select ‘external’, I don’t know if it’d be too much hassle if you could test it as to see if the problem is on my site, if it’s not, I’d thank you in case you have a working example.

    Thank you again!

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    it would likely require having the page refresh first so that the meta data can be saved and then queried for first.

    dkurth

    (@dkurth)

    I choice not to use the conditional example for very similar reasons and the alternative method suited the need.

    The show_cb solution is not interactive persay aka driven by user selections. It is database driven so you can mix record types using the same cmb2 field set.

    If you need the user interactive solution, the example looks like a good starting point.

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

The topic ‘Conditional field still required when hidden’ is closed to new replies.