Support

Account

Home Forums General Issues Best way to allow user to create field choices?

Helping

Best way to allow user to create field choices?

  • Hi,

    I’m using ACF in the theme for sale and hiding it from the admin area.

    What would be the best way to allow user to create a field choices once and then use them as radio button choices?

    E.g. I want to create a field called “Meal Preference”, yet I can’t hardcode it since it will differ from user to user:

    User 1 will set: Meat · Fish · Vegetarian
    User 2 will set: Fish · Vegetarian
    Then I’d like to use these values as choices in radio button group.

    Should I create an options page with let’s say textarea or is there a better way?

  • The best way would be to create an options page to allow the setup of values and then dynamically set the field choices based on these values. See this example https://www.advancedcustomfields.com/resources/dynamically-populate-a-select-fields-choices/, it deals with a select field but radio and checkbox fields work the same way.

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

You must be logged in to reply to this topic.