I'm writing a module to unset taxonomy terms using D6 hook_form_alter(). The object is to only present the current user terms which they have created themselves.

The trouble is that I don't know which variables to alter. I'm thinking it should be something like $form['taxonomy']['2']['#options'], but I cannot see a path in a DSM print_r($form).

I have gone through hierarchical_select.module again and again, but can't work out whether I need to be amending the results of $storage, $elements, #names, $hsid or any of the other variables; I am not sure about which hook to use too.

I just need to know how to apply the results of this db_query() in my custom module code which you can see on http://pastebin.com/RbwKB0rt.

Can anybody please help?

1 Answer 1


I think I need more information.

In general, I believe you set the #default_value on your dependent form element to be the parent element, and also set the #ajax callback and wrapper on the parent. Check out the Ajax example and the form API reference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.