Something is going wrong in the following use case.
I want a a select2, with multiple selections, with a default value selected when the page is loaded. In your documentation you mention to use "initValueText" but something is going wrong here.
I get an exception:
array_combine(): Both parameters should have an equal number of elements
I have debugged and have come to the following line of code in the Select2.php file (starting from line code 184):
It seems that the number of elements of $key and $val are not the same. The array for $val ( which equals $this->initValueText)- is set, but the $val (corresponding with $this->value) is not set.
I have tried adding
'value => [theValue]
in the array for the Select2 but it seems it gets skipped somehow.
The code I have (partially) for the select2 in the formgrid is as follows:
` 'attributes' => [
Dear Kartik
Something is going wrong in the following use case. I want a a select2, with multiple selections, with a default value selected when the page is loaded. In your documentation you mention to use "initValueText" but something is going wrong here.
I get an exception:
array_combine(): Both parameters should have an equal number of elements
I have debugged and have come to the following line of code in the Select2.php file (starting from line code 184):
It seems that the number of elements of $key and $val are not the same. The array for $val ( which equals $this->initValueText)- is set, but the $val (corresponding with $this->value) is not set.
I have tried adding
'value => [theValue]
in the array for the Select2 but it seems it gets skipped somehow.The code I have (partially) for the select2 in the formgrid is as follows: ` 'attributes' => [