Skip to content

Commit

Permalink
fixup! Add subtemplate for rendering update/delete form
Browse files Browse the repository at this point in the history
Connect labels to their respective fields for update form
  • Loading branch information
stveit committed Nov 1, 2024
1 parent f262452 commit 9d70718
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
<fieldset class="menu menu-horizontal menu-md items-center gap-4">
{% for hidden_field in form.hidden_fields %}{{ hidden_field }}{% endfor %}
{% for field in form.visible_fields %}
<label class=" flex items-center gap-2">{{ field.label }}</label>
<div class="input input-bordered flex items-center gap-2">{{ field }}</div>
<label class=" flex items-center gap-2">
{{ field.label }}
<div class="input input-bordered flex items-center gap-2">{{ field }}</div>
</label>
{% if field.errors %}<p class="text-error">{{ field.errors }}</p>{% endif %}
{% empty %}
<p>Something went wrong</p>
Expand Down

0 comments on commit 9d70718

Please sign in to comment.