base generator with askama templating, toml config and json writing

This commit is contained in:
2025-12-01 18:19:15 +01:00
commit bdfa359702
8 changed files with 1918 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
{% extends "_layout.html" %}
{% block title %}Form{% endblock %}
{% block content %}
<h1>Dynamic Form</h1>
<form action="/submit" method="POST" autocomplete="off">
{% for f in fields %}
<div class="field">
<label for="{{ f.name }}">{{ f.description }}</label>
<div class="desc">{{ f.description }}</div>
{% if f.answer_type == "textarea" %}
<textarea id="{{ f.name }}" name="{{ f.name }}" rows="5"></textarea>
{% elif f.answer_type == "select" %}
<select id="{{ f.name }}" name="{{ f.name }}"><option value="">(no options)</option></select>
{% else %}
<input id="{{ f.name }}" name="{{ f.name }}" type="{{ f.answer_type }}">
{% endif %}
</div>
{% endfor %}
<div><button type="submit">Submit</button></div>
</form>
{% endblock %}