function conditional_fields_forms_submit in Conditional Fields 6
Same name and namespace in other branches
- 5 conditional_fields.module \conditional_fields_forms_submit()
- 6.2 conditional_fields.module \conditional_fields_forms_submit()
Handle saving of conditional field settings. The controlled field can be either a field or a group
2 string references to 'conditional_fields_forms_submit'
- conditional_fields_content_admin_field in ./
conditional_fields.module - Alteration of the field editing form
- conditional_fields_fieldgroup_group_edit_form in ./
conditional_fields.module - Alteration of the fieldgroup editing form
File
- ./
conditional_fields.module, line 528 - Content fields and groups visibility based on the values of user defined 'trigger' fields.
Code
function conditional_fields_forms_submit($form, &$form_state) {
isset($form_state['values']['field_name']) ? $controlled_field = $form_state['values']['field_name'] : ($controlled_field = $form_state['values']['group_name']);
isset($form['#field']['type_name']) ? $type = $form['#field']['type_name'] : ($type = $form['#content_type']['type']);
conditional_fields_save_field($type, $controlled_field, $form_state['values']['conditional_fields']);
}