Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Create a likert scale but move the "not applicable" option to the right
- Mazi
- Offline
- Official LimeSurvey Partner
Less
More
13 years 2 months ago #56011
by Mazi
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on topic Create a likert scale but move the "not applicable" option to the right
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: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
13 years 2 months ago #56018
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Create a likert scale but move the "not applicable" option to the right
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.
The topic has been locked.
- Mazi
- Offline
- Official LimeSurvey Partner
13 years 2 months ago #56034
by Mazi
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on topic Create a likert scale but move the "not applicable" option to the right
Doesn't the last column have any unique value we can use for some customized formatting (just guessing)?tpartner wrote: Yoy will need to use JavaScript to insert the extra column. I have already included rules to be added to template.css.
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
- hugomp
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
11 years 7 months ago #85624
by hugomp
Replied by hugomp on topic Aw: Re: Create a likert scale but move the "not applicable" option to the right
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?
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?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
11 years 7 months ago #85647
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Aw: Re: Create a likert scale but move the "not applicable" option to the right
Try this:
Code:
<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.
The topic has been locked.
- hugomp
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
11 years 7 months ago #85678
by hugomp
Replied by hugomp on topic Aw: Re: Aw: Re: Create a likert scale but move the "not applicable" option to the right
Yes, many thanks.
I got it that far.
However, I do not understand why reset all column widths?
I want to keep the original column widths and only set the witdth of the spacer-column.
The indicated extra CSS does not seem to manage it.
I got it that far.
However, I do not understand why reset all column widths?
I want to keep the original column widths and only set the witdth of the spacer-column.
The indicated extra CSS does not seem to manage it.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
11 years 7 months ago #85679
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Create a likert scale but move the "not applicable" option to the right
You cannot keep the original widths if adding a column. The original widths are in percentages and add to 100 so adding a column wrecks that.
The posted CSS will manage the widths if you reset them.
The posted CSS will manage the widths if you reset them.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- Mazi
- Offline
- Official LimeSurvey Partner
9 years 2 months ago #116617
by Mazi
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on topic Create a likert scale but move the "not applicable" option to the right
Did anyone recently test if this JavaScript works fine at the latest Limesurvey 2.05 version?
Is it cross-template compatible/does it work fine with the default template?
Is it cross-template compatible/does it work fine with the default template?
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
- mafo
- Offline
- Junior Member
Less
More
- Posts: 25
- Thank you received: 0
8 years 11 months ago #120366
by mafo
I tried to use this JavaScript in combination with LimeSurvey 2.05+ but it did not work . Of course, it is also possible that I've made a mistake.
Replied by mafo on topic Create a likert scale but move the "not applicable" option to the right
Mazi wrote: Did anyone recently test if this JavaScript works fine at the latest Limesurvey 2.05 version?
Is it cross-template compatible/does it work fine with the default template?
I tried to use this JavaScript in combination with LimeSurvey 2.05+ but it did not work . Of course, it is also possible that I've made a mistake.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
8 years 11 months ago #120381
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Create a likert scale but move the "not applicable" option to the right
I have just tested in 2.05 without a problem.
mafo, what template are you using? Do you have any JavaScript errors?
.
mafo, what template are you using? Do you have any JavaScript errors?
.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- mafo
- Offline
- Junior Member
Less
More
- Posts: 25
- Thank you received: 0
8 years 11 months ago #120404
by mafo
I created a new template which is probably based on the default template!? After creating the new one I only changed the things you mentioned (in template.css).
I don't get a JavaScript error but JavaScript should work since I already successfully used another script which partially randomizes answers ( manual.limesurvey.org/Workarounds:_Manip...rs_-_Array_questions ).
Do I have to use another template?
Thank you for your help!
Replied by mafo on topic Create a likert scale but move the "not applicable" option to the right
tpartner wrote: I have just tested in 2.05 without a problem.
mafo, what template are you using? Do you have any JavaScript errors?
.
I created a new template which is probably based on the default template!? After creating the new one I only changed the things you mentioned (in template.css).
I don't get a JavaScript error but JavaScript should work since I already successfully used another script which partially randomizes answers ( manual.limesurvey.org/Workarounds:_Manip...rs_-_Array_questions ).
Do I have to use another template?
Thank you for your help!
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
8 years 11 months ago #120425
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Create a likert scale but move the "not applicable" option to the right
Can you provide a link to a live test survey?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.