Hello there, I'm writing a "Label Question" just for composing an intuitive interface. This question does a check on answer status, then provide a note with an icon:
Code:
<p>{if(count(that.QFin1.NAOK) == 2 && count(that.QFin2.NAOK) == 2, '<i class="fa fa-check-square"></i> Questa funzione è stata compilata','<i class="fa fa-pencil-square-o"></i> Questa funzione è incompleta')}</p>
The code is working flawless, showing a nice FontAwesome icon. The problem is when I go further editing the question, HTML inside ExpressionScripts disappears and gets wiped by the richtext editor, even if I go in Source Mode. Any hint how can I keep HTML persistent inside ExpressionScript conditional command?
My problem is the logic is much more complicated than "2 ANDs", maybe I can save the logic in a variable?
Code:
{this.COMPLICATED = count(that.QFin1.NAOK) == 2 && count(that.QFin2.NAOK) == 2}
<p><i class="fa fa-{if(this.COMPLICATED == 1, 'check-square', 'pencil-square-o')}"></i> {if(this.COMPLICATED == 1, 'Questa funzione è stata compilata.', 'Questa funzione è incompleta.')}</p>
Another problem is the output of "if statement", it's manipulated increasing the mess (i'm running 3.x branch)
This is a sample output of generated HTML:
Code:
<!-- <i class="fa fa-<span id='LEMtailor_Q_5969_2'>pencil-square-o</span>"></i> -->
Questa funzione è <span id="LEMtailor_Q_5969_3">stata compilata</span>
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.
On LS-3.x PopUp editor is not working when creating a new question, every RichText Popup you ask returns 403 forbidden error. It works only editing already saved questions.
To me, happens with PHP 7.3 and LS 3.25.x
When I click the popup button trigger, the new windows opens an error page: "invalid group id". Its url is like this:
I think it's already reported and fixed for the popup.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.