Closed (fixed)
Project:
Hierarchical Select
Version:
5.x-1.4
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2007 at 12:33 UTC
Updated:
23 Nov 2007 at 13:53 UTC
I'm building a custom multistep form, where i want to get a term from a 2 level vocabulary. My vocabulary looks like:
town1
-district1
-district2
-district3
town2
town3
town4
-district21
-district22
town5
and so on.
I can get the terms, and the form renders smoothly and seems to work fine. It "seems" because i cannot get the value of the second level.
this is what the form entry looks like:
$form['step']['tid']=array(
'#type'=>'hierarchical_select',
'#title'=>t('Region'),
'#options'=>$options,
'#description'=>t('Choose District and then Municipality'),
'#required'=>TRUE,
'#hierarchical_select_settings'=> array(
'module'=>'taxonomy',
'params'=>array (
'vid'=>'5',
),
),
);
When i print $form['step']['tid'] during validation i only get the value (tid) of the first level of taxonomy. I really cannot figure out what's going on!
I use the same vocabulary in a certain content type and it works perfectly!
Thanks in advance for any help!
Comments
Comment #1
porfyros commentedto be more specific, i only get the town value. When i select town4, i do get a second select with "district21" and "district22" but the $form['step']['tid'], doesn't get the tid of either "district21" or "district22".
Comment #2
wim leersIs $options filled properly? Please post a dump of it.
Comment #3
porfyros commentedWim you were right, i goofed!!! I also have various other vocabulariesin my form. So i filled the $options right for another vocabulary and thought that i did have checked it!
Thanks for your time and your module!
Comment #4
wim leersComment #5
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.