Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Custom CSS and Javascript

  • hugebob
  • hugebob's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 2 weeks ago #254276 by hugebob
Custom CSS and Javascript was created by hugebob
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Community Edition, Version 3.28.42+221213
Own server or LimeSurvey hosting: LimeSurvey
Survey theme/template: Fruity
==================
Hi all,

I'm new to LimeSurvey, but, I've been able to set up a working survey that I'm happy with except for two minor details. One of the questions has a dropdown list of answers that overlaps the question border. I was able to isolate the dropdown and manipulate the width in a debugger. I'd like to apply that same CSS to the question but can't seem to find where to apply it. The other minor detail is I'd like to apply Javascript to the same control: i.e., add an onChange event handler. I'd like to add  JQuery too if possible. These are simple development matters. But, finding where to apply them isn't easy for a newbie. I looked at Theme Options, but there doesn't 
seem to be anything there to facilitate adding code or CSS. How and where can I apply these changes?

Thanks!


 

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 months 2 weeks ago #254290 by tpartner
Replied by tpartner on topic Custom CSS and Javascript
Place your CSS and JavaScript in the source of the question.

- manual.limesurvey.org/Workarounds:_Manip...tc..29_in_LimeSurvey

Cheers,
Tony Partner

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

Please Log in to join the conversation.

  • hugebob
  • hugebob's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 2 weeks ago #254310 by hugebob
Replied by hugebob on topic Custom CSS and Javascript
Tony,

Thanks for your response. I saw this documentation prior and tried it. When I saved a short snippet of code containing a JS alert and saved it, upon returning, my changes hadn't been saved and no alert was displayed upon running the survey. Here's what I did:

 

Is there a setting elsewhere that I'm missing?

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 months 2 weeks ago #254312 by tpartner
Replied by tpartner on topic Custom CSS and Javascript
Did you read the line about disabling the XSS filter?

Go to Global settings --> Security and set "Filter HTML for XSS" to "Off".


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: hugebob

Please Log in to join the conversation.

  • hugebob
  • hugebob's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 2 weeks ago #254317 by hugebob
Replied by hugebob on topic Custom CSS and Javascript
In my haste, no. But, once I did and made the changes, everything worked!

Thanks!!

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose