-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathget-started.html
More file actions
157 lines (130 loc) · 5.06 KB
/
Copy pathget-started.html
File metadata and controls
157 lines (130 loc) · 5.06 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
---
---
<!DOCTYPE html>
<html>
{% include head.html title="Get started with LocalData" %}
<body class="leads">
<header class="out">
<div class="photo">
<div class="a">
<h1 class="logo"><a href=".">LocalData</a></h1>
</div>
</div>
<div class="b">
<h1 class="case"></h1>
<div id="sec-start">
<h1>Ready to go?</h1>
<h2>Get ready before the ground thaws with survey tools that are
fast and easy to use.</h2>
<p>Fill out the form below or call us toll-free at <strong>866-944-4468</strong>.</p>
</div>
<div class="hidden" id="sec-thanks">
<h1>Thank you!</h1>
<h2>We will be in touch shortly.</h2>
<p>You can also <a href="http://localhost:8888/public-site/_site/case-muncie.html">read a series of case studies</a> showing how LocalData has been used for data collection ranging from crime to historic preservation.</p>
<p>Want to get started right now? Give us a call at <strong>866-944-4468</strong>.
</div>
<form action="" id="sec-form">
<div class="hidden req" id="req-message">Oops, you're missing some required fields.</div>
<div class="single">
<label for="form-name">Name<a class="req">*</a></label>
<input type="text" name="entry.0.single" id="form-name" placeholder="Your name" data-required="true" />
</div>
<div class="pair">
<div class="single">
<label for="form-email">Email<a class="req">*</a></label>
<input type="text" name="entry.23.single" id="form-email" data-required="true" placeholder="you@example.com" />
</div>
<div class="single">
<label for="form-phone">Phone<a class="req">*</a></label>
<input type="text" name="entry.22.single" id="form-phone" data-required="true" placeholder="(555) 555-1234" />
</div>
</div>
<div style="display:none;">
<input type="text" name="entry.2.single" id="form-last-name" value="_"/>
</div>
<input type="hidden" name="pageNumber" value="0" />
<input type="hidden" name="backupCache" value="" />
<input type="hidden" name="submit" value="Submit" />
<input type="submit" value="Get in touch" class="input-submit" id="form-submit" />
</form>
</form>
<iframe id="cm" src="cmform-2014-preservation.html" width="0" height="0">
</iframe>
</div>
</header>
{% include js.html %}
<script type="text/javascript">
$(document).ready(function () {
'use strict';
// Fill in e-mail from fragment
if (location.hash !== '') {
$('#form-email').val(decodeURIComponent(location.hash.slice(1)));
}
function setCheckToggle(id) {
var $el = $('#' + id);
$el.change(function handleToggle(e) {
var $sub = $('div[data-condition="' + id + '"]');
if ($el.prop('checked')) {
$sub.show(400);
} else {
$sub.hide(400);
}
});
}
function setRadioToggle(id, name, yes) {
var $el = $('input[name="' + name + '"]');
$el.change(function handleToggle(e) {
var $checked = $('input[name="' + name + '"]:checked');
var $sub = $('div[data-condition="' + id + '"]');
if ($checked.val() === yes) {
$sub.show(400);
} else {
$sub.hide(400);
}
});
}
// Collect and submit entries from the form.
$('#sec-form').submit(function (e) {
e.preventDefault();
$('#form-submit').val('Submitting...');
// Validation
$('#req-message').hide();
var valid = true;
$('input[data-required="true"]').each(function () {
var val = $(this).val();
if (!val) {
$(this).addClass('missing');
valid = false;
}else {
$(this).removeClass('missing');
}
});
if (!valid) {
$('#req-message').show();
$('#form-submit').val('Submit');
$('body').animate({
scrollTop: 0
});
return;
}
//console.log("posting");
// Record responses in the spreadsheet.
var $cm = $(window.frames[0].document);
$cm.find('#hidden-name').val($('#form-name').val());
$cm.find('#hidden-email').val($('#form-email').val());
$cm.find('#hidden-phone').val($('#form-phone').val());
$cm.find('#hidden-form').submit();
$('#sec-form').hide(500, function () {
window.scrollTo(0, $('.text').position().top);
$('#sec-start').hide();
$('#sec-thanks').show(600);
});
// Record an analytics event
_gaq.push(['_trackEvent', 'interest', 'submit']);
});
});
</script>
{% include footer.html %}
</body>
</html>