generate.html
1.5 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
<html lang="en">
<head>
<script src="{{ url_for('static', filename='Scripts/construct.js') }}"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Generador de Formularios</title>
</head>
<body>
Tabs: <br>
<div id="tabs"></div>
<button onclick="addTab(document.getElementById('tabs'))">
+
</button>
<br>
<br>
<button onclick="generate(document.getElementById('tabs'))">
Generar
</button>
</body>
<!-- templates -->
<template id="tabTemplate">
<br>
-------------------
<button onclick="removeTab(this)">
x
</button>
<br>
<button onclick="addField(this)">
+
</button>
<br>
-------------------
<br>
</template>
<template id="fieldTemplate">
<input type="text" placeholder="Título">
<select name="input">
<option disabled selected value="">Input</option>
<option value="text">Texto</option>
<option value="number">Numero</option>
<option value="mail">Mail</option>
<option value="password">Contraseña</option>
<option value="date">Fecha</option>
<option value="time">Hora</option>
<option value="textarea">Párrafo</option>
<option value="checkbox">Selección</option>
</select>
Obligatorio : <input type="checkbox">
<button onclick="removeField(this)">
-
</button>
</template>
</html>