-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
226 lines (205 loc) · 7.57 KB
/
index.html
File metadata and controls
226 lines (205 loc) · 7.57 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://kit.fontawesome.com/3da1a747b2.js" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="papaparse.min.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
<title>ISP A#3</title>
</head>
<body>
<h1>Web Form Generator</h1>
<p>Drag and drop items to create your form</p>
<!-- Button to view the webpage -->
<button class="check-btn" id="check">
View Form
<i class="fas fa-angle-double-right"></i>
</button>
<!-- Generate and down load the HTML, PHP, and SQL files -->
<button onclick="builderFunction()">
Generate Application
</button>
<!-- The draggable list -->
<ul class="draggable-list" id="draggable-list"></ul>
<form onsubmit="gotRows(); return false;" name="getUserForm" id="getUserForm" style="visibility: hidden">
Question title: <input type="text" id="qTitle"> <br>
Option 1: <input type="text" id="option1"> <br>
Option 2: <input type="text" id="option2"> <br>
Option 3: <input type="text" id="option3"> <br>
Option 4: <input type="text" id="option4"> <br> <br>
Type of question: <input type="radio" name="formOption" value="radio" required>Radio (one slection) <input type="radio" name="formOption" value="checkbox"> Checkbox (multiple options) <input type="radio" name="formOption" value="select"> Drop Down (one selection)
<br>
<input type="submit">
<button>Cancel</button>
</form>
<br>
<!-- Table displaying the possible attributes -->
<table>
<tr>
<th>Form Elements</th>
<th>HTML Elements</th>
<th>Styling</th>
</tr>
<!-- Row 1 -->
<tr>
<td>
<button onclick="addFormElm('dropDown')" id="addButton">+</button>
<br>
Drop down
<br>
<select>
<option value="">Yes</option>
<option value="">No</option>
</select>
</td>
<td>
<button onclick="addHTMLelm('header')" id="addButton">+</button>
<h1>Header</h1>
</td>
<td>
<button onclick="addStyle('</b>')" id="addButton">+</button>
<br>
<b>BOLD</b>
</td>
</tr>
<!-- Row 2 -->
<tr>
<td>
<button onclick="addFormElm('button')" id="addButton">+</button>
<button>Button</button>
</td>
<td>
<button onclick="addHTMLelm('subtit')" id="addButton">+</button>
<h3>Subtitle</h3>
</td>
<td>
<button onclick="addStyle('</u>')" id="addButton">+</button>
<u>Underline</u>
</td>
</tr>
<!-- Row 3 -->
<tr>
<td>
<label>
<button onclick="addFormElm('check')" id="addButton">+</button>
<p>Checkbox</p>
<input type="checkbox">
Select <br>
<input type="checkbox">
all <br>
<input type="checkbox">
that<br>
<input type="checkbox">
apply
</label>
</td>
<td>
<button onclick="addHTMLelm('text')" id="addButton">+</button>
<p>Text</p>
</td>
<td>
<button onclick="addStyle('</i>')" id="addButton">+</button>
<i>Italics</i>
</td>
</tr>
<!-- Row 4 -->
<tr>
<td>
<button onclick="addFormElm('textbox')" id="addButton">+</button>
Textbox <br>
<input type="text" id="TextBox" name="TextBox">
</td>
<td>
<button onclick="addHTMLelm('link')" id="addButton">+</button>
<a href="url">Link</a>
</td>
<td>
<button onclick='addStyle(`style="color: red; font-weight: bold;"`)' id="addButton">+</button>
<p style="color: red"><b>Important!</b></p>
</td>
</tr>
<!-- Row 5 -->
<tr>
<td>
<button onclick="addFormElm('radioButtons')" id="addButton">+</button>
Radio buttons <br>
<input type="radio" name="gender" value="male"> Choose<br>
<input type="radio" name="gender" value="female"> An<br>
<input type="radio" name="gender" value="other"> Option
</td>
<td>
<button onclick="addHTMLelm('image')" id="addButton">+</button>
Image
</td>
<td>
<button onclick='addStyle(`style="display: inline; border: 2px solid black; padding: 4px;"`)' id="addButton">+</button>
<p style="border: 2px solid black; padding: 4px;">Outline</p>
</td>
</tr>
<!-- Row 6 -->
<tr>
<td>
<button onclick="addFormElm('datebox')" id="addButton">+</button>
<label for="start">Date:</label> <br>
<input type="date" id="start" name="date">
</td>
<td>
<button onclick="addHTMLelm('YTvid')" id="addButton">+</button>
YouTube Video <br>
<iframe width="560" height="315" src="https://www.youtube.com/embed/Uw5OLnN7UvM?start=11" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</td>
<td>
<button onclick='addStyle(`style="display: inline; background-color: yellow;"`)' id="addButton">+</button>
<p><mark>Highlight</mark></p>
</td>
</tr>
<!-- Row 7 -->
<tr>
<td>
<button onclick="addFormElm('number')" id="addButton">+</button>
Number <br>
<input id="number" type="number">
</td>
<td>
<button onclick="addHTMLelm('break')" id="addButton">+</button>
Linebreak
</td>
<td>
<button onclick="addStyle('</code>')" id="addButton">+</button>
<p><code>Code style</code></p>
</td>
</tr>
</table>
<!-- CSV File Section -->
<h1>Upload CSV File</h1>
<h3>Upload a .csv file here for restricting form usage to specified users.</h3>
<div class="container" style="margin-top: 30px; padding: 50px;">
<input type="file" id="fileToUpload" class="form-control">
<button type="button" class="btn btn-info btn-lg" id="btnUploadFile">Upload File</button>
</div>
<h3>The file template should be as follows</h3>
<table>
<tr>
<th>
Username
</th>
<th>
Email
</th>
</tr>
<tr>
<td>
Exp123
</td>
<td>
example@example.com
</td>
</tr>
</table>
<script src="script.js">
</script>
</body>
</html>