function field_validation_match_field_validator::settings_form in Field Validation 7.2
Provide settings option.
Overrides field_validation_validator::settings_form
File
- plugins/
validator/ field_validation_match_field_validator.inc, line 53
Class
Code
function settings_form(&$form, &$form_state) {
$default_settings = $this
->get_default_settings($form, $form_state);
// Print debug($default_settings);
$form['settings']['entity_type'] = array(
'#title' => t('Entity type'),
'#description' => t("Machine name. Entity type of the field that to be matched against."),
'#type' => 'textfield',
'#default_value' => isset($default_settings['entity_type']) ? $default_settings['entity_type'] : '',
);
$form['settings']['bundle'] = array(
'#title' => t('Bundle'),
'#description' => t("Machine name. Bundle of the field that to be matched against."),
'#type' => 'textfield',
'#default_value' => isset($default_settings['bundle']) ? $default_settings['bundle'] : '',
);
$form['settings']['field_name'] = array(
'#title' => t('Field name'),
'#description' => t("Machine name. Name of the field that to be matched against."),
'#type' => 'textfield',
'#default_value' => isset($default_settings['field_name']) ? $default_settings['field_name'] : '',
);
$form['settings']['column'] = array(
'#title' => t('Column'),
'#description' => t("Column of the field that to be matched against."),
'#type' => 'textfield',
'#default_value' => isset($default_settings['column']) ? $default_settings['column'] : '',
);
$form['settings']['reverse'] = array(
'#title' => t('Reverse'),
'#description' => t("If it is checked, it means must not match the field."),
'#type' => 'checkbox',
'#default_value' => isset($default_settings['reverse']) ? $default_settings['reverse'] : FALSE,
);
parent::settings_form($form, $form_state);
}