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!
$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!