How can I get the results of a form to be sent to a single recipient based on group rotation? I have 3 users I want to share form results with, but I don't want any of them to get the same form result.
For example:
visitor #1 results are sent to user #1;
visitor #2 results go to user #2;
visitor #3 results go to user #3;
visitor #4 results go to user #1; and so on...
Any advice?
7 views and no replies in the last 24 hours. This must be something that Chrono can't do (even though my instinct and Joomla experience tells me there's always a solution).
Is anyone else facing this kind of issue?
Hi obriennolan,
Sorry, missed this the first time around.
You'll need to write some code to detect the user submitting the form and redirect the mail acccording. Thers is basic code for re-directng emails in one of hte FAQs (#36 I think) and there have been a few good threads about this recently (though none with this specific application).
Bob
Thanks for the reply. I checked out all the FAQ entries, and it seems #31 may be close to the solution I'm looking for. The major difference is that I don't want the visitor who fills out the form to select the email recipient, I would like recipient selection to be automatic.
What I'm trying to do is have the form results (leads) be distributed automatically among a handful of notification recipients in a round robin style, so no two recipients get the same lead and each new lead is sent to the next recipient on the list (or I guess the array??).
It seems the "On Submit Code - before email sent" is the place to put the solution. I just don't know what the should look like.
Hi obriennolan,
Ok so you need some extra code to do the distribution. As I see it you have two main choices:
1 The simpler route is to allocate randomly. Probably one line of code to pick an address out of the array. Over time this will work OK but on any given day one user might get a bunch of emails to respond to.
2 Rotate the emails. To do this you need some way of finding out who is next in the queue. You could do this with a text file saved somewhere, or by checking in the database to see who got the last one. Either way more compex code to write.
Bob
Thanks again GreyHead for the quick reply. (for the record, you look like a very hip, young blonde.)
It looks like option 2 is what I am looking for. Any ideas where I can look to find an example of the kind of code I will need, or tutorials of some sort? I've scoured the Internet universe to no avail so far. Perhaps I just don't know the right keywords to find the answer with Google. I don't mean to burden you, I just don't know where else to look.
Any advise you have is much appreciated.