Forums

Refer a Friend Form

enounce 04 Aug, 2010
We want to set up a form to allow a customer to enter up to 5 email addresses of friends on the form. The form then would send a separate email to each of those friends with a different referral code and save all this in a table. I know how to use PHP in the OnSubmit to generate the referral codes but is it possible to use something similar to FAQ 31 to set the Email data and then send the email in a loop to each of the email addresses entered?

Thanks,
Chris
GreyHead 04 Aug, 2010
Hi Chris,

You could do this by hand coding a mailer loop, But I think I would create 5 Email Setups each with a distinct Dynamic To value email_1, email_2, etc. and a different identifier field {id_1}, {id_2}, etc in the template.

Then disable all but the first Email Setup.

In in the OnSubmit before box check the results, set the values of email_x and id_x and enable the appropriate number of emails. (I think I posted the code for this again a few days ago.)

Bob
GreyHead 05 Aug, 2010
Hi enounce,

Yes, that's it.

Bob
This topic is locked and no more replies can be posted.