Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Change color of chosen answer....

Change color of chosen answer.... 9 months 3 weeks ago #97666

  • jaytsang
  • jaytsang's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Hi,
I am newbie in using LimeSurvey. So I have question, is there a way to change the color of the selected answer(s)?

regards,
The administrator has disabled public write access.

Change color of chosen answer.... 9 months 3 weeks ago #97676

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 5875
  • Thank you received: 722
  • Karma: 223
Hello,

You can use somethink like that for "radio" and "checkbox" button:
input.radio:checked + label,input.checkbox:checked + label{
color:red;
}
Work on real browser (not in IE6/7, to be tested in IE8).
Last Edit: 9 months 3 weeks ago by DenisChenu.
The administrator has disabled public write access.

Change color of chosen answer.... 9 months 3 weeks ago #97681

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 3844
  • Thank you received: 690
  • Karma: 330
Here is a post about applying "unanswered" and "answered" classes to questions.
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Change color of chosen answer.... 9 months 3 weeks ago #97697

  • jaytsang
  • jaytsang's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Hi, thanks for replying. but I tried to inject the code in the template.js, but unfortantely it didn't work. I am using imagetick.js script to control the shape of the answers (especially radio buttons, and checkboxes).

is there any advice???
The administrator has disabled public write access.

Change color of chosen answer.... 9 months 3 weeks ago #97713

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 5875
  • Thank you received: 722
  • Karma: 223
Hello,

This part:
input.radio:checked + label,input.checkbox:checked + label{
color:red;
}
is for template.css.

Denis
The administrator has disabled public write access.

Change color of chosen answer.... 9 months 2 weeks ago #97723

  • jaytsang
  • jaytsang's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Hi Denis,
i tried the code you gave me but nothing cahnged. I put it at the end of the "template.css" file.


also, Tpartner;
I tried the code in "www.limesurvey.org/en/forum/design-issue...k-mark-when-answered"; it is not cahnged.

any help???
The administrator has disabled public write access.

Change color of chosen answer.... 9 months 2 weeks ago #97725

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 5875
  • Thank you received: 722
  • Karma: 223
ts2k13 wrote:
Hi Denis,
i tried the code you gave me but nothing cahnged. I put it at the end of the "template.css" file.
Provide a test link (a survey activated with this template).

Denis
The administrator has disabled public write access.

Change color of chosen answer.... 9 months 2 weeks ago #97830

  • jaytsang
  • jaytsang's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Hi Denis,
How can I provide a test link? I tried to do it but unfortiantley I couldn't.

regards,
The administrator has disabled public write access.

Change color of chosen answer.... 9 months 2 weeks ago #97840

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 5875
  • Thank you received: 722
  • Karma: 223
Hello,

Create a "simple survey" with only one or 2 question ( one single choice question radio button).
Put the template you made for this survey
Activate the survey
Send us the link for access to this survey.

A test link : limesurvey.sondages.pro/975921/lang-fr

Denis
The administrator has disabled public write access.

Change color of chosen answer.... 4 months 1 day ago #102838

  • dweisser
  • dweisser's Avatar
  • OFFLINE
  • Silver Donor
  • Posts: 182
  • Thank you received: 5
  • Karma: 5
Hi there,

With regard to this:
Hello,

This part:
input.radio:checked + label,input.checkbox:checked + label{
color:red;
}
is for template.css.
- which works perfectly, does anyone know how you might extend the style to encompass the entire li where the answer is found? I'm using ImageTick with multi-opt question type...

<li id="javatbd171641X190X1314SQ001" class="question-item answer-item checkbox-item">
<img src="/survey/upload/templates/Clear_logo_Clone/check.png" alt="no_tick" class="checkboxes" id="tick_img_answer171641X190X1314SQ001" style="opacity: 1;"><input class="checkbox" type="checkbox" name="171641X190X1314SQ001" id="answer171641X190X1314SQ001" value="Y" onclick="cancelBubbleThis(event);checkconditions(this.value, this.name, this.type)" style="position: absolute; left: -99999px;">
<label for="answer171641X190X1314SQ001" class="answertext">Completeness of communication</label>
<input type="hidden" name="java171641X190X1314SQ001" id="java171641X190X1314SQ001" value="Y">
</li>

Any advice would be appreciated.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.137 seconds
Donation Image