[v3] LS changes Source Code on question save

More
11 months 3 weeks ago #217752 by cesoielampo
Hello,
i have some problem in editing an IF statement. This is the only working version:
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:
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,

Please Log in to join the conversation.

More
11 months 3 weeks ago #217757 by tpartner
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?
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

Please Log in to join the conversation.

More
11 months 3 weeks ago #217762 by cesoielampo
Thanks tpartner,
it seems that using popup mode solved my problem.

Regards,

Please Log in to join the conversation.

More
11 months 3 weeks ago #217829 by DenisChenu
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.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now