Your module is the first time I've seen user reference used correctly.
To: _______
"Enter the recipient, separate recipients with commas."
Why doesn't drupal core already do this??
I have many content types where a user reference field is used to select multiple users. In drupal core, you can only add one user at a time.. but using privatemsg, I can add users after adding a comma. Is there php code that I can apply to my other content types to create this effect? I searched the issues--sorry if I missed this. And if there is php code how and where should I apply it in the user reference field?
Thank you.
Comments
Comment #1
berdirShort answer: No, there is no php snippet you can copy somewhere.
Longer answer: Adding multiple references in a single HTML textfield is the easy part. But you also have to parse it again. CCK's User Reference module is not able to do that.
Anyway, the code that does this is here:
Autocomplete: http://blog.worldempire.ch/de/api/function/privatemsg_autocomplete/6-2
Parsing: http://blog.worldempire.ch/de/api/function/_privatemsg_parse_userstring/6-2
However, that code is all very privatemsg specific with our own hooks and so on.
Comment #2
calefilm commentedThanks for the response! I'm sure in a few months I'll learn to apply what you referenced. That's a bit too advanced for me at this point. But at least I know there isn't a simple solution I was missing. I think it's very innovative though and would be widely used by drupal users if it was part of the user reference field widgets.
Thank you.
Comment #4
agaur commentedHi Calefilm,
Were you able to resolve it ? I am just beginning to learn Drupal, and need user reference field to allow addition of users in same box as done in "To" for privatemsg instead of using "Add another" option.
Any help would be really appreciated.
BR
Alakh
Comment #5
berdirIf you need this for fields, http://drupal.org/project/entityreference has this feature built in for any entity type, including users and nodes.
Comment #6
calefilm commentedI decided not to take that route. But try Berdir's referenced module. Luck.