function om_tools_alter_form in OM Tools 6.2
OM Tools alter forms processor
1 call to om_tools_alter_form()
- om_tools_form_alter in ./
om_tools.module - Implementation of hook_form_alter().
File
- inc/
om_tools.utils.inc, line 16 - OM Tools Admin Utilities
Code
function om_tools_alter_form(&$form, &$form_state, $form_id) {
$om_tools_values = variable_get('om_tools', '');
//dsm($form);
$tools = om_tools_get();
foreach ($tools as $key => $module) {
if (isset($om_tools_values[$module])) {
$form['om_' . $module . '_tools_values']['#type'] = 'hidden';
$form['om_' . $module . '_tools_values']['#value'] = $om_tools_values[$module];
include_once drupal_get_path('module', 'om_tools') . '/tools/' . $module . '/' . $module . '.inc';
$function = 'om_' . $module . '_alter_form';
if (function_exists($function)) {
$function($form, $form_state, $form_id);
}
// this avoids inclusion in the actual output of form
unset($form['om_' . $module . '_tools_values']);
}
}
}