You are here

function hs_content_taxonomy_common_config_form_submit in Hierarchical Select 5.3

Same name and namespace in other branches
  1. 6.3 modules/hs_content_taxonomy.admin.inc \hs_content_taxonomy_common_config_form_submit()

Additional submit callback to update the multiple values field setting.

File

modules/hs_content_taxonomy.module, line 166
Implementation of the Hierarchical Select API for the Content Taxonomy module.

Code

function hs_content_taxonomy_common_config_form_submit($form_id, $form_values, $content_type_name, $field_name) {
  $config = $form_values['hierarchical_select_config'];
  $multiple_values = $config['save_lineage'] | $config['dropbox']['status'];
  $content_type = content_types($content_type_name);
  $field = $content_type['fields'][$field_name];
  $form_values = array(
    'widget_type' => 'content_taxonomy_hs',
    'label' => $field['widget']['label'],
    'weight' => $field['widget']['weight'],
    'description' => $field['widget']['description'],
    'required' => $field['required'],
    'multiple' => $multiple_values,
    'save' => $field['save'],
    'vid' => $field['vid'],
    'tid' => $field['tid'],
    'depth' => $field['depth'],
    'op' => t('Save field settings'),
    'submit' => t('Save field settings'),
    'type_name' => $field['type_name'],
    'field_name' => $field_name,
    'field_type' => 'content_taxonomy',
    'module' => 'content_taxonomy, hs_content_taxonomy',
    'form_id' => '_content_admin_field',
  );
  drupal_execute('_content_admin_field', $form_values, $field['type_name'], $field_name);
}