Forms with PowerMail
In TYPO3 you can create forms with the PowerMail extension and then integrate them on one or more pages. These can be pure contact forms, registration forms for events or other forms. The form data entered is then saved and/or sent by email.
Two important functions of PowerMail are the ability to send confirmation emails to the person completing the form and the ability to export the form data as a table (e.g. XLS, CSV).
Important:
Please note the data protection information on forms, see also Data Protection and Information Security Unit: FAQ: "How to use the TYPO3 Powermail form". Personal data should only be collected for a specific purpose and deleted as soon as it is no longer required. Powermail responses in TYPO3 are automatically deleted after 6 months.
1. preparation: create pages and folders
Preparations in the page tree
- When working with forms, you naturally need a website on which the form is to be integrated. This can be an existing page or a new one that is created specifically as a registration website.
→ The use of a separate website that is only intended for the form is usually recommended in order to keep the appearance clear and organised for those registering. - For the sake of internal organisation, it is also usually advisable to create two folders: the form is stored in one folder (form design) and the second folder serves as a storage location for the form data entered by the applicants. Technically, these two folders are not absolutely necessary, and it is not important where exactly they are located (e.g. they do not necessarily have to be subordinate to the form page). However, they are very helpful for the problem-free handling of forms and submitted form data and should therefore be placed and named in such a way that you always have a good orientation as to where something is located.
Procedure for creating folders
First create a page for the form. In principle, the two folders mentioned are created in the same way as the page, but when creating them, use the grey folder symbol and drag this onto the previously created page so that the two folders are subsequently located within the page:
2. create form
After the preparatory steps, the actual form is created:
- In the page tree, click on the folder in which the form is to be saved (form design) and follow the prompt (blue button) to switch to the list view.
- Then click on the plus button above ("New data record" - see Fig. 1) and select powermail→Forms from the list displayed (see Fig. 2).
- In the view that opens, first give the form a name (see Fig. 3).
- You can then create the first page of the form. Form pages are named groups of input fields to distinguish thematic parts of the form from each other (not to be confused with web pages). Technically, only a single form page is required to accommodate all input fields, but it can be clearer when filling out the form if there are several form pages, as these are visually identified as a content group by a border line. It is therefore purely a design decision whether to work with one or more form pages.
Form pages can also be used to fill out the form piece by piece by displaying only one page at a time and clicking on the next page after filling it out (this can be configured in the plug-in settings). - Give the form page a name (as a sort of subheading in the form). Within the form page, create the desired fields (input fields of the form).
- Don't forget to add a field of type Submit at the end! This is the submit button of the form.
For the input fields, always select a title and a type (text field, radio button, submit, etc.) for the data to be entered. To make advanced settings, you must save the form once. In the "Advanced" tab of the field, you can then set whether the field is a mandatory field or whether the input should be checked.
Special fields: Email address and proper name
If the input form asks for the email address and the proper name, this information can then be used automatically, e.g. to send an automatic reply email. In order for this function to be used, it must be made clear that this is the corresponding field - here is the procedure for e-mail (there is a comparable checkbox for the proper name):
Mandatory fields and validity check (e.g. for the email field)
Mandatory fields should be labelled as such so that the form can only be sent once these fields have actually been completed. This is done in the Advanced tab of the respective input field.
A further safeguard is the validity check ("field check"), which can be used to ensure that the entry fulfils certain formal criteria. This is shown in the following image using the email address as an example.
Email fields should always be made a mandatory field and also have a corresponding validity check (see image below)! This ensures that the field
- has been filled in at all
- is formally valid (e.g. it must not contain umlauts etc.)
- can then be used to automatically send a reply e-mail.
Validity check (selectable check methods, see image):
Uni Oldenburg Email: Use this check method if the form is aimed exclusively at university members.Email (better check e.g. for invalid domains): Use this verification method if external persons also fill out the form.
Important: This procedure does not ensure that the email address entered actually exists! The correctness of the email address can only be confirmed with a "double opt-in", i.e. the person filling in the form automatically receives an email with a confirmation link after submitting the form, and only after clicking on it will the entered form data actually be noted as valid in TYPO3.
→ At the point where the form is integrated into a website, this double opt-in can be activated by means of a corresponding switch.
3. embed the form in a website
A new content element (see section: Inserting content into a page) of the type [Powermail plug-in] is created on the website. This can be found under the [Plug-ins] tab. You can make all the important settings for the plug-in under the [Plug-in] tab (next to General).
Settings" tab
In the main settings, first select the form you have just created under [Available objects]. As mentioned above, if several pages have been created in the form, you can also select whether they should be displayed on separate pages ("Activate multi-step form").
However, it is more important to specify where the emails should be saved. Here you select one of the created folders. If this field remains empty, the form responses are saved directly to the current website.
Email to recipient" tab
Meaning: This is the recipient of the form, i.e. the form data is sent to this address. If these fields are left blank, the form data will not be sent to the provider of the form.
In the recipient settings, you enter a recipient name and the recipient email address below it. You can also enter several email addresses one below the other. Alternatively, you can select a user group to which the email should be sent.
In the text field you can see the variable: {powermail_all}. Powermail_All displays all values from the form fields in the email, i.e. a complete list of the transmitted information is displayed here for information purposes. The text field can be supplemented as required.
Email to visitor" tab
Meaning: This information is used as sender information if the person completing the form ("visitor") receives an automatic reply email. If these fields - including the subject line! - are filled in, this activates the sending of automatic reply mails as confirmation that the form has been received. If the fields are left blank, no reply email will be sent.
A personal salutation is also possible in the reply email, provided the name has been submitted in a corresponding form field, e.g:
Hello {name},
Thank you for registering!
... etc. ...Response page" tab
Here you can enter any text that will be displayed once the form has been completed and submitted. The response page acts as a final confirmation that the form has been submitted in full. The variable {powermail_all} in the text lists all submitted form data once again.
Data protection / Delete" tab
This tab is used to set how the received form data should be handled:
- Data is not stored in the database:
The data is only sent by email to the recipient address entered and is not stored in TYPO3. This inevitably means that the data received cannot subsequently be exported as an Excel spreadsheet. - Data is deleted after the specified deletion period:
A number of days can be entered here after which received form data should be automatically deleted from the TYPO3 database.
In addition, a notification to the recipient address before deletion can be activated with a selectable number of days before deletion.
In addition, information texts on objection options and data protection can be entered, which will then be displayed with the submit button of the form in future. (This function is still deactivated for the time being). - Data will be deleted after the specified date:
In contrast to the previous point, no time period is specified here, but a time when all received form data should be deleted from the TYPO3 database.
In addition, a notification to the recipient address before deletion can be activated with a selectable number of days before deletion.
In addition, information texts on objection options and data protection can be entered, which will then be displayed in the future when the form is submitted. (This function is still deactivated for the time being).
Registration restriction (permitted number of form submissions)
If online forms are used to register for events with limited participation or for a similarly limited purpose, a maximum number of permitted submissions can be set. Once this number has been reached, the form will no longer accept registrations.
There are three options for counting form submissions:
- By default, all submissions are counted and the form is blocked when the specified number is reached. This can be used, for example, for an event with a limited number of participants.
- Instead of a total count, however, a selection field or a simple selection using radio buttons can also be configured in the form, where you can select one of several dates offered, for example. The submissions are then counted separately for each of the selectable options. In the example, the total number is not determined, but it is checked separately for each date whether it has reached the maximum number entered.
- Separate counting of answer options, each with its own limit number - this is a differentiation of variant b. - For each answer option, you can define independently how often it may be selected. Example: During an event, there are several workshops on offer at the same time, from which you can choose one. The individual workshops each have their own maximum number of permitted participants.
Total count of submissions
This is the simplest way to use the login restriction.
To activate it, enter a natural number in the "Submission limit (max. responses)" field at the bottom of the [Plug-in:]→[Settings] tab. When this number of submissions is reached, a corresponding message appears instead of the form.
Please note: The count may depend on the integrated form! If, as described in the next section, an included selection field has been defined as the basis for counting, then counting is based on the answers in that field and therefore no longer on the total number of submissions!
Separate counting of answer options
Instead of counting all form submissions across the board, the count can also be based on a selection field within the form.
The relevant selection field must either be of the selection field type or the single selection type (radio button) (see illustration below). You will then find the "Login limit (per selection)" field in the [Advanced] tab.
- By activating the "Registration limit (per selection)" field, the form "knows" that this field is to be used as the basis for the count.
- In addition, the registration limit must now also be set to a selected maximum number as described in the previous section. As a result, the count defined there is applied to the response options of this form field.
Separate counting of answer options, each with its own limiting number
This is another way of differentiating the aforementioned option.
- The prerequisite is that a separate count of the response options is already configured, for which a maximum number is defined in the form element on the page.
- In addition, a hashtag with a number can now be entered after an answer option in the form design in order to define this number as the permitted maximum for the answer option. In the example
Yes, I will take part #650,#650has been added to the text to limit the number of participants to 650.
Offer calendar dates as response options in the form
The website of an event is a conceivable scenario. This can be calendarised, i.e. dates for the event can be entered in the "Date options" in the page properties. If the event now takes place several times - namely on the specified dates - it may be desirable to be able to register for one of the dates offered.
For this purpose, input fields of the selection field or single selection (radio button) type can be configured when creating the form so that they are automatically filled with the calendar dates of the website in which the form is embedded:
- In form editing, create a field of type
selection fieldorsingle selection (radio button)and leave the "Options" field empty (see Fig. 1 below). - In the [Advanced] tab of this field, there is the field "Automatically fill field from ...". Select the "Dates from calendarised page" selection option here (see Fig. 2 below).
- Ensure that the page in which the form is embedded contains corresponding date options in its page properties.
Tip:
Automatic date embedding can be used very well in combination with counting based on response options, so that only a certain number of registrations are possible for each date offered!
Multilingual forms
Just like websites, forms are also considered to be in German by default, and foreign-language versions can also be created. If the structure of the English form version corresponds exactly to the content of the German form, the form data can be collected together internally and exported for further processing. It is then irrelevant whether the German or the English version was filled out.
The following steps are required to also create an English version of a form:
- Firstly, an English page version of the folder (in the example: draft form) must be created. (Fig. 1)
- An English localisation of the form can then be created (Fig. 2)
- Finally, the English name can be entered for each existing (German-language) input field. The structure of the form is adopted 1:1 in the translation.
- Of course, an English translation of the website in which the form will then be embedded must now also be created and the form embedded there. This is also best done after the German version of the page or form is complete and tested, as this minimises the risk of technical problems.
Important:
Once an English version of a form has been created, no subsequent changes should be made if possible - not even in the German version of the form! Unfortunately, this can occasionally lead to technical errors, as a result of which the form fields are no longer displayed correctly online. In any case, this must be checked immediately; if you have any problems, please contact our support team at de.)
Data export
All submitted form data is automatically saved internally and can later be exported as a table (in Excel format XLS or as a CSV file) in order to be available for further data use or as a source for a mail merge function.
Data is exported in TYPO3 using the separate Web>Powermail entry in the far left column. After selecting the data directory in which the form data is stored, the table can be output as a file using the corresponding button:
Attention: Automated data deletion after 180 days!
According to current data protection law, data entered via input forms may only be stored for as long as there is an actual need for it. Our TYPO3 CMS saves the entered form data by default and then allows the data to be exported for further processing. The TYPO3 CMS itself has thus fulfilled its task and there is no longer any need for the form data to remain stored in the TYPO3 database.
- In principle, you should delete the form data collected by your forms in TYPO3 yourself as soon as you no longer need them there.
- From 1 September 2021, the following applies:
If form data is not deleted manually, this is done automatically after a specified period of time: form data that is older than 180 days is automatically deleted from the TYPO3 database. This deletion takes place without further notice and removes the data irretrievably from the TYPO3 system!
Please make sure that you export the recorded form data in good time before the 180 days expire!
Recommendations for Powermail forms (checklist)
The recommendations are based on previous problems with forms.
- Pleasetest the functionality of new forms before using them, see next point.
- Please complete the "Email to recipient" and "Email to visitor" tabs in the Powermail content element, i.e. name, email and subject. The exception is if no email is to be sent. As a rule, the fields should contain the same information; the subject may be slightly different.
- Use mandatory fields ("Advanced" in the Powermail form field) and validators ("Verification") as strictly as possible to support the correct completion of the form as much as possible - especially for email addresses.
- Reason: Incorrect input is more likely to be noticed, an error is displayed and input can be corrected.
- If the target group of the input form consists only of university employees, please use the validator "Uni-Email" in the "Verification" field for email fields and, if necessary, change the page type to "Intranet" (the disadvantage is that this page cannot be found via Google. If necessary, create a public parent page that is easy to find).
- Reason: Incorrect email is more likely to be noticed, an error is displayed and email address can be corrected.
- Always activate the "Activate confirmation page" switch ("Settings" tab in the Powermail content element).
- Reason: a) This increases user-friendliness, as users often use different forms and it can be confusing if they behave differently. b) In addition, (a uniform configuration) improves ease of maintenance and reduces the susceptibility to errors. c) Finally, the confirmation page means that the form can no longer be accidentally resubmitted when the browser is restarted.
- If possible, use separate pages for the forms, i.e. do not place the forms on pages that have a lot of other content that is not relevant to the form.
- Reason: If errors occur, in some cases an error message is displayed when the form is sent. If the page is very full, this may be overlooked.
- Do not place several forms on one page.
- Reason: This has not been tested and can lead to problems when receiving the submitted form data.
- Please indicate a contact option in the event of problems with the form, e.g.
"For problems with this form or questions about the form: {email address}"
- It can be helpful to let users know what to expect - e.g. "You should receive a confirmation email from us shortly."
Recommendations for testing forms
Test the functionality of new forms by filling out and sending a form. Errors can occur, especially with newly created forms, due to input errors in the configuration of the Powermail content element or the form.
- Check that an email is sent to both the recipient and the visitor and that the sender and recipient emails and names are correct.
- If there is also an English version of the form, please also test this (errors occasionally occur due to incorrect handling of languages).
If technical errors occur, please report them promptly to (ideally stating the time when the error occurred, the URL for the form and the test conditions, e.g. with a screenshot).
Typical sources of error
There are basically 3 potential sources of error:
- Technical errors / faults:
These are usually temporary and are quickly rectified. - Errors in the configuration of the forms (e.g. inconsistencies):
These can be avoided by following the recommendations. - Filling errors:
These can often be prevented by using validators for the form fields (in the "Advanced" tab, "Validation" field), for example.
Some errors that have already occurred when configuring the forms (see 2) are listed below:
- A non-university email address is used in the "Email to recipient" tab. This is rejected by the university's email server (especially if the form filler uses a non-university email). The email cannot be sent to the recipient, an error message is displayed and an email notification is sent to the "visitor" indicating the error.
- Remedy: When configuring the Powermail content element, only use university emails ( @uol.de or @uni-oldenburg.de).
- The form content element is configured so that an email should be sent to the "visitor" (e.g. by activating "Email must be confirmed (double opt-in)" or by filling in the subject in the "Email to visitor" tab), but the email field is not fully configured in the form design.
- Remedy: If an email is to be sent to the visitor, the following should be filled in:
- All fields in the "Email to visitor" tab. A university e-mail address must be used as the sender address ( @uol.de or @uni-oldenburg.de).
- There must be an email field in the form that reads
- "This field contains the sender's email" has been activated
- Mandatory field is
- Validation "Email" or "Uni email" has been activated.
- Remedy: If an email is to be sent to the visitor, the following should be filled in:
- Due to a bug in Powermail there are potential problems if confirmation page is enabled and fields with file upload are mandatory. When the visitor goes back to the form from the confirmation page, the files have to be uploaded again. This problem does not exist if the file fields are not mandatory.
Video of the training course on online input forms with Powermail
An online training course on the subject of input forms showed how to create an online input form and use it on a website. The configuration of automatic email notifications was also demonstrated and the procedure for creating an English translation of a form was shown.
Note: The video is only available to members of the university.
Video: Show dates of calendared pages /Subscription restriction in forms
In an online training course, the options for displaying the dates of calendarised pages were shown, as well as the use of these dates in registration forms. The new option of limiting permitted form submissions to a set maximum number was also demonstrated.
- Introduction to the topic (0'00")
- Calendarising a website (e.g. an event) (2'49")
- Automatically display calendar appointments of a page online in the page (7'39")
- Variant: Appointment list with clock symbol instead of dash (11'05")
- Past appointments are also listed (11'43")
- Create online form (13'11")
- Create selection field with answer options for which there should be a registration limit (16'19")
- General registration limit (maximum number of form submissions) (19'04")
- Limit the maximum number of individual response options instead of the total number of form submissions (22'11")
- Use dates from the calendarised page as response options in the form (25'21")
Note: The video can only be viewed by members of the university.
Video: Login restriction in forms - Part 2
In an online training course, the now extended options for limiting permitted form submissions to a set maximum number were demonstrated: You can now assign individual selection options in forms their own permitted maximum numbers.
- Introduction to the topic (0'00")
Note: The video is only available to members of the university.