You are here

function rules_action_taxonomy_add_vocab_form in Rules 6

Action: Create a new vocabulary configuration form.

See also

rules_action_taxonomy_add_vocab_submit().

Related topics

File

rules/modules/taxonomy.rules_forms.inc, line 139
Rules configuration forms for the taxonomy module.

Code

function rules_action_taxonomy_add_vocab_form($settings, &$form, $form_state) {
  module_load_include('inc', 'taxonomy', 'taxonomy.admin');
  $form['settings']['vocab'] = array(
    '#type' => 'fieldset',
    '#title' => t('Vocabulary settings'),
  );
  $form['settings']['vocab']['vocab'] = taxonomy_form_vocabulary($form_state, !empty($settings) ? $settings : array());

  // Remove the 'Save' button.
  unset($form['settings']['vocab']['vocab']['submit']);
}