Welcome, Guest
Username: Password: Remember me

TOPIC: explanatory heading in array subquestion

explanatory heading in array subquestion 1 month 2 weeks 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?

header.png
The administrator has disabled public write access.

explanatory heading in array subquestion 1 month 2 weeks ago #110614

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4117
  • Thank you received: 760
  • Karma: 346
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 1 month 2 weeks ago by tpartner.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.122 seconds
Donation Image