Welcome to the LimeSurvey Community Forum

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

new line & expression manager

  • marcomarenco
  • marcomarenco's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 10 months ago - 6 years 10 months ago #154364 by marcomarenco
new line & expression manager was created by marcomarenco
Hi,
do you know if there's a way to print a new line in a string.
e.g.
{if ((!is_empty(A0.NAOK)),"hi, NEW LINE, HOW ARE YOU?","hi, NEW LINE, who are you?")}

i've tried with <br>, but the editor add "/" --> so it's saved as <br />, and the expression don't run, i've tried with \n, but it print "\n"

do you have any idea?

thanks,
Marco
Last edit: 6 years 10 months ago by marcomarenco.
The topic has been locked.
More
6 years 10 months ago #154366 by Ben_V
Replied by Ben_V on topic new line & expression manager

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
  • marcomarenco
  • marcomarenco's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 10 months ago - 6 years 10 months ago #154370 by marcomarenco
Replied by marcomarenco on topic new line & expression manager
Hi Ben,
i've solved using <p></p>
:)
and i'll try the solution in the topic that you've suggested.
thanks
Last edit: 6 years 10 months ago by marcomarenco.
The topic has been locked.
  • marcomarenco
  • marcomarenco's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 10 months ago #154417 by marcomarenco
Replied by marcomarenco on topic new line & expression manager
hi Ben,
solved in this way:

{if ((!is_empty(A0.NAOK)),"Soluzione: COMUNE. - Anagramma: risolto. - Tempi risoluzione parziali: SOTTO la MEDIA. Punteggio: MINIMO. - COMMENTO: PERFORMANCE SCARSA",html_entity_decode("Soluzione: NESSUNA. - Anagramma: NON RISOLTO. &lt;br &#47;&gt; Tempi risoluzione parziali: MOLTO sotto la MEDIA. - Punteggio: NESSUNO. - COMMENTO: PERFORMANCE MOLTO SCARSA."))}

:)
thanks
The topic has been locked.
  • marcomarenco
  • marcomarenco's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 10 months ago #154535 by marcomarenco
Replied by marcomarenco on topic new line & expression manager
Hi Ben,
the solution that you suggest and my attempts don't go well. the problem is that chkeditor after <br /> add "by default" :/n, so it breaks the code line, the same behaviour happens using </p>.
i try to find some way to solve in chkeditor forum.

bye
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose