Quantcast
Channel: Topics in Category: Can I do this with LimeSurvey? - LimeSurvey forums
Viewing all articles
Browse latest Browse all 17529

Partially Randomized Answers For Array Typed Questions - by: tpartner

$
0
0
1) Follow the instructions regarding answer/subquestion codes here - docs.limesurvey.org/tiki-index.php?page=...List_radio_questions

2) Set your array to "Random answer order"

3) Add this script to the source of the array (this code is for the plain "Array" question and may need to be modified for other question types):
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
 
		// Identify some elements
		var q1ID = '{QID}';
		var q1 = $('#question'+q1ID+'');
		var tbody = $('tr[id^="javatbd"]:eq(0)', q1).parent();
 
		// Find the number of answers
		var ansCount = $('tr[id^="javatbd"]', q1).length;
 
		// Place the last answer created at the end of the list
		$('tr[id$="X'+q1ID+ansCount+'"]', q1).appendTo($(tbody));
	});
</script>

Regarding the "Other" option, you can add a following short-text question that is shown conditionally when an option in that array row is clicked.

Viewing all articles
Browse latest Browse all 17529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>