Welcome to the LimeSurvey Community Forum

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

JavaScript in Question Editor gets removed

  • TRCBerlin
  • TRCBerlin's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago - 5 years 4 months ago #176653 by TRCBerlin
Hey folks,


LimeSurvey version: 3.13.1+180629
Browser: Mozilla Firefox 60.3.0esr (32-Bit)

I use a java script to switch the text style to password. It always worked until now. At first the script was completely gone, I pasted it once again, but when I saved and closed the editor parts of the script were missing and it is displayed as plain text.

This is the script:
Code:
<script type='text/javascript' charset='utf-8'>
 
  $( document ).ready( function() {
    // self.sgqa ist der Identifier für das Antwortfeld. my_targetTextBox gibt die ID jquery-konform wieder
  var this_self='{self.sgqa}';
  var my_targetTextBox='#answer' + this_self;
 
    // ändert den Texttypen auf Passwort
  $( my_targetTextBox ).attr( 'type', 'password' );
});
</script>

I searched through the forums, if anyone else experienced similar issues, but did not find anything related to it. Neither did I find any configurations in my survey, that might be responsible for this issue.

Screenshots are attached, showing how it looks like before and after I save the question





Any help how to enable the script once again is much appreciated!
Last edit: 5 years 4 months ago by TRCBerlin. Reason: double pasted the code
The topic has been locked.
  • holch
  • holch's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #176655 by holch
Replied by holch on topic JavaScript in Question Editor gets removed
Did you set up your survey for being able to use Javascript according to the manual?

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

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose