Using ajax to process textfield in Drupal 7 Inside of a hook_form_alter function, I want to leverage the #ajax property to modify/update database tables without leaving the form... In other words, I want the user to be able to fill in the field and either "tab", "click" or "enter" and have ajax respond. 

The response should be an update of that field being displayed as well as an update to the DB...

If I can get the call back to wakeup, the DB call is easy. And hopefully the form displays that new data. Code I have so far is:

$form['license'] = array(
  '#type' =&gt; 'textfield',
  '#title' =&gt; t('License'),
  '#size' =&gt; 20,
  '#default_value' =&gt; 'default license',
  '#required' =&gt; FALSE,
  '#weight' =&gt; 10,
  '#ajax' =&gt; array(
    '#callback' =&gt; 'license_fillin_js',
    '#event' =&gt; 'change',
    .
    .
    .

  ),


So far, nothing seems to be waking up the callback.

This is probably very simple! Right?
change it to and then try again.

$form['license'] = array(
  -
  -
  '#ajax' =&gt; array(
    'callback' =&gt; 'license_fillin_js',
    'event' =&gt; 'change',
    .
    .
    .

  ),


As an example you can check this link