How to add exist taxonomy term field to custom form It's possible to add exists taxonomy reference field to new custom form?

For example: i have a term field named "field_tags" and would like to add to new form ->

  $form['node_taxonomy_term'] = // load here exists taxonomy autocomplete field "field_tags"
  $form['#submit'][] = 'save_node_terms';
  return $form;
Not exactly i think, but you can implement next:

$form['node_taxonomy_term'] = array(
  '#type' =&gt; 'textfield',
  '#autocomplete_path' =&gt; 'ntt/autocomplete',
);


add menu callback for autocomplete path

function HOOK_menu() {
  $items = array();

  $items['ntt/autocomplete'] = array(
    'page callback' =&gt; 'node_taxonomy_term_autocomplete',
    'page arguments' =&gt; array(2),
    'type' =&gt; MENU_CALLBACK,
  ); 
  return $items;
}


and add callback function

function node_taxonomy_term_autocomplete($str = 0) {
  $matches = array();
  //vocabulary id
  $vid = 2;

  $result = db_select('taxonomy_term_data', 't')
    -&gt; fields('t', array('tid', 'name'))
    -&gt; condition('vid', $vid, '=')
    -&gt; condition('name', $str.'%%', 'LIKE')
    -&gt; range(0, 10)
    -&gt; execute();

  foreach ($result as $term) {
    $matches[$term -&gt; tid] = check_plain($term -&gt; name);
  }

  drupal_json_output($matches);
}


enjoy