<form
  {{ with .id }}id="{{ . }}" {{ end }}
  {{ with .name }}name="{{ . }}" {{ end }}
  {{ with .action }}action="{{ . | safeURL }}" {{ end }}
  {{ with .enctype }}enctype="{{ . }}" {{ end }}
  {{ with .target }}target="{{ . }}" {{ end }}
  {{ with .accept_charset }}accept-charset="{{ . }}" {{ end }}
  {{ if eq .novalidate "true" }}novalidate {{ end }}
  {{ if in (slice "on" "off") .autocomplete }}autocomplete="{{ .autocomplete }}" {{ end }}
  {{ if in (slice "get" "post") .method }}method="{{ .method }}" {{ end }}
  class="form{{ with .class }} {{ . }}{{ end }}">
  {{- .body -}}
</form>
