I would like to be able to make more specific CSS changes to some create form elements, but there isn't much specificity in Drupal's elements.
Specifically, I am looking for how to hook into the function where the class names are written for the taxonomy SELECT element, and insert additional class names into the taxonomy elements. (
For example, instead of just this appearing in the element:
class="form-select required"
I want to output this:
class=" form-select required select-terms"
I assume I can hook some function in template.php of my theme, but I just can't find the function to hook, nor do I know just how to do it. I'm more a designer than a programmer, but i can make do, if someone could be nice enough to give me a fairly explicit example or doc reference.
Thanks in advance.
FYI. This is an example of what gets output now, for just one fieldset containing the taxonomy select elements"
Vocabularies
* Goverment
Politics
Comments
Opps..the code example
I guess I have no edit rights to my posts? Weird. Here's the example I forgot to wrap with a code tag above:
I think the override you
I think the override you want here is theme_taxonomy_term_select.
What you need to do is to override the element and push the class through #attributes like so:
Should work, untested.
⎋ joon park
Thanks. Looks like that is
Thanks. Looks like that is indeed what I wanted. Will test when i get back there.
did it work?!
Hi, i'm looking to change the wording 'Vocabularies' to 'Activities' and i'm not sure how to do this, Do i use the PHP work around you were advised to use?
Here's where it appears:
Vocabularies
Many thanks in advance.
Rob