Hi,

The Scheme control box in Access By Taxonomy page, shows only 4 lines of taxonomies; can any one advise how to make it display more lines?

Thanks

Comments

msamavi’s picture

Still I need the selection box to be resizable.
Any help please?

Dave Cohen’s picture

I don't think a "resizable" select is built into drupal. But there is a "#size" form field setting that could make it more than 4. The question then becomes how large to make it. Any preference?

msamavi’s picture

Thanks Dave for the reply.
30 lines would be fine for me.

phily’s picture

Issue summary: View changes

Some tips for a long timed post:

• Adding .resizable(); to the select element using jQuery makes it resizable:
$('#edit-tac-lite-grants-scheme-1-1-3').resizable();

• hack _tac_lite_term_select function in tac_lite.module file to add '#size' => 20 to the $field_array variable:

function _tac_lite_term_select($v, $default_values = array()) {
  $tree = taxonomy_get_tree($v->vid);
  $options = array(0 => '<' . t('none') . '>');
  if ($tree) {
    foreach ($tree as $term) {
      $choice = new stdClass();
      $choice->option = array($term->tid => str_repeat('-', $term->depth) . $term->name);
      $options[] = $choice;
    }
  }
  $field_array = array(
    '#type' => 'select',
    '#title' => $v->name,
    '#default_value' => $default_values,
    '#options' => $options,
    '#multiple' => TRUE,
    '#size' => 20, // EXPANDS THE NUMBER OF ITEMS SHOWN IN THE SELECT BOX
    '#description' => $v->description,
  );
  return $field_array;
}

Shouldn't be hard to add this in code ;-)