function ife_form_alter in Inline Form Errors 6.2
Same name and namespace in other branches
- 6 ife.module \ife_form_alter()
- 7.2 ife.module \ife_form_alter()
- 7 ife.module \ife_form_alter()
Implementation of hook_form_alter().
File
- ./
ife.module, line 138 - Drupal hooks
Code
function ife_form_alter(&$form, $form_state, $form_id) {
$ife_options = ife_form_id_load($form_id);
if ($ife_options->status) {
$display = ife_form_id_display($ife_options);
ife_filter_form($form, $display);
//if a general message is set run the validator
if ($display == 1) {
$form['#validate'][] = 'ife_form_validator';
}
}
//print form_ids
if (variable_get('ife_show_form_ids', 0)) {
$form['ife_form_id'] = array(
'#type' => 'item',
'#value' => t('Form ID: ') . $form_id,
'#weight' => -1000,
'#access' => user_access('administer inline form errors'),
);
}
}