Closed (fixed)
Project:
Hierarchical Select
Version:
6.x-3.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
22 Oct 2009 at 13:07 UTC
Updated:
27 Oct 2009 at 14:05 UTC
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
Comment #1
wim leersIt's simply Forms API. Nothing special.
You can read in API.txt how to configure a HS form item.
Comment #2
bassam commentedYou're a life saver man.
Thanks a lot :)
Comment #3
wim leersNo problem :)
Comment #4
bassam commentedHi 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' => '',
);
Comment #5
wim leersSounds 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.
Comment #6
bassam commentedHope this helps
http://screencast.com/t/tZ0AVT9sU
Comment #7
bassam commentedComment #8
wim leersProbably 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 :)
Comment #9
bassam commentedThank a lot :)