-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathstdFormSample.html
More file actions
47 lines (42 loc) · 2.07 KB
/
stdFormSample.html
File metadata and controls
47 lines (42 loc) · 2.07 KB
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>Demandbase Standard Forms Implementation Tester</title>
<!--Including Demandbase Company Autocomplete Widget -->
<script src="http://api.demandbase.com/autocomplete/widget.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="http://autocomplete.demandbase.com/autocomplete/stylesheet.v2.css" />
<!-- Including Demandbase Standard Forms Implementation -->
<script src="demandbaseFormStd.js" type="text/javascript"></script>
<script type="text/javascript">
function showFormSubmit() {
if(DemandbaseForm.demandbaseParser.dbDataSet.company_name) {
companyName = DemandbaseForm.demandbaseParser.dbDataSet.company_name;
alert("Submitted form with Demandbase Data Source: " + DemandbaseForm.demandbaseParser.dbDataSrc + "\nCompany Identified: " + companyName);
} else if (DemandbaseForm.demandbaseParser.dbDataSet.registry_company_name) {
alert('Visitor Classified as: ' + DemandbaseForm.demandbaseParser.dbDataSet.audience);
} else {
alert('Visitor Company Not Identified (or error)');
}
}
</script>
</head>
<body>
<h1 id="testP">
Test page for the Demandbase Standard Forms Solution
</h1>
<h2>
This page utilizes all three Demandbase APIs (IP, Domain and Company Name) by utilizing the Company Autocomplete Widget.
</h2>
<hr/>
<p id="sampleForm">
<h2>Sample Form</h2>
<h3>To enable this form, update <em>demandbaseFormStd.js</em> with your Demandbase Forms Key.</h3>
<form name="simpleFormTest">
Email: <input type="text" id="email_input_id"/> <br/>
Company: <input type="text" id="company_input_id"/>
<br/>
<input type="submit" value="submit" onclick="showFormSubmit();"/>
</form>
</p>
</body>
</html>