I am trying to use hook form alter to add an onchange attribute to a select field but it is not working. Is it possible or is there something wrong with my module code?
function addonchange_form_alter(&$form, &$form_state, $form_id){
// target a single form
if($form_id == "webform_client_form_22"){
$form['submitted']['company']['#onchange'] = 'changevalue';
}
}
Thanks for any help.