I want to write a module that makes a select search form based on taxonomy terms. (with hierarchical select boxes) This is on drupal 7.0 and status is up to date. The form is made and Ajax is properly working with testing values. But now I need to find a way to fill up my select boxes with taxonomy terms, wanted to use the function taxonomy_get_tree (modules/taxonomy/taxonomy.module, line 836) and received the message:
Fatal error: Call to undefined function taxonomy_get_tree()
When I've put the function from modules/taxonomy/taxonomy.module in my own module I receive the message:
Fatal error: Cannot redeclare taxonomy_get_tree()
Should it be that I have to hook my module in any kind of way with the taxonomy.module file, or ar there other ways to achieve my goal?
This is on a mymodule.module file placed in drupal7/sites/all/sitename/modules/custom/mymodule/mymodule.module
The code is like
$tree = taxonomy_get_tree(6, $parent = 0, $max_depth = NULL, $load_entities = FALSE); print_r($tree);
I'm unable to approach all functions in the taxonomy.module page...