Closed (fixed)
Project:
Hierarchical Select
Version:
5.x-2.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 May 2008 at 17:21 UTC
Updated:
31 May 2008 at 17:52 UTC
I'm trying to have custom numbers of selections based on role in my custom form. I thought this was possible using the 'dropbox_limit' attribute, but I can't figure out how to set this limit in my template.
I'm using Drupal 5.7
Here is the code that I've tried:
// Following the form array:
$form['1']['1']['#hierarchical_select_settings'] = array('dropbox_limit'=>2);
$taxonomy['2']['#hierarchical_select_settings'] = array('dropbox_limit' => 2);
$form['#hierarchical_select_settings'] = array('dropbox_limit' => 2);
$form['1']['#hierarchical_select_settings'] = array('dropbox_limit' => 2);
$form['taxonomy']['#hierarchical_select_settings'] = array('dropbox_limit' => 2);
// And to add the taxonomy select (which displays... just not with my set limit)
<?php print '<div id="txnmy">' .drupal_render($form['taxonomy']) .'</div>'; ?>
I've tried all of the ways above and can't set a custom limit. Is there another way I should go about this? or have I not found the right path to the dropbox_limit attribute? Any help would be appreciated.
Comments
Comment #1
wim leersUhm… just do a print_r() of $form and find your way to the element? It depends on your vocabulary id. E.g. for vid == 3, it'll probably be something like
$form['taxonomy'][3].Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.