Hi,

I'm trying to build custom node edit forms. I want to use taxonomy HS and I want to spread out the fields in different fieldsets.

How can I do this? is there a documentation on this?

One other note, I want to be able to use the multiple terms select feature as well.

Thanks

Comments

wim leers’s picture

Assigned: Unassigned » wim leers
Status: Active » Fixed

It's simply Forms API. Nothing special.

You can read in API.txt how to configure a HS form item.

bassam’s picture

You're a life saver man.

Thanks a lot :)

wim leers’s picture

No problem :)

bassam’s picture

Status: Fixed » Active

Hi again, I used the code below and I ran into a problem. Not all of the terms are loaded. There are about 25 terms and when the form renders it only shows 4 items.
- A
- A1
- B
- B1

$form['institute_type'] = array(
'#type' => 'hierarchical_select',
'#title' => t('Institute Type'),
'#size' => 1,
'#config' => array(
'module' => 'hs_taxonomy',
'params' => array(
'vid' => 2,
'exclude_tid' => NULL,
'root_term' => NULL,
),
'save_lineage' => 0,
'enforce_deepest' => 1,
'entity_count' => 0,
'require_entity' => 1,
'resizable' => 0,
'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 => 1, 1 => 1, 2 => 1, ),
'allow_new_levels' => 0,
'max_levels' => 100,
),
// 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' => '',
);

wim leers’s picture

Status: Active » Postponed (maintainer needs more info)

Sounds impossible.

Please make a screencast of it.

P.S.: don't have any screencast software yet? On Windows and Mac OS X, you can use the free Jing.

bassam’s picture

bassam’s picture

Status: Postponed (maintainer needs more info) » Active
wim leers’s picture

Status: Active » Fixed

Probably found it.

You have
'require_entity' => 1,
in your configuration. This means that a node must be associated with a term before it will be shown. You probably don't have that enabled for the normal node form.

Set it to 0 and all terms will appear once again :)

bassam’s picture

Status: Fixed » Closed (fixed)

Thank a lot :)