Home › Forums › Backend Issues (wp-admin) › New field type: how to save data › Reply To: New field type: how to save data
Hi,
Everything seems to work better now that I have adjusted the values for name and value:
'name' => $key.'[interactive_image_tag'.$tagnr.'][top]', 'value' => $field['value']['interactive_image_tag'.$tagnr]['top']
Now things do get saved to the database. I have a new field[‘value’] array that is filled with the data. But something with the default values is still going wrong.
When I use the reference to the defaults, I always see the default value.
When I use the reference to the real values, I don’t get the default fallback.
I have applied $field = array_merge($this->defaults, $field);
.
Updated code is at https://gist.github.com/jelmerdemaat/7661494
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.