Support

Account

Home Forums Front-end Issues acf_form(): unable to select and save data to group sub fields Reply To: acf_form(): unable to select and save data to group sub fields

  • You are confusing ACF by trying to include only sub fields. When you do this ACF does not know when the form is submitted that the values belong to sub field and thinks they belong in top level fields. So, basically, you can’t do this.

    The way to do this is to include the group and then not show the field you don’t want updated using an acf/prepare_field filter.

    
    // use the field key for sub fields
    add_filter('acf/prepare_field/key=field_XXXXX', 'hide_field_on_front');
    function hide_field_on_front($field) {
      if (!is_admin()) {
        // front end of site, do not show field
        return false;
      }
      return $field;
    }