- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
JS Animated. How to activate newsletter (subscription) addon
January 15, 2015
Our support team is glad to present our new tutorial on activating Subscription form on your HTML website.
JS Animated. How to activate newsletter (subscription) addonIf you want to stay in touch with your site visitors, it is good to have not only a contact form on your site, but give customers opportunity to subscribe to your newsletter.
Description
![JS Animated.How_to_activate_subscription_form_1](/help/wp-content/uploads/2014/10/JS-Animated.How_to_activate_subscription_form_1-300x57.png)
In order to make subscription form appear on the site, this HTML code should be included into page content:
![JS Animated.How_to_activate_subscription_form_2](/help/wp-content/uploads/2014/10/JS-Animated.How_to_activate_subscription_form_2-300x139.png)
The HTML structure inside the form is flexible, the only condition is that inputs should be placed inside the label tags that have class corresponding to their type. There are the following classes/types by default:
- name – the User’s Name. Validation: digits are disallowed, not less than 2 symbols;
- email – the User’s Email;
Also, label tag mentioned above can contain nested span elements with class error, which include the error message in case the data in the field is specified incorrectly.
In order to activate subscription form, follow these steps:
-
Include subscribe form script (the one from example below) in the section of HTML file:
-
Copy “bat” folder to your website root folder. The “bat” folder should contain 1 file: MailHandler-sub.php .
-
Initialize your subscription form on the $(window).load() : event at the end of sForm.js file:
$(window).load(function(){ $('#subscribe-form').sForm({ ownerEmail:'#', sitename:'sitename.link' }) })
-
Use the following parameters for initialization:
- ownerEmail – the Email address the data will be sent to;
- sitename – website address which maintains subscription form:
In case of successful subscription, the website owner and the website visitor get two separate successful subscription confirmation emails. The website owner target email is grabbed from sForm.js file and the website visitor email is an email specified during subscription:
![JS Animated.How_to_activate_subscription_form_6](/help/wp-content/uploads/2014/10/JS-Animated.How_to_activate_subscription_form_6-300x139.png)
Feel free to check the detailed video tutorial below:
JS Animated. How to activate newsletter (subscription) addon