-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathform_setup.js
More file actions
24 lines (18 loc) · 812 Bytes
/
form_setup.js
File metadata and controls
24 lines (18 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
async function setupForm(e) {
if (e.preventDefault) e.preventDefault();
const data = new FormData(e.target);
let email = data.entries().next().value[1];
const response = await fetch("get_form.php?uuid=" + email + "&email=" + email);
var div = document.createElement("div");
div.setAttribute("class", "iframe-ctn");
document.body.appendChild(div);
var ifrm = document.createElement("iframe");
ifrm.setAttribute("src", response.url);
ifrm.setAttribute("style", "position: absolute; width: 100%; height: 100%; overflow: hidden;");
ifrm.setAttribute("scrolling", "no");
ifrm.setAttribute("id", "consent");
ifrm.setAttribute("name", "consent");
ifrm.setAttribute("onload", "initIframeResizer('#consent');");
div.appendChild(ifrm);
return false;
}