Using PHP code, you can use the function getItems()
to retrieve a list of checked items.
$checked = getItems('AB01', 'is', 2);
And the you can use count()
to count this list:
if (count($checked) > 1) {
question('BB02');
}
Tip: Ic case that AB01 is asking for the spoken languages and BB02 for the primary language, than it may be useful to copy the primary language (either from AB01 oder BB02) to an internal variable via put()
.
$checked = getItems('AB01', 'is', 2);
if (count($checked) > 1) {
question('BB02', $checked);
} else {
put('IV01_01', $checked[0]);
}
... and on next page
$checked = getItems('AB01', 'is', 2);
if (count($checked) > 1) {
put('IV01_01', value('BB02'));
}