Home › Forums › Backend Issues (wp-admin) › Automatically setting default settings on new multisite install › Reply To: Automatically setting default settings on new multisite install
The first thing is that when updating fields that do not always have values then you need to use the field key. This is covered in the documentation.
I would set the entire group using update_field()
$value = array( // a group field's value is an array // sub field key => value pairs // this is a simple sub field 'field_xxxxx' => 'value', // a nested group would be a nested array 'field_yyyyy' => array( // nested group field 'field_zzzzz' => 'value of field', ) ); update_field('field_ggggg', $value, 'options');
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!
© 2022 Advanced Custom Fields.