Adding autocomplete to title field of node form I created a small custom module to help users while creating a specific content type.  Basically the module just adds the autocomplete feature to the title field to show possible duplicate nodes to the user while filling out the form for "on-the-fly" feedback.  

The problem is that the autocomplete only works for users with the permission 'Administer nodes'.  Is this normal or am I doing something wrong?  If it is normal, is there another way to achieve these results without handing out that permission?

Custom module:  

&lt;?php
/**
 * Implementation of hook_menu()
 */
function duplicates_menu() {
  $items = array();
  $items['duplicates/check'] = array(
    'title' =&gt; 'Check for duplicates',
    'page callback' =&gt; 'duplicates_check',
    'access callback' =&gt; TRUE,
    'type' =&gt; MENU_CALLBACK,
  );
  return $items;
}

/**
 * Implementation of hook_form_alter()
 */
function duplicates_form_alter(&amp;$form, $form_state, $form_id) {
  if ($form_id == 'company_node_form') {
    $form['title']['#autocomplete_path'] = 'duplicates/check';
  }
}

/**
 * Check for duplicates
 */
function duplicates_check($check) {
  $duplicates = array();
  if ($check) {
    $results = db_query('SELECT title FROM {node} WHERE type = "company" AND LOWER(title) LIKE LOWER("%%%s%%")', $check);
    while ($dupes = db_fetch_object($results)) {
      $duplicates[$dupes-&gt;title] = check_plain($dupes-&gt;title);
    }
  }
  print drupal_json($duplicates);
}
Avoid a custom implementation and use the Unique Field Module. Once this module is enabled, it adds a 'Unique field settings' section to each content type's administration page for specifying which fields (Including node title) for that content type must be unique.The administrator may choose whether the fields must be unique among all other nodes, among nodes of the same content type, or of the same language. You can also set it to display the nodes that match the title.