Home › Forums › Bug Reports › Update field for multiple choose with array › Reply To: Update field for multiple choose with array
Hello,
i clean the code
if( is_array($value) ) {
foreach ($value as $key => $val) {
//echo var_dump($val);
if ( isset($val['value']) ) {
$value[$key] = $val['value']; // when value is available, like return value/label with API in json
} else {
$value = array_map('strval', $value); // will get directly the parent array
}
}
}
@team, do you need more informations for apply this fix to ACF ?
Thanks
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.