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
  • rickyd's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 4 months ago #127791 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
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 4 months ago #127873 by tpartner
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
  • LouisGac's Avatar
  • Visitor
  • Visitor
8 years 4 months ago - 8 years 4 months ago #127875 by LouisGac
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.
Last edit: 8 years 4 months ago by LouisGac.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 4 months ago #127878 by tpartner
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
  • LouisGac's Avatar
  • Visitor
  • Visitor
8 years 4 months ago #127880 by LouisGac
Neither do I ;-)
The topic has been locked.
  • rickyd
  • rickyd's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 4 months ago #127982 by rickyd
Thank you all! Looks like I was able to make the changes.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose