You are here

function _webform_edit_shs in Webform Simple Hierarchical Select 7

Implements _webform_edit_component().

File

components/shs.inc, line 29
Webform simple hierarchical select component.

Code

function _webform_edit_shs($component) {
  $options = array();
  foreach (taxonomy_get_vocabularies() as $vocabulary) {
    $options[$vocabulary->vid] = $vocabulary->name;
  }
  $form['extra']['vid'] = array(
    '#type' => 'select',
    '#title' => t('Vocabulary'),
    '#options' => $options,
    '#default_value' => $component['extra']['vid'],
  );
  $form['extra']['multiple'] = array(
    '#type' => 'checkbox',
    '#title' => t('Multiple'),
    '#default_value' => $component['extra']['multiple'],
    '#description' => t('Check this option if the user should be allowed to choose multiple values.'),
    '#weight' => 0,
  );
  return $form;
}