Remove hardcoded prefix 'Staff - ' from contact drop-down
jamm - January 4, 2008 - 13:58
| Project: | Role Contact |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | zxombie |
| Status: | closed |
Description
This module was a perfect fit for our association, but the word "Staff" doesn't fit for us. I would prefer if you could provide one of the following:
1) Make the prefix customizable in the admin/settings/rolecontact
and/or
2) Use the name of the role selected
Thank you.
btw, I realize I could just manually edit the rolecontact.module, but I am looking for a better solution than that in case later down the road when I'm not the web dev anymore someone updates this module. I don't know enough about hacking drupal's insides at this point to create a better solution.

#1
Hi jamm,
Thanks for looking at RoleContact - I'm happy to hear it looks useful to you. I think I've just addressed the shortcoming you've encountered - I've just created a version of the module which allows you to specify an optional "Role Label" which is prepended with a " - " before the names of role members in the dropdown list. If you don't include a label, it'll list the names without a prefix or " - ". It might take me a little while to do a release of the update version, so I've attached a patch in the meantime.
Hope that helps - I'd be interested to see your site, if it's publicly visible!
Cheers,
Dave
#2
I've committed the patch with some style fixes found by the coder module