Native Form Maker
Form Layout
", " ", "", "" ].join("\n"); } function downloadText(filename, text) { const blob = new Blob([text], { type: "text/html;charset=utf-8" }); const url = URL.createObjectURL(blob); const a = document.createElement("a"); a.href = url; a.download = filename; document.body.appendChild(a); a.click(); a.remove(); setTimeout(() => URL.revokeObjectURL(url), 1000); } el("btnGenerate").onclick = () => { const html = buildFormAppHtml(state); const name = (state.form.name || "form").toLowerCase().replace(/[^a-z0-9]+/g, "-"); downloadText(name + ".html", html); }; el("btnExport").onclick = exportSchema; el("btnNew").onclick = () => { state = defaultState(); selectedId = null; renderAll(); }; el("fileImport").onchange = (e) => { const file = e.target.files[0]; if (file) importSchema(file); e.target.value = ""; }; renderAll(); })();