From dafbca8d7acd3c14ae5415f34a02b892f8d3ff6c Mon Sep 17 00:00:00 2001 From: Jens Schuppe Date: Wed, 21 Feb 2024 14:12:35 +0100 Subject: [PATCH] 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 135463a..e07f6eb 100644 --- a/modules/civiremote_event/src/Form/RegisterForm.php +++ b/modules/civiremote_event/src/Form/RegisterForm.php @@ -171,9 +171,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':