/**
* programmatically show taxonomy dropdown
*/
$taxonomy_source = taxonomy_get_tree(2);
$options_arr = array('0' => '--none--');
foreach($taxonomy_source as $taxonomy_items) {
$tid = $taxonomy_items->tid;
$t_name = $item->name;
$options_arr[$tid] = $t_name;
}
/**
* Category Dropdown
*/
$form['filterset']['category'] = array(
'#weight' => '1',
'#key_type' => 'associative',
'#multiple_toggle' => '1',
'#type' => 'select',
'#options' => $options_arr,
'#title' => 'Categories',
);
unset($options_arr);
Friday, 7 December 2012
Tuesday, 4 December 2012
Exposed form show as Block
Go to Advance section and click on Exposed form Exposed in block: No and set it to Yes. Then go to block and manually enable it to any Region.
Subscribe to:
Posts (Atom)