{{ $pageform := (index .context.Page.Params.forms .form) }} {{ $group := slice }} {{ $divide := .context.Page.Params.divide }}
{{ range $pageform.fields }} {{ $title := .title }} {{ $name := $title }} {{ if .name }} {{ $name = .name }} {{ end }} {{ if and .group (not (in $group .group))}}
{{ if i18n (singularize .group) }}{{ i18n (singularize .group) }}{{ else }}{{ humanize .group }}{{ end }} {{ partial "tools/generator/expand" (dict "name" (printf "%sgroup" .group)) }}
{{ $group = $group | append .group }} {{ end }} {{ if eq .input_type "buttons" }} {{ else if eq .input_type "title" }}

{{- $name -}}{{- if .required -}}{{- " *" -}}{{- end -}}

{{ else if eq .input_type "textarea" }}
{{ $button_target := .title }} {{ range split .buttons ";"}} {{ $b := split . ","}} {{ $translation := index $b 1 }} {{ $n := index $b 0 }} {{ $nn := printf "%s;%s" $button_target $n}} {{ end }}
{{ if .pictures }} {{ $nn := printf "%s;%s" .title "addfiles"}}
{{ end }}
{{ else if eq .input_type "radio" }}
{{ else if eq .input_type "checkbox" }}
{{ else if eq .input_type "results" }}
{{ else if eq .input_type "submit" }}
{{ else if eq .input_type "mc" }} {{ $in0 := .title }} {{- $finale := slice -}} {{ $pages := where site.RegularPages "Type" "in" site.Params.searchSections }} {{ if eq .title "tags" }} {{ range $pages }} {{- with .Params.tags -}} {{- $finale = $finale | append . -}} {{ end }} {{ end }} {{ else if eq .title "foundations" }} {{ range resources.Match "/images/foundations/*" }} {{ $n := path.Base (strings.TrimSuffix (path.Ext .Name) .Name) }} {{- $finale = $finale | append $n -}} {{ end }} {{ else }} {{ range $pages }} {{ range .Param $in0 }} {{- $finale = $finale | append . -}} {{ end }} {{ end }} {{ end }} {{- $finale = $finale | uniq -}}
{{ .name }} {{ if ne .expanded true }}{{ partial "tools/generator/expand" (dict "name" (printf "%scat" $in0)) }}{{ end }}{{- if .required -}}{{- " *" -}}{{- end -}}
{{ range sort $finale }} {{ end }}
{{ if .new }} {{ end }}
{{ else if eq .input_type "rb" }} {{ $in0 := .title }} {{- $finale := slice -}} {{ $pages := where site.RegularPages "Type" "in" site.Params.searchSections }} {{ if eq .title "tags" }} {{ range $pages }} {{- with .Params.tags -}} {{- $finale = $finale | append . -}} {{ end }} {{ end }} {{ else if eq .title "foundations" }} {{ range resources.Match "/images/foundations/*" }} {{ $n := path.Base (strings.TrimSuffix (path.Ext .Name) .Name) }} {{- $finale = $finale | append $n -}} {{ end }} {{ else }} {{ range $pages }} {{ range .Param $in0 }} {{- $finale = $finale | append . -}} {{ end }} {{ end }} {{ end }} {{- $finale = $finale | uniq -}}
{{ .name }} {{ if ne .expanded true }}{{ partial "tools/generator/expand" (dict "name" (printf "%scat" $in0)) }}{{ end }}{{- if .required -}}{{- " *" -}}{{- end -}}
{{ range sort $finale }} {{ end }}
{{ if .new }} {{ end }}
{{ else if eq .input_type "categories" }} {{ $in0 := .title }} {{- $finale := slice -}} {{ $pages := where site.RegularPages "Type" "in" site.Params.searchSections }} {{ if eq .title "tags" }} {{ range $pages }} {{- with .Params.tags -}} {{- $finale = $finale | append . -}} {{ end }} {{ end }} {{ else if eq .title "foundations" }} {{ range resources.Match "/images/foundations/*" }} {{ $n := path.Base (strings.TrimSuffix (path.Ext .Name) .Name) }} {{- $finale = $finale | append $n -}} {{ end }} {{ else }} {{ range $pages }} {{ range .Param $in0 }} {{- $finale = $finale | append . -}} {{ end }} {{ end }} {{ end }} {{- $finale = $finale | uniq -}}
{{ .name }} {{ if ne .expanded true }}{{ partial "tools/generator/expand" (dict "name" (printf "%scat" $in0)) }}{{ end }}{{- if .required -}}{{- " *" -}}{{- end -}}
{{ $direction := "row" }} {{ if .direction }} {{ $direction = .direction }} {{ end }}
{{ $button_target := .title }} {{ range sort $finale }} {{ if . }} {{ $n := . }} {{ $nn := printf "%s;%s" $button_target $n}} {{ end }} {{ end }}
{{ else }} {{ if eq .title "name" }}
{{ else if eq .title "address" }}
{{ else }}
{{ end }} {{ end }} {{ end }}