If you could provide me with a script example of how to insert the names of the actors into the hidden multi-short-text question...
1) Insert a multiple short text question directly after the multiple choice question. The multiple short text needs to have the same number of sub-questions as the maximum answers allowed in the multiple choice question.
2) Give the multiple short text question a class "hidden".
3) Add this script to the text of the multiple choice question:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
// Identify the questions
var thisQuestion = $('#question{QID}');
var hiddenQuestion = $(thisQuestion).nextAll('.multiple-short-txt:eq(0)');
// Interrupt the "Next" function
$('#movenextbtn, #movesubmitbtn').on('click', function(e) {
// Load the hidden question
$('input[type="checkbox"]:checked', thisQuestion).each(function(i) {
var thisText = $.trim($(this).nextAll('.label-text:eq(0)').text());
$('input[type="text"]:eq('+i+')', hiddenQuestion).val(thisText);
});
});
});
</script>
Sample survey attached: