From c67b54a2b09c04d373f56f3094ff68874543e1ea Mon Sep 17 00:00:00 2001 From: Samuel Vanhove Date: Thu, 20 Jun 2019 09:47:04 -0400 Subject: [PATCH] dev/core#1058 Fixing the display of checkboxes in event confirm / thank you --- CRM/Event/BAO/Event.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CRM/Event/BAO/Event.php b/CRM/Event/BAO/Event.php index 2729d09693..46172f50bd 100644 --- a/CRM/Event/BAO/Event.php +++ b/CRM/Event/BAO/Event.php @@ -1638,6 +1638,16 @@ WHERE id = $cfID } $skip = TRUE; } + // for checkboxes, change array of [key => bool] to array of [idx => key] + elseif ($dao->html_type == 'CheckBox') { + $v = []; + foreach ($params[$name] as $key => $val) { + if ($val) { + $v[] = $key; + } + } + $customVal = $v; + } else { $customVal = $params[$name]; } -- 2.25.1