By solidad on
I want to remove the fieldset and legend tags from all the forms that have taxonomy, and the fieldsets from the registration page. I had looked on how to theme forms but if I render the taxonomy form field, it's still wrapped in a fieldset. Is there anyway to change the fieldset to a div, or remove it completely? The module short form is probably the closest thing to what I am looking for, but not only is it for drupal 5, but I really don't want to use javascript to achieve something that seems so simple. I am almost getting ready to just paste the source of the form into a page and deal wit it, but I know it's not the best way to do what I want.
Comments
Well you could override theme_fieldset
If you do not want any fieldsets on forms a simple override of theme_fieldset would do the trick. (original is in includes/form.inc). See http://drupal.org/node/11811 for how to override theme functions. You should also be able to make the use of the fieldset conditional based on the path and/or the element being "wrapped".
Wow! Will wonders never cease!
Not only did that work the first time I tried it, but I understood it! Thank you! that actually helped alot in getting me to understand how overrides work.