Support

Account

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