Support

Account

Home Forums Backend Issues (wp-admin) ACF select for each item in an array?

Helping

ACF select for each item in an array?

  • Not sure if this is even possible –
    I have an array of items, say items A through D. I want to list them on the left on an options page, and for each one, have the same ACF select box on the right. For instance:

    A | ACF SELECT BOX
    B | ACF SELECT BOX
    C | ACF SELECT BOX
    D | ACF SELECT BOX

    Now the array on the left could change, could be A through C, or A through J, or whatever.

    I could do this in straight PHP/Wordpress code, but was hoping to use ACF because then could change the select box options in Admin easily, without having to go re-code and re-deploy.

    Any ideas?

  • You can create an ACF group and store it as the options for your selections, maybe use an Options page as a settings page. Using PHP you can dynamically generate the “left side” then for each loop grab the fields from that settings page to build the select box.

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

You must be logged in to reply to this topic.