Forum

Thread tagged as: Question, Addons, Forms

Optional multiple email addresses in forms app

Hi there

I am developing a site currently that has an 'email a friend' functionality. It's all working ok but they want the option of sending it to 2 possible email address.

So, in the form options I have set this in the email address(es) field: {friend-email1},{friend-email2}.

When both are filled in, it works perfectly but if only one is filled in, it doesn't send the email. I need to make the second one optional somehow. I have tried merging them in to one address with a comma separating them but that didn't work (which I didn't think would, but you never know).

Is there anything else I can try?

Thanks..

Michael Wilkinson

Michael Wilkinson 6 points

  • 6 years ago

You could pass a variable into your template containing a bulk email address then use an if statement in your template based on whether or not both emails were used. Is this answer good enough or do you need an example?