Term Reference Display question
I have a term reference field on a node that is based on a taxonomy vocabulary. The taxonomy has a hierarchy of terms. When a user adds or edits a node that uses this taxonomy term reference with a select drop down widget, I would like to alter the appearance of the elements in the select widget.
Specifically I would like to only display leaves in the widget (i.e. no parent items) and they should be sorted alphabetically. I have tried various hooks to accomplish this but so far I have had no luck. Could anyone help me out and let me know what hook or hooks I would have to use and if this hook function could be placed in the template.php file of the theme that I am using or if it has to be used in its own module.
I have tried using hook_form_alter, hook_taxonomy_term_view, hook_taxonomy_term_view_alter, theme_preprocess_node, theme_field__taxonomy_term_reference but so far no luck. Any help would be greatly appreciated.