function nome modulo_form_alter(&$form, &$form_state, $form_id) {
switch ($form_id) {
case 'id_form':
dsm($form_id);
$form['#after_build'][] = 'nomemodulo_after_build';
break;
}
}
function nomemodulo_after_build($form, &$form_state) {
$path = drupal_get_path('module', 'nomemodulo');
drupal_add_js ("$path/custom_javascript.js");
return $form;
}
Nessun commento:
Posta un commento