function conflict_form_node_form_alter in Conflict 7
Implements hook_form_FORM_ID_alter().
File
- ./
conflict.module, line 22 - Fieldwise conflict prevention and resolution. @author Brandon Bergren
Code
function conflict_form_node_form_alter(&$form, &$form_state) {
// Force caching enabled so the original $form['node'] survives multiple page
// requests.
if (variable_get('conflict_enable_' . $form['#node']->type, FALSE)) {
$form_state['cache'] = TRUE;
}
// Highlight conflict or expired fields.
if (!empty($form_state['temporary']['conflict_fields'])) {
foreach ($form_state['temporary']['conflict_fields'] as $field_name) {
_conflict_apply_error($form[$field_name]);
}
}
}