bellaskeys.com/themes/agnes-hugo-theme/layouts/partials/contact_form.html

19 lines
826 B
HTML
Raw Normal View History

2024-03-01 14:34:27 -05:00
{{ $form := index .Site.Params.contact_forms 0 }}
<form class="contact-form" action="{{ $form.submit_url }}" method="post">
<div class="form-grid">
{{ range $field := $form.fields }}
<div class="form-group {{ if $field.class }}{{ $field.class }}{{ end }}">
<label for="{{ $field.name }}">{{ $field.name }}</label>
{{ if eq $field.type "textarea" }}
<textarea id="{{ $field.name }}" name="{{ $field.name }}" rows="5"{{ if $field.required }} required{{ end }}></textarea>
{{ else }}
<input type="{{ $field.type }}" id="{{ $field.name }}" name="{{ $field.name }}"{{ if $field.required }} required{{ end }}>
{{ end }}
</div>
{{ end }}
</div>
<div class="form-group full-width">
<button class="button" type="submit">Submit</button>
</div>
</form>