Home › Forums › General Issues › Repeater field + Auto populate select › Reply To: Repeater field + Auto populate select
Hi,
I’m not able to make this work.
I have added:
function my_acf_load_field2( $field )
{
$field['choices'] = array(
'custom' => 'My Custom Choice'
);
return $field;
}
// acf_load_field-{$field_key} - filter for a specific field based on it's key
add_filter('acf_load_field-field_520fa5c4c3ce6', 'my_acf_load_field2');
to my functions.php, but it doesn’t work.
I’m trying to populate select field:
<select id="acf-field-reserve_country" class="select" name="fields[field_520fa5c4c3ce6]">
I use ACF as a plugin.
Doing something wrong?
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.