Welcome to the LimeSurvey Community Forum

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

issue with admin notifications - message too long?

More
8 years 11 months ago #141444 by tpartner
Tammo, try placing the variable text in an equation question and then reference that question in the email.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
8 years 11 months ago #141450 by jelo

Mazi wrote: Isn't that what the "pop-up" mode of the editor does?

That is correct, but the question is what happens in LS afterwards. Why was disabling the HTML editor recommended instead of just using the other view? We once had a "smart ass" filtering in the EndURL field, where no editor was involved. When using EM sometimes the whole URL got messed up. Since there was no bug report there might be no bug at all.

Tammo, which version are you using?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
More
8 years 11 months ago #141451 by tammo
2.05 b140821 and 2.50GIT


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
More
8 years 11 months ago #141452 by jelo

tpartner wrote: Tammo, try placing the variable text in an equation question and then reference that question in the email.

Good idea. I remember doing just that to workaround the issue with the filtered EM code inside the EndURL field.
Try that Tammo. Will narrow down the issue.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
More
8 years 11 months ago #141453 by tammo
Great idea. I even works! :)


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
More
8 years 11 months ago #141454 by tammo
But still struggling with HTML, though: replacing equation text in the mail works, but HTML tags are lost. Still investigating, but 1 step further now. Thanks.


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
More
8 years 11 months ago #141455 by jelo

tammo wrote: Great idea. I even works! :)

If it works the issue is not with the editor itself but with the php code handling the EM stuff.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
More
8 years 11 months ago #141456 by tammo
I guess the EM does not swallow line breaks...


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
More
8 years 11 months ago #141457 by tpartner

But still struggling with HTML, though: replacing equation text in the mail works, but HTML tags are lost.

Try with htmlentities() and html_entity_decode(), something like this post - www.limesurvey.org/forum/can-i-do-this-w...ge-won-t-load#141000

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
8 years 11 months ago #141458 by tammo
Strange, this does not work. html_entity_decode decodes to:

Confirmation mail text (in HTML) htmlentities( ' < p > Hiereenwatlangeretekst < / p > < p > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- < / p > < p > http : / / www.toolsforresearch.com < / p > < p > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- < / p > ' )


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
More
8 years 11 months ago #141459 by tammo
It works when I place this in the equation text:
Code:
<p>Hier een wat langere tekst</p>
 
<p>--------------------------------------</p>
 
<p>https://www.toolsforresearch.com</p>
 
<p>--------------------------------------</p>

but it fails when I put this in the equation text:
Code:
{htmlentities('<p>Hier een wat langere tekst</p>
 
<p>--------------------------------------</p>
 
<p>https://www.toolsforresearch.com</p>
 
<p>--------------------------------------</p>')}

HTML for token emails is switched on. Using 2.50 GIT


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
More
8 years 11 months ago #141460 by tpartner
Here is a small sample survey with the basic admin notification set to include your variable text - you will need to change the "Send basic admin notification email to" setting.

Click 1 in Q1 to have the variable text included in the notification email.



File Attachment:

File Name: limesurvey...29-2.lss
File Size:14.56 KB

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: tammo
The topic has been locked.
More
8 years 11 months ago - 8 years 11 months ago #141461 by tammo
Wow, this is something that has cost some hours. Somehow your example worked perfectly, while what I typed looked the same. I guess it must have been a keyboard issue, encoding of the quotes or something. After typing in again (keyboard US-English) it works!

en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Last edit: 8 years 11 months ago by tammo. Reason: typo
The topic has been locked.
More
8 years 11 months ago #141475 by jelo

tammo wrote: I guess it must have been a keyboard issue, encoding of the quotes or something. After typing in again (keyboard US-English) it works!

Sounds like quoting hell. It's a nice hobby for some of us ;-) Will you open a bug ticket? Or isn't that currently a workaround?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
More
8 years 11 months ago #141477 by tammo
This was already a workaround: putting HTML text (without variables) in an equation and then referring to that equation. If this grows huge, for each respondent the same text is saved in his/her record in the database. I find that a bit clumsy.

For now (and with a short text) this may work. For following implementations I will look for another solution. Perhaps try to call a text file.


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose