by default, when you create a content which has a taxonomy,
drupal will show a select list with all term showed up.
i just want to know, which built in function the drupal 6 used to build that
select list.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
taxonomy.module:
hook function for modifying node adding/editing form:
function taxonomy_form_alter(&$form, $form_state, $form_id) {list of associated with current node type vocabularies are from query:
$c = db_query(db_rewrite_sql("SELECT v.* FROM {vocabulary} v INNER JOIN {vocabulary_node_types} n ON v.vid = n.vid WHERE n.type = '%s' ORDER BY v.weight, v.name", 'v', 'vid'), $node->type);
after this, for all vocabs, terms editing element building
_taxonomy_term_selectwill called,that call drupal.api function for getting datas about terms of current vocabulary:
http://api.drupal.org/api/function/taxonomy_get_tree/6
See all function for taxonomy here: http://api.drupal.org/api/search/6/taxonomy