DragonByte Tech
Well-known member
- Affected version
- 2.1.2
Given this code:
this means that a multi-select will be saved like so:
(Notice the lack of
However, when later looking for the value:
It always expect
Therefore, it is impossible to save criteria with a multi-select user field and load these criteria back into the form with the correct selection.
HTML:
<xf:set var="$fieldName" value="criteria[user_field]{{ ($choices && $fieldDefinition.type_group != 'multiple') ? '[exact]' : '' }}[{$fieldId}]" />
Code:
["user_field"] => array(1) {
["test_multi_select"] => array(1) {
[0] => string(11) "s:5:"test1""
}
}
exact
)However, when later looking for the value:
HTML:
<xf:checkbox name="{$fieldName}" value="{$criteria.user_field.exact.{$fieldId}}" listclass="listColumns" readonly="{$readOnly}">
exact
to exist, which will never be true for multi-selects.Therefore, it is impossible to save criteria with a multi-select user field and load these criteria back into the form with the correct selection.