You are here

function _conditional_fields_admin_submit in Conditional Fields 6

Same name and namespace in other branches
  1. 5 conditional_fields.module \_conditional_fields_admin_submit()
  2. 6.2 conditional_fields.module \_conditional_fields_admin_submit()

File

./conditional_fields.module, line 167
Content fields and groups visibility based on the values of user defined 'trigger' fields.

Code

function _conditional_fields_admin_submit($form, &$form_state) {
  $type = $form['#parameters'][2];
  variable_set('c_fields_js_' . $type, $form_state['values']['js']);
  variable_set('c_fields_animation_' . $type, $form_state['values']['animation']);
  variable_set('c_fields_anim_speed_' . $type, $form_state['values']['anim_speed']);
  variable_set('c_fields_view_' . $type, $form_state['values']['orphaned_view']);
  variable_set('c_fields_edit_' . $type, $form_state['values']['orphaned_edit']);
  variable_set('c_fields_reset_default_' . $type, $form_state['values']['reset_default']);
  variable_set('c_fields_show_all_' . $type, $form_state['values']['show_all']);
  drupal_set_message(t('Conditional fields options for this content type saved.') . $message);
  if ($form_state['values']['delete'] == 1) {
    conditional_fields_node_type_delete($type);
    drupal_set_message(t('All configured conditional fields for this content type have been deleted.'));
  }
}