Home › Forums › Bug Reports › acf_get_value notice incorrect › Reply To: acf_get_value notice incorrect
Hi John,
$fields = acf_get_local_store('fields');
$fields->aliases
This is the internal array in the ACF store that holds a mapping with field names to field ids.
Here’s a very minimalistic representation of what I’m doing:
acf_add_local_field_group([
"key" => "group_Feature toggles",
"title" => "Feature Toggles",
"fields" => [
[
"type" => "true_false",
"name" => "anchor_tags",
"label" => "Anchor Tags",
"key" => "field_feature_toggles_anchor_tags",
],
]
]);
get_field('anchor_tags', 'option');
The aliases array contains:
"anchor_tags" => "field_feature_toggles_anchor_tags"
So my pre load value work around just fetches the field key from the internal store and uses that to fetch the value instead of the name solving the issue.
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.