I have a 6.16 site. The contact form is the core site-wide form. I have searched for this and the closest I was able to find was a semantics discussion about the appropriateness of the term 'Category' but not a solution to change it.

My contact form "categories" are staff member titles such as Director, Office Manager, etc. The label Category is an inaccurate description of the drop down menu's content. And since we service libraries, I get routine grief about it.

Since the label Category is not part of a t() call I cannot use string overrides. I certainly do not want to go hacking core module files.

Am I just stuck? This seems to me to be one of those labels that should be part of the settings that can be (must be) customized for each installation.

Thanks in advance for your help.

Comments

vm’s picture

I use the webform.module to create a site wide contact form.

Seems odd that this isn't a t string though.

technobrarygeek’s picture

Thought of that but it seems a LOT of work to change the word Category to Staff Members.

betancourt’s picture

Hi, to change the Category label go to the file ../modules/contact/contact.pages.inc

In the line 67 you will find the following line of code.

'#title' => t('Category'),

Just replace Category to what you want it to display, you might need to clear your cache before you can see the changes, not completely sure about this.

Note that since this solution is modifying core files, when performing an upgrade to the contact module or to the Drupal installation, the changes will be lost, so you will have to alter the file again.

iparsin’s picture

Thank you, it was easy, just to have to make to note for the upgrade.

vm’s picture

you don't have to hack core to change t() strings. investigate the stringsoverrides.module

never hack core.

iparsin’s picture

Thanks so much, that is the best way. I am newbie, so often did things from what I see first without awareness of damages.

StitchTech’s picture

I agree with the sentiment, but the stringoverride module doesn't allow a lot of specificity. I had the same issue - and the solution is great - but I hope I don't find another instance in my site where the word "Category" is used in a t string!