Support

Account

Home Forums Backend Issues (wp-admin) Use options page values in a radio button field

Solved

Use options page values in a radio button field

  • I have an advanced custom repeater field that has radio buttons. I want the user to be able to add and delete values to the radio button field. Preferably via an options page. Is this possible?

  • Hi @robertocoppi

    Just to clarify, do you want a repeater field on the options page where your client can edit a list of choices? These choices would be used to populate a radio field somewhere else?

    There is already a tutorial for this:
    http://www.advancedcustomfields.com/resources/tutorials/dynamically-populate-a-select-fields-choices/

  • Hi Elliot,

    Thanks for you reply. I would like to take it one step further and populate a radio field in another repeater with the values from the options page.

    Is that possible?

  • Hi @robertocoppi

    Yes, the tutorial shows how to populate a select field, this is exactly the same procedure as a radio button field.

    The fact that the field appears in a repeater is not relevant. As a tip, please use the field_key to target the load_field filter!

    Thanks
    E

  • Thans Elliot,

    I think I’m not explaining myself properly. I don’t want a radio button field on the front end of the website populated by a list from the options page. I want a radio button field on the back end populated.

    So my cliënt is a photographer and has a portfolio. He can add pictures via a repeater and assign a category and set to an image. I want these categories and sets to be editable as well and be predefined by me in the custom fields admin panel.

    Thanks!

  • Hi @robertocoppi

    Yes, this is exactly what I interpreted it as.

    The acf/load_field filter will allow you to modify the field in the ‘back-end’. You can populate the choices element of the $field array and your client will see the choices when inputting data.

    All is explained in the above tutorial

  • Sorry for wasting your time. You we’re right all along and I misunderstood you. Thanks for the great help and great plugin.

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

The topic ‘Use options page values in a radio button field’ is closed to new replies.