- Posts: 4
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Changing the Basic Admin Notification Email on the fly
- jhookham
- Topic Author
- Offline
- New Member
Less
More
5 years 2 months ago - 5 years 2 months ago #180335
by jhookham
Changing the Basic Admin Notification Email on the fly was created by jhookham
Hello all and thanks for the help!
I have a form with one group and several survey questions. At the end of the form I have a hidden text field with the default an email address that I use to set the basic admin notification email. So far so good this all works great.
One of my questions in the survey is of type list radio with the option "other". If someone writes in this "other" box I'd like to change the email address in the hidden field. Or even better just set the basic admin notification email from the survey (but I don't know how to do that directly).
Any help would be much appreciated!
I have a form with one group and several survey questions. At the end of the form I have a hidden text field with the default an email address that I use to set the basic admin notification email. So far so good this all works great.
One of my questions in the survey is of type list radio with the option "other". If someone writes in this "other" box I'd like to change the email address in the hidden field. Or even better just set the basic admin notification email from the survey (but I don't know how to do that directly).
Any help would be much appreciated!
Last edit: 5 years 2 months ago by jhookham.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
5 years 2 months ago #180340
by jelo
Your single choice radio other field can be accessed via
Questioncode needs to be replaced with the actual questioncode.
You could enter {Question_other} instead of the actual emailadress in the basic admin notification field.
The email is sent to the adress after submitting the survey.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Changing the Basic Admin Notification Email on the fly
You mean you want to change the emailadress of the basic notification to the value, entered in the other field?jhookham wrote: Or even better just set the basic admin notification email from the survey (but I don't know how to do that directly).
Your single choice radio other field can be accessed via
Code:
{Questioncode_other}
You could enter {Question_other} instead of the actual emailadress in the basic admin notification field.
The email is sent to the adress after submitting the survey.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- jhookham
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
5 years 2 months ago - 5 years 2 months ago #180341
by jhookham
Replied by jhookham on topic Changing the Basic Admin Notification Email on the fly
Thank you for responding Jelo!
I'll try and explain with a little more detail. What I want to happen is the following. I just don't know where to put it or what syntex to use. q1 is my list radio with other and q_email is my hidden text field.
if {q1_other} is empty then {q_email} = abc@abc.com else {q_email} = 123@123.com
In plain english, if the other field for list radio is empty then I want to set my hidden email field to one email address or if there is something in the other field (it won't contain an email address, just a comment) then set the hidden email field to another email address.
If the other field has text that means something bad happened and I need to escalate who receives the basic admin email:)
I hope this is clear and thank you for your help!
I'll try and explain with a little more detail. What I want to happen is the following. I just don't know where to put it or what syntex to use. q1 is my list radio with other and q_email is my hidden text field.
if {q1_other} is empty then {q_email} = abc@abc.com else {q_email} = 123@123.com
In plain english, if the other field for list radio is empty then I want to set my hidden email field to one email address or if there is something in the other field (it won't contain an email address, just a comment) then set the hidden email field to another email address.
If the other field has text that means something bad happened and I need to escalate who receives the basic admin email:)
I hope this is clear and thank you for your help!
Last edit: 5 years 2 months ago by jhookham.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
5 years 2 months ago #180345
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Changing the Basic Admin Notification Email on the fly
The best way is like using an equation question type (code : ADMINEMAIL)
And put this equation inside:
After you can use {ADMINEMAIL} for the email address of basic admin.
See manual.limesurvey.org/Expression_Manager
And put this equation inside:
Code:
{if(is_empty(q1_other.shown),"abc@example.org","123@example.org")}
After you can use {ADMINEMAIL} for the email address of basic admin.
See manual.limesurvey.org/Expression_Manager
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: jhookham
The topic has been locked.
- jhookham
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
5 years 2 months ago #180359
by jhookham
Replied by jhookham on topic Changing the Basic Admin Notification Email on the fly
DenisChenu that works perfectly. Thank you!!
The topic has been locked.