Home › Forums › Backend Issues (wp-admin) › 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?
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?
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!
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.
The topic ‘Use options page values in a radio button field’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.