- Posts: 9
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Headline in multiple Choice
- cgebauer
- Topic Author
- Offline
- New Member
Less
More
7 years 5 months ago #143538
by cgebauer
Headline in multiple Choice was created by cgebauer
Hello again,
I have one more question:
I want to create topics for the choices (see screenshot)
For topic 2 I just extended the last answer of topic 1. But that doesn't work for the first one because there is no upfront.
A solution without a java script would be perfect.
I very much appreciate your help.
Thank you!
I have one more question:
I want to create topics for the choices (see screenshot)
For topic 2 I just extended the last answer of topic 1. But that doesn't work for the first one because there is no upfront.
A solution without a java script would be perfect.
I very much appreciate your help.
Thank you!
Attachments:
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12881
- Thank you received: 3964
7 years 5 months ago #143541
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Headline in multiple Choice
Hi, quaxp,
maybe this helps.
www.limesurvey.org/community-services/fo...iple-choice-question
Regarding your dislike of JS.
For years browsers have JS "on" per default; and it's not so easy to switch it to "off".
So I should say: In times of bootstrap (or other) based websites nearly anybody uses JS.
The times that JS was condemned are long, long ago.
Best regards
Joffm
maybe this helps.
www.limesurvey.org/community-services/fo...iple-choice-question
Regarding your dislike of JS.
For years browsers have JS "on" per default; and it's not so easy to switch it to "off".
So I should say: In times of bootstrap (or other) based websites nearly anybody uses JS.
The times that JS was condemned are long, long ago.
Best regards
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10098
- Thank you received: 3589
7 years 5 months ago #143543
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 Headline in multiple Choice
You could hide those check-boxes with pure CSS but respondents would still be able to toggle them if navigating threw the form with the tab key and space bar.
Also not that without JS, your respondents will be presented with a warning at the top of the page, the progress bar will not work and dynamic on-page Expression Manager will not work.
Also not that without JS, your respondents will be presented with a warning at the top of the page, the progress bar will not work and dynamic on-page Expression Manager will not work.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- cgebauer
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
7 years 5 months ago - 7 years 5 months ago #143576
by cgebauer
Replied by cgebauer on topic Headline in multiple Choice
Thank you! I think I will just try it with JS. Will there be issues if the participant has JS deactivated?
Somehow, the script does not work when I implement it (I am using Version 2.54.2+161012)
Could you have a look into the question?
I uploaded it.
Many thanks!
Somehow, the script does not work when I implement it (I am using Version 2.54.2+161012)
Could you have a look into the question?
I uploaded it.
Many thanks!
Attachments:
Last edit: 7 years 5 months ago by cgebauer. Reason: whole survey instead of one question
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10098
- Thank you received: 3589
7 years 5 months ago #143587
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 Headline in multiple Choice
You have some syntax errors in your script and are targeting the wrong element. Additionally, you will need to hide the pseudo-elements (fake checkboxes) inserted by LimeSurvey.
I would add something like this to the question source:
And, add something like this to the end of template.css:
I would do the same thing for your second "headline" (see my attached version of your survey). As you have that now, simply adding text in the label for "C", if you click on that "headline", the "C" checkbox will be toggled.
Survey attached:
I would add something like this to the question source:
Code:
<script charset="utf-8" type="text/javascript"> $(document).ready(function() { $( '#question{QID} .question-item:eq(0)').addClass('hide-pseudo-elements').find('input.checkbox').remove(); }); </script>
And, add something like this to the end of template.css:
Code:
.hide-pseudo-elements label::before, .hide-pseudo-elements label::after { display: none; } .hide-pseudo-elements .label-text { margin-left: -20px; }
I would do the same thing for your second "headline" (see my attached version of your survey). As you have that now, simply adding text in the label for "C", if you click on that "headline", the "C" checkbox will be toggled.
Survey attached:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The topic has been locked.