function asaf_form_alter in Asaf (ajax submit for any form) 7
Same name and namespace in other branches
- 8 asaf.module \asaf_form_alter()
File
- ./
asaf.module, line 33
Code
function asaf_form_alter(&$form, &$form_state, $form_id) {
$buttons = asaf_is_handled_form($form_id);
if (variable_get('asaf_show_form_ids', 0)) {
drupal_set_message(t('Form id: %form_id', array(
'%form_id' => $form_id,
)));
}
if (isset($buttons) && is_array($buttons)) {
$options = array();
if (variable_get('asaf_autoload_form_stuff', FALSE)) {
$options['needed_files'] = asaf_get_form_stuff($form, $form_state, $form_id);
}
asaf_prepare_form($form, $form_state, $buttons, $options);
}
}