Support

Account

Home Forums General Issues Problem using update_field with user field Reply To: Problem using update_field with user field

  • Hi @esedeerre

    For complex fields, ACF stores the value in wp_postmeta as a serialized PHP array.

    Hmm… I believe you should be able to update the user field using update_field(…) function. The code should look something like this:

    $administradores[] = $new_user_id;
    update_field( $field_key, $administradores, $post_id );

    where $new_user_id is the ID of a new user and $administradores contains user IDs of the previously selected users.