Heads Up: This is the documentation for Joomla 3

We recommend using the Documentation for Joomla 5

It is more up-to-date and extensive. Most of it applies retrospectively to Joomla 3.

Joomla 5 Notice

We are pleased to announce that as of January 29, 2024, all of our Joomla extensions are compatible with Joomla 5.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is now a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5!

Double opt-in procedure

This feature is part of the Visforms Subscription and not available in the free Visforms version..

Since the Visforms Subscription 3.5.0 you can set up a double opt-in procedure with Visforms.

For reasons of data protection law, a so-called double opt-in procedure may be necessary. This is particularly the case if the data is to be used for advertising purposes (e.g. newsletter).

Double opt-in procedure means: After a user has submitted the form, they must confirm in a second step that they actually agree to the use of data and, for example, actually want to receive the newsletter to the specified email address.

For this purpose, the user receives an email with a confirmation link. The final registration for the selected use may only take place if they click on this confirmation link. In a classic double opt-in procedure, the user data is usually transferred to an external target system (e.g. the newsletter software) after successful confirmation using a defined data interface and is deleted in the system in which the data was entered.

This basic idea is also the basis for the development of a double opt-in process with Visforms.

How does the Visforms double opt-in work?

  • With the Visforms double opt-in, the data that the user has transmitted with the form is temporarily stored (with its own status) in the Visforms data table.
  • The user receives an email with a confirmation link.
  • You configure this email completely yourself.
  • A PDF file of this confirmation email is saved on the server as proof of the transferred data later.

What happens if the confirmation link is not clicked or not clicked in time?

If the confirmation link in the double opt-in mail is not clicked within a period of time specified by you, the stored data including the PDF file will be automatically deleted.

What happens if the confirmation link is clicked on time?

If the link is successfully confirmed within a specified period of time, the status of the data record is changed so that the data is visible in Visforms. The confirmation is also logged in a form-specific log file, which is located in the log directory of the website in the subfolder visforms_datalogs. The following information is logged: the time of the action, the action type (data confirmed), the form ID, the data record ID and the confirmation URL.

Visforms triggers a custom event that can be used to write the individual code necessary to transfer the user data to the target system in which it is to be permanently stored.

The user is automatically redirected to the success page you named.

What happens if the confirmation link is clicked multiple times?

If the link is clicked on but is no longer valid because it has already been confirmed once or because it has expired, the user automatically receives an error message.

Configuration

  1. Enable the plugin "System - Delete Visforms Data"
  2. Enable the plugin "Visforms - Double-Opt-In"
  3. In the form configuration on the "Result" tab, set the "Save result" option to yes
  4. Follow the instructions under "The double opt-in mail" to set up the double opt-in mail
  5. In the form configuration on the "Double-Opt-In" tab, set the "Enable" option to yes
  6. In the form configuration on the "Double-Opt-In" tab, specify how long the confirmation link in the double-opt-in mail should be valid (in days; 1 day is a good value here)
  7. If necessary, assign a text for the confirmation link in the double opt-in mail in the form configuration on the "Double-Opt-In" tab (option "Link Text")
  8. In the form configuration on the "Double-Opt-In" tab, enter a complete absolute URL to which the user should be redirected after clicking the confirmation link in the double-opt-in mail and if the confirmation was successful (option "Redirect Url")

The double opt-in mail

Please note: In order for the double opt-in process to work correctly, the e-mail to the user must be enabled and correctly set up!

Visforms verwendet die E-Mail an den Benutzer als Double-Opt-In Mail.

  1. Go to the tab "Mail Options" in the form configuration
  2. In the section "Options for recipient mails" set the option "Email Receipt" to "yes"
  3. Enter a suitable (legally compliant) text for a double opt-in mail in the "Email Receipt Text" textbox
  4. Use the placeholder $ {* doiclink *} in this email text to include the confirmation link in the email
  5. This placeholder is automatically replaced with the correct confirmation link
  6. If you have entered a link text in the double opt-in configuration, this link text will be used as text of the confirmation link
  7. Make sure that you transfer all data that the user has submitted with the double opt-in mail
  8. The easiest way to do this is to set the options "Include Data", "Exclude empty fields" and "Include Registered At" to "yes" and all other options for data transfer to "no"

Further processing of the data after successful confirmation

In a classic double opt-in procedure, the user data is usually transferred to an external target system using a defined data interface after successful confirmation. After that the data are deleted in the system in which the data was entered. Whether such an interface exists and what it looks like depends on the selected target system. So it is an individual development.

Visforms provides an interface through which individual code can be implemented, which runs after a data record has been successfully confirmed. Visforms uses the event 'onVisformsAfterConfirmDoi' for this purpose, which can be used in an individual Visforms plug-in. (See: Development of a data interface to the target system)

If such an individual code does not exist, the data records remain stored in Visforms and are visible in the Visforms data table after successful confirmation.

Please note: If you have activated the "double opt-in" option for a form, all existing data records for which there is no confirmation and whose confirmation period has expired will always be automatically deleted.

Development of a data interface to the target system

After a data record has been successfully confirmed, Visforms triggers the 'onVisformsAfterConfirmDoi' event with the following function signature.

public function onVisformsAfterConfirmDoi ($context, $fid, $recordId) {
	// Use the recordId, to fetch the user data from the visforms data table (recordId = id)
        // recordId corresponds to the value in the database field id
        // Fetch the double opt-in data from the #__visdoubleoptindata table using the recordId
        // recordId corresponds to the value in the database field doi_id
        // Transfer user data to the external target system
        // If necessary, transfer the pdf of the confirmation email to an external target system
        // The PDF file is located in the administrator \components\com_visforms\pdfs\doi directory
        // The file name is stored in the double opt-in data in the "mailpdf" field
        // Delete user data in visforms data table
        // Delete double opt-in record in table #__visdoubleoptindata
        // Delete the PDF of the confirmation email
}

Back to list Find subscription