Create a likert scale but move the "not applicable" option to the right

More
7 years 9 months ago - 7 years 9 months ago #55157 by shirleyorigami
shirleyorigami created the topic: Create a likert scale but move the "not applicable" option to the righ
Hi guys,

I would like my participants to rate a statement with five possible answers:

Example: Never - rarely - sometimes - often - always

I used an "array" to create these questions.

However, I want to add another option "not applicable"

Example: Never - rarely - sometimes - often - always - not applicable.

Is it possible to create a greater distance in the questiontable between the first five items and the sixth item, so that participants view "not applicable" as a distinct option?

Example: Never - rarely - sometimes - often - always
not applicable.
Last Edit: 7 years 9 months ago by shirleyorigami.

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

More
7 years 9 months ago - 7 years 9 months ago #55167 by tpartner
tpartner replied the topic: Create a likert scale but move the "not applicable" option to the righ
You will need to insert blank cells in the table.

Set up your survey to use JavaScript and place the following script in the source of the array question or the group description. Replace "QQ" (line 5) with the array question ID.
<script type="text/javascript" charset="utf-8">
 
    $(document).ready(function() {
 
		var qID = QQ;
 
		// Reset column widths
		$('#question'+qID+' col').attr('width', 'auto');
 
		// Insert new column
		$('<th class="spacerCell"></th>').insertBefore('#question'+qID+' table.question thead tr th:last');
		$('#question'+qID+' table.question tbody tr').each(function(i) {
			$('td:last', this).addClass('lastCell');
		});
		$('<td class="spacerCell"></td>').insertBefore('.lastCell');
 
 
	});
 
</script>

Then, add the following to the end of template.css to set styles for your new column and the sub-question widths. Replace "QQ" with the array question ID.
#questionQQ .spacerCell {
	background-color: #FFFFFF;
	width: 5px;
}
 
#questionQQ tbody th {
	width: 15%;
}


Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last Edit: 7 years 9 months ago by tpartner.

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

More
7 years 9 months ago #55168 by holch
holch replied the topic: Create a likert scale but move the "not applicable" option to the righ
Excellent solution by Tpartner again.

Thumbs up!

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

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

More
7 years 9 months ago #55202 by shirleyorigami
shirleyorigami replied the topic: Create a likert scale but move the "not applicable" option to the righ
Thank you very much! I will try it out.

BTW, I receive a lot of 500 errors when I look at the LimeSurvey website.

For instance, this link gives a 500 error as well:

docs.limesurvey.org/tiki-index.php?page=..._etc._in_LimeSurvey_

Error 500!

/tiki-index.php
Internal Server Error!

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

More
7 years 9 months ago #55214 by Mazi
Mazi replied the topic: Create a likert scale but move the "not applicable" option to the righ
This link work fine for me: docs.limesurvey.org/tiki-index.php?page=..._etc._in_LimeSurvey_

Though we have updated our wiki software recently and there might be some problems. Please list them all here so we can fix them.


Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

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

More
7 years 9 months ago #55216 by shirleyorigami
shirleyorigami replied the topic: Create a likert scale but move the "not applicable" option to the righ
docs.limesurvey.org/
I get the same 500 error over here.

Basically, I cannot access your wiki; but I did a Google search and visited the cached version.

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

More
7 years 9 months ago #55222 by Mazi
Mazi replied the topic: Create a likert scale but move the "not applicable" option to the righ
It works fine here.Please try clearing your browser cache.


Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The following user(s) said Thank You: shirleyorigami

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

More
7 years 9 months ago #55227 by shirleyorigami
shirleyorigami replied the topic: Create a likert scale but move the "not applicable" option to the righ
Thanks, that was indeed the problem. Other browsers do show the website.

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

More
7 years 9 months ago #55317 by Mazi
Mazi replied the topic: Create a likert scale but move the "not applicable" option to the righ
You're welcome!

If our hints have been helpful and you enjoy limesurvey please consider a donation to the team .
We do all this in our free time and you don't have to pay a penny for this software.

Without your help we can't keep this project alive.


Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

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

More
7 years 8 months ago #56006 by shirleyorigami
shirleyorigami replied the topic: Create a likert scale but move the "not applicable" option to the righ
Is there another option without enabling Javascript? For instance, by changing the template?

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

More
7 years 8 months ago #56011 by Mazi
Mazi replied the topic: Create a likert scale but move the "not applicable" option to the righ
This can also be done by editing the template.css of the template you are using. Check the CSS that is embedded at tpartner's javascript. It should be possible to extract it and assign it to either the whole question type or just a single (or several) question by using the question ID.


Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

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

More
7 years 8 months ago #56018 by tpartner
tpartner replied the topic: Create a likert scale but move the "not applicable" option to the righ
Yoy will need to use JavaScript to insert the extra column. I have already included rules to be added to template.css.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

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

More
7 years 8 months ago #56034 by Mazi
Mazi replied the topic: Create a likert scale but move the "not applicable" option to the righ

tpartner wrote: Yoy will need to use JavaScript to insert the extra column. I have already included rules to be added to template.css.

Doesn't the last column have any unique value we can use for some customized formatting (just guessing)?


Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

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

More
6 years 1 month ago #85624 by hugomp
hugomp replied the topic: Aw: Re: Create a likert scale but move the "not applicable" option to
Hallo
What would be the script if I want to add a spacer-column not before last but say between the third and the fourth column?

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

More
6 years 1 month ago #85647 by tpartner
tpartner replied the topic: Aw: Re: Create a likert scale but move the "not applicable" option to
Try this:
<script type="text/javascript" charset="utf-8">
 
    $(document).ready(function() {
 
		var qID = QQ;
 
		// Reset column widths
		$('#question'+qID+' col').attr('width', 'auto');
 
		// Insert new column
		$('<th class="spacerCell"></th>').insertBefore('#question'+qID+' table.question thead tr th:eq(3)');
		$('#question'+qID+' table.question tbody tr').each(function(i) {
			$('td:eq(3)', this).addClass('lastCell');
		});
		$('<td class="spacerCell"></td>').insertBefore('.lastCell');
 
 
	});
 
</script>

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

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!