- Posts: 9
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ // Identify this question var thisQuestion = $('#question{QID}'); var placeHoldOne = $('#question{if(RANDOM == 1 or RANDOM == 2, "Yes", "No")}'); var placeHoldTwo = $('#question{if(RANDOM == 1 or RANDOM == 2, "Yes", "No")}'); var placeHoldThr = $('#question{if(RANDOM == 1 or RANDOM == 3, "Yes", "No")}'); var placeHoldFou = $('#question{if(RANDOM == 1 or RANDOM == 4, "Yes", "No")}'); // Insert the new header row $('tr.answers-list:eq(0)', thisQuestion).before('<tr class="ls-heading"><td class="" style="text-align: left;">Option 1</td>'+'<th class="answer-text">'+placeHoldOne+'</th>'+'<th class="answer-text">'+placeHoldTwo+'</th></tr>'); $('tr.answers-list:eq(0)', thisQuestion).before('<tr class="ls-heading"><td class="" style="text-align: left;">Option 2</td>'+'<th class="answer-text">'+placeHoldThr+'</th>'+'<th class="answer-text">'+placeHoldFou+'</th></tr>'); }); </script>