function conditional_fields_field_overview_form_validate in Conditional Fields 6
Same name and namespace in other branches
- 6.2 conditional_fields.module \conditional_fields_field_overview_form_validate()
Conditional fields can't change group.
1 string reference to 'conditional_fields_field_overview_form_validate'
- conditional_fields_field_overview_form in ./
conditional_fields.module - Find conditional fields and mark them.
File
- ./
conditional_fields.module, line 911 - Content fields and groups visibility based on the values of user defined 'trigger' fields.
Code
function conditional_fields_field_overview_form_validate($form, $form_state) {
$data = conditional_fields_load_data($form['#type_name'], 'flat');
foreach ($form['#fields'] as $field_name) {
if ($data[$field_name] && $form_state['values'][$field_name]['parent'] != $form_state['values'][$field_name]['prev_parent']) {
form_set_error('', t("You can't change the parent group of a conditional field."));
}
}
}