formidable/internal/server/template/blocks/form_row.html.tmpl

23 lines
735 B
Cheetah

{{define "form_row"}}
{{ $fullProperty := getFullProperty .Parent .Property }}
<tr>
<td align="left" nowrap="">
<label for="{{ $fullProperty }}" class="block font-medium text-gray-900">
<strong class="text-lg">
{{ if .Schema.Title }}{{ .Schema.Title }}{{ else }}{{ .Property }}{{ end }}
</strong>
<br />
<span class="text-sm">{{ .Schema.Description }}</span>
</label>
</td>
<td align="left" nowrap="">
{{template "form_input" .}}
</td>
<td>
{{ $err := getPropertyError .Error $fullProperty }}
{{if $err}}
<em class="text-red-700 px-4 py-3">{{ $err.Message }}</em>
{{end}}
</td>
</tr>
{{end}}