forked from lytics/pathforajs-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom-form.js
47 lines (45 loc) · 1.05 KB
/
custom-form.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
(function(window) {
var customFormWidget = window.pathfora.Form({
id: "custom-form-widget",
layout: "slideout",
position: "bottom-left",
className: "custom-form-widget",
headline: "Sign up for our Newsletter",
formElements: [
{
"type": "text",
"required": true,
"label": "Email Address",
"name": "email"
},
{
"type": "checkbox-group",
"required": true,
"label": "Which feeds would you like to subscribe to?",
"name": "subscription_feeds",
"values": [
{
"label": "Beauty & Perfumes",
"value": "beauty"
},
{
"label": "Electronics",
"value": "electronics"
},
{
"label": "Fashion",
"value": "fashion"
}
]
}
],
okMessage: "Subscribe"
});
var modules = {
target: [{
segment: "high_intensity",
widgets: [customFormWidget]
}]
};
window.pathfora.initializeWidgets(modules);
}(window));