Additional Array Header

More
3 years 3 months ago - 3 years 3 months ago #112265 by tixeon
tixeon created the topic: Additional Array Header
I have a 0-10 rating in an array and would like to add a header row for the 0-10 columns (not the Don't know column).
The left most label (Not at all) needs to be left aligned and the right most (extremely) needs to be right aligned.


(don't need the underline)

I tried adjusting the script posted here with no success: www.limesurvey.org/en/forum/can-i-do-thi...rray-question#101280
Last Edit: 3 years 3 months ago by tixeon. Reason: Inserted image example

Please Log in to join the conversation.

More
3 years 3 months ago - 3 years 3 months ago #112282 by tpartner
tpartner replied the topic: Additional Array Header
You could add something like this to the source of the array. This will insert a new row in the <thead> of the array table.

<script type="text/javascript" charset="utf-8">	
    $(document).ready(function(){
 
		// Identify this question
		var thisQuestion = $('#question{QID}');
 
		// Insert the new header row
		$('table.subquestions-list thead', thisQuestion).prepend('<tr class="new-header">\
			<td>&nbsp;</td>\
			<th colspan="6" style="text-align:left;">Not at all important</th>\
			<th colspan="5" style="text-align:right;">Extremely important</th>\
			<th></th>\
		</tr>');
	});
</script>

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 3 years 3 months ago by tpartner.
The following user(s) said Thank You: tixeon

Please Log in to join the conversation.

More
3 years 3 months ago #112312 by tixeon
tixeon replied the topic: Additional Array Header
Perfect, thank you!

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!