+1000 for this feature request! I recently had issues with a client’s search form that uses custom field data that was broken because it was using an old custom field structure that was no longer in place, and I had no idea that was an issue. Please please add this feature soon!
+1000 for this feature request! I recently had issues with a client’s search form that uses custom field data that was broken because it was using an old custom field structure that was no longer in place, and I had no idea that was an issue. Please please add this feature soon!
Perfect! Thanks very much for your help
Thanks for your quick reply! Your example worked to compare the values, but the $old_value is returning an array rather than a single value. This is the output from print_r($field):
Array ( [key] => field_56607351f4d8b [label] => Delivery Method [name] => delivery_method [_name] => delivery_method [type] => text [order_no] => 1 [instructions] => [required] => 0 [id] => acf-field-delivery_method [class] => text [conditional_logic] => Array ( [status] => 0 [allorany] => all [rules] => 0 ) [default_value] => [allow_null] => 0 [multiple] => 0 [formatting] => html [maxlength] => [placeholder] => [prepend] => [append] => ) 1
I’m not sure the difference between [name] and [_name] but perhaps since they have the same value, that’s why I’m getting an array?
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.