- Posts: 8
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Changing Colors and Style for one specific question
- rickyd
-
Topic Author
- Offline
- New Member
-
Less
More
7 years 11 months ago #127791
by rickyd
Changing Colors and Style for one specific question was created by rickyd
Hello,
I'm working on a survey and I need to change the template for just my multiple numeric type questions. Is there a way to do this via the template editor? All of my attempts have failed thus far.
Thank you
I'm working on a survey and I need to change the template for just my multiple numeric type questions. Is there a way to do this via the template editor? All of my attempts have failed thus far.
Thank you
The topic has been locked.
- tpartner
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 10356
- Thank you received: 3585
7 years 11 months ago #127873
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 Changing Colors and Style for one specific question
Yes, you can do that but we need more details on what you are trying to do, which template you use and a link to a sample 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.
- LouisGac
-
- Visitor
-
7 years 11 months ago - 7 years 11 months ago #127875
by LouisGac
Replied by LouisGac on topic Changing Colors and Style for one specific question
if it's only about changing colors, and style, you can do it via css or js.
All the multiple numerical question html is inside a div, with the class numeric-multi. Just use firebug to explore the code and find the the different classes/elements of your question and edit the template.css of your template.
If you want to change the DOM (the HTML itself), the best way to do it for now is to use JavaScript.
If you really really want to change the HTML flow of the multiple numerical question, without using javascript, you can't do it from the template itself. You must hack the LimeSurvey kernel code. The HTML of the multiple numerical question is generated in the file application/helpers/qanda_helper.php in the function do_multiplenumeric :
github.com/LimeSurvey/LimeSurvey/blob/ma...nda_helper.php#l2996
Of course, any modification you do to this file will be overwritten by further updates.
All the multiple numerical question html is inside a div, with the class numeric-multi. Just use firebug to explore the code and find the the different classes/elements of your question and edit the template.css of your template.
If you want to change the DOM (the HTML itself), the best way to do it for now is to use JavaScript.
If you really really want to change the HTML flow of the multiple numerical question, without using javascript, you can't do it from the template itself. You must hack the LimeSurvey kernel code. The HTML of the multiple numerical question is generated in the file application/helpers/qanda_helper.php in the function do_multiplenumeric :
github.com/LimeSurvey/LimeSurvey/blob/ma...nda_helper.php#l2996
Of course, any modification you do to this file will be overwritten by further updates.
Last edit: 7 years 11 months ago by LouisGac.
The topic has been locked.
- tpartner
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 10356
- Thank you received: 3585
7 years 11 months ago #127878
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 Changing Colors and Style for one specific question
I do NOT recommend hacking the core code!
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- LouisGac
-
- Visitor
-
7 years 11 months ago #127880
by LouisGac
Replied by LouisGac on topic Changing Colors and Style for one specific question
Neither do I

The topic has been locked.
- rickyd
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 8
- Thank you received: 0
7 years 11 months ago #127982
by rickyd
Replied by rickyd on topic Changing Colors and Style for one specific question
Thank you all! Looks like I was able to make the changes.
The topic has been locked.