Hi,

I'm customizing user registration form. I use taxonomy_term_select to display a select containing terms. I also use the module Hirarchical Select. I would like my select to have the same look than the hirarchical Select.

/* I would like it to be a hierarchical Select like in create content */
	$form['business']['location']= _taxonomy_term_select(
		'Location', 
		'location', 
		'', 
		$vid, 
		'Description here if needed',
		'',
		false
	);

Does anyone know how to do that?

Thanks for any help

Comments

damic’s picture

  $form['business']['b_directory'] = array(
  	'#type' => 'hierarchical_select',
  	'#title' => t('Directory'),
  	'#size' => 1,
  	'#config' => array(
  	'module' => 'hs_taxonomy',
  	'params' => array(
  	'vid' => $vid,

  ),
  	'save_lineage'    => 0,
  	'enforce_deepest' => 0,
  	'entity_count'    => 0,
  	'require_entity'  => 0,
  	'resizable'       => 1,
  	'level_labels' => array(
  	'status' => 0,
  	'labels' => array(
  	  0 => t('Main category'),
  	  1 => t('Subcategory'),
  	  2 => t('Third level category'),
     ),
  ),
  	'dropbox' => array(
  	'status'   => 0,
  	'title'    => t('All selections'),
  	'limit'    => 0,
  	'reset_hs' => 1,
  ),
  	'editability' => array(
  	'status'           => 0,
  	'item_types'       => array(),
  	'allowed_levels'   => array(
  	  0 => 0,
  	  1 => 0,
  	  2 => 1,
  ),
  	'allow_new_levels' => 0,
  	'max_levels'       => 3,
  ),
  	// These settings cannot be configured through the UI: they can only be
  	// overridden through code.
  	'animation_delay'    => 400,
  	'special_items'      => array(),
  	'render_flat_select' => 0,
  	'path'               => 'hierarchical_select_json',
  ),
  	'#default_value' => '',
  );