explanatory heading in array subquestion

More
2 years 11 months ago #110514 by barbacot
barbacot created the topic: explanatory heading in array subquestion
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?

Attachments:

Please Log in to join the conversation.

More
2 years 11 months ago - 2 years 11 months ago #110614 by tpartner
tpartner replied the topic: explanatory heading in array subquestion
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 11 months ago by tpartner.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now