- Posts: 5
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How can I insert the multiple choice other answer in email template ?
- OlivierDestrade
- Topic Author
- Offline
- New Member
Less
More
4 months 3 weeks ago #252944
by OlivierDestrade
How can I insert the multiple choice other answer in email template ? was created by OlivierDestrade
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.3.7
Own server or LimeSurvey hosting: cloud
Survey theme/template: default
==================
I want to sent a confirmation mail with the survey responses in the body of the email.
I'm using the syntax "Nom" : {INSERTANS:SurveyIDXGroupIDXQuestionID} which works well for most questions.
Now I have a multiple choice question with the Other option activated. If the user choose Other in the survey, the value that is rendreded in email is "-oth-".
I searched the doc how to render the other value option and found this syntax {QUESTIONCODE_other} but the result in the mail body is :
"Autre" : " < em > G01Q06_other < / em > "
with underlying HTML : "
What should be the correct syntax to render the "other" answer to a multiple choice question in email ?
Your LimeSurvey version: 6.3.7
Own server or LimeSurvey hosting: cloud
Survey theme/template: default
==================
I want to sent a confirmation mail with the survey responses in the body of the email.
I'm using the syntax "Nom" : {INSERTANS:SurveyIDXGroupIDXQuestionID} which works well for most questions.
Now I have a multiple choice question with the Other option activated. If the user choose Other in the survey, the value that is rendreded in email is "-oth-".
I searched the doc how to render the other value option and found this syntax {QUESTIONCODE_other} but the result in the mail body is :
"Autre" : " < em > G01Q06_other < / em > "
with underlying HTML : "
Code:
<p>"Autre" : "<span class='em-expression em-haveerror' ><span class="em-compare"> < </span><span class='em-error' title=' ' ><span title='Variable non définie' class='em-var em-var-error' >em</span></span><span class="em-compare"> > </span><a title='[java371828X3X14other][G:0][Q:5]: <span class="M7eMe">Comment avez-vous connu La Cagette ?</span>; value=CHIC' class='em-var em-var-static' href='/questionAdministration/view/surveyid/371828/gid/3/qid/14' >G01Q06_other.value</a><span class="em-compare"> < </span><span> / </span><span class='em-error' title=' ' ><span title='Variable non définie' class='em-var em-var-error' >em</span></span><span class="em-compare"> > </span></span>"</p> "
Please Log in to join the conversation.
- tpartner
- Online
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
4 months 3 weeks ago #252947
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic How can I insert the multiple choice other answer in email template ?
Export the data with answer and question codes and check the column names.
I think it's probably G01Q06_oth.
I think it's probably G01Q06_oth.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Please Log in to join the conversation.
- OlivierDestrade
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
4 months 3 weeks ago #252952
by OlivierDestrade
Replied by OlivierDestrade on topic How can I insert the multiple choice other answer in email template ?
Thanks for your reply !
Unfortunately, G01Q06_oth render the following
< i > G01Q06_oth < / i >
Unfortunately, G01Q06_oth render the following
< i > G01Q06_oth < / i >
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12941
- Thank you received: 3979
4 months 3 weeks ago - 4 months 3 weeks ago #252953
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic How can I insert the multiple choice other answer in email template ?
Hi
as @tpartner
[url] manual.limesurvey.org/ExpressionScript_-...code_variable_naming [/url]
I am surprised that you use the latest release (6.3.7.) but also use the stone age "INSERTANS".
Since ExpressionScript was introduced (I think in version 2.0.0.) we use this.
In your case {Q01Q06_other} is sufficient.
ExpressionScript is surrounded by curly brackets.
This you may read here ("Introduction" and "Key definitions")
[url] manual.limesurvey.org/ExpressionScript_-...tion/en#Introduction [/url]
Joffm
as @tpartner
or read the manualand check the column names.
[url] manual.limesurvey.org/ExpressionScript_-...code_variable_naming [/url]
For comment and other, the corresponding question codes are QuestionCode_comment and QuestionCode_other, respectively.
I am surprised that you use the latest release (6.3.7.) but also use the stone age "INSERTANS".
Since ExpressionScript was introduced (I think in version 2.0.0.) we use this.
In your case {Q01Q06_other} is sufficient.
ExpressionScript is surrounded by curly brackets.
This you may read here ("Introduction" and "Key definitions")
[url] manual.limesurvey.org/ExpressionScript_-...tion/en#Introduction [/url]
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 months 3 weeks ago by Joffm.
The following user(s) said Thank You: DenisChenu
Please Log in to join the conversation.
- OlivierDestrade
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
4 months 3 weeks ago - 4 months 3 weeks ago #252972
by OlivierDestrade
Replied by OlivierDestrade on topic How can I insert the multiple choice other answer in email template ?
Thanks a lot @Joffm !
Yes, {Q01Q06_other} is working fine now.
P.S. I'm new to LimeSurvey and INSERTANS was the first sample I found to insert survey answers in email. I've juste changed to question name syntax and it's more easy to read and maintenable.
Yes, {Q01Q06_other} is working fine now.
P.S. I'm new to LimeSurvey and INSERTANS was the first sample I found to insert survey answers in email. I've juste changed to question name syntax and it's more easy to read and maintenable.
Last edit: 4 months 3 weeks ago by OlivierDestrade.
Please Log in to join the conversation.