generate.html 1.38 KB
<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>
</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>