I would use a hidden multiple options question and
array filter to pass the checked option codes into page 2.
1) Insert a copy of the multiple options question (q1) at the top of group 2. Let's call it "qHidden" (we'll hide it with JavaScript). All answer codes in q1, qHidden and the multi-numeric must be identical.
2) Apply an
array filter to qHidden using the q1 ID.
3) Insert the following script into the source of qHidden. Replace "HH" with the ID of qHidden and "NN" with the ID of the multi-numeric question.
The script looks for all hidden (by array filter) options in qHidden, hides the corresponding options in the multi-numeric and then hides the whole qHidden question.
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
handleChecked3(HH, NN);
function handleChecked3(q1ID, q2ID) {
// Find the survey and group IDs
if($( 'input#fieldnames' ).length != 0) {
var fieldNames = $( 'input#fieldnames' ).attr('value');
var tmp = fieldNames.split('X');
var sID = tmp[0];
var gID = tmp[1];
}
// An empty array for the answer codes
var optCodes = new Array();
// Loop through all hidden (by array filter) options in qHidden
$('#question'+q1ID+' li[id^="javatbd"]:hidden').each(function(i) {
// Find the option code
var itemID = $(this).attr('id');
var tmp2 = itemID.split('X'+q1ID);
var optCode = tmp2[1];
// Add the code to the array
optCodes.push(optCode);
});
// Loop through the array of hidden option codes
$(optCodes).each(function(i) {
// Find the corresponding list item in the multi-numeric
var el = $('#question'+q2ID+' label[for="answer'+sID+'X'+gID+'X'+q2ID+''+this+'"]').parent('li:eq(0)');
// Hide the list item
$(el).hide();
// Set the list item input to 0
$('input.text', el).val(0);
});
// Now, hide the whole qHidden question
$('#question'+q1ID+'').hide();
}
});
</script>
Note, if you are using any of the "sum value" settings for the multi-numeric, you will need some extra code to calculate those.