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' => 'textfield',
'#title' => t('License'),
'#size' => 20,
'#default_value' => 'default license',
'#required' => FALSE,
'#weight' => 10,
'#ajax' => array(
'#callback' => 'license_fillin_js',
'#event' => 'change',
.
.
.
),
So far, nothing seems to be waking up the callback.
This is probably very simple! Right?