Does LS allow a response value specific alert

More
3 years 5 months ago #108405 by Foram
Foram created the topic: Does LS allow a response value specific alert
Greetings,
I am trying to configure a survey with a need such that a specific response like dissatisfied should raise an alert email in my inbox.
How do we achieve this in Lime Survey ?
Foram.

Please Log in to join the conversation.

More
3 years 5 months ago #108412 by Ben_V
Ben_V replied the topic: Does LS allow a response value specific alert
Hi,
I suppose this old post may help you ;)

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)

Please Log in to join the conversation.

More
3 years 5 months ago - 3 years 5 months ago #108919 by Foram
Foram replied the topic: Does LS allow a response value specific alert
Actually I dont need to add dynamic email address. I just want that suppose I have 5 point choice question with answer code A1, A2, A3, A4, A5 and someone selects A5 then email should go to the survey owner. How do I do this with LimeSurvey. Can you help me with it ?

Is there any way to add conditions in mail body for this feature ?
Last Edit: 3 years 5 months ago by Foram.

Please Log in to join the conversation.

More
3 years 5 months ago #108921 by Foram
Foram replied the topic: Does LS allow a response value specific alert
Ben
Thanks for your response on the previous one.
Regards,
Forum

Please Log in to join the conversation.

More
3 years 5 months ago - 3 years 5 months ago #109019 by Ben_V
Ben_V replied the topic: Does LS allow a response value specific alert
your need is very similar to the situation explained in the indicated post, and its look quiet easy to re-use the javascript.
<script type="text/javascript" charset="utf-8">	
	$(document).ready(function() {
 
		var thisQuestion = $('#question{QID}');
		var emailQuestion = $(thisQuestion).nextAll('.text-short:eq(0)');
 
		// Hide the email address question
		$(emailQuestion).hide();
 
		// Listener on the dropdown
		$('select', thisQuestion).change(function(event) {
 
			// Define the email address
			var emailAddress = '';
			switch($(this).val()) {
 /* 
                                case 'A1' :
					emailAddress = '';
					break;
				case 'A2' :
					emailAddress = '';
					break;
                                case 'A3' :
					emailAddress = '';
					break;
				case 'A4' :
					emailAddress = '';
					break;
*/
				case 'A5' :
					emailAddress = 'user@example.com';
					break;
 
			}
 
			// Load the hidden email question
			$('input.text', emailQuestion).val(emailAddress);
		});
	});
</script>

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Last Edit: 3 years 5 months ago by Ben_V.

Please Log in to join the conversation.

More
3 years 5 months ago #109029 by DenisChenu
DenisChenu replied the topic: Does LS allow a response value specific alert
Hi,

It's really more easy now with EM.

In 'Send basic admin notification email to' put:
{if(QCODE=="A5","youremail@example.org","")}

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: Ben_V

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now