-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
89 lines (85 loc) · 3.24 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Website Questionnaire | Shane Boland</title>
<meta name="description" content="Minimal Form Interface: Simplistic, single input view form" />
<meta name="keywords" content="form, minimal, interface, single input, big form, responsive form, transition" />
<meta name="author" content="Shane Boland" />
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/demo.css" />
<link rel="stylesheet" type="text/css" href="css/component.css" />
<script src="js/modernizr.custom.js"></script>
</head>
<body>
<div class="container">
<header class="header">
<h1>Looking for a website?<span>Help me out by answering these 5 simple questions.</span></h1>
</header>
<section>
<form action="http://forms.brace.io/[email protected]" id="theForm" class="simform">
<div class="simform-inner">
<ol class="questions">
<li>
<span><label for="q1">What's your email?</label></span>
<input id="q1" name="_replyto" type="email"/>
</li>
<li>
<span><label for="q2">What is the name of your website?</label></span>
<input id="q2" name="q2" type="text"/>
</li>
<li>
<span><label for="q3">What is the purpose/goal of your website?</label></span>
<input id="q3" name="q3" type="text"/>
</li>
<li>
<span><label for="q4">What is your approximate budget for this site?</label></span>
<input id="q4" name="q4" type="text"/>
</li>
<li>
<span><label for="q5">What book inspires you?</label></span>
<input id="q5" name="q5" type="text"/>
</li>
</ol><!-- /questions -->
<button class="submit" value="Send" type="submit">Send answers</button>
<div class="controls">
<button class="next"></button>
<div class="progress"></div>
<span class="number">
<span class="number-current"></span>
<span class="number-total"></span>
</span>
<span class="error-message"></span>
</div><!-- / controls -->
</div><!-- /simform-inner -->
<span class="final-message"></span>
</form><!-- /simform -->
<p>Made by Shane Boland</p>
</section>
</div><!-- /container -->
<script src="js/classie.js"></script>
<script src="js/stepsForm.js"></script>
<script>
var theForm = document.getElementById( 'theForm' );
//disable form autocomplete
theForm.setAttribute( "autocomplete", "off" );
new stepsForm( theForm, {
onSubmit : function( form ) {
// hide form
classie.addClass( theForm.querySelector( '.simform-inner' ), 'hide' );
/*
form.submit()
or
AJAX request (maybe show loading indicator while we don't have an answer..)
*/
var messageEl = theForm.querySelector( '.final-message' );
messageEl.innerHTML = 'Thank You! I will be in touch soon.';
classie.addClass( messageEl, 'show' );
}
} );
</script>
</body>
</html>