Email a Copy if Checkbox Checked

rswyatt 27 Oct, 2008
I'm trying to figure out how I can set my form to email a copy of a form submission ONLY if a checkbox is checked indicating the form filler-outer person wants that to happen. :-)

I know about Dynamic To: but that would always send.

Where can I do it the way I want or better yet, is there a tutorial on how to do this?

Thanks much!
Rich
petervanwesten 31 Oct, 2008
I have a email field called contact_email
and a checkbox called contact_send_cc

I made it work by doing:
if(JRequest::getVar('contact_send_cc')) {
   $emails[0]->to .= ','.JRequest::getVar('contact_email');
}
Max_admin 31 Oct, 2008
thanks for posting the solution!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.