This instruction will help you to layout a pop-up, which CSS styles will not distort or conflict with the styles of your site. You will be able to manage pop-up settings in the service interface in the “Pop-ups” section.
Three types of pop-ups are available in the service:
And 2 categories:
Designed to collect user information: email, phone number, name, etc.
By leaving an email address (and other user data) in the field of the pop-up window, the user subscribes to the newsletter. After subscribing, he/she sees a “thank you page” with a confirmation of successful subscription.
Class .enpop_thanks-windowwhich should be added to the parent block with id #enpopclass is responsible for the mechanics of showing the “thank you page”. Adding one class changes the behaviour of the other elements.
The additional (optional) class marketing-consent–enpop is responsible for the mechanics of subscribing to a mailing list. Using this class with the name marketingConsent, you can add a checkbox for “Consent to advertising mailings”. If the user does not check it, they will not be subscribed to the mailing lists of the pop-up collector, but will be added to the enKod platform.
Designed to inform the user about a particular service/promotion, etc. “Thank-you pages” are not used for such a popup.
Pop-up service pop-up templates have the correct structure and classes, which can be modified and supplemented if necessary. Therefore, we recommend using them for layout.
<div id="enpop" class="container--enpop enpop_color_1 enpop_position_bottom-right">
<form class="popup--enpop" data-role="body">
<input class="popup__close-button--enpop" type="button" data-role="close" />
<div class="popup__title--enpop enpop_title">Weekly news</div>
<div class="popup__text--enpop enpop_text">Leave us your email-address so we can sent you more information</div>
<div class="popup__inputs-container--enpop">
<input class="inputs-container__input--enpop" name="firstName" type="text"
placeholder="name">
<input class="inputs-container__input--enpop" name="email" type="email"
placeholder="email">
<input class="inputs-container__input--enpop" name="phone" type="tel"
placeholder="phone number">
<input class="inputs-container__submit--enpop enpop_submit" type="submit"
value="Subscribe">
</div>
<div class="popup__accept-container--enpop">
<p class="accept-container__text--enpop">By pressing this button you are agreeing to
<a class="accept-container__link--enpop enpop_accept">our polices</a></p>
</div>
</form>
</div>
Example layout of a checkbox for agreeing to receive advertising mailings
<div class="marketing-consent marketing-consent--enpop">
<input type="checkbox" name="marketingConsent" class="marketing-consent__checkbox" />
<label class="marketing-consent__label">
I agree to receive promotional emails
</label>
</div>
Example of a pop-up window structure with a checkbox for consent to receive advertising mailings
<div
id="enpop"
class="container--enpop enpop_color_1 enpop_position_bottom-right"
>
<form class="popup--enpop" data-role="body">
<input class="popup__close-button--enpop" type="button" data-role="close" />
<div class="popup__title--enpop enpop_title">News of the week</div>
<div class="popup__text--enpop enpop_text">
Leave your email here and we will write back to you
</div>
<div class="popup__inputs-container--enpop">
<input
class="inputs-container__input--enpop"
name="firstName"
type="text"
placeholder="phone"
/>
<input
class="inputs-container__input--enpop"
name="email"
type="email"
placeholder="email"
/>
<input
class="inputs-container__input--enpop"
name="phone"
type="tel"
placeholder="phone number"
/>
<input
class="inputs-container__submit--enpop enpop_submit"
type="submit"
value="Subscribe"
/>
</div>
<div class="popup__accept-container--enpop">
<p class="accept-container__text--enpop">
By pressing this button you agree with
<a class="accept-container__link--enpop enpop_accept">the info in this link</a>
</p>
</div>
<!-- Agree to accept marketing mailings -->
<div class="marketing-consent marketing-consent--enpop">
<input
class="marketing-consent__checkbox"
type="checkbox"
name="marketingConsent"
/>
<label class="marketing-consent__label">
Agree to accept marketing mailings
</label>
</div>
</form>
</div>
Mandatory:
!important#enpop * {all: initial !important}–enpop to make the styles unique..container–enpop. All themes with colour, positioning, etc. should be applied to it.container–enpop put id #enpop and write all styles through it.#enpop.container–enpop и #enpop .container–enpopdata-role='overlay' - background block (if any)data-role='body' - popup bodydata-role='close' - button to close the pop-up windowname='firstName' type='text' - input with namename='lastName' type='text' - surname inputname='email' type='email' - email inputname='phone' type='tel' - phone inputtype='submit' - form submit buttonenpop_title - title textenpop_text - body textenpop_submit - subscribe buttonenpop_accept - link to the agreement on processing of personal dataenpop_accept_container - if there is a checkbox, wrap the container with the PD and the checkbox..enpop_accept a (or another class of the PDN container), i.e. without creating a class for itdisplay:noneso the top indents should not be set, so that the layout will not break when it is hiddenenpop_position_bottom - for line popupsenpop_position_bottom-right - for small pop-upsmarketing-consent–enpop and name marketingConsent are required for the checkbox.Desirable:
What else is important:
enpop_position_top-leftenpop_position_top-rightenpop_position_bottom-leftenpop_position_bottom-rightenpop_position_topenpop_position_bottomenpop_position_leftenpop_position_rightenpop_offer-windowenpop_thanks-windowenpop_color_1enpop_color_2enpop_color_3…
enpop_special-effect_1enpop_special-effect_2enpop_special-effect_3…
Configuration file is needed to describe the popup parameters that can be changed, as well as for its proper operation when loaded into enKod. Only part of the config file needs to be filled in, we will do the rest ourselves.
Examples of configuration files can be found in the download templates.
type - popup type (fullscreen/line/small)category - pop-up category (collecting/informing)scriptSettings - settings that are passed to the script. If you don't add these settings, you won't be able to choose to display a thank you page in the editorthanksPageClass - thanksPage classcontainerSelector - container to which you want to add a class"marketingNewslettersConsent": true — a field (optional) responsible for displaying a checkbox for consent to receive advertising mailings. If you do not plan to include such a checkbox in the pop-up, then there is no need to add this setting.settings - general settingspersonalData - PD settingsshow - whether to show by default (true/false)selector - selector for the container with the AP text (by default enpop_accept)text - default AP texthref - default PD linkcontainerSelector - If the AP link contains not only text but also other elements like a checkbox, you can specify their common container to be hidden to avoid cases where the text is hidden but the checkbox remains. Field optionalcustom - popup settingsname - description of the field that will be displayed in the interface when customising the pop-up windowselector - selector for the container (by default 'enpop_title/enpop_text/enpop_submit)param - changeable property (textContent/value/innerHTML/style.width)value - default field valuetype - type (text)themes - design themesvalue - default colour scheme (enpop_color_1)selector - selector (container–enpop)enumcolour - theme colour for previewclass - colour scheme class (enpop_color_X)fields - Configuring dynamically added form fields
Warning. If you specify a field inputContainerSelectorfield, its contents will be automatically cleared and only those fields specified in the settings will be rendered.
fieldClass - class with which the input field is addedinputContainerSelector - selector of the container to which fields will be addedenumname - field name (email/phone/firstName/lastName)placeholder - name of the field the user will seerequired - whether the field is required (true/false)positions - design themesvalue - default positionselector - selector (ontainer–enpop)enumaligment - position (top-left/top-right/bottom-left/bottom-right)class - position classthanksPage - text settings for thanks pagename - description of the field that will be displayed in the interface when setting up the pop-up windowselector - selector for the container (by default enpop_title/enpop_text/enpop_submit)param - modifiable property (textContent/value/innerHTML/style.width)value - default field valuetype - type (text)