Welcome to the LimeSurvey Community Forum

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

[v3] LS changes Source Code on question save

  • cesoielampo
  • cesoielampo's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 9 months ago #217752 by cesoielampo
Hello,
i have some problem in editing an IF statement. This is the only working version:
Code:
if(countif("No",that.Q1.NAOK) > 0, "<span style='color: #f39c12;'><span aria-hidden='true' class='fa fa-exclamation-triangle'> </span>Warning: message</span>")</p>

after i save it LS changes it to:
Code:
if(countif("No",that.Q1.NAOK) > 0, "<span style="color: #f39c12;"><span aria-hidden="true" class="fa fa-exclamation-triangle"> </span>Warning: message</span>")</p>

so every time i have to refix the code.

How can i solve this? If i invert the double quotes and the single quotes the IF statement doesn't work.

Thanks,
Regards,
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #217757 by tpartner
Replied by tpartner on topic [v3] LS changes Source Code on question save
LimeSurvey version? (v3 could be anything over a couple of years)

If i invert the double quotes and the single quotes the IF statement doesn't work.

This should work. Are there errors in the logic file?
Code:
if(countif('No', that.Q1.NAOK) > 0, '<span style="color: #f39c12;"><span aria-hidden="true" class="fa fa-exclamation-triangle"> </span>Warning: message</span>', '')

Alternatively, use the editor in pop-up mode.

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: DenisChenu
The topic has been locked.
  • cesoielampo
  • cesoielampo's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 9 months ago #217762 by cesoielampo
Replied by cesoielampo on topic [v3] LS changes Source Code on question save
Thanks tpartner,
it seems that using popup mode solved my problem.

Regards,
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #217829 by DenisChenu
Replied by DenisChenu on topic [v3] LS changes Source Code on question save
If it work on a previous version : must be reported as an new issue.

@tparner : seems i have some issue with double quote inside single quote on some version too :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose