Contact form with multiple recipients

gregkoron

New Member
Hi, I would like to create a contact form with multiple recipients as in the attached image. I have created a checkbox element called department_emails. In the form, under the plugins tab, I have added an email plugin and I am using the following script under the "To" of the "Performs email tasks on form submission". I have not chosen to store anything in the db so the "Full Element Name" of the checkbox element is "___department_emails".

$department = $this->data['___department_emails'];
switch ($department) {
case 'Department A':
$email = 'depa@mail.com';
break;
case 'Department B':
$email = 'depb@mail.com';
break;
case 'Department C':
$email = 'depc@mail.com';
break;
}
return $email;

I face the following problems:

1) When I disable the Captcha I get a success message after the submit of the form but the email is not sent to the chosen recipient.

2) I have created a captcha element but when I submit the form I get the error "PLG_ELEMENT_CAPTCHA_RECAPTCHA_FAILED", even if I use the "Standard" method in Captcha.

3) I cannot find how to make groups with checkboxes like the attached image, i.e. I need to show the recipients (checkboxes) for each Department separately. Do I have to accomplish that by creating different checkbox element for each department and assign them into the same group?

4) After each checkbox (recipient) I have to provide some descriptive info to ease the user. The tip is shown with the element label and not with every checkbox. How I can accomplish that?

Thank you in advance for you time!
 

Attachments

  • contact.png
    contact.png
    54.8 KB · Views: 35
Is this on the mtaxc site? It'd be easier for me to login and take a look...

For 3, yes, each department would need it's own checkbox element in the same group.

For 4, we don't have a way of showing tips on individual checkbox options. Only on the element as a whole.

-- hugh
 
Thank you for the response. Yes, everything is on my test site (mtaxc.com/test) . The url to the form is mtaxc.com/test/en/contact_en.html
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top