E-mail send form

<< Click to Display Table of Contents >>

Navigation:  Templates >

E-mail send form

Displaying of this section can be configured in feedback.tpl. E-mail send form template can be configured in this section. It is not recommended to edit this section without knowledge of HTML, because it uses the field names that are passed to the script via the form. In other words, you can edit the text as you like, but do not change the names of the fields, it is extremely important. You can use the following tags:

 

{recipient} - Recipients list

[not-logged] and [/not-logged] - Displays the enclosed text if user was not registered.

{code} - Displays CAPTCHA code.

[sec_code] and [/sec_code] - Displays the CAPTCHA code if enabled.

[recaptcha] and [/recaptcha] - Displays the enclosed text if reCAPTCHA type was enabled in settings.

{recaptcha} - Displays reCAPTCHA widget if it was enabled in settings.

[attachments] text [/attachments] Text in these tags is displayed if attachment of files for feedback letters is allowed for a certain user group.

 

You can use extra fields in the feedback section of your website. You only need to place the desired field with the specified name in feedback form to add an extra field there. After that it is available to be used in email message templates. It is necessary to use the following attribute: name = "xfield[X]" in the input field to add additional field to the form, where X is the name of the field written in latin letters. For example, if you want to put the phone number field in the feedback form, then in the template feedback.tpl you need to place the following:

 

<input placeholder = "Your phone number" type = "text" name = "xfield[tel]">

 

where "tel" is a unique name of the extra field. Then you need just to place {%tel%} tag in email template in Administration Panel. After that, the phone number specified by the user will be sent with the message. You can use any number of extra fields.

 

You can attach files to feedback letters. For this, in User Group settings you can specify user groups which are allowed to attach files to the letters. You also can set the maximum number of attached files and their maximum total size. For files attachment you can use:

 

<input name="attachments[]" type="file" multiple>

 

tag in the form. You can use any name and tags number. The main thing is to use type = "file" as an attribute. DLE will count the number of attached files and their correspondence to group settings.

 

You can use several feedback forms on the website. A special URL is used in the browser for this. http://yourwebsitename.com/index.php?do=feedback address is used to add a standard feedback form. In order to add another feedback form, you can use http://yourwebsitename.com/index.php?do=feedback&template=X1&mailtemplate=X2 address, where X1 is a name of a feedback form, and X2 is a name of a letter template which is sent using this form. If X1 template is specified, then you should have feedback_X1.tpl file on the server in the template folder, and if X2 is specified, then you should have email_X2.tpl file on the server in the template folder. For example, if you specify http://yourwebsitename.com/index.php?do=feedback&template=test&mailtemplate=test then feedback_test.tpl feedback file and email_test.tpl email file must be in the template folder. These files support all the same tags as the standard feedback form and standard email template in the Administration Panel do. Concerning that feedback forms support several types of extra fields, you can make several feedback forms on your website.