From 8c8b29822d280c2fb9c8f8cb012625daad785b62 Mon Sep 17 00:00:00 2001 From: Tano Rojas Date: Fri, 29 Jan 2021 21:50:08 +0700 Subject: [PATCH] CATL-2002: Do not shrink the values for hidden elements --- includes/wf_crm_webform_preprocess.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/wf_crm_webform_preprocess.inc b/includes/wf_crm_webform_preprocess.inc index ae6783e90..4346e11c8 100644 --- a/includes/wf_crm_webform_preprocess.inc +++ b/includes/wf_crm_webform_preprocess.inc @@ -486,7 +486,7 @@ class wf_crm_webform_preprocess extends wf_crm_webform_base { if (($element['#type'] == 'checkboxes' || !empty($element['#multiple'])) && !is_array($val)) { $val = wf_crm_explode_multivalue_str($val); } - if ($element['#type'] != 'checkboxes' && $element['#type'] != 'date' + if ($element['#type'] != 'checkboxes' && $element['#type'] != 'date' && $element['#type'] != 'value' && empty($element['#multiple']) && is_array($val)) { // If there's more than one value for a non-multi field, pick the most appropriate if (!empty($element['#options'])) {