Component Emails

With RSForm! Pro, you can send custom emails to the users that submitted the form. Naturally, you can customize RSForm!Pro to send another email to you, as administrator. These two types of email (User and Admin) are configured separately, in the two corresponding areas of the back-end form properties management. In both cases, you can use simple form specific placeholders to include also the submission information. Because both sections are identical, we will cover them both.

 

Let's see what fields can be configured:

  • Email Form data TO: the address where the email should be sent.
  • Email Form data FROM: whenever the user receives the email, this will be the senders' address (i.e. from who the mail came from).
  • Email From Name: whenever the user receives the email, this will be the senders' name (i.e. the person's name the mail came from).
  • Email Reply To Email: this is the email that will be used when the user uses the Reply option from his email account.
  • Email Reply To Name: this text will be displayed within the header of the 'To' field when the user uses the Reply option from his email account.
  • Email CC: the email address(es) you'd like to send carbon copies to.
  • Email BCC: the email address(es) you'd like to send blank carbon copies to.
  • Email Subject: the subject of the email.
  • Email Mode: you can send your email as plain text, or, if you wish to add more "color" to your message, you can send a HTML email.
  • Auto-Generate Email Message: Set this to Yes if you would like to automatically include all available placeholders in your User Email Text. You can still type in your Email Text and the placeholders will be generated at the bottom of the message.
  • Email Text: the actual text of the email. If you set the last parameter (Email mode) to HTML, then you'll be able to put HTML code here for a nicer email look.Important note! If you write HTML tags BUT haven't set the Email mode option to HTML, the HTML tags will not be interpreted and the user, instead of seeing a nice bold message, may see the actuall HTML code. Please take caution.
  • Email Text Preview: here you can preview the email that will be sent to the user. This way you can see if the email message contains any HTML errors or if the email text was correctly written.

As a side note, the User Emails has one extra configuration option: the possibility to add file, as an attachment. Simply set the Attach File option to Yes and set the location of the file.

In all of these fields you can use placeholders to write important data. We defined for your ease of use general and form specific placeholders. Form specific placeholders are used just like layout placeholders are.

Supported options for component placeholders are:

  • value: this returns the value typed by the user in the corresponding component.
  • name: the name of the component, as defined in the back-end.
  • caption: the caption of the component, as defined in the back-end.
 
Example:

Suppose that among others, your form has a text field that requires the user to input his/her name. This component is called fullname. If you want to use that value in your user message, write this in your email text field: {fullname:value}

If an user typed "John Doe", the email that he would receive after he submitted the form will contain "John Doe" and not the placeholder.

Let's see now the second category, the general placeholders. General placeholders are used like this:

{global:placeholder_name}
Placeholders
Placeholder name Description Logged in user required?
username If the user is registered to your Joomla website, his username will appear when using this placeholder Yes
userid If the user is registered to your Joomla website, his user id will appear when using this placeholder Yes
useremail If the user is registered to your Joomla website, his email will appear when using this placeholder Yes
fullname If the user is registered to your Joomla website, his fullname will appear when using this placeholder Yes
userip The IP of the user that submitted the form No
date_added The date the user submitted the form No
utc_date_added The date the user submitted the form, in UTC SQL format No
sitename The name of your site, as defined in your Joomla configuration No
siteurl The URL of your site No
confirmation The URL used to confirm the submission No
confirmedip The IP of the confirmed submission No
confirmeddate The date of the confirmed submission No
utc_confirmeddate The UTC SQL format date of the confirmed submission No
confirmed The status of the submission No
submissionid / submission_id The id of the submission No
mailfrom The Global Configuration From Email address. No
fromname The Global Configuration From Name. No
deletion The Global placeholder that can be used in order to delete the submission. No
language Displays the language code a submission was made in. No
confirmation_hash Returns the confirmation calculated hash (useful if you're making a custom confirmation URL and in need of its value). No
deletion_hash Returns the deletion calculated hash (useful if you're making a custom submission deletion URL and in need of its value). No
formtitle The configured form's title. No
 
Example:

So, let's say that in the admin email you want to track the IP address of your submissions. Just add {global:userip} in your admin email message and every time you receive an email, the IP of the user that submitted the form will appear.

 

RSForm!Pro allows you to control whether or not to display certain placeholder information(including the according description) by using an "IF" statement.

Example:

{if {name_of_field:value}}The submitted message is {name_of_field:value}.{/if}

>The string found within the {if} syntax will not show if the field has no value.

The {if} clause also accept the following operators:

<= , >=, <>, <, >, !=, =,==,===, <-, ->

Assuming that you have a checkbox and you need to compare its value with a specific string, you will use:

{if {Checkbox:value}<-Item1}This text will be displayed if the Item1 value is selected, regardless of any other selections{/if}

If you want to display a text if the checkbox has only at least one of your desired values, you will use the following syntax:


{if {Checkbox:value}->Item1,Item2}This text will be displayed if one of the following values is selected: Item1 or Item2, or if both are selected. It will not display if another additional value is selected{/if}

If you want to see if the user entered a specific value into a field you can use the following syntax:

{if {field_name:value}=Your desired value} this text gets displayed only if the placeholder has the "Your desired value" value {/if}

Notice the blank space between "if" and the field placeholder.

The pseudocode is useful in cases where users would skip fields that are not required in the submission process, generating empty spaces in the email's layout.

The above scripting language can be used in the User, Admin & Additional Emails as well as the Thank You Message.

Additional Emails
 

RSForm!Pro also allows you to set up additional emails to be sent when the form is submitted. Similar to the User and Admin emails, these have the same, standard configuration fields: From, From name, Reply To, To, CC, BCC, Subject, Mode and Message.

RSform!Pro does not impose any limit on the number of configured emails.

Note: The User, Admin and Additional Emails can be altered using custom scripting, in the PHP Email Scripts tab. Click here for more information, as well as some scripting eaxmples.
Deletion Email
 

RSForm!Pro also allows you to set up a deletion email to be sent when a submission is deleted from the frontend, regardless if done through the Submissions Directory or the {global:deletion} placeholder. It has the same, standard configuration fields: From, From name, Reply To, To, CC, BCC, Subject, Mode and Message.


65 persons found this article helpful.


Was this article helpful?

Yes No
Sorry about that

You Should Also Read

PHP Email Scripts HOT

Plugin - RSMail! (Create custom newsletter subscription forms) HOT

Plugin - External Mailer (Use different email settings and add DKIM support) HOT

How to avoid email validation when using RSForm!Pro - RSMail! integration plugin