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

23 lines
632 B
Cheetah
Raw 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 }}">
<strong>
{{ if .Schema.Title }}{{ .Schema.Title }}{{ else }}{{ .Property }}{{ end }}
</strong>
<br />
<span>{{ .Schema.Description }}</span>
</label>
</td>
<td align="left" nowrap="">
{{template "form_input" .}}
</td>
<td>
{{ $err := getPropertyError .Error $fullProperty }}
{{if $err}}
<em>{{ $err.Message }}</em>
{{end}}
</td>
</tr>
{{end}}