From 469653ca0b0d5bee557f470fbc93ed0197cfd504 Mon Sep 17 00:00:00 2001 From: Jens Schuppe Date: Wed, 21 Feb 2024 14:15:08 +0100 Subject: [PATCH] [#23] Allow arrays as default value for checkboxes elements --- modules/civiremote_event/src/Form/RegisterForm.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/civiremote_event/src/Form/RegisterForm.php b/modules/civiremote_event/src/Form/RegisterForm.php index ba48ecf..478a87d 100644 --- a/modules/civiremote_event/src/Form/RegisterForm.php +++ b/modules/civiremote_event/src/Form/RegisterForm.php @@ -231,9 +231,8 @@ public static function defaultValue($field, $field_name, $type) { case 'checkboxes': if ( isset($field['value']) - && array_key_exists($field['value'], $field['options']) ) { - $default_value = $field['value']; + $default_value = (array) $field['value']; } break; case 'radios':