diff --git a/_includes/form/boolean.html b/_includes/form/boolean.html index 1e0ee21..32d35b4 100644 --- a/_includes/form/boolean.html +++ b/_includes/form/boolean.html @@ -1,25 +1,30 @@ +{%- assign name = include.field[0] -%} +{%- assign id = include.field[1].id | default: name -%} +{%- assign label = include.field[1].label[site.locale] -%} +{%- assign help = include.field[1].help[site.locale] -%} +{%- assign autocomplete = include.field[1].autocomplete -%} +
- + - {%- if include.field[1].help -%} - - {{ include.field[1].help }} + {%- if help -%} + + {{ help }} {%- endif -%}
diff --git a/_includes/form/hidden.html b/_includes/form/hidden.html index 50688ab..e9ab603 100644 --- a/_includes/form/hidden.html +++ b/_includes/form/hidden.html @@ -1 +1,5 @@ - +{%- assign name = include.field[0] -%} +{%- assign id = include.field[1].id | default: name -%} +{%- assign value = include.field[1].value -%} + + diff --git a/_includes/form/input.html b/_includes/form/input.html index 36253b8..cc674c2 100644 --- a/_includes/form/input.html +++ b/_includes/form/input.html @@ -1,24 +1,33 @@ +{%- assign name = include.field[0] -%} +{%- assign id = include.field[1].id | default: name -%} +{%- assign label = include.field[1].label[site.locale] -%} +{%- assign help = include.field[1].help[site.locale] -%} +{%- assign autocomplete = include.field[1].autocomplete -%} +
-
diff --git a/_includes/form/predefined_array.html b/_includes/form/predefined_array.html index 883c59b..bdbf6ad 100644 --- a/_includes/form/predefined_array.html +++ b/_includes/form/predefined_array.html @@ -1,18 +1,27 @@ +{%- assign name = include.field[0] -%} +{%- assign id = include.field[1].id | default: name -%} +{%- assign label = include.field[1].label[site.locale] -%} +{%- assign help = include.field[1].help[site.locale] -%} +{%- assign autocomplete = include.field[1].autocomplete -%} +
-
diff --git a/_includes/form/string.html b/_includes/form/string.html index a92aa57..8f6c389 100644 --- a/_includes/form/string.html +++ b/_includes/form/string.html @@ -1 +1,3 @@ -{% include input.html field=field %} +{% assign f = field %} +{% assign f.type = 'text' %} +{% include input.html field=f %} diff --git a/_includes/form/submit.html b/_includes/form/submit.html index ce8862a..5032564 100644 --- a/_includes/form/submit.html +++ b/_includes/form/submit.html @@ -1 +1 @@ - + diff --git a/_includes/form/text.html b/_includes/form/text.html index 46b0c8c..3f145ef 100644 --- a/_includes/form/text.html +++ b/_includes/form/text.html @@ -1,24 +1,32 @@ +{%- assign name = include.field[0] -%} +{%- assign id = include.field[1].id | default: name -%} +{%- assign label = include.field[1].label[site.locale] -%} +{%- assign help = include.field[1].help[site.locale] -%} +{%- assign autocomplete = include.field[1].autocomplete -%} +
-