I'm starting to use CCK for customized contact forms. One of the things I've needed to do on a couple of projects now is to email multiple people depending on who gets chosen on a particular form.
For example, I have a "person" node type and each person has a field containing their email address. On a contact form node type, I'm using CCK's nodereference module to include the appropriate list of people as a *multi-select* field.
Rather than writing custom form handling code, I'd like to use Workflow-ng to handle sending the emails. I don't know how hard it would be to have Workflow-ng include the tokens for nodereferenced nodes, but I think that would be a useful way to extend the reach of Workflow-ng. For the time being, I think I can get by using the "Execute custom PHP code" action.
Comment | File | Size | Author |
---|---|---|---|
#5 | multiple_userreference.patch | 4.58 KB | Jody Lynn |
Comments
Comment #1
fagouse wng 2.x and load the referenced node. then you can use its token.
Comment #2
Matt V. CreditAttribution: Matt V. commentedI checked out wng 2.x. According to the help on the "Load a referenced node" action, "If the field has multiple values, only the first node will be loaded." Since I'm trying to email the person associated with each of the referenced nodes submitted on the form, are there plans to eventually allow the loading of all the referenced nodes? Or is there another way that I'm missing, to do what I need?
Thanks!
Comment #3
fagono, handling of set of entities is currently not supported and won't be ever for 5.x
Comment #4
Matt V. CreditAttribution: Matt V. commentedOk, thanks for the update. And again, thanks for the GREAT module!
Comment #5
Jody LynnI needed to do something similar needing multiple user_references to send emails and created the following patch. It definitely needs work as I bet it currently breaks the use of user_reference users for actions other than sending emails, but it works for what I needed.
Comment #6
seakayjay CreditAttribution: seakayjay commentedI would like to have this feature as well. which version is the patch for? version 1.6 or 2.0?
thank you
Comment #7
Shawn DeArmond CreditAttribution: Shawn DeArmond commentedPatch worked for me, but you're right, it broke some other stuff. For instance, now when I try to grab the token for the referenced user's name, I get nothing.
Also, it doesn't seem to work now for userreference fields that are not multiple-selects.