• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Conditional Email address?

Conditional Email address? 13 years 1 month ago #16826

Hi,

We have a form where based on the selection the submission should go to either person A or B or C. Is there a way to have a conditional send to email?

Looking forward to a creative reply,

Steve --
The administrator has disabled public write access.

Re: Conditional Email address? 13 years 1 month ago #16830

  • royce
  • royce's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 52
  • Thank you received: 5
This link was specified in a similar question:

www.rsjoomla.com/support/documentation/v...d-on-selection-.html

I guess if it works, fine, another way is to not use the automated email, but instead write a simple plugin that is triggered after the form is saved to email to the appropriate party.
Last Edit: 13 years 1 month ago by royce. Reason: added link from other question
The administrator has disabled public write access.

Conditional Email address? 11 years 6 months ago #25331

  • info0054
  • info0054's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Dear Royce,

the way described in the link works really well. I choose to send the email to the value that is behind an option. The only problem now:

I'd like to use the user-email to send him the info he entered the {name:value} - Tag doesn't work, because it doesn't represent the option in the drop down that the user chose. Instead it will give him the email-address stored in the value. But I do not want him to have it. Is there any way to work around that?

Regards

Martin
The administrator has disabled public write access.

Conditional Email address? 11 years 6 months ago #25462

  • benc
  • benc's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Hi Martin,

You could try going down this path to still have conditional emails while retaining the info selected in a dropdown...

1. Create a hidden field which we will use for the “recipient” email.

2. Use the values you want in your “dropdown”…


value1|option1
value2|option2
etc…

On the additional attributes of the dropdown, call a javascript function:

onchange="sendto()"


3. Create a function in the properties-javascript section.

<script type="text/javascript">
function sendto() {

if (document.getElementById(‘dropdown’).value == “value1”)
{
document.getElementById('recipient').value = “email1(at)example.com";
}

if (document.getElementById('dropdown').value == “value2”)
{
document.getElementById('recipient').value = "email2(at)example.com";
}


4. In the administrator email, use the {recipient:value} in the To: field.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!