Support

Account

Home Forums General Issues Updating fields in Groups in acf/save_post Reply To: Updating fields in Groups in acf/save_post

  • The true way for update / create a sub field of a group is with this :
    update_field('the_group', array('the_element_to_update'=>$value), $post_id)

    With this way :update_field('the_group_the_element_to_update', $value, $post_id)
    If the field has’nt been created before, it don’t work, because in the database the meta_data _the_group_the_element_to_update is empty and then, you can’t get the value of the field.
    `get_field(‘the_group’, $post_id)[‘the_element_to_update’] is empty.