Adding text to table cells in arrays

More
1 month 3 weeks ago #183907 by krosser
Hi guys!
I would like to add text to the first cell in the heading of an array. Any help would be much appreciated.



Sample survey attached:

File Attachment:

File Name: limesurvey...5628.lss
File Size:26 KB

I'm using the latest LS 3.17 hosted on LS servers, not installed locally.
Attachments:

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
1 month 2 weeks ago #183946 by tpartner
Place something like this in the question source:

<script type="text/javascript" charset="utf-8">	
    $(document).on('ready pjax:scriptcomplete',function(){
 
		// Identify this question
		var thisQuestion = $('#question{QID}');
 
		// Insert header text
		var insertedText = "Inserted text";
		$('table.subquestion-list thead tr:last td:first', thisQuestion).addClass('inserted-header').append(insertedText);
	});
</script>

And maybe something like this in custom.css:

td.inserted-header {
	font-weight: bold;
	text-align: center;
	vertical-align: middle !important;
}

Sample survey attached:

File Attachment:

File Name: limesurvey...6281.lss
File Size:26 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Attachments:
The following user(s) said Thank You: krosser

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #183952 by krosser
Awesome! Many thanks, Tony.

I'm using the latest LS 3.17 hosted on LS servers, not installed locally.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!