form

Ajax Autocomplete Textfield for Nodes

function module_name_form() {
  $form = array();
 
  $form['nid'] = array(
    '#title' => t('Nodes'),
    '#type' => 'textfield',
    '#autocomplete_path' => 'example/autocomplete',
   );
 
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Save',
  );
 
  return $form;
}
function module_name_menu() {  
  $items['example/autocomplete'] = array(
    'page callback' => '_module_name_autocomplete',
    'access arguments' => array('access example autocomplete'),
    'type' => MENU_CALLBACK
  );
  return $items;
}
  

Change button name using form_alter

<?php
/**
* Implementation of hook_form_alter().
*
* The function is named modulename_form_alter.
*/
function my_hook_module_form_alter(&$form, $form_state, $form_id) {
// Normally a switch is used because you may want to alter more than
// one form and it is easy to add a new case for each form.
switch ($form_id) {
// This is our form ID.
case 'my_new_form_node_form':
// Our kickin' mods go here.
$form['submit'] = array(
'#type' => 'submit',