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

23 lines
735 B
Cheetah
Raw Permalink Normal View History

2022-03-22 09:21:55 +01:00
{{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">
2022-03-22 09:21:55 +01:00
{{ if .Schema.Title }}{{ .Schema.Title }}{{ else }}{{ .Property }}{{ end }}
</strong>
<br />
<span class="text-sm">{{ .Schema.Description }}</span>
2022-03-22 09:21:55 +01:00
</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>
2022-03-22 09:21:55 +01:00
{{end}}
</td>
</tr>
{{end}}