Commit c5c00742 authored by somersoft's avatar somersoft Committed by Liam Morland
Browse files

Issue #3261965 by somersoft: Make default values for checkboxes be arrays

parent b4f66a83
Loading
Loading
Loading
Loading
+2 −2
Changes for webform_validation.module: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ function webform_validation_form_webform_ui_element_form_alter(&$form, FormState
    '#title' => t('Equal Components'),
    '#description' => t('Select the components to be validated by this validation rule'),
    '#parents' => ['properties', 'equal_components'],
    '#default_value' => $customProperties['equal_components'] ?? NULL,
    '#default_value' => $customProperties['equal_components'] ?? [],
    '#states' => [
      'visible' => [
        ':input[name="properties[equal]"]' => ['checked' => TRUE],
@@ -172,7 +172,7 @@ function webform_validation_form_webform_ui_element_form_alter(&$form, FormState
    '#title' => t('Several Components'),
    '#description' => t('Select the components to be validated by this validation rule'),
    '#parents' => ['properties', 'some_of_several_components'],
    '#default_value' => $customProperties['some_of_several_components'] ?? NULL,
    '#default_value' => $customProperties['some_of_several_components'] ?? [],
    '#states' => [
      'visible' => [
        ':input[name="properties[some_of_several]"]' => ['checked' => TRUE],