Support

Account

Home Forums ACF PRO Set value of ACF on user role Reply To: Set value of ACF on user role

  • Hey Bee

    This is on the post creation admin screen – so by default depending on the user thats logged in and their role different values would be selected.

    It might not be the most elegant code but I did come up with a solution for this one

    $user_access_level = current_user_can('gold');
    
    if ( $user_access_level == true ){
      $field['choices'] = array('standard', 'gold');
      $field['default_value'] = 1;
    }