HTML
General guidelines
- You can start your layout with
<div>, with"popmechanic-reset"andid="popmechanic-form"classes. The<!DOCTYPE html>or<header>tags are not required. - The
"popmechanic-main"class wraps the main screen of the subscription form. - Any element that is used to close a form should use
"data-popmechanic-close". No additional scripts are needed:
Forms that collect contacts
As contact collection forms send some customer details to Maestra, they should contain at least one input field and one confirmation button:"popmechanic-thankyou" class:
Data submission forms
If you need to count clicks on your embedded form’s URL or button, add"data-popmechanic-submit" to this URL/button.
CSS styles
Style parameters to fit various screen sizes
Avoid using media requests to create a pop-up form. Maestra’s script uses the"popmechanic-desktop", "popmechanic-tablet", and "popmechanic-mobile" classes in the pop-up container to adapt it to different devices.
Classes reserved for styles:
- #popmechanic-form — all the form screens;
- .popmechanic-mobile — the mobile version of a screen;
- .popmechanic-tablet — the desktop form version;
- .popmechanic-thankyou — the “Thank You For Subscribing” screen.
#popmechanic-form at the beginning of the selector as shown below: