We design a survey for a Social Network Analysis in which we ask the employees in a company to nominate colleagues for certain relationship types. For instance, with whom are you friends outside of work?
An array lists all employees and participants can make their choices.
Function 1: We use a radio buttons for nominating colleagues. To undo a nomination we’ve implemented a reset button next to each name (see screenshot). That works
Function 2: Now we would like to insert subheadings in order to group the individual names (by organisational departments) to make it easier for participants to find their peers (there will be 70 names in total). We’ve tried the “hide” function to omit an answer and to display the department name instead. That works without the reset button, but not in combination. We also tried the function “subheading”, but also that did not work.
I'm rather new to LimeSurvey and coding, and I'm not entirely sure how to combine functions properly.
How could we combine the reset button with either the “hide” function or the ”subheading” function?
Or, is there a better way to group answers?
Thanks,
Till
We use LimeSurvey Version 2.05+. This is how the script for the radio button looks like (in the question source):
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
addReset('{QID}');
function addReset(qID) {
$('#question'+qID+' table.subquestions-list').css('table-layout', 'auto');
$('#question'+qID+' table.subquestions-list thead tr').append('<th />');
$('#question'+qID+' tr.answers-list').append('<td class="buttonCell"><input type="button" value="Reset" class="resetButton" /></td>');
$('#question'+qID+' .resetButton').click(function(e){
var parentRow = $(this).closest('tr');
$('input.radio', parentRow).attr('checked', false);
});
}
});
</script>