source: PerfectFit/Web/src/main/webapp/form.html

Last change on this file was 7, checked in by Wouter Pasman, 10 months ago

#124 release PerfectFit sources

File size: 32.6 KB
RevLine 
[7]1<?xml version="1.0" encoding="UTF-8"?>
2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
3<head>
4<meta charset="utf-8" />
5<title>PerfectFit Chat App</title>
6<link rel="stylesheet" type="text/css" media="screen"
7 href="css/form.css" />
8</head>
9
10<script type="application/javascript">
11/* Show alert if cookies disabled, as website does not work properly then.
12 */
13 function checkCookies() {
14 document.cookie = "cookie";
15
16 if (document.cookie!="cookie") {
17 alert("Your browsesr blocks the session cookie, therefore this application does not work correctly. Please enable the local session cookie.");
18 }
19 }
20</script>
21
22
23<body onload="checkCookies();";>
24
25 <h1>Your information</h1>
26
27 <p>The answers to the following questions are used to personalize
28 the chat bot. This form contains default values. You can modify it as
29 you like, or use it as it is. Scroll to the bottom and press "Done" to
30 use the values as set and proceed to the chat.</p>
31
32 <div class="question">Age</div>
33 <div>What is your age in years?</div>
34 <!-- Normalization is 52 therefore max must be 52 too. I assume baby's don't participate -->
35 <input type="number" id="age" value=25 min="1" max="52" step="1" />
36
37 <div class="question">Household income</div>
38 <div>What is your total household income per year, including all
39 earners in your household (after tax) in GBP?</div>
40 <div>
41 <input type="radio" name="income" value="0"><label>Less
42 than £10,000.</label> <br>
43 <input type="radio" name="income" value="1"><label>£10,000
44 - £15,999 </label> <br>
45 <input type="radio" name="income" value="2"><label>£16,000
46 - £19,999</label> <br>
47 <input type="radio" name="income" value="3"><label>£20,000
48 - £29,999</label> <br>
49 <input type="radio" name="income" value="4"><label>£30,000
50 - £39,999</label> <br>
51 <input type="radio" name="income" value="5" checked><label>£40,000
52 - £49,999</label> <br>
53 <input type="radio" name="income" value="6"><label>£50,000
54 - £59,999</label> <br>
55 <input type="radio" name="income" value="7"><label>£60,000
56 - £69,999</label> <br>
57 <input type="radio" name="income" value="8"><label>£70,000
58 - £79,999</label> <br>
59 <input type="radio" name="income" value="9"><label>£80,000
60 - £89,999</label> <br>
61 <input type="radio" name="income" value="10"><label>£90,000
62 - £99,999</label> <br>
63 <input type="radio" name="income" value="11"><label>£100,000
64 - £149,999</label> <br>
65 <input type="radio" name="income" value="12"><label>More
66 than £150,000</label> <br>
67 </div>
68
69 <div class="question">Household size</div>
70 <div>Including you, how many people live in your household?</div>
71 <div>
72 <input type="radio" name="householdsize" value="0"><label>1</label>
73 <br>
74 <input type="radio" name="householdsize" value="1"><label>2</label>
75 <br>
76 <input type="radio" name="householdsize" value="2"><label>3</label>
77 <br>
78 <input type="radio" name="householdsize" value="3"><label>4</label>
79 <br>
80 <input type="radio" name="householdsize" value="4"><label>5</label>
81 <br>
82 <input type="radio" name="householdsize" value="5" checked><label>6</label>
83 <br>
84 <input type="radio" name="householdsize" value="6"><label>7</label>
85 <br>
86 <input type="radio" name="householdsize" value="7"><label>8</label>
87 <br>
88 <input type="radio" name="householdsize" value="8"><label>9</label>
89 <br>
90 <input type="radio" name="householdsize" value="9"><label>10</label>
91 <br>
92 <input type="radio" name="householdsize" value="10"><label>10+</label>
93 <br>
94 </div>
95
96 <div class="question">Traits and Physical Activity</div>
97 <div>
98 Here are a number of personality traits that may or may not apply to
99 you. Please indicate for each statement the extent to which <b>you
100 agree or disagree</b> with that statement. You should rate the extent to
101 which the <b>pair of traits applies to you</b>, even if one
102 characteristic applies more strongly than the other.
103 </div>
104 <table>
105 <tr>
106 <th>trait</th>
107 <th>disagree strongly</th>
108 <th>disagree moderately</th>
109 <th>disagree a little</th>
110 <th>Neither agree nor disagree</th>
111 <th>Agree a little</th>
112 <th>Agree moderately</th>
113 <th>Agree strongly</th>
114 </tr>
115
116
117 <tr>
118 <td>extraverted, enthusiastic</td>
119 <td><input type="radio" name="extraverted" value=0 /></td>
120 <td><input type="radio" name="extraverted" value=1 /></td>
121 <td><input type="radio" name="extraverted" value=2 /></td>
122 <td><input type="radio" name="extraverted" value=3 checked /></td>
123 <td><input type="radio" name="extraverted" value=45 /></td>
124 <td><input type="radio" name="extraverted" value=5 /></td>
125 <td><input type="radio" name="extraverted" value=6 /></td>
126 </tr>
127 <tr>
128 <td>reserved, quiet</td>
129 <td><input type="radio" name="reserved" value=0 /></td>
130 <td><input type="radio" name="reserved" value=1 /></td>
131 <td><input type="radio" name="reserved" value=2 /></td>
132 <td><input type="radio" name="reserved" value=3 checked /></td>
133 <td><input type="radio" name="reserved" value=4 /></td>
134 <td><input type="radio" name="reserved" value=5 /></td>
135 <td><input type="radio" name="reserved" value=6 /></td>
136 </tr>
137 <tr>
138 <td>open to new experiences, complex</td>
139 <td><input type="radio" name="creative" value=0 /></td>
140 <td><input type="radio" name="creative" value=1 /></td>
141 <td><input type="radio" name="creative" value=2 /></td>
142 <td><input type="radio" name="creative" value=3 checked /></td>
143 <td><input type="radio" name="creative" value=4 /></td>
144 <td><input type="radio" name="creative" value=5 /></td>
145 <td><input type="radio" name="creative" value=6 /></td>
146 </tr>
147 <tr>
148 <td>conventional, uncreative</td>
149 <td><input type="radio" name="uncreative" value=0 /></td>
150 <td><input type="radio" name="uncreative" value=1 /></td>
151 <td><input type="radio" name="uncreative" value=2 /></td>
152 <td><input type="radio" name="uncreative" value=3 checked /></td>
153 <td><input type="radio" name="uncreative" value=4 /></td>
154 <td><input type="radio" name="uncreative" value=5 /></td>
155 <td><input type="radio" name="uncreative" value=6 /></td>
156 </tr>
157
158 </table>
159
160
161
162 <br />
163 <div class="question">Activity</div>
164 <!-- TTM_PA -->
165
166 <div>
167 <b> Physical activity</b> is any bodily movement produced by skeletal
168 muscles that requires energy expenditure. This includes exercise (e.g.
169 swimming, jogging) as well as other activities which involve bodily
170 movement and are done as part of playing, working, active
171 transportation, house chores and recreational activities.
172 </div>
173 <br />
174 <div>
175 The WHO recommends to do <b>2</b> types of physical activity <b>every
176 week</b>:
177 </div>
178 <div>
179 <ol>
180 <li><b>areobic physical activity</b> in <b>one</b> of these 3
181 forms:
182 <ul>
183 <li>at least <b>2.5-5 hours of moderate-intensity</b> aerobic
184 physical activity,
185 <li>at least <b>1.25-2.5 hours of vigorous-intensity</b>
186 aerobic physical activity,
187 <li>an equivalent combination of moderate- and
188 vigorous-intensity activity.
189 </ul>
190 <li><b>muscle-strengthening activities</b> at moderate or
191 greater intensity that involve all major muscle groups on <b>2
192 or more days</b>.
193 </ol>
194 </div>
195 <div>
196 Adults who are <b>65 or older and have poor mobility</b> should <b>additionally</b>
197 perform veried <b>multicomponent physical activity</b> that emphasizes
198 functional balance and strangth training at moderate or greater
199 intensity <b>to enhance functional capacity and prevent falls</b> on <b>3
200 or more days per week</b>.
201 </div>
202 <br />
203
204
205 <div><b>Are you physically active according to this definition?</b></div>
206
207 <div>
208 <input type="radio" id="html" name=ttm_pa value="0"><label
209 for="html">Yes, I have been for MORE than 6 months.</label> <br>
210 <input type="radio" id="html" name="ttm_pa" value="1"><label
211 for="html">Yes, I have been for LESS than 6 months.</label> <br>
212 <input type="radio" id="html" name="ttm_pa" value="2" checked><label
213 for="html">No, but I intend to in the next 30 days.</label> <br>
214 <input type="radio" id="html" name="ttm_pa" value="3"><label
215 for="html">No, but I intend to in the next 6 months.</label> <br>
216 <input type="radio" id="html" name="ttm_pa" value="4"><label
217 for="html">No, and I do NOT intend to in the next 6 months.</label>
218 </div>
219
220
221 <div class="question">Openness to experiences</div>
222 <table>
223 <tr>
224 <th>trait</th>
225 <th>disagree strongly</th>
226 <th>disagree</th>
227 <th>Neither agree nor disagree</th>
228 <th>Agree</th>
229 <th>Agree strongly</th>
230 </tr>
231
232
233 <tr>
234 <td>I consider myself a physically active person.</td>
235 <td><input type="radio" name="active" value=0 /></td>
236 <td><input type="radio" name="active" value=1 /></td>
237 <td><input type="radio" name="active" value=2 checked /></td>
238 <td><input type="radio" name="active" value=3 /></td>
239 <td><input type="radio" name="active" value=4 /></td>
240 </tr>
241 <tr>
242 <td>When I describe myself to others, I usually include my
243 involvement in physical activity.</td>
244 <td><input type="radio" name="describing" value=0 /></td>
245 <td><input type="radio" name="describing" value=1 /></td>
246 <td><input type="radio" name="describing" value=2 checked /></td>
247 <td><input type="radio" name="describing" value=3 /></td>
248 <td><input type="radio" name="describing" value=4 /></td>
249 </tr>
250 <tr>
251 <td>I have numerous goals related to being physically active.</td>
252 <td><input type="radio" name="goals" value=0 /></td>
253 <td><input type="radio" name="goals" value=1 /></td>
254 <td><input type="radio" name="goals" value=2 checked /></td>
255 <td><input type="radio" name="goals" value=3 /></td>
256 <td><input type="radio" name="goals" value=4 /></td>
257 </tr>
258 <tr>
259 <td>Physical activity is a central factor to my self-concept.</td>
260 <td><input type="radio" name="selfconcept" value=0 /></td>
261 <td><input type="radio" name="selfconcept" value=1 /></td>
262 <td><input type="radio" name="selfconcept" value=2 checked /></td>
263 <td><input type="radio" name="selfconcept" value=3 /></td>
264 <td><input type="radio" name="selfconcept" value=4 /></td>
265 </tr>
266 <tr>
267 <td>I need to be physically active to feel good about myself.</td>
268 <td><input type="radio" name="feelgood" value=0 /></td>
269 <td><input type="radio" name="feelgood" value=1 /></td>
270 <td><input type="radio" name="feelgood" value=2 checked /></td>
271 <td><input type="radio" name="feelgood" value=3 /></td>
272 <td><input type="radio" name="feelgood" value=4 /></td>
273 </tr>
274 <tr>
275 <td>Others see me as someone who is physically active.</td>
276 <td><input type="radio" name="others" value=0 /></td>
277 <td><input type="radio" name="others" value=1 /></td>
278 <td><input type="radio" name="others" value=2 checked /></td>
279 <td><input type="radio" name="others" value=3 /></td>
280 <td><input type="radio" name="others" value=4 /></td>
281 </tr>
282 <tr>
283 <td>For me, being a physically active person means more than
284 just being physically active.</td>
285 <td><input type="radio" name="means" value=0 /></td>
286 <td><input type="radio" name="means" value=1 /></td>
287 <td><input type="radio" name="means" value=2 checked /></td>
288 <td><input type="radio" name="means" value=3 /></td>
289 <td><input type="radio" name="means" value=4 /></td>
290 </tr>
291 <tr>
292 <td>I would feel a real loss if I were forced to give up being
293 physically active.</td>
294 <td><input type="radio" name="feel" value=0 /></td>
295 <td><input type="radio" name="feel" value=1 /></td>
296 <td><input type="radio" name="feel" value=2 checked /></td>
297 <td><input type="radio" name="feel" value=3 /></td>
298 <td><input type="radio" name="feel" value=4 /></td>
299 </tr>
300 <tr>
301 <td>Being physically active is something I think about often.</td>
302 <td><input type="radio" name="think" value=0 /></td>
303 <td><input type="radio" name="think" value=1 /></td>
304 <td><input type="radio" name="think" value=2 checked /></td>
305 <td><input type="radio" name="think" value=3 /></td>
306 <td><input type="radio" name="think" value=4 /></td>
307 </tr>
308 </table>
309
310
311 <div class="question">Preference</div>
312 <div>Do you prefer walking or running?</div>
313 <div id="WalkOrRun">
314 <input type="radio" name="WalkOrRun" value="run" checked><label>Running</label>
315 <br>
316 <input type="radio" name="WalkOrRun" value="walk"><label>Walking</label>
317 <br>
318 </div>
319
320 <script>
321 document.getElementById("WalkOrRun").onchange = walkorrunupdate;
322 function walkorrunupdate() {
323 val = document.querySelector('input[name="WalkOrRun"]:checked').value;
324 isRunning = val == "run";
325 document.getElementById("self-efficacy-running").hidden = !isRunning;
326 document.getElementById("self-efficacy-walking").hidden = isRunning;
327 }
328 </script>
329
330 <div class="question">Self-efficacy</div>
331 <div id="self-efficacy-running">
332 <div>
333 Using the scales listed below please indicate how <b>confident</b>
334 you are that you will be able to <b><u><span class="mtype">run</span></u>
335 at a moderate intensity</b> for the given amount of minutes <b>per
336 week</b>. When you're running at a moderate intensity, you breathe
337 heavily but you can still hold a short conversation.
338 </div>
339 <br />
340 <table>
341 <tr>
342 <th>
343 <!-- top left of table is blank -->
344 </th>
345 <th>
346 <table style="border: none;">
347 <tr>
348 <td style="border: none;">Not at all confident</td>
349 <td style="border: none;">Moderately confident</td>
350 <td style="border: none;">Highly confident</td>
351 </tr>
352 <table style="border: none; width: 100%">
353 <tr>
354 <td style="border: none;">0</td>
355 <td style="border: none;">10</td>
356 <td style="border: none;">20</td>
357 <td style="border: none;">30</td>
358 <td style="border: none;">40</td>
359 <td style="border: none;">50</td>
360 <td style="border: none;">60</td>
361 <td style="border: none;">70</td>
362 <td style="border: none;">80</td>
363 <td style="border: none;">90</td>
364 <td style="border: none;">100</td>
365 </tr>
366 </table>
367 </tr>
368
369
370 </th>
371 </tr>
372
373 <tr>
374 <td>How confident are you to <b>run</b> for <b>15</b>
375 minutes per week at moderate intensity?
376 </td>
377 <td><input type="range" min="0" max="100" value="50"
378 class="slider" id="run1" style="width: 100%;"></td>
379 </tr>
380 <tr>
381 <td>How confident are you to <b>run</b> for <b>30</b>
382 minutes per week at moderate intensity?
383 </td>
384 <td><input type="range" min="0" max="100" value="50"
385 class="slider" id="run2" style="width: 100%;"></td>
386 </tr>
387 <tr>
388 <td>How confident are you to <b>run</b> for <b>45</b>
389 minutes per week at moderate intensity?
390 </td>
391 <td><input type="range" min="0" max="100" value="50"
392 class="slider" id="run3" style="width: 100%;"></td>
393 </tr>
394 <tr>
395 <td>How confident are you to <b>run</b> for <b>60</b>
396 minutes per week at moderate intensity?
397 </td>
398 <td><input type="range" min="0" max="100" value="50"
399 class="slider" id="run4" style="width: 100%;"></td>
400 </tr>
401 <tr>
402 <td>How confident are you to <b>run</b> for <b>75</b>
403 minutes per week at moderate intensity?
404 </td>
405 <td><input type="range" min="0" max="100" value="50"
406 class="slider" id="run5" style="width: 100%;"></td>
407 </tr>
408 <tr>
409 <td>How confident are you to <b>run</b> for <b>90</b>
410 minutes per week at moderate intensity?
411 </td>
412 <td><input type="range" min="0" max="100" value="50"
413 class="slider" id="run6" style="width: 100%;"></td>
414 </tr>
415 <tr>
416 <td>How confident are you to <b>run</b> for <b>105</b>
417 minutes per week at moderate intensity?
418 </td>
419 <td><input type="range" min="0" max="100" value="50"
420 class="slider" id="run7" style="width: 100%;"></td>
421 </tr>
422 <tr>
423 <td>How confident are you to <b>run</b> for <b>120</b>
424 minutes per week at moderate intensity?
425 </td>
426 <td><input type="range" min="0" max="100" value="50"
427 class="slider" id="run8" style="width: 100%;"></td>
428 </tr>
429 <tr>
430 <td>How confident are you to <b>run</b> for <b>135</b>
431 minutes per week at moderate intensity?
432 </td>
433 <td><input type="range" min="0" max="100" value="50"
434 class="slider" id="run9" style="width: 100%;"></td>
435 </tr>
436 <tr>
437 <td>How confident are you to <b>run</b> for <b>150</b>
438 minutes per week at moderate intensity?
439 </td>
440 <td><input type="range" min="0" max="100" value="50"
441 class="slider" id="run10" style="width: 100%;"></td>
442 </tr>
443 </table>
444 </th>
445 </tr>
446 </table>
447 </div>
448
449 <div id="self-efficacy-walking" hidden>
450 <div>
451 Using the scales listed below please indicate how <b>confident</b>
452 you are that you will be able to <b><u><span class="mtype">walk</span></u>
453 at a moderate intensity</b> for the given amount of minutes <b>per
454 week</b>. When you're walking at a moderate intensity, you breathe
455 heavily but you can still hold a short conversation.
456 </div>
457 <br />
458 <table>
459 <tr>
460 <th>
461 <!-- top left of table is blank -->
462 </th>
463 <th>
464 <table style="border: none;">
465 <tr>
466 <td style="border: none;">Not at all confident</td>
467 <td style="border: none;">Moderately confident</td>
468 <td style="border: none;">Highly confident</td>
469 </tr>
470 <table style="border: none; width: 100%">
471 <tr>
472 <td style="border: none;">0</td>
473 <td style="border: none;">10</td>
474 <td style="border: none;">20</td>
475 <td style="border: none;">30</td>
476 <td style="border: none;">40</td>
477 <td style="border: none;">50</td>
478 <td style="border: none;">60</td>
479 <td style="border: none;">70</td>
480 <td style="border: none;">80</td>
481 <td style="border: none;">90</td>
482 <td style="border: none;">100</td>
483 </tr>
484 </table>
485 </tr>
486
487
488 </th>
489 </tr>
490
491 <tr>
492 <td>How confident are you to <b>walk</b> for <b>30</b>
493 minutes (<b>0.5</b> hour) per week at moderate intensity?
494 </td>
495 <td><input type="range" min="0" max="100" value="50"
496 class="slider" id="walk1" style="width: 100%;"></td>
497 </tr>
498 <tr>
499 <td>How confident are you to <b>walk</b> for <b>60</b>
500 minutes (<b>1</b> hour) per week at moderate intensity?
501 </td>
502 <td><input type="range" min="0" max="90" value="50"
503 class="slider" id="walk2" style="width: 100%;"></td>
504 </tr>
505 <tr>
506 <td>How confident are you to <b>walk</b> for <b>90</b>
507 minutes (<b>1.5</b> hours) per week at moderate intensity?
508 </td>
509 <td><input type="range" min="0" max="100" value="50"
510 class="slider" id="walk3" style="width: 100%;"></td>
511 </tr>
512 <tr>
513 <td>How confident are you to <b>walk</b> for <b>120</b>
514 minutes (<b>2</b> hours) per week at moderate intensity?
515 </td>
516 <td><input type="range" min="0" max="100" value="50"
517 class="slider" id="walk4" style="width: 100%;"></td>
518 </tr>
519 <tr>
520 <td>How confident are you to <b>walk</b> for <b>150</b>
521 minutes (<b>2.5</b> hours) per week at moderate intensity?
522 </td>
523 <td><input type="range" min="0" max="100" value="50"
524 class="slider" id="walk5" style="width: 100%;"></td>
525 </tr>
526 <tr>
527 <td>How confident are you to <b>walk</b> for <b>180</b>
528 minutes (<b>3</b> hours) per week at moderate intensity?
529 </td>
530 <td><input type="range" min="0" max="100" value="50"
531 class="slider" id="walk6" style="width: 100%;"></td>
532 </tr>
533 <tr>
534 <td>How confident are you to <b>walk</b> for <b>210</b>
535 minutes (<<b>3.5</b> hours) per week at moderate intensity?
536 </td>
537 <td><input type="range" min="0" max="100" value="50"
538 class="slider" id="walk7" style="width: 100%;"></td>
539 </tr>
540 <tr>
541 <td>How confident are you to <b>walk</b> for <b>240</b>
542 minutes (<b>4</b> hours) per week at moderate intensity?
543 </td>
544 <td><input type="range" min="0" max="100" value="50"
545 class="slider" id="walk8" style="width: 100%;"></td>
546 </tr>
547 <tr>
548 <td>How confident are you to <b>walk</b> for <b>270</b>
549 minutes (<b>4.5</b> hours) per week at moderate intensity?
550 </td>
551 <td><input type="range" min="0" max="100" value="50"
552 class="slider" id="walk9" style="width: 100%;"></td>
553 </tr>
554 <tr>
555 <td>How confident are you to <b>walk</b> for <b>300</b>
556 minutes (<b>5</b> hours) per week at moderate intensity?
557 </td>
558 <td><input type="range" min="0" max="100" value="50"
559 class="slider" id="walk10" style="width: 100%;"></td>
560 </tr>
561 </table>
562 </th>
563 </tr>
564 </table>
565 </div>
566
567 <div class="question">Sitting in weekend</div>
568 <p>
569 During the last 7 days, how much time did you usually spend sitting on
570 a weekend day?
571 </p>
572 <input type="number" min="0" max="24"
573 value="6" class="slider" id="sitting_weekend" />
574
575
576 <!-- Godin activity, but "godin" is left out, nobody knows that term -->
577 <div class="question">Typical Activity</div>
578 During a typical
579 <b>7-Day period</b> (a week), how many times on the average do you do
580 the following kinds of exercise for
581 <b>more than 15 minutes</b> during your free time (write on)each line
582 the appropriate number).
583
584 <table>
585 <tr>
586 <th>
587 <!-- top left of table is blank -->
588 </th>
589 <th>Number of times per week:</th>
590 </tr>
591 <tr>
592 <td><b>Strenuous exercise (heart beats rapidly)</b> (e.g.,
593 running, jogging, hockey, football,)soccer, squash, basketball,
594 cross country skiing, judo, roller skating, vigorous swimming,
595 vigorous long distance bicycling)</td>
596 <td><input type="number" id="godin_1" value=1 min="0" max="99" /></td>
597 </tr>
598
599 <tr>
600 <td><b>Moderate exercise (not exhausting)</b> (e.g., fast
601 walking, baseball, tennis, easy bicycling, volleyball, badminton,
602 easy swimming, alpine skiing, popular and folk dancing)</td>
603 <td><input type="number" id="godin_2" value=2 min="0" max="99" /></td>
604 </tr>
605
606 <tr>
607 <td><b>Mild/light exercise (minimal effort)</b> (e.g., yoga,
608 archery, fishing from river bank, bowling, horseshoes, golf,
609 snow-mobiling, easy walking)</td>
610 <td><input type="number" id="godin_3" value=3 min="0" max="99" /></td>
611 </tr>
612 </table>
613
614 <div class="question">Similar persons</div>
615 "Hi, my name is Jennifer, I am 57 years old and I was almost
616 permanently disabled because I had problems with my knees and my spine.
617 But this past year I have taken up swimming and I lost some weight so
618 now I'm actually able to walk 3 days a week"
619 <br />
620 <br /> How
621 <b>similar</b> do you consider this person to yourself?
622 <table style="border: none; width: 100%; text-align: center;">
623 <tr>
624 <th>
625 <table style="border: none; width: 100%">
626 <tr>
627 <td style="border: none; text-align: center;">Not similar</td>
628 <td style="border: none; text-align: center;">Neutral</td>
629 <td style="border: none; text-align: center;">Very similar</td>
630 </tr>
631 </table>
632 <table style="border: none; width: 100%">
633 <tr>
634 <td style="border: none; text-align: center; width: 14%">-3</td>
635 <td style="border: none; text-align: center; width: 14%">-2</td>
636 <td style="border: none; text-align: center; width: 14%">-1</td>
637 <td style="border: none; text-align: center; width: 14%">0</td>
638 <td style="border: none; text-align: center; width: 14%">1</td>
639 <td style="border: none; text-align: center; width: 14%">2</td>
640 <td style="border: none; text-align: center; width: 14%">3</td>
641 </tr>
642
643 </table>
644 </th>
645 </tr>
646 <tr>
647 <td><input type="range" class="slider" id="C1_1" value=0
648 min="-3" max="3" style="width: 90%;" /></td>
649 </tr>
650 </table>
651
652 <br /> "I enjoy walking whihc I do at least once, sometimes twice a
653 day. I find this a gentle exercise that keeps me relatively fit. Having
654 walking paths where I live really helps and encourages me."
655 <br />
656 <br /> How
657 <b>similar</b> do you consider this person to yourself?
658 <table style="border: none; width: 100%; text-align: center;">
659 <tr>
660 <th>
661 <table style="border: none; width: 100%">
662 <tr>
663 <td style="border: none; text-align: center;">Not similar</td>
664 <td style="border: none; text-align: center;">Neutral</td>
665 <td style="border: none; text-align: center;">Very similar</td>
666 </tr>
667 </table>
668 <table style="border: none; width: 100%">
669 <tr>
670 <td style="border: none; text-align: center; width: 14%">-3</td>
671 <td style="border: none; text-align: center; width: 14%">-2</td>
672 <td style="border: none; text-align: center; width: 14%">-1</td>
673 <td style="border: none; text-align: center; width: 14%">0</td>
674 <td style="border: none; text-align: center; width: 14%">1</td>
675 <td style="border: none; text-align: center; width: 14%">2</td>
676 <td style="border: none; text-align: center; width: 14%">3</td>
677 </tr>
678
679 </table>
680 </th>
681 </tr>
682 <tr>
683 <td><input type="range" class="slider" id="C1_2" value=0
684 min="-3" max="3" style="width: 90%;" /></td>
685 </tr>
686 </table>
687
688
689 <br /> "I am a person who tries to stay active. I walk briskly every
690 day. My daily goal is to walk 5km."
691 <br />
692 <br /> How
693 <b>similar</b> do you consider this person to yourself?
694 <table style="border: none; width: 100%; text-align: center;">
695 <tr>
696 <th>
697 <table style="border: none; width: 100%">
698 <tr>
699 <td style="border: none; text-align: center;">Not similar</td>
700 <td style="border: none; text-align: center;">Neutral</td>
701 <td style="border: none; text-align: center;">Very similar</td>
702 </tr>
703 </table>
704 <table style="border: none; width: 100%">
705 <tr>
706 <td style="border: none; text-align: center; width: 14%">-3</td>
707 <td style="border: none; text-align: center; width: 14%">-2</td>
708 <td style="border: none; text-align: center; width: 14%">-1</td>
709 <td style="border: none; text-align: center; width: 14%">0</td>
710 <td style="border: none; text-align: center; width: 14%">1</td>
711 <td style="border: none; text-align: center; width: 14%">2</td>
712 <td style="border: none; text-align: center; width: 14%">3</td>
713 </tr>
714
715 </table>
716 </th>
717 </tr>
718 <tr>
719 <td><input type="range" class="slider" id="C2_1" value=0
720 min="-3" max="3" style="width: 90%;" /></td>
721 </tr>
722 </table>
723
724 <br /> "I seem to be very busy doing things to keep life ticking over
725 and not having time for myself. This involves physical activity at work
726 and home, however not so much for leisurely physical activity."
727 <br />
728 <br /> How
729 <b>similar</b> do you consider this person to yourself?
730 <table style="border: none; width: 100%; text-align: center;">
731 <tr>
732 <th>
733 <table style="border: none; width: 100%">
734 <tr>
735 <td style="border: none; text-align: center;">Not similar</td>
736 <td style="border: none; text-align: center;">Neutral</td>
737 <td style="border: none; text-align: center;">Very similar</td>
738 </tr>
739 </table>
740 <table style="border: none; width: 100%">
741 <tr>
742 <td style="border: none; text-align: center; width: 14%">-3</td>
743 <td style="border: none; text-align: center; width: 14%">-2</td>
744 <td style="border: none; text-align: center; width: 14%">-1</td>
745 <td style="border: none; text-align: center; width: 14%">0</td>
746 <td style="border: none; text-align: center; width: 14%">1</td>
747 <td style="border: none; text-align: center; width: 14%">2</td>
748 <td style="border: none; text-align: center; width: 14%">3</td>
749 </tr>
750
751 </table>
752 </th>
753 </tr>
754 <tr>
755 <td><input type="range" class="slider" id="C2_2" value=0
756 min="-3" max="3" style="width: 90%;" /></td>
757 </tr>
758 </table>
759
760 <br /> "I'm a person who likes to train alone, so I train at home 6
761 days a week, focusing on the parts of my body I want to improve. I let
762 my meals take care of my other body parts."
763 <br />
764 <br /> How
765 <b>similar</b> do you consider this person to yourself?
766 <table style="border: none; width: 100%; text-align: center;">
767 <tr>
768 <th>
769 <table style="border: none; width: 100%">
770 <tr>
771 <td style="border: none; text-align: center;">Not similar</td>
772 <td style="border: none; text-align: center;">Neutral</td>
773 <td style="border: none; text-align: center;">Very similar</td>
774 </tr>
775 </table>
776 <table style="border: none; width: 100%">
777 <tr>
778 <td style="border: none; text-align: center; width: 14%">-3</td>
779 <td style="border: none; text-align: center; width: 14%">-2</td>
780 <td style="border: none; text-align: center; width: 14%">-1</td>
781 <td style="border: none; text-align: center; width: 14%">0</td>
782 <td style="border: none; text-align: center; width: 14%">1</td>
783 <td style="border: none; text-align: center; width: 14%">2</td>
784 <td style="border: none; text-align: center; width: 14%">3</td>
785 </tr>
786
787 </table>
788 </th>
789 </tr>
790 <tr>
791 <td><input type="range" class="slider" id="C32_1" value=0
792 min="-3" max="3" style="width: 90%;" /></td>
793 </tr>
794 </table>
795
796
797 <br /> "Hello, I'm Daniel. I always took care of my body more or less,
798 by free body training and cardio. I let go last year because I always
799 came home from work tired, but I regained the habit of going jogging
800 and exercising."
801 <br />
802 <br /> How
803 <b>similar</b> do you consider this person to yourself?
804 <table style="border: none; width: 100%; text-align: center;">
805 <tr>
806 <th>
807 <table style="border: none; width: 100%">
808 <tr>
809 <td style="border: none; text-align: center;">Not similar</td>
810 <td style="border: none; text-align: center;">Neutral</td>
811 <td style="border: none; text-align: center;">Very similar</td>
812 </tr>
813 </table>
814 <table style="border: none; width: 100%">
815 <tr>
816 <td style="border: none; text-align: center; width: 14%">-3</td>
817 <td style="border: none; text-align: center; width: 14%">-2</td>
818 <td style="border: none; text-align: center; width: 14%">-1</td>
819 <td style="border: none; text-align: center; width: 14%">0</td>
820 <td style="border: none; text-align: center; width: 14%">1</td>
821 <td style="border: none; text-align: center; width: 14%">2</td>
822 <td style="border: none; text-align: center; width: 14%">3</td>
823 </tr>
824
825 </table>
826 </th>
827 </tr>
828 <tr>
829 <td><input type="range" class="slider" id="C32_2" value=0
830 min="-3" max="3" style="width: 90%;" /></td>
831 </tr>
832 </table>
833
834 <div class="question">Done</div>
835 When you are done adjusting the values in the above questionnaire and
836 want to proceed to the chat bot, press the Done button below.
837 <br />
838 <br />
839
840 <div>
841 <button type="button" onclick="done()">Done!</button>
842 </div>
843 <br />
844 <br />
845 <br />
846
847 <script>
848 /**
849 Compute the preference vector and send it to server
850 */
851 function done() {
852 godin_1 = document.getElementById('godin_1').value;
853 godin_2 = document.getElementById('godin_2').value;
854 godin_3 = document.getElementById('godin_3').value;
855 godin_total_score = godin_1* 9 + godin_2 * 5 + godin_3 * 3;
856 godin_activity = godin_total_score < 14? 0: godin_total_score < 24 ? 1: 2;
857
858
859 walkrun = getRadioValue("WalkOrRun"); // string "walk" or "run"
860 exercise_se=0;
861 for (var i=1; i<=10; i++) {
862 exercise_se += +document.getElementById(walkrun+i).value;
863 }
864 exercise_se=exercise_se/10.;
865
866
867 exercise_identity= averageRadioValue(['active', 'describing', 'goals',
868 'selfconcept', 'feelgood', 'others', 'means','feel', 'think']);
869 extraversion = averageRadioValue(['extraverted', 'reserved']);
870 openness_to_experiences = averageRadioValue(['creative', 'uncreative']);
871
872
873 ttm_pa=getRadioValue('ttm_pa');
874 sitting_weekend=document.getElementById('sitting_weekend').value;
875 age=document.getElementById('age').value;
876 household_income=getRadioValue('income');
877 household_size=getRadioValue('householdsize');
878
879 prefvector = "godin_activity="+godin_activity+
880 "&exercise_se="+exercise_se.toFixed(1)+
881 "&exercise_identity="+exercise_identity.toFixed(2)+
882 "&extraversion="+extraversion.toFixed(1)+
883 "&ttm_pa="+ttm_pa+
884 "&openness_to_experiences="+openness_to_experiences.toFixed(2)+
885 "&sitting_weekend="+sitting_weekend+
886 "&age="+age+
887 "&household_income="+household_income+
888 "&household_size="+household_size;
889
890 window.location.replace('chat.html?'+prefvector);
891
892 }
893
894 /**
895 @param ids a list of radiobutton ids. Only 1 of the radiobuttons of each id must be active.
896 And it must have a value set.
897 @return the average value from a list of selected radio buttons
898 */
899 function averageRadioValue(ids) {
900 sum =0;
901 for (const type of ids) {
902 sum += +getRadioValue(type);
903 }
904 return sum/ids.length;
905 }
906
907 /**
908 @param name the name of the radio button
909 @return the value of the checked radio button that has the given name.
910 The value may be anything, eg string, number.
911 */
912 function getRadioValue(name) {
913 return document.querySelector('input[name="'+name+'"]:checked').value;
914 }
915 </script>
916
917</body>
918
919
920</html>
Note: See TracBrowser for help on using the repository browser.