Hi forum,
I'm new in limesurvey and I like it a lot!
Unfortunatelly I can't figure out, why the email-template does not replace the placeholder correctly.
Found a lot of topics about the right using. And I guess I have used the if-condition and placeholder in the right way.
But at the end, in the inbox, the Placeholder/Tokens used in the {if}-conditions are still empty, although the Token as it own is replace correctly.
Would be great to get a push in the right direction.
The email-tempalte
The second line «Token {TOKEN:ATTRIBUTE_1}, the Placeholder/Token is replaced right in the emial. (Value is «DU»)
But all the other lines with {if}-conditions the replacing is not working.
The email rendered in the inbox
Also the validation show's NO-errors
Would be great to get help for.
juicy regards
Martin
You are already inside an equation, you must use equation system.
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.
Thank you DenisChenu for help. I did «copy & paste» a working template from text-tab.
So I used your advice and it does not change anything. To be sure to type right I «copy&paste»'d your code 1:1.
Unfortunatelly with same end-result. There is no output in the email with your code too.
[hr]
Tried also WITHOUT TOKEN-ELEMENT IN OUTPUT:
SAME Problem -> NO output in email for if-statement:
LIne 1+2+3 > I tried with FIRSTNAME -> WORKS FINE!
Line 4: > I tried same with copy-paste and replace «FIRSTNAME» with «ATTRIBUTE_1» -> IT DOES NOT WORK.
Line 5: > Output value from «ATTRIUBTE_1» -> WORKS FINE!
I copy&paste ATTRIBUTE_1 to all Lines so typo should be excluded!
Should ATTRIBUTE_1 and the value usable in {if}-conditions?
Obvious it does not work. Could this be a bug?
Thanks for help.
Martin
Hi,
Unfortunatelly the Expression-Manager in email-templates is render the placholder {TOKEN:ATTRIBUTE_1} in the right way and print-out the value «DU» in the email.
But in the {if}-condition expression, the same placeholder is not to use. The Output is nothing: not the «TRUE» part (first in the function), nor the «FALSE» part (second in the function).
With try&error I found the solution:
The Expression-Manager for text is working fine with the Placeholder {TOKEN:ATTRIBUTE_1} but for email, the part «TOKEN:» does NOT work!
[hr]
So for everybody who is searching a solution - here the right way to use {TOKEN:ATTRIBUTE_1} in email-templates:
Question to Forum-Admins: What kind of bug/feature request I have to report in but-tracker? Any idea?
The bug reporting system is really hard to understand compared to other systems I know.
and a bug-report for
- cosistent use of {TOKEN:ATTRIBUTE_INT} in Expression-Manager in simple «value» output and «{if}-statement rendering» OR/AND missing error-mark in code behind button «validate expression» >
bugs.limesurvey.org/view.php?id=14288
Hope will help in future users to save time or/and to code the system more consistently and error-free.
Sending email to user is something totally unrelated to sending email to admin : TOKEN:ATTRIBUTE_1 is EMPTY for anonymous survey.
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.
DenisChenu wrote: Did you check if it work with ATTRIBUTE_X ?
You mean in email-template: YES I used this at the end -> it works fine!
Or you mean in text for surveys? There I have used TOKEN:ATTRIBUTE_X -> it works. I don't try only {ATTRIBUTE_X} in text until now, but I will have a try.
But TOKEN:ATTRIBUTE_X in email-templates does not work in {if}-statement only in normal output. I guess.
DenisChenu wrote: Sending email to user is something totally unrelated to sending email to admin : TOKEN:ATTRIBUTE_1 is EMPTY for anonymous survey.
All tested e-mails are sending to user and NOT from anonmous surveys.
TOKEN:ATTRIBUTE_X is still not usable in {if}-statement, I guess.
If I misunderstood something and you still need to answer, just ask.
It's an issue with TOKEN:attribute inside equation, fixed in next release.
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.