Skip to content

Commit 6d453c0

Browse files
committed
Add feedback form
1 parent ecd22d3 commit 6d453c0

File tree

3 files changed

+177
-0
lines changed

3 files changed

+177
-0
lines changed

_includes/feedbackScript.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
2+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.2.2/jquery.form.min.js" integrity="sha256-2Pjr1OlpZMY6qesJM68t2v39t+lMLvxwpa8QlRjJroA=" crossorigin="anonymous">
3+
</script>
4+
<script type="text/javascript">
5+
$('#bootstrapForm').submit(function (event) {
6+
event.preventDefault()
7+
var extraData = {}
8+
$('#bootstrapForm').ajaxSubmit({
9+
data: extraData,
10+
dataType: 'jsonp', // This won't really work. It's just to use a GET instead of a POST to allow cookies from different domain.
11+
error: function () {
12+
// Submit of form should be successful but JSONP callback will fail because Google Forms
13+
// does not support it, so this is handled as a failure.
14+
alert('Feedback successffully submitted. Hope you enjoyed event.')
15+
document.getElementById("bootstrapForm").reset();
16+
}
17+
})
18+
})
19+
</script>

_layouts/feedback.html

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
---
2+
layout: default
3+
---
4+
<section class="section">
5+
<h1 class="has-text-centered">Feedback</h1>
6+
<div class="content container">
7+
<p class="has-text-centered">Please fill your valuable feedback for this event. Your feedback helps us improve future events.</p>
8+
</div>
9+
<form action="https://docs.google.com/forms/d/e/1FAIpQLSdgn3AOlyhJCcA8DWkx7FDOL8C4n7wawRT5_gG9ZaVvXbNK0A/formResponse"
10+
target="_self"
11+
id="bootstrapForm"
12+
method="POST">
13+
<div class="field">
14+
<h2>Localhost Hack the Technical Interview Feedback<br><small></small></h2>
15+
</div>
16+
<div class="field">
17+
<legend class="label" for="">Email</legend>
18+
<div class="control">
19+
<input id="emailAddress" type="email" name="emailAddress" class="input" required>
20+
</div>
21+
</div>
22+
23+
24+
<!-- Field type: "short" id: "1508204068" -->
25+
<div class="field">
26+
<legend class="label" for="1508204068">Name</legend>
27+
<div class="control">
28+
<input id="1223500353" type="text" name="entry.1223500353" class="input" required>
29+
</div>
30+
</div>
31+
32+
33+
<!-- Field type: "short" id: "1186849288" -->
34+
<div class="field">
35+
<legend class="label" for="1186849288">Phone Number</legend>
36+
<div class="control">
37+
<input id="1119659540" type="text" name="entry.1119659540" class="input" required>
38+
</div>
39+
</div>
40+
41+
42+
<!-- Field type: "linear" id: "2137196546" -->
43+
<div class="field">
44+
<legend class="label" for="2137196546">How satisfied were you with this Localhost workshop?</legend>
45+
<div class="control">
46+
<div>
47+
<label class="radio">
48+
<input type="radio" name="entry.1747016377" value="1" required>
49+
1
50+
</label>
51+
<label class="radio">
52+
<input type="radio" name="entry.1747016377" value="2" required>
53+
2
54+
</label>
55+
<label class="radio">
56+
<input type="radio" name="entry.1747016377" value="3" required>
57+
3
58+
</label>
59+
<label class="radio">
60+
<input type="radio" name="entry.1747016377" value="4" required>
61+
4
62+
</label>
63+
<label class="radio">
64+
<input type="radio" name="entry.1747016377" value="5" required>
65+
5
66+
</label>
67+
</div>
68+
</div>
69+
</div>
70+
71+
72+
<!-- Field type: "linear" id: "2064489387" -->
73+
<div class="field">
74+
<legend class="label" for="2064489387">How relevant and helpful do you think it was for you?</legend>
75+
<div class="control">
76+
<div>
77+
<label class="radio">
78+
<input type="radio" name="entry.305553560" value="1" required>
79+
1
80+
</label>
81+
<label class="radio">
82+
<input type="radio" name="entry.305553560" value="2" required>
83+
2
84+
</label>
85+
<label class="radio">
86+
<input type="radio" name="entry.305553560" value="3" required>
87+
3
88+
</label>
89+
<label class="radio">
90+
<input type="radio" name="entry.305553560" value="4" required>
91+
4
92+
</label>
93+
<label class="radio">
94+
<input type="radio" name="entry.305553560" value="5" required>
95+
5
96+
</label>
97+
</div>
98+
</div>
99+
</div>
100+
101+
102+
<!-- Field type: "short" id: "1131114772" -->
103+
<div class="field">
104+
<legend class="label" for="1131114772">How could we have improved this event?</legend>
105+
<div class="control">
106+
<input id="1340586078" type="text" name="entry.1340586078" class="input" >
107+
</div>
108+
</div>
109+
110+
111+
<!-- Field type: "short" id: "234554653" -->
112+
<div class="field">
113+
<legend class="label" for="234554653">Any other feedback for the event?</legend>
114+
<div class="control">
115+
<input id="879050699" type="text" name="entry.879050699" class="input" >
116+
</div>
117+
</div>
118+
119+
<input type="hidden" name="fvv" value="1">
120+
<input type="hidden" name="fbzx" value="-7418162051004310469">
121+
<!--
122+
CAVEAT: In multipages (multisection) forms, *pageHistory* field tells to google what sections we've currently completed.
123+
This usually starts as "0" for the first page, then "0,1" in the second page... up to "0,1,2..N" in n-th page.
124+
Keep this in mind if you plan to change this code to recreate any sort of multipage-feature in your exported form.
125+
We're setting this to the total number of pages in this form because we're sending all fields from all the section together.
126+
-->
127+
<input type="hidden" name="pageHistory" value="0">
128+
<div class="has-text-centered">
129+
<input class="button is-link" type="submit" value="Submit">
130+
</div>
131+
</form>
132+
133+
</section>
134+
{% include registerScript.html %}

feedback.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
layout: feedback
3+
permalink: /feedback/
4+
title: "MLH Localhost: Hack The Technical Interview"
5+
date: "29th July 2019"
6+
time: "2 PM to 4 PM"
7+
venue: "LT-1, IIPS, DAVV, Indore"
8+
form:
9+
formurl: "https://docs.google.com/forms/d/e/1FAIpQLScOdxIdpAcPXUcaoO9iOWzlqVc9-id3UZS2irB1xWp6Phmitg/formResponse"
10+
name-label: 826355120
11+
name: 2092238618
12+
email-label: 2071572813
13+
email: 297764783
14+
number-label: 569514487
15+
number: 1966605262
16+
college-label: 245385898
17+
college: 479301265
18+
course-label: 1517600930
19+
course: 1340835164
20+
semester-label: 1312689492
21+
semester: 1857009907
22+
fvv: 1
23+
fbzx: 4436870651230317346
24+
---

0 commit comments

Comments
 (0)