Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Does LS allow a response value specific alert

  • Foram
  • Foram's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 10 months ago #108405 by Foram
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 topic has been locked.
More
9 years 10 months ago #108412 by Ben_V
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)
The topic has been locked.
  • Foram
  • Foram's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 10 months ago - 9 years 10 months ago #108919 by Foram
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: 9 years 10 months ago by Foram.
The topic has been locked.
  • Foram
  • Foram's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 10 months ago #108921 by Foram
Ben
Thanks for your response on the previous one.
Regards,
Forum
The topic has been locked.
More
9 years 10 months ago - 9 years 10 months ago #109019 by Ben_V
your need is very similar to the situation explained in the indicated post, and its look quiet easy to re-use the javascript.
Code:
<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: 9 years 10 months ago by Ben_V.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 10 months ago #109029 by DenisChenu
Replied by DenisChenu on 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:
Code:
{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 , plugin development .
I don't answer to private message.
The following user(s) said Thank You: Ben_V
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose