Home › Forums › Bug Reports › issues related to field key references › Reply To: issues related to field key references
Elliot,
yes. we are using the field_name within our app/importer. The reason for this is because we have several environments (e.g. dev. / staging / production) where the field_keys are not guaranteed to be the same on each system. We also have hundreds of ACFs defined. This is why the lookup is so important.
anyways, the important issue with regards to my OP is that the workaround, whereas we populated the reference ‘_text’ with a value of ‘text’ (as an example) and ‘text’ had a proper value in it, was working fine with wordpress 3.5 but then stopped working properly in conjunction with the wordpress 3.7.1 upgrade.
specifically with regards to radio buttons in which the get_field_object() function appears to be prepending ‘field_’ to the value that is stored in the reference (in this example ‘_text’)
so, let’s use the following example:
meta_key = ‘radio_button’, meta_value = ‘pick me!’
meta_key = ‘_radio_button’, meta_value = ‘radio_button’
get_field_object() is returning ‘field_radio_button’ for the value of ‘_radio_button’ meta_key. it should be returning ‘radio_button’ as the value of the ‘_radio_button’ meta_key, but it’s prepending ‘field_’ and thus the actual values are not being properly returned as an object. (and subsequently as a result the [‘choices’] array element does not exist within the returned object)
Regards,
Alan
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.