Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Does LS allow a response value specific alert

Does LS allow a response value specific alert 2 years 2 months ago #108405

  • Foram
  • Foram's Avatar
  • Offline
  • Junior Lime
  • Posts: 24
  • Karma: 0
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.
The administrator has disabled public write access.

Does LS allow a response value specific alert 2 years 2 months ago #108412

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1790
  • Thank you received: 439
  • Karma: 110
Hi,
I suppose this old post may help you ;)
Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
All LS releases => bit.ly/1VMuTDu | 2.06lts => bit.ly/1Qv44A1
Demo surveys => bit.ly/20NW9V8 (already included in /docs/demosurveys)
The administrator has disabled public write access.

Does LS allow a response value specific alert 2 years 2 months ago #108919

  • Foram
  • Foram's Avatar
  • Offline
  • Junior Lime
  • Posts: 24
  • Karma: 0
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: 2 years 2 months ago by Foram.
The administrator has disabled public write access.

Does LS allow a response value specific alert 2 years 2 months ago #108921

  • Foram
  • Foram's Avatar
  • Offline
  • Junior Lime
  • Posts: 24
  • Karma: 0
Ben
Thanks for your response on the previous one.
Regards,
Forum
The administrator has disabled public write access.

Does LS allow a response value specific alert 2 years 2 months ago #109019

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1790
  • Thank you received: 439
  • Karma: 110
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
All LS releases => bit.ly/1VMuTDu | 2.06lts => bit.ly/1Qv44A1
Demo surveys => bit.ly/20NW9V8 (already included in /docs/demosurveys)
Last Edit: 2 years 2 months ago by Ben_V.
The administrator has disabled public write access.

Does LS allow a response value specific alert 2 years 2 months ago #109029

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9259
  • Thank you received: 1320
  • Karma: 382
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 developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.
The following user(s) said Thank You: Ben_V
Moderators: ITEd
Time to create page: 0.224 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form