-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
546 lines (493 loc) · 28.4 KB
/
Copy pathindex.html
File metadata and controls
546 lines (493 loc) · 28.4 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
<!DOCTYPE html>
<html lang="en" data-theme="clt">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Show Evaluation | Clemson Little Theatre</title>
<meta name="description" content="Cast, crew, and production team: share your experience working on a Clemson Little Theatre production.">
<link href="https://cdn.jsdelivr.net/npm/daisyui@4.12.23/dist/full.min.css" rel="stylesheet">
<script src="https://cdn.tailwindcss.com"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@300;400;500;600&display=swap" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
maroon: {
50: '#fdf2f4', 100: '#fce7ea', 200: '#f9d2d9', 300: '#f4adb9',
400: '#ec7e93', 500: '#df5070', 600: '#cc305a', 700: '#ab2349',
800: '#6d2932', 900: '#5a1f29', 950: '#360e17',
},
gold: {
50: '#fefdf4', 100: '#fdf9d8', 200: '#fbf0a8', 300: '#f5e06e',
400: '#eece3e', 500: '#d4a934', 600: '#c49220', 700: '#a0701c',
800: '#84591e', 900: '#6f4a1e',
}
},
fontFamily: {
display: ['"Playfair Display"', 'Georgia', 'serif'],
body: ['"Source Sans 3"', 'system-ui', 'sans-serif'],
}
}
}
}
</script>
<style>
[data-theme="clt"] {
--p: 345 47% 29%; --pf: 345 47% 23%; --pc: 0 0% 100%;
--s: 39 61% 52%; --sf: 39 61% 42%; --sc: 0 0% 100%;
--a: 345 47% 40%; --af: 345 47% 34%; --ac: 0 0% 100%;
--n: 230 10% 18%; --nf: 230 10% 14%; --nc: 0 0% 95%;
--b1: 30 15% 97%; --b2: 30 10% 93%; --b3: 30 8% 88%; --bc: 230 10% 15%;
--in: 198 93% 60%; --su: 158 64% 52%; --wa: 43 96% 56%; --er: 0 91% 71%;
--rounded-box: 0.75rem; --rounded-btn: 0.5rem; --btn-text-case: none;
}
body { font-family: 'Source Sans 3', system-ui, sans-serif; }
h1, h2, h3, h4, .font-display { font-family: 'Playfair Display', Georgia, serif; }
.role-option input:checked + label {
background-color: #6d2932; color: white; border-color: #6d2932;
}
.role-option label { transition: all 0.2s ease; }
.role-option label:hover { border-color: #6d2932; background-color: #fdf2f4; }
/* Scale slider styling */
.scale-container { position: relative; }
.scale-labels { display: flex; justify-content: space-between; font-size: 0.7rem; color: #888; padding: 0 2px; }
input[type="range"] {
-webkit-appearance: none; width: 100%; height: 8px; border-radius: 4px;
background: linear-gradient(to right, #f4adb9, #6d2932); outline: none;
}
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%;
background: #6d2932; cursor: pointer; border: 3px solid white;
box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
input[type="range"]::-moz-range-thumb {
width: 28px; height: 28px; border-radius: 50%;
background: #6d2932; cursor: pointer; border: 3px solid white;
box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.scale-value {
display: inline-flex; align-items: center; justify-content: center;
width: 48px; height: 48px; border-radius: 50%; background: #6d2932;
color: white; font-size: 1.25rem; font-weight: 700; margin: 0 auto;
}
.dynamics-option input:checked + label {
background-color: #6d2932; color: white; border-color: #6d2932;
}
.dynamics-option label { transition: all 0.2s ease; }
.dynamics-option label:hover { border-color: #6d2932; background-color: #fdf2f4; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.6s ease-out forwards; }
.curtain-left, .curtain-right {
position: absolute; top: 0; width: 60px; height: 100%; opacity: 0.06; pointer-events: none;
}
.curtain-left { left: 0; background: linear-gradient(to right, #6d2932, transparent); }
.curtain-right { right: 0; background: linear-gradient(to left, #6d2932, transparent); }
</style>
</head>
<body class="bg-base-100 min-h-screen">
<header class="bg-maroon-800 text-white relative overflow-hidden">
<div class="curtain-left"></div>
<div class="curtain-right"></div>
<div class="max-w-3xl mx-auto px-4 py-10 text-center relative z-10">
<div class="inline-flex items-center gap-2 mb-3">
<svg class="w-8 h-8 text-gold-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15.536 8.464a5 5 0 010 7.072M12 12h.01M18.364 5.636a9 9 0 010 12.728M5.636 18.364a9 9 0 010-12.728M8.464 15.536a5 5 0 010-7.072"/>
</svg>
<span class="text-gold-400 font-body text-sm tracking-widest uppercase">Behind the Curtain</span>
</div>
<h1 class="text-3xl md:text-5xl font-display font-bold mb-3">Show Evaluation for Cast/Crew/Production</h1>
<p class="text-maroon-200 font-body text-lg max-w-lg mx-auto">
Your honest feedback helps us make every production a better experience for everyone involved.
</p>
</div>
<div class="h-1 bg-gradient-to-r from-transparent via-gold-500 to-transparent"></div>
</header>
<main class="max-w-2xl mx-auto px-4 py-8">
<form id="feedbackForm" class="space-y-6">
<!-- Your Name -->
<section class="card bg-white shadow-sm border border-base-300 fade-up">
<div class="card-body">
<h2 class="card-title font-display text-maroon-800 text-xl mb-0">Your Name</h2>
<p class="text-sm text-base-content/60 font-body mb-3">Feel free to leave blank if you'd like this to be anonymous</p>
<input type="text" id="respondentName" class="input input-bordered w-full font-body" placeholder="Your name (optional)">
</div>
</section>
<!-- Show -->
<section class="card bg-white shadow-sm border border-base-300 fade-up">
<div class="card-body">
<h2 class="card-title font-display text-maroon-800 text-xl mb-1">
Show <span class="text-red-500 text-sm">*</span>
</h2>
<select id="showName" class="select select-bordered w-full font-body" required>
<option value="" disabled selected>Select a show...</option>
<option>The Miracle Worker</option>
<option>It's A Wonderful Life</option>
<option>Dearly Departed</option>
<option>Other</option>
</select>
<div id="showOtherContainer" class="hidden mt-2">
<input type="text" id="showOther" placeholder="Enter show name" class="input input-bordered w-full font-body">
</div>
</div>
</section>
<!-- Your Role -->
<section class="card bg-white shadow-sm border border-base-300 fade-up">
<div class="card-body">
<h2 class="card-title font-display text-maroon-800 text-xl mb-1">
Your Role <span class="text-red-500 text-sm">*</span>
</h2>
<div class="grid grid-cols-2 gap-2 sm:grid-cols-3">
<div class="role-option">
<input type="radio" name="role" id="role-cast" value="Cast" class="hidden" required>
<label for="role-cast" class="block cursor-pointer rounded-lg border-2 border-base-300 px-4 py-2.5 text-center font-body text-sm transition-all">Cast</label>
</div>
<div class="role-option">
<input type="radio" name="role" id="role-parent" value="Parent" class="hidden">
<label for="role-parent" class="block cursor-pointer rounded-lg border-2 border-base-300 px-4 py-2.5 text-center font-body text-sm transition-all">Parent</label>
</div>
<div class="role-option">
<input type="radio" name="role" id="role-prodcrew" value="Production/Crew" class="hidden">
<label for="role-prodcrew" class="block cursor-pointer rounded-lg border-2 border-base-300 px-4 py-2.5 text-center font-body text-sm transition-all">Production / Crew</label>
</div>
<div class="role-option">
<input type="radio" name="role" id="role-prefernot" value="Prefer not to say" class="hidden">
<label for="role-prefernot" class="block cursor-pointer rounded-lg border-2 border-base-300 px-4 py-2.5 text-center font-body text-sm transition-all">Prefer not to say</label>
</div>
<div class="role-option col-span-2 sm:col-span-1">
<input type="radio" name="role" id="role-other" value="Other" class="hidden">
<label for="role-other" class="block cursor-pointer rounded-lg border-2 border-base-300 px-4 py-2.5 text-center font-body text-sm transition-all">Other</label>
</div>
</div>
<div id="roleOtherContainer" class="hidden mt-2">
<input type="text" id="roleOther" placeholder="Describe your role" class="input input-bordered w-full font-body text-sm">
</div>
</div>
</section>
<!-- Overall Experience 1-10 -->
<section class="card bg-white shadow-sm border border-base-300 fade-up">
<div class="card-body">
<h2 class="card-title font-display text-maroon-800 text-xl mb-0">
Overall Experience <span class="text-red-500 text-sm">*</span>
</h2>
<p class="text-sm text-base-content/60 font-body mb-4">On a scale of 1 to 10 (where 1 is "Very Poor" and 10 is "Excellent"), how would you rate your overall experience with this production?</p>
<div class="text-center mb-2">
<span class="scale-value" id="overallVal">5</span>
</div>
<div class="scale-container px-1">
<input type="range" id="overallExperience" min="1" max="10" value="5" step="1" oninput="document.getElementById('overallVal').textContent=this.value">
<div class="scale-labels mt-1">
<span>1 - Very Poor</span>
<span>10 - Excellent</span>
</div>
</div>
</div>
</section>
<!-- Enjoyment Aspects -->
<section class="card bg-white shadow-sm border border-base-300 fade-up">
<div class="card-body">
<h2 class="card-title font-display text-maroon-800 text-xl mb-0">Enjoyment Aspects</h2>
<p class="text-sm text-base-content/60 font-body mb-3">What did you enjoy most about being part of this show?</p>
<textarea id="enjoymentAspects" rows="3" class="textarea textarea-bordered w-full font-body text-sm" placeholder="Share what you enjoyed most..."></textarea>
</div>
</section>
<!-- Support and Community -->
<section class="card bg-white shadow-sm border border-base-300 fade-up">
<div class="card-body">
<h2 class="card-title font-display text-maroon-800 text-xl mb-0">Support and Community</h2>
<p class="text-sm text-base-content/60 font-body mb-3">How supported did you feel by both the production team and your fellow cast members? Please elaborate.</p>
<textarea id="supportCommunity" rows="3" class="textarea textarea-bordered w-full font-body text-sm" placeholder="How supported did you feel?"></textarea>
</div>
</section>
<!-- Direction Clarity 1-10 -->
<section class="card bg-white shadow-sm border border-base-300 fade-up">
<div class="card-body">
<h2 class="card-title font-display text-maroon-800 text-xl mb-0">Direction Clarity</h2>
<p class="text-sm text-base-content/60 font-body mb-4">On a scale of 1 to 10 (where 1 is "Not Clear at All" and 10 is "Extremely Clear"), how clear and helpful was the direction provided by the production team?</p>
<div class="text-center mb-2">
<span class="scale-value" id="directionVal">5</span>
</div>
<div class="scale-container px-1">
<input type="range" id="directionClarity" min="1" max="10" value="5" step="1" oninput="document.getElementById('directionVal').textContent=this.value">
<div class="scale-labels mt-1">
<span>1 - Not Clear at All</span>
<span>10 - Extremely Clear</span>
</div>
</div>
</div>
</section>
<!-- Rehearsal Feedback -->
<section class="card bg-white shadow-sm border border-base-300 fade-up">
<div class="card-body">
<h2 class="card-title font-display text-maroon-800 text-xl mb-0">Rehearsal Feedback</h2>
<p class="text-sm text-base-content/60 font-body mb-3">What aspects of the rehearsal process worked well, and what could be improved?</p>
<textarea id="rehearsalFeedback" rows="3" class="textarea textarea-bordered w-full font-body text-sm" placeholder="What worked well? What could be improved?"></textarea>
</div>
</section>
<!-- Safety and Comfort -->
<section class="card bg-white shadow-sm border border-base-300 fade-up">
<div class="card-body">
<h2 class="card-title font-display text-maroon-800 text-xl mb-0">Safety and Comfort</h2>
<p class="text-sm text-base-content/60 font-body mb-3">Did you ever feel unsafe or uncomfortable during the production? If yes, please provide details.</p>
<textarea id="safetyComfort" rows="3" class="textarea textarea-bordered w-full font-body text-sm" placeholder="Your safety matters to us..."></textarea>
</div>
</section>
<!-- Personal Growth 1-10 -->
<section class="card bg-white shadow-sm border border-base-300 fade-up">
<div class="card-body">
<h2 class="card-title font-display text-maroon-800 text-xl mb-0">
Personal Growth <span class="text-red-500 text-sm">*</span>
</h2>
<p class="text-sm text-base-content/60 font-body mb-4">How effectively did the feedback received during rehearsals help you grow as a performer?</p>
<div class="text-center mb-2">
<span class="scale-value" id="growthVal">5</span>
</div>
<div class="scale-container px-1">
<input type="range" id="personalGrowth" min="1" max="10" value="5" step="1" oninput="document.getElementById('growthVal').textContent=this.value">
<div class="scale-labels mt-1">
<span>1 - None</span>
<span>10 - Significant Growth</span>
</div>
</div>
</div>
</section>
<!-- Team Dynamics -->
<section class="card bg-white shadow-sm border border-base-300 fade-up">
<div class="card-body">
<h2 class="card-title font-display text-maroon-800 text-xl mb-0">
Team Dynamics <span class="text-red-500 text-sm">*</span>
</h2>
<p class="text-sm text-base-content/60 font-body mb-3">Were there sufficient opportunities for bonding and building relationships within the cast and crew?</p>
<div class="flex gap-3">
<div class="dynamics-option flex-1">
<input type="radio" name="teamDynamics" id="dynamics-yes" value="Yes" class="hidden" required>
<label for="dynamics-yes" class="block cursor-pointer rounded-lg border-2 border-base-300 px-4 py-3 text-center font-body font-medium transition-all">Yes</label>
</div>
<div class="dynamics-option flex-1">
<input type="radio" name="teamDynamics" id="dynamics-somewhat" value="Somewhat" class="hidden">
<label for="dynamics-somewhat" class="block cursor-pointer rounded-lg border-2 border-base-300 px-4 py-3 text-center font-body font-medium transition-all">Somewhat</label>
</div>
<div class="dynamics-option flex-1">
<input type="radio" name="teamDynamics" id="dynamics-no" value="No" class="hidden">
<label for="dynamics-no" class="block cursor-pointer rounded-lg border-2 border-base-300 px-4 py-3 text-center font-body font-medium transition-all">No</label>
</div>
</div>
</div>
</section>
<!-- Volunteer Experience -->
<section class="card bg-white shadow-sm border border-base-300 fade-up">
<div class="card-body">
<h2 class="card-title font-display text-maroon-800 text-xl mb-0">Volunteer Experience</h2>
<p class="text-sm text-base-content/60 font-body mb-3">What was your experience like working in this volunteer-driven production, and what improvements would you suggest?</p>
<textarea id="volunteerExperience" rows="3" class="textarea textarea-bordered w-full font-body text-sm" placeholder="Share your volunteer experience..."></textarea>
</div>
</section>
<!-- Future Participation Scale 1-10 -->
<section class="card bg-white shadow-sm border border-base-300 fade-up">
<div class="card-body">
<h2 class="card-title font-display text-maroon-800 text-xl mb-0">
Future Participation <span class="text-red-500 text-sm">*</span>
</h2>
<p class="text-sm text-base-content/60 font-body mb-4">On a scale of 1 to 10 (where 1 is "Not Likely at All" and 10 is "Extremely Likely"), how likely are you to participate in another production at CLT?</p>
<div class="text-center mb-2">
<span class="scale-value" id="futureVal">5</span>
</div>
<div class="scale-container px-1">
<input type="range" id="futureParticipation" min="1" max="10" value="5" step="1" oninput="document.getElementById('futureVal').textContent=this.value">
<div class="scale-labels mt-1">
<span>1 - Not Likely at All</span>
<span>10 - Extremely Likely</span>
</div>
</div>
</div>
</section>
<!-- Future Participation Feedback -->
<section class="card bg-white shadow-sm border border-base-300 fade-up">
<div class="card-body">
<h2 class="card-title font-display text-maroon-800 text-xl mb-0">Future Participation Feedback</h2>
<p class="text-sm text-base-content/60 font-body mb-3">Please share any factors influencing your decision above.</p>
<textarea id="futureFeedback" rows="3" class="textarea textarea-bordered w-full font-body text-sm" placeholder="What factors influence your decision?"></textarea>
</div>
</section>
<!-- Additional Comments -->
<section class="card bg-white shadow-sm border border-base-300 fade-up">
<div class="card-body">
<h2 class="card-title font-display text-maroon-800 text-xl mb-0">Additional Comments</h2>
<p class="text-sm text-base-content/60 font-body mb-3">Please share any other feedback, suggestions, or concerns that you think could help improve future productions.</p>
<textarea id="additionalComments" rows="3" class="textarea textarea-bordered w-full font-body text-sm" placeholder="Any other thoughts..."></textarea>
</div>
</section>
<!-- Future Shows -->
<section class="card bg-white shadow-sm border border-base-300 fade-up">
<div class="card-body">
<h2 class="card-title font-display text-maroon-800 text-xl mb-0">Future Shows</h2>
<p class="text-sm text-base-content/60 font-body mb-3">What shows should CLT do next that you would want to be part of?</p>
<textarea id="futureShows" rows="3" class="textarea textarea-bordered w-full font-body text-sm" placeholder="What shows would you love to do?"></textarea>
</div>
</section>
<!-- Submit -->
<div class="text-center pt-2 pb-8">
<button type="submit" id="submitBtn" class="btn btn-lg bg-maroon-800 hover:bg-maroon-900 text-white border-none font-body font-semibold px-12 shadow-lg hover:shadow-xl transition-all">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8"/>
</svg>
Submit Evaluation
</button>
<p class="text-xs text-base-content/40 font-body mt-3">Your name is optional. All feedback is greatly appreciated.</p>
</div>
</form>
<!-- Success State -->
<div id="successState" class="hidden text-center py-16">
<div class="inline-flex items-center justify-center w-20 h-20 rounded-full bg-green-100 mb-6">
<svg class="w-10 h-10 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M5 13l4 4L19 7"/>
</svg>
</div>
<h2 class="font-display text-3xl text-maroon-800 font-bold mb-3">Thank You!</h2>
<p class="font-body text-lg text-base-content/70 max-w-md mx-auto mb-6">
Your evaluation has been received. Thank you for being part of this production and for helping us improve.
</p>
<button onclick="resetForm()" class="btn bg-maroon-800 hover:bg-maroon-900 text-white border-none font-body">Submit Another Response</button>
</div>
<!-- Error State -->
<div id="errorState" class="hidden">
<div class="alert alert-error shadow-sm">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
<div>
<p class="font-body font-medium">Something went wrong</p>
<p class="font-body text-sm" id="errorMessage">Please try again in a moment.</p>
</div>
<button onclick="hideError()" class="btn btn-sm btn-ghost">Dismiss</button>
</div>
</div>
</main>
<iframe name="submit-target" id="submitTarget" style="display:none"></iframe>
<footer class="bg-maroon-800 text-white/60 py-6 mt-8">
<div class="max-w-2xl mx-auto px-4 text-center font-body text-sm">
<p class="text-white/80 font-display text-lg mb-1">Clemson Little Theatre</p>
<p>214 S. Mechanic Street, Pendleton, SC 29670</p>
<p class="mt-3 text-white/40">© <span id="currentYear"></span> Clemson Little Theatre. All rights reserved.</p>
</div>
</footer>
<script>
const APPS_SCRIPT_URL = 'https://script.google.com/macros/s/AKfycbyhUOFsDhEjVCpMCXLlyuQO-70l5FFUz3MrshXUTTcbmHmWGNjlFNVDQ7Am8MKPmL4J6Q/exec';
const form = document.getElementById('feedbackForm');
const submitBtn = document.getElementById('submitBtn');
const successState = document.getElementById('successState');
const errorState = document.getElementById('errorState');
const errorMessage = document.getElementById('errorMessage');
document.getElementById('currentYear').textContent = new Date().getFullYear();
// Show "Other" fields
document.getElementById('showName').addEventListener('change', function() {
document.getElementById('showOtherContainer').classList.toggle('hidden', this.value !== 'Other');
});
document.querySelectorAll('input[name="role"]').forEach(function(radio) {
radio.addEventListener('change', function() {
document.getElementById('roleOtherContainer').classList.toggle('hidden', this.value !== 'Other');
});
});
// Form submission
form.addEventListener('submit', async function(e) {
e.preventDefault();
submitBtn.disabled = true;
submitBtn.innerHTML = '<span class="loading loading-spinner loading-sm"></span> Submitting...';
let showName = document.getElementById('showName').value;
if (showName === 'Other') showName = document.getElementById('showOther').value || 'Other';
let role = '';
const roleRadio = document.querySelector('input[name="role"]:checked');
if (roleRadio) {
role = roleRadio.value;
if (role === 'Other') {
const otherVal = document.getElementById('roleOther').value;
role = otherVal ? 'Other: ' + otherVal : 'Other';
}
}
const teamDynamics = document.querySelector('input[name="teamDynamics"]:checked')?.value || '';
const payload = {
respondentName: document.getElementById('respondentName').value.trim(),
showName: showName,
role: role,
overallExperience: document.getElementById('overallExperience').value,
enjoymentAspects: document.getElementById('enjoymentAspects').value.trim(),
supportCommunity: document.getElementById('supportCommunity').value.trim(),
directionClarity: document.getElementById('directionClarity').value,
rehearsalFeedback: document.getElementById('rehearsalFeedback').value.trim(),
safetyComfort: document.getElementById('safetyComfort').value.trim(),
personalGrowth: document.getElementById('personalGrowth').value,
teamDynamics: teamDynamics,
volunteerExperience: document.getElementById('volunteerExperience').value.trim(),
futureParticipation: document.getElementById('futureParticipation').value,
futureFeedback: document.getElementById('futureFeedback').value.trim(),
additionalComments: document.getElementById('additionalComments').value.trim(),
futureShows: document.getElementById('futureShows').value.trim()
};
try {
// Use hidden form + iframe to bypass CORS (Apps Script redirects break fetch)
const hiddenForm = document.createElement('form');
hiddenForm.method = 'POST';
hiddenForm.action = APPS_SCRIPT_URL;
hiddenForm.target = 'submit-target';
hiddenForm.style.display = 'none';
const dataInput = document.createElement('input');
dataInput.type = 'hidden';
dataInput.name = 'data';
dataInput.value = JSON.stringify(payload);
hiddenForm.appendChild(dataInput);
document.body.appendChild(hiddenForm);
// Listen for iframe load (means server responded)
const iframe = document.getElementById('submitTarget');
iframe.onload = function() {
form.classList.add('hidden');
successState.classList.remove('hidden');
window.scrollTo({ top: 0, behavior: 'smooth' });
document.body.removeChild(hiddenForm);
};
hiddenForm.submit();
// Fallback: show success after 4s even if iframe onload doesn't fire
setTimeout(function() {
if (!successState.classList.contains('hidden')) return;
form.classList.add('hidden');
successState.classList.remove('hidden');
window.scrollTo({ top: 0, behavior: 'smooth' });
if (hiddenForm.parentNode) document.body.removeChild(hiddenForm);
}, 4000);
} catch (err) {
errorMessage.textContent = 'Network error. Please check your connection and try again.';
errorState.classList.remove('hidden');
submitBtn.disabled = false;
submitBtn.innerHTML = '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8"/></svg> Submit Evaluation';
}
});
function resetForm() {
form.reset();
form.classList.remove('hidden');
successState.classList.add('hidden');
errorState.classList.add('hidden');
submitBtn.disabled = false;
submitBtn.innerHTML = '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8"/></svg> Submit Evaluation';
document.getElementById('showOtherContainer').classList.add('hidden');
document.getElementById('roleOtherContainer').classList.add('hidden');
['overallVal','directionVal','growthVal','futureVal'].forEach(function(id) {
document.getElementById(id).textContent = '5';
});
window.scrollTo({ top: 0, behavior: 'smooth' });
}
function hideError() { errorState.classList.add('hidden'); }
// Fade-in on scroll
const observer = new IntersectionObserver(function(entries) {
entries.forEach(function(entry) {
if (entry.isIntersecting) { entry.target.style.opacity = '1'; entry.target.style.transform = 'translateY(0)'; }
});
}, { threshold: 0.1 });
document.querySelectorAll('.fade-up').forEach(function(el) {
el.style.opacity = '0'; el.style.transform = 'translateY(20px)';
el.style.transition = 'opacity 0.5s ease, transform 0.5s ease';
observer.observe(el);
});
</script>
</body>
</html>