Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: explanatory heading in array subquestion

explanatory heading in array subquestion 2 years 5 months ago #110514

  • barbacot
  • barbacot's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
I need to add an explanatory heading common to all subquestions in the array - see attached screenshot.
I saw a solution here but it was for the answers - how can
I do this for subquestions?

The administrator has disabled public write access.

explanatory heading in array subquestion 2 years 5 months ago #110614

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6573
  • Thank you received: 1477
  • Karma: 579
Set up your survey to use JavaScript and add something like this to the source of the question:

<script type="text/javascript" charset="utf-8">	
	$(document).ready(function(){
 
		var newText = 'This is the sub-question header';
 
		$('#question{QID} table.subquestions-list thead td:first').addClass('sub-question-header').text(newText);
	});
</script>

Then you can style it with something like this at the end of template.css:

td.sub-question-header {
	font-size: 11px;
	padding: 4px 6px;
	color: red;
	text-align: right;
}
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 2 years 5 months ago by tpartner.
The administrator has disabled public write access.
Time to create page: 0.305 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form