/
Add subscription form to website

Add subscription form to website

Section template “newsletter_form”

This integration provides a section template “newsletter_form” which acts as a container for all forms managed within the Universal Messenger.

When creating a form in the Universal Messenger with the form wizard a JavaScript snippet will be provided which can simply be included on your website. It will then load the form directly from the Universal Messenger via Ajax.

DataAccessModule “Universal Messenger Forms”

The module provides a DataAccessModule “Universal Messenger Forms” which allows the FirstSpirit editors to select a form from the Universal Messenger.

 

The section template “newsletter_form” uses this module in the field “UMForms”. Once a form was selected the module will output the JavaScript snippet which then displays the form.

Subscribe, unsubscribe, change profile

Depending on certain GET parameters the embedded Universal Messenger app can display a form to subscribe to a newsletter (default), to unsubscribe from the newsletter or allow the recipient to edit their profile data or change their subscription.

To select a page with the newsletter form from your website as the unsubscribe link in the newsletter footer go to the GCA “newsletter_settings” and edit the field “Unsubscribe page” in the tab “Pages”. Also make sure to change your website URL in the corresponding field under “Optional”.

Universal Messenger CORS settings

In order for the form to properly load on your website it is necessary to add your website URL to the list of allowed websites in the Universal Messenger CORS settings.

Log in to Universal Messenger and go to Extras->Apps->CORS. Select the existing instance (or create one of none exists) and add your URL(s) to the comma separated list under “Settings”.