Visual space between (likert type labels of) a scale and an option 'don't know'

More
1 year 3 months ago #207173 by vprovoos
(Mostly applicable to array questions) Given that it is important that respondents clearly see the difference between an answer to a question and an option 'don't know' or 'not applicable', I wondered how this can be provided in Lime survey. I do not see a possibility to 1) create an empty space between two columns; or 2) give the last column (e.g. 'don't know') a different color compared to the other columns. How can this difference between the two answer-types be made more clear in the lay-out of the question? Do people have tips to share? Thanks!

Please Log in to join the conversation.

More
1 year 3 months ago #207174 by Joffm
Like this?


with this in question text
<style type="text/css">.answer_cell_9 {
    background-color: #efefef !important;
    border-left: 2px solid #aaa !important;
}
</style>
with answer_cell_9 the answer option code.

And here you find how to define column width in arrays.
forums.limesurvey.org/forum/can-i-do-thi...rvey?start=15#186378

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The following user(s) said Thank You: DenisChenu, vprovoos

Please Log in to join the conversation.

More
1 year 3 months ago #207178 by holch
Well, I think that looks great, Joffm. Need to have a look at that.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: vprovoos

Please Log in to join the conversation.

More
1 year 3 months ago #207179 by vprovoos
Yes, this is how I want it to look. Thank you!

Please Log in to join the conversation.

More
1 year 3 months ago #207187 by tpartner
Maybe this would be more universal:

<style type="text/css">#question{QID} td.answer-item:last-child {
    background-color: #efefef !important;
    border-left: 2px solid #aaa !important;
}
</style>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: vprovoos

Please Log in to join the conversation.

More
1 year 1 week ago #210597 by mcovents
This works great but is it also possible to add this code to a template so all array questions that use this template have this layout so I don't have to include this code in every array question?
I work with Limesurvey 3.15
Thanks in advance and best regards,

Please Log in to join the conversation.

More
1 year 1 week ago #210600 by Joffm
Enter this to your custom.css
.no-answer-border #question{QID} td.answer-item:last-child {
    background-color: #efefef !important;
    border-left: 2px solid #aaa !important;
}

And in each question you want to use this, enter the css class "no-answer-border".
You may name it as you like.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:

Please Log in to join the conversation.

More
1 year 1 week ago #210602 by tpartner
I'm not sure about the {QID} placeholder in custom.css. :)

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

More
1 year 1 week ago #210603 by Joffm
@tpartner
Nor am I.
You are more experienced in these things
I tried and it worked. But it was an artefact.

It really works without the "#question{QID}"
only ".no-answer-border td.answer-item:last-child".

Without class "no-answer-border"
 

with class "no-answer-border"
 

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The following user(s) said Thank You: mcovents

Please Log in to join the conversation.

More
1 year 6 days ago #210629 by mcovents
Hello,
This works, but a bit too good.
This seems to work for ALL array questions in my survey even without entering the name of the class (no-answer-border) in the CSS classes field.

Did I do something wrong?

I made an extension of the default fruity theme and named it "fruity_no-answer-border"
I added the code in the custom.css using the theme editor.

Please Log in to join the conversation.

More
1 year 6 days ago #210631 by tpartner
"no-answer-border" is not to be the theme name, it is intended to be a CSS class added to the question - manual.limesurvey.org/Question_type_-_Ar...lass_.28css_class.29

Cheers,
Tony Partner

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

Please Log in to join the conversation.

More
1 year 6 days ago #210638 by mcovents
Sorry, my mistake.
I forgot to remove the "#question{QID}" part.
Now I have the following code in the custom.css file which works as described.

.no-answer-border td.answer-item:last-child {
background-color: #efefef !important;
border-left: 2px solid #aaa !important;
}

Thanks for your help.

Please Log in to join the conversation.

More
9 months 7 hours ago #215428 by mihai.bejan
Hi Joffm,

Thank you for your valuable answers on everything. I really appreciate!
I would like to keep the column "No answer" in an array question and I was wondering if it's possible to change from "No answer" to anything you want?
That would be really helpful for me, because the "No answer" will be selected by default. I also used a source code from another topic to select the last column as default answer but it take 5-7 second until the page is loading.

Thank you!

Please Log in to join the conversation.

More
9 months 6 hours ago #215439 by tpartner
Insert something like this script in the question source:

<script type="text/javascript" data-author="Tony Partner">	
 
	$(document).on('ready pjax:scriptcomplete',function(){
 
		$('#question{QID} .noanswer-text, #question{QID} .noanswer-item label').text('My text');
	});
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: phinpope

Please Log in to join the conversation.

More
8 months 4 weeks ago #215481 by mihai.bejan
Thank you so much!

It works perfectly.

Regards!

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now