is there a way that the selexion list can pull names from the users given a certain ROLE?

Comments

adamo’s picture

I'm not sure exactly what you are looking for. You want the selection list to be populated with user names from the site having a certain role? Are you looking to give rewards to users for referring other users? Can you give me some details regarding exactly what you are trying to do?

If that's what you're getting at it would probably be better to have a separate field where users could type the email address of whoever referred them. I think putting all users in a select list would get out of hand very quick (think hundreds or thousands of users).

plasticlax’s picture

well the idea is that the referral sources i want to use are actually already given a specific role, "sales reps" in the site, so to maintain a separate list of sources is redundant. that's all. that way, yes, there would be the beginnings of a commission or affiliate system that doesn't rely on stupid affiliate links!

adamo’s picture

Ah I see. This seems like a rather unique scenario so I'm not sure I want to have a UI specifically for that. One way to do it would be to implement hook_form_alter() in your own mini-module to modify the select list options. Perhaps I could add an option to enter a PHP snippet to generate the list from.