- TRA-99 Solved. Unable to create a new Tenant Make

- Generic improvement of initialisation of Dynamic Forms, ensuring correct form processing
This commit is contained in:
Josako
2025-11-26 11:31:25 +01:00
parent 0d3c3949de
commit f10bb6f395
4 changed files with 40 additions and 21 deletions

View File

@@ -11,18 +11,9 @@
{{ form.hidden_tag() }}
{% set disabled_fields = [] %}
{% set exclude_fields = [] %}
{% for field in form.get_static_fields() %}
{% for field in form %}
{{ render_field(field, disabled_fields, exclude_fields) }}
{% endfor %}
<!-- Render Dynamic Fields -->
{% for collection_name, fields in form.get_dynamic_fields().items() %}
{% if fields|length > 0 %}
<h4 class="mt-4">{{ collection_name }}</h4>
{% endif %}
{% for field in fields %}
{{ render_field(field, disabled_fields, exclude_fields) }}
{% endfor %}
{% endfor %}
<button type="submit" class="btn btn-primary">Register Tenant Make</button>
</form>
{% endblock %}