Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've a taxonomy vocabulary and creting a custom field using the HS form API. My taxonomy structure like the following-
A
-B
--D
--E
-C
---F
I need to hide the root term when population the term and populated the field field starting from chield level.
The code to generate the field is-
$form['test']['#title'] = t('Category?');
$form['test']['#type'] = 'hierarchical_select';
$form['test']['#config'] = array(
'module' => 'hs_taxonomy',
'params' => array(
'vid' => $vocabulary->vid,
'exclude_tid' => NULL,
'root_term' => TRUE,
'entity_count_for_node_type' => NULL,
),
'enforce_deepest' => 0,
'entity_count' => 0,
'require_entity' => 0,
'save_lineage' => 0,
'dropbox' => array(
'status' => 1,
'limit' => 0,
),
'editability' => array(
'status' => 0,
),
'render_flat_select' => 0,
);
Can anyone help me.