summaryrefslogtreecommitdiff
path: root/templ/form.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'templ/form.tpl')
-rw-r--r--templ/form.tpl14
1 files changed, 14 insertions, 0 deletions
diff --git a/templ/form.tpl b/templ/form.tpl
new file mode 100644
index 0000000..b17cb1d
--- /dev/null
+++ b/templ/form.tpl
@@ -0,0 +1,14 @@
+{{define "formItem"}}
+ <label {{with .ID}}for="{{.}}"{{end}}>{{.Label}}</label>
+ <input
+ {{with .ID}}id="{{.}}"{{end}}
+ type="{{.Type}}"
+ name="{{.Name}}"
+ placeholder="{{.Placeholder}}"
+ {{with .Value}}value="{{.}}"{{end}}
+ {{with .Class}}class="{{.}}"{{end}}
+ {{range .Options}} {{.}} {{end}}
+ >
+ {{with .Footer}}<p>{{.}}</p>{{end}}
+ <br />
+{{end}} \ No newline at end of file