How to use autocomplete text field in fieldset? I want to use a textbox with autocomplete features. I have gone through the drupal form API and found the solution at here. 

It's working fine if I am using this directoly in the form fields. But it's not working if I am using this any Field collections item in profile2 fields.

I am using profile2 fields with fieldscollection and following is my code. 

/*profile_2_type is id for profile 2 module and it's not working for me*/    
$form['profile_2_type']['field_test_auto_cmplete']['#autocomplete_path'] = 'user/autocomplete';

/*Here is the code which is working for me for node fields */
$form['title']['#autocomplete_path'] = 'user/autocomplete';
finally got the solution
here is updated code

$form['profile_2_type']['field_test_auto_cmplete']['und'][0]['value']['#autocomplete_path'] = 'user/autocomplete';


and "user/autocomplete" only works for admin users