Silverstripe File Upload in Form to Email
Form submissions
Viewing grade submissions in the CMS
To view form submissions navigate to the 'Submissions' tab. You can click any of the listed submissions to view the content of each submission.
Setting upwards automated emails for submissions
It is possible to set upwards automatic emails upon each grade submission, to do this navigate to the "Recipients" tab and click "Add Email Recipient".
You will be prompted with a grade where you can fill in the details of the email.
Using course fields in submission emails
Each form field has a unique merge field located nether the field's options.
Just insert the merge field into the email content, and the field's value will exist displayed, when the email is sent.
Email details
Email Subject
The discipline of the email, you lot can either blazon a custom field of study here or select a field from the class to employ as the email subject.
Send email to
This is the recipient's accost where the email volition exist sent.
Send electronic mail from
This shows where the email was sent from, and will virtually likely need to be an email address on the same domain as your site. For example If your website is yoursite.com, the email address for this field should be something@yoursite.com.
Email for answer to
This will exist the address which the email recipient will be able to 'reply' to.
Email content
In this field you tin add together a custom bulletin to add to the e-mail
Hide form data from e-mail?
You tin can check this if you do not wish for the e-mail recipient to meet the form submission's data in the e-mail.
Ship e-mail as plain text?
You can check this if yous want to remove all of the HTML from the email, this ways the email will accept no custom styling and the recipient volition only meet the apparently text.
If "Ship email as plain text?" is unselected, several additional options for HTML editing are displayed.
If sending as HTML, there is the option to preview the HTML that is sent in the editor. Additionally an HTML template can exist selected to provide a standard formatted email to contain the editable HTML content.
The list of bachelor templates can be controlled by specifying the folder for these template files in YAML config.
UserDefinedForm : email_template_directory : mysite/templates/useremails/
Custom Rules
In this section you tin determine whether to send the email to the recipient based on the data in the form submission.
Send conditions
This decides whether to ship the electronic mail based on two options
- All conditions are true (Every single custom dominion must exist met in club to send the email)
- Any conditions are truthful (At least i of the custom rules must be met in order to send the email)
Adding a custom rule
- Click 'Add' to add a custom sending dominion.
- Select the field which you desire the custom rule to employ to
- Select the condition the field must follow
- enter for the condition (the 'is blank' and 'is not blank' conditions do not require whatever text)
File Upload Field
Files and other information that is uploaded by your website visitors should be handled with care to reduce the run a risk of exposing sensitive information. Files which are uploaded through a course inherit the permissions of the folder they are being placed into, so information technology's of import that yous ensure the folder you select tin only be viewed by advisable parties. Binder permissions can be managed within the Files area.
File permissions exercise not bear upon the Draft/Modified/Published country of files. Use both file permissions and Typhoon states together to ensure your files remain safe. For case, in case they are accidentally published.
File indicators
Files have a number of icons which can help to identify the original source of a file and whether caution should be taken when using information technology.
Form submission:
This indicates a file is associated with a form submission. This file has non been uploaded to the CMS by a Content Manager and may contain sensitive information. Intendance should be taken so that it is not published and leaked.
Grade submission with warning:
This indicates that a file associated with a form submission does not have the recommended permissions practical to information technology. A caution symbol is added to the form submission icon because information technology has a college risk of being publicly accessible if it is published.
Restricted access:
Indicates that a file/folder has restricted access and will only be visible to certain users or groups. To learn more about the usage of this particular icon refer to File Permissions.
Overview of files with custom permissions
Folder with restricted access containing files with custom permissions and their associated file icons. FS - Form submission
To become started, create a new User Defined Form folio in the CMS. Meet Creating and editing forms to acquire more. To add a File Upload field to the form, click on the Form Fields tab in the page editing view. Click the Add Field push button and then select File Upload Field from the dropdown.
Setting upward a folder to shop file uploads for your form
When setting upward an Upload Field on a form for the start time yous will receive a prompt to select an advisable folder to store files for this form. You tin can either create a new folder or apply an existing folder to store your file submissions.
The binder you select volition become the default folder for this form and any additional Upload Fields which are added. Each File Upload Field can utilise different folders for storing its files, this can be managed by editing the folder location on each individual field.
Option 1, create a new folder (recommended):
This option is but available the first time you add together an upload field to your form. Once the first upload binder for the grade has been established, all subsequent file uploads from the same form will use this folder by default.
By default this option will store file submissions in a folder with restricted access suitable for dealing with personal/sensitive information. A folder will automatically be created with the same name equally the form proper name.
It will be recommended for this folder (and the submission files) to exist placed within a acme level binder named '/Course-submissions'. You tin either use the suggested binder name or create your own by altering the folder proper noun. You can also manually add together deeper folder levels past adding '/' in the text field provided e.g 'Contest-entries/May-2020'.
By default the '/Class-submissions' folder is set so just Admins accept permissions to access it (restricted access), any files or folders in this folder will inherit these permissions. This can be changed manually on a per file/folder basis from the Files area.
Click Save and keep to continue editing your form.
Option 2, use an existing folder:
If you choose to use a folder that already exists you can select the folder from the Select folder dropdown. In one case you select a folder, an icon will betoken whether or not the folder has restricted access and provide information for who the file uploads volition be visible to.
If the form deals with personal information you will want to select a folder which has Restricted Access. It will display some information about the groups who tin can admission files in this folder.
Click Save and continue to continue editing your form.
Changing folders for individual fields
If the binder you lot have selected for storing files does non accept the recommended view restrictions applied, files uploaded to that folder which have a published state will be visible to anyone who views them, or that can gauge the URL. You tin can alter the folder associated with an Upload Field at any time.
When viewing/selecting folder locations from the form y'all will see an icon indicating its permission status. You lot volition either see a restricted access icon, or a warning icon.
To store your files in a safer estate you tin can do one of several things:
- Create a new binder from the Files surface area, or if this is your offset time setting up an Upload Field for this form y'all will be guided through the process, for more data run into Setting upwards a folder to shop file uploads for your class.
- Change the upload folder to i which already has restricted access. Edit the Upload Field and select a folder from the Select a folder dropdown.
- Change the view access permissions of the current binder in the Files area to restrict access to the file.
You can manage your folder permissions by navigating to the Files section in the CMS menu and edit the folders details. See File Permissions for more information and Roles and permissions to acquire more.
For more information on the usage of these icons in the files area, please refer to File Indicators.
Edit on Github
barnestuslies1976.blogspot.com
Source: https://userhelp.silverstripe.org/en/4/optional_features/forms/form-submissions/
0 Response to "Silverstripe File Upload in Form to Email"
Post a Comment