Support

Account

Home Forums Backend Issues (wp-admin) How to make checkbox with different custom values for every item

Solving

How to make checkbox with different custom values for every item

  • Hello,
    i need add checkbox, where values will not shared across all CPT items, but in every checkbox will different, depend what user will add there.

    Ï need on frontend show all values in checkbox. Checked also unchecked. But different values in every item.

    Item 1 – checkbox values:
    airplane – checked
    bus – unchecked
    car – checked

    On frontend will displayed all values. Bus will have different class, because it is unchecked.
    Lets say unchecked values will with grey background, checked with green background.

    Item 2:
    cake – checked
    bread – unchecked
    banana – checked

    Now the problem is, car,bus,airplane is showing also with cake,bread,banana.

    How to make checkbox values will different in every item?

  • Is there any hook to do this or is it real so unfinished function in plugin?

  • ACF does not provide any functionality for conditional choices.

    This would have to be created by you. ACF provides several hooks that could potentially be used to code.
    acf/load_field
    acf/prepare_field
    acf/load_value

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.