Changing the width of columns in an array

More
1 month 3 weeks ago #215404 by MatthieuBRANTHOME
Hi!
I am using version 2.56.1+161118 of LimeSurvey
I have created an array question with 10 radio buttons, the answers are numbers from 0 to 9.
The problem is that these answers take up too much space compared to the sub-questions. I can change the size of the sub-questions, but this has no effect beyond 30%. As you can see below, it would be possible to save space by moving the columns containing the radio buttons closer together.


Do you have any idea how to proceed?

Thank you in advance,

MatthieuB

Please Log in to join the conversation.

More
1 month 3 weeks ago - 1 month 3 weeks ago #215405 by holch
Sorry, your installation is completely outdated. It was released on 18.11.2016, over 4 years ago. Not sure if anyone who helps here in the forum still has such an old installation. From what I understand, the colums for the responses are all the same width and thus are probably defined by the last column "sans response". Rename the column to something like "S" just to see what happens.

And you should seriously consider and update to the latest stable version of Limesurve (which currently is LS 3.x). You are running a software that has not received any updates and bug fixes for 4,5 years and you are possibly collecting personal data. In times of the GDPR this is a dangerous game, in my opinion. If something happens, you can't really argue that you were doing everything in your power to protect the data, by using state of the art software, can you? ;-)

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Last edit: 1 month 3 weeks ago by holch.

Please Log in to join the conversation.

More
1 month 3 weeks ago - 1 month 3 weeks ago #215408 by MatthieuBRANTHOME
Hi Holch and thank you for your quick answer.

First, this old version of LimeSurvey is installed in my university and there is nothing I can do about it.

Secondly, in fact the column "Sans réponse" = "no answer" appears automatically when the question is not mandatory. I tried making the question mandatory and it does not change the width of the other columns: 

Last edit: 1 month 3 weeks ago by MatthieuBRANTHOME.

Please Log in to join the conversation.

More
1 month 3 weeks ago #215420 by tpartner
The problem is terrible styling in that version, specifically the cell padding.

Add this to the question source:

 
 
<style type="text/css">
 
	@media only screen and (min-width: 780px) {
 
		#question{QID} table.array-no-dropdown td.answer-item.text-center {
			padding: 5px 0;
		}
 
		#question{QID} .radio label::before,
		#question{QID} .radio label::after {
			margin-left: 2px;
		}
	}
</style>

 

Cheers,
Tony Partner

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

Please Log in to join the conversation.

More
1 month 3 weeks ago #215423 by MatthieuBRANTHOME
I Tpartner and thanks for your answer.

I can't add the code to the source of the question. It is not considered as code but as text. (despite the fact that I pressed the source button)

Is there any special marker for it to be recognised as code?

Do you I to have special rights or make a setting somewhere?  (I don't have control over the administration).

MatthieuB

Please Log in to join the conversation.

More
1 month 3 weeks ago #215424 by tpartner
I can't help with that, you will need to get your administrator to disable the XSS filter or give you more permissions.

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 month 3 weeks ago #215430 by MatthieuBRANTHOME
I will contact my administrator, what do I need to ask exactly?

Please Log in to join the conversation.

More
1 month 3 weeks ago #215431 by MatthieuBRANTHOME
I asked this: Go to Global settings --> Security and set "Filter HTML for XSS" to "Off".

I need to wait now...

Please Log in to join the conversation.

More
1 month 3 weeks ago - 1 month 3 weeks ago #215435 by holch
Good luck!

But I am quite sure he/she won't. Because switching off the XSS filter will affect all users and admins of bigger installations with a lot of users usually don't like to switch the XSS filter off. And given that they are still running on 2.56.1+161118, I doubt that they are willing to invest much time in this. Because I don't think there is any good reason for not doing an update for 4,5 years despite: "I really don't want to...". ;-)

I assume you also don't have the right to modify the survey themes/templates.

So without these rights, I think you'll have to live with how the question looks like now.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Last edit: 1 month 3 weeks ago by holch.

Please Log in to join the conversation.

More
1 month 3 weeks ago #215438 by MatthieuBRANTHOME
You're right, I don't have the right to modify the survey themes/templates neither 

OK the XSS filter option isn't local to my survey, it's a global parameter. 

What difference does it make to others users if it is set to off? I mean for standard use?

Actually, my real need will be to change the 0 to 9 radio button lines and to replace them by a slider in each row of the array.

Is that possible with a standard use (I mean with the XSS filter) of LimeSurvey ?



 

Please Log in to join the conversation.

More
1 month 3 weeks ago #215440 by tpartner
You cannot insert sliders into arrays without permission to use JavaScript.

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 month 3 weeks ago #215441 by MatthieuBRANTHOME
Ok thank you.

What does the XSS filter set to off change for a standard user?

I need to convince my admin that in will not infer on other user work :)

Please Log in to join the conversation.

More
1 month 3 weeks ago #215442 by tpartner
If it is disabled, all users will be able to insert JavaScript, CSS...

- manual.limesurvey.org/Global_settings#Security

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 month 3 weeks ago #215444 by MatthieuBRANTHOME
Ok but for standard use, it makes no differences?

Please Log in to join the conversation.

More
1 month 3 weeks ago #215449 by holch
It makes a difference in terms of security. With a lot of users, admins are usually reluctant to give these rights to the users (survey creators), because besides a lot of good things, you could also do bad things.

But if you want to have sliders, why does the width of the columns matter and why don't you use the slider question type instead of an array then??

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now