-
Notifications
You must be signed in to change notification settings - Fork 0
/
survey.ejs
32 lines (29 loc) · 887 Bytes
/
survey.ejs
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Survey</title>
</head>
<body>
<p>
Survey page:<b><%= page %></b> for user:<b><%= uname %></b>
<br />
<br />
<%= question %>
</p>
<p>
<a href="/layoutSetting">Set your layout sytle</a>
</p>
<p></p>
<form method="POST" action="/survey">
<% for(var i=0; i < choices.length; i++) { %>
<input type='radio' name='answer' value='<%= i %>' <%= selected === i ? 'checked' : '' %> />
<%= choices[i].choice %> <% if (layoutStyle === "vertical") { %> <br /><br />
<% } %> <% } %> <% if (page > 1) { %>
<input type="submit" name="submit" value="prev" />
<% } %>
<input type="submit" name="submit" value="next" /> <br />
<p><em>Psst, you should pick option <%= rand %></em></p>
</form>
</body>
</html>