- Posts: 85
- Thank you received: 9
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Inserting an Q.Value into confirm email conditionally
- marcgold
- Topic Author
- Offline
- Premium Member
Less
More
3 years 9 months ago #202522
by marcgold
Inserting an Q.Value into confirm email conditionally was created by marcgold
Hi
Wondering if this is even possible, we have a conditional if statement within the confirmation email, but want to add in some data from the survey is this even possible and if so, how.
The following doesn't work. I have tried wrapping the variables in @@****@@ but that doesnt work either.
This is what we have - which doesn't work.
Any help appreciated
Wondering if this is even possible, we have a conditional if statement within the confirmation email, but want to add in some data from the survey is this even possible and if so, how.
The following doesn't work. I have tried wrapping the variables in @@****@@ but that doesnt work either.
This is what we have - which doesn't work.
Code:
{if (Q15 == "A6","We will process your gratuity of £50 within the next few days to the account details you have provided","Thank you for thinking of the {Q15.Value} we will make the donation of {Q32.Value} on your behalf. Any balance remaining will be paid to you via BACS within the next 7 days")}
Any help appreciated
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
3 years 9 months ago - 3 years 9 months ago #202537
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 Inserting an Q.Value into confirm email conditionally
You cannot put curly braces inside an Expression Manager statement that is already wrapped in curly braces.
You insert a variable into a text string as you would in JavaScript.
Try this:
You insert a variable into a text string as you would in JavaScript.
Try this:
Code:
{if (Q15 == "A6","We will process your gratuity of £50 within the next few days to the account details you have provided","Thank you for thinking of the "+Q15.value+" we will make the donation of "+Q32.value+" on your behalf. Any balance remaining will be paid to you via BACS within the next 7 days")}
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 3 years 9 months ago by tpartner.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- marcgold
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 85
- Thank you received: 9
3 years 9 months ago #202549
by marcgold
Replied by marcgold on topic Inserting an Q.Value into confirm email conditionally
Your a star! As always.
That worked perfectly.
Thanks
That worked perfectly.
Thanks
The topic has been locked.