Forms generator – module code for website subscription
To place a subscription module on your website, you just need to generate the HTML code after selecting the appropriate parameters. This can be done in the Preferences module, in the Form Generator section.
Step 1 – Set up subscription scenarios
In this part of the system, you can specify the actions to be performed after three email address handling events:
- Adding an address through the website.
- Incorrect data when adding an address or an existing address in the database.
- Confirm the addition of an email address or automatically unsubscribe from the email.
For each of these events, you can specify actions, such as sending an administrative email, redirecting to a web page, or displaying an HTML/TXT object (web page).
It is important that each scenario is written for a specific interface, i.e., a form on the website through which the user adds himself to the email address database. At least three scenarios should be created for each interface, handling the events mentioned earlier.
Note that confirmation of adding an email address and automatic unsubscribe are not distinguished due to the interface, as these actions are not related to a specific form. The SARE program provides several ready-made scenarios that are available for the default interfaces. If you do not create your own scenarios, the program will use the default ones.
Scenario for the event – adding an address through the website
In this scenario, you specify the actions to be performed when an email address is added to the subscription list. Possible actions are:
- Display HTML/TXT object – this is an object saved in SARE, which will be displayed as a regular web page.
- Redirection to website – the person adding to the list will be redirected to a thank you page.
- Sending an administrative email (TXT) – an email requesting confirmation of the addition of an address to the database. This email is sent only in text version to be compatible with different email programs and operating systems.
Scenario for the event – confirmation of the addition of an e-mail address
In this scenario, you specify the actions to be performed after confirming the addition of an email address. Possible actions are:
- Display HTML/TXT object – this is an object saved in SARE, which will be displayed as a regular web page.
- Redirection to website – the confirmer will be redirected to a thank you page.
- Sending an administrative email (TXT) – an email requesting confirmation of the addition of an address to the database. This email is sent only in text version to be compatible with different email programs and operating systems.
Scenario for the event – automatic discharge
In this scenario, you specify the actions to be performed when a user unsubscribes. Possible actions are:
- Sending an email – sending any HTML or TXT version of the newsletter. Note, however, that by unsubscribing from the list, the user is letting it be known that he/she does not want to receive any more e-mails from the sender.
- Display HTML/TXT object – this is an object saved in SARE, which will be displayed as a regular web page.
- Redirect to website – the unsubscriber will be redirected to a thank you page.
Defining scenarios
Before creating a scenario, its elements must be defined: event, interface, action and object type. The user creates the object in the Subscription Messages section. To create a new scenario, go to the Action Scenarios tab and click “New scenario.” Then select the type of event, interface and action, as well as the object to be sent or displayed. The scenario is saved by clicking “Save.” You can create several scenarios for each event.
Step 2 – Set subscription messages
Subscription messages are part of action scenarios. They are any information in HTML or text form that will automatically be displayed or sent to the user after a specific action, such as adding an address via a website, confirming the addition of an email address, or automatically unsubscribing from an email.
There are three types of facilities
- TXT administrative email – this is usually an email requesting confirmation of addition to the database.
- HTML/TXT object – this can be any HTML page created and placed in SARE or any e-mail (in HTML or TXT version), such as the current newsletter.
- Redirect – a URL that leads to a page that is “outside” SARE.
All defined objects are displayed in a table. The SARE program includes several standard objects, for example, an e-mail requesting registration confirmation.
Description of columns
- Object identifier – a unique identifier of the object. The first two letters indicate the type of object, and the next three digits are the object number (MA – administrative email, ME – HTML/TXT, RE – redirect).
- Subject title – the subject of an e-mail or the title of a website.
- Object description – an explanation or commentary on the content of the object.
- Object type – information whether the object is in HTML or TXT format.
- The last modification of the object – the date of the last change to the object.
- Scenario – information about the scenario to which the object is assigned. One object can be assigned to several scenarios.
- Encoding when sending – the type of encoding used when sending the object as an e-mail.
- Edit object – the ability to make changes to existing objects.
Adding new objects
To add a new object, go to the Special Objects tab. Then select the type of object (TXT/HTML, administrative email, redirect) from the list above the “Add new object” table and confirm your selection by clicking the “Create” button.
For the form to create an object of type “Administrative Mail – TXT”, enter the object description, e-mail title and select the object encoding. For the form to create an object of type “HTML/TXT” or “Redirection”, enter the object description, page/e-mail title, object encoding, and e-mail content or redirection URL, respectively.
It is worth noting that any HTML or text message saved in the Mailing -> work section can be used as a subscription message. All you need to do is save it as a subscription message in the “Create Subscription Message” section.
Step 3 – Preparing the interface
This part allows you to hook up a subscription module to a website to collect email addresses for the database in SARE. Each interface is handled separately, allowing you to collect addresses from different sites, ensuring that messages are displayed in the appropriate languages. To create a new interface, select the number and name of the interface in the “Interface Description” table and click “Update.”
Step 4 – Generate code
With the help of the generator, you can get an HTML form for collecting email addresses on a website. Such a form should be placed on the page where users will have the opportunity to sign up. Before generating the HTML form, you need to set several parameters, such as the interface number (if you don’t choose any, the default interface will be used), the character encoding (ISO-8859-2 for Polish characters, UTF-8 for international characters), the group to which the user will be added, and the list of features that the user will be able to define when signing up for the database (the list of features can be empty).
After setting all the parameters, you can generate the HTML form by clicking the “Generate HTML code” button. The generated code will appear in the box below the button. Copy this code and place it on the web page where you want to place the subscription form.
Thanks to the use of the SARE form generator, the process of adding a subscription module to a website becomes simple and intuitive. All you have to do is set the appropriate parameters, and the system generates the HTML code ready to be placed on the site.
Using this solution, you can easily collect email addresses from users, customizing subscription scenarios according to your needs. All this allows you to effectively manage your subscriptions and communications with users.
The advantages of using the SARE form generator are:
- Quickly and easily create subscription forms on your website.
- Customizable subscription scenarios, taking into account various events and actions.
- Collecting email addresses to build a subscriber base.
- Access to ready-made scenarios and objects that can be easily customized.
- Intuitive user interface for easy configuration and management of the subscription module.
With SARE’s form generator, you can effectively manage subscriptions on your website and maintain regular communication with users by sending newsletters, information about promotions or other types of communications.
Subscription scenarios allow you to automate the registration, confirmation and unsubscription process, making it easy to maintain a clean and up-to-date subscriber base.
If you are looking for a simple and effective way to integrate a subscription module into your website, using the SARE form generator is a solution worth considering.