Verwendung
einzelne Felder eines Django-Formulars an beliebiger Stelle; Name, ID, Wert, Label, Hilfetext und Pflicht kommen aus dem Formular.
Formulare
One Django BoundField rendered as the matching tc control: text/email/url/number inputs, password, date/datetime/time pickers, textarea, select (multiple), radio group, checkbox (group), file upload; hidden and unknown widgets fall back to Django markup in the field frame. Extra attributes (HTMX …) go to the control.
einzelne Felder eines Django-Formulars an beliebiger Stelle; Name, ID, Wert, Label, Hilfetext und Pflicht kommen aus dem Formular.
jedes Django-Widget wird zum passenden tc-Element – Select, Radio- und Checkbox-Gruppe, Checkbox, Datum, Uhrzeit und Zahl.
Label, Hilfetext, Größe, Monospace und Spaltenbreite je Feld; weitere Attribute (hx-*, data-*) landen am Element.
ein gebundenes Formular zeigt Django-Fehler direkt am Feld (role=alert, aria-describedby); Formularfehler zeigt tc_fields als Zusammenfassung.
| Option | Standard | Werte | Beschreibung |
|---|---|---|---|
field | 'None' | – | Bound field, e.g. form.hostname (required). |
label | '' | – | Override the field label. |
help | 'None' | – | Override the help text. |
size | 'md' | Control size. | |
mono | False | – | Monospaced value (text inputs and textarea). |
wide | 'None' | – | Span both columns of a two-column form (default for textareas and groups). |
Zusätzliche Attribute (z. B. class, aria-*, data-*) und HTMX-Kurzformen (get, post, get_url, post_url, target, swap, trigger, confirm) werden an das Element „root“ durchgereicht.