Ep. 7 - How to send e-mails to recipients listed in a drop-down field

This video tutorial explains how to configure the RSForm!Pro "user and admin emails".

 

 

As an example, we have used a simple Joomla! contact form with 5 fields (name, email, message, staff and a submit button )that allows users to send messages to staff members. Users will be able to select from the dropdown the staff member that will receive the message.

 

Upon form submission, the user receives a personalized e-mail from your company. This e-mail is called "user email" and can be configured in the RSForm!Pro "Manage forms" tab >> "user e-mails" area.

 

The staff member selected from the drop-down receives an e-mail with the user submitted data. This email is called "admin email" and can be configured in the RSForm!Pro "Manage forms" tab >> "admin emails" area.

 

Test RSForm!Pro in frontend

 

Test RSForm!Pro in backend

 

Comments



Gravatar
Mike - 06.11.2014 (09:46:08)

Thanks for the key to seeing the list of variables.

I'll check on leaving from & to empty but I think I received an error message when I tried that.

Quote
1

Gravatar
Alexandru Plapana - 06.11.2014 (03:49:10)

Hello,

If you take a closer look at the PHP Email scripts article, you will notice that it does provide a complete list of the email properties. Further to this, you can simply use a print_r($adminE mail);die(); to see the exact structure for yourself.
You can disable the admin email by simply not specifying a From and To address.

Quote
1

Gravatar
Mike - 05.11.2014 (14:30:51)

Please disregard my comment about admin email - it was erroneous.

I have a script to populate the dropdown without emails from a simple csv file. This script is in the "items" values in the dropdown options. I also have a script which converts the dropdown selection into the associated email. This is in the "after post before before send" form-script area. My issue now is that I need to modify the mail "to" value (as well as cc and bcc). I have seen vague references to it in the tutorials but nothing specific about field-names, how/when/what the intepreter does with an override, etc.

I also wish there was an option to Not send an email to the admin. That though is a function request.

Thanks

Quote
1

Gravatar
Alexandru Plapana - 05.11.2014 (02:53:37)
@Mike

This is why the scripting method is suggested as an alternate. Thus the recipients won't be displayed within the frontend - thus being protected from spam bots.

I am not quite sure i understand your reference to admin email. Can you please explain further ?

Quote
1

Gravatar
mike - 04.11.2014 (19:05:06)

If you are trying to hide emails from scrapers and bots, do NOT use the methods suggested here. As soon as you enter an email address into any selectable item-pair, the email is exposed in the html. As far as I know, there is no built-in function to match a selected form-value to an "admin-email" value. BTW, "admin-email" is a complete misnomer for the standard email "to:" field.

Quote
1

Gravatar
Alexandru Plapana - 29.10.2014 (04:38:08)

Quote :
$POST does not fill the dropdown with values. I tried to ask support but my site is covered under a site license through a "mother" site and I have no access to the license key. I'm not asking for a tutorial on php but your articles do not address my issue.

Thanks


If there would be an article for each "issue" there wouldn't be any issues, isn't it ? You are more then welcome to post your inquiry to the forum and see if anyone can help.

Quote
1

Gravatar
mike - 28.10.2014 (09:53:10)
populating dropdown from csv

$POST does not fill the dropdown with values. I tried to ask support but my site is covered under a site license through a "mother" site and I have no access to the license key. I'm not asking for a tutorial on php but your articles do not address my issue.

Thanks

Quote
1

Gravatar
Mike - 26.10.2014 (10:03:34)
populate dropdown

I have a small csv file, ~12 lines; each line contains 2 fields:
office, office@us.com
president, president@us.com
finances,treasu rer@us.com
I can successfully read/parse through the data but I cannot populate the dropdown. I must be missing something simple. code is below which is in "Script called on form display". Thanks
//
$handle = fopen("/home/em/em.csv", "r");
if ($handle) {
while (($data = fgetcsv($handle , 4096, ",")) !== FALSE) {
$_POST['form']['cf_recipient'][0] = $data[0];
}

fclose($handle) ;
}
else
{
echo "Error: Unable to open file\n";
}
//

Quote
1

Gravatar
Alexandru Plapana - 21.10.2014 (03:52:15)

The $_POST array will only contain the submitted value. If a dropdown is used, then it will contain a single value, indexed 0.

PS: If you are having problems in implementing this, please submit a support ticket:

http://www.rsjoomla.com/support.html

Quote
1

Gravatar
Mike - 20.10.2014 (14:36:20)

Quote :
You can simply use the PHP Email scripts section instead:

http://www.rsjoomla.com/support/documentation/view-article/610-php-email-scripts.html

Thanks for the link - it helped a bit. But, the example to get a selected drop-down value works only on a single selection = [0]. Is the original drop-down array replaced with only what has been selected? If so, I can merely loop through the new array and concat the data into the mailto variable. If not, how do I tell the difference between selected cvalue and non-selected ones?

Thanks

Quote
1

1000 Characters left

Related Videos

Episode 3 : Joomla! Form inside article - RSForm!Pro

Episode 3 : Joomla! Form inside article - RSForm!Pro

The RSForm!Pro Content Plugin allows you to publish a Joomla! form inside a content item.   Step 1: Download the Content Plugin To be able to embed Joomla! forms inside articles, you need to download the RSForm!Pro Content Plugin....
read more
Episode 8 : Creating  forms for Joomla! with RSForm! Pro

Episode 8 : Creating forms for Joomla! with RSForm! Pro

In this tutorial, we will show you how to create a simple Joomla! form with 5 fields using the RSForm!Pro wizard: 1. Textbox- Standard HTML text field 2. Textarea - Standard HTML text area 3. Captcha Antispam for the user authentication 4. Submit...
read more
Ep.9 - Create a multilanguage form in Joomla! with RSForm! Pro and Joom!Fish

Ep.9 - Create a multilanguage form in Joomla! with RSForm!...

Starting with RSForm!Pro revision 36, RSForm!Pro has a built-in multilanguage option: you will be able to translate all the necessary form information. For further details, please refer to Ep. 52: Translate a Joomla! form using the RSForm!Pro...
read more
Ep. 25 - How to add Paypal functionality to your Joomla! forms using the RSForm!Pro Paypal Plugin

Ep. 25 - How to add Paypal functionality to your Joomla!...

Before we begin, please note that the following explanations, along with the video tutorial, are only available for the RSForm!Pro Joomla! 1.5 PayPal plugin. For more information and a video tutorial on how to implement a PayPal functionality to an...
read more
Ep. 32 - Using RSForm!Pro and Salesforce to create new leads

Ep. 32 - Using RSForm!Pro and Salesforce to create new...

Starting with RSForm!Pro 1.3.0, you can automatically assign the users submited details to your Salesforce.com account as new leads, using the Salesforce Web2Lead plugin In this episode we will show you, step by step, how to integrate the Salesforce...
read more
Ep. 33 - Using RSForm!Pro with Mailchimp

Ep. 33 - Using RSForm!Pro with Mailchimp

RSForm!Pro allows you to create Joomla! subscription forms, pass users data to your Mailchimp account and assign them to the existing lists and groups using the RSForm!Pro Mailchimp plugin.   Step 1: In the Joomla! backend panel, head to...
read more
Ep. 39: Create newsletter subscription forms with RSForm!Pro and RSMail!

Ep. 39: Create newsletter subscription forms with...

In this video, you'll learn how to create custom subscription forms with RSMail! and RSForm!Pro. Suppose you have created a subscription form to collect data from your subscribers: First Name, Last Name, Company, Job title , etc. Upon the form...
read more
Ep. 40: Create  custom Joomla! registration forms for your events  with RSEvents! and RSForm!Pro

Ep. 40: Create custom Joomla! registration forms for your...

There are situations when you need more than a simple Joomla! registration form for your events. In this case, you'll need to use RSForm!Pro to create the custom form, RSEvents! to manage the event registration and the integration plugin. Let's see...
read more
Ep. 51: How to configure the user and the admin email in RSForm!Pro

Ep. 51: How to configure the user and the admin email in...

RSForm!Pro allows you to send custom emails (user and admin emails) upon the form submission. These two types of email are configured separately in the "Manage forms" area >> Properties, in two corresponding tabs ("User Emails" and "Admin...
read more
Ep. 52: How to translate a Joomla! form  using the RSForm!Pro multi-language option

Ep. 52: How to translate a Joomla! form using the...

Starting with revision 36, the RSForm!Pro multi-language support allows you to easily translate your Joomla! forms from English to your native language. This video tutorial explains how to use this new option to translate a Joomla! form from...
read more