diff options
Diffstat (limited to 'template/en/default/global')
-rw-r--r-- | template/en/default/global/hidden-fields.html.tmpl | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/template/en/default/global/hidden-fields.html.tmpl b/template/en/default/global/hidden-fields.html.tmpl index e622e7b90..f968fab20 100644 --- a/template/en/default/global/hidden-fields.html.tmpl +++ b/template/en/default/global/hidden-fields.html.tmpl @@ -21,6 +21,8 @@ [%# INTERFACE: # form: hash; the form fields/values for which to generate hidden fields. + # mform: hash; the form fields/values with multiple values for which to + # generate hidden fields. # exclude: string; a regular expression matching fields to exclude # from the list of hidden fields generated by this template #%] @@ -28,6 +30,13 @@ [%# Generate hidden form fields for non-excluded fields. %] [% FOREACH field = form %] [% NEXT IF exclude && field.key.search(exclude) %] - <input type="hidden" name="[% field.key %]" - value="[% field.value | html | html_linebreak %]"> + [% IF mform.${field.key}.size > 1 %] + [% FOREACH mvalue = mform.${field.key} %] + <input type="hidden" name="[% field.key %]" + value="[% mvalue | html | html_linebreak %]"> + [% END %] + [% ELSE %] + <input type="hidden" name="[% field.key %]" + value="[% field.value | html | html_linebreak %]"> + [% END %] [% END %] |