Welcome to the LimeSurvey Community Forum

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

condition: "end survey" or "go to end"

  • ninchi
  • ninchi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago - 8 years 10 months ago #121124 by ninchi
Hello! I am new here and I have a question:

Is ist possible to ask a first question (answer options "yes" or "no") and if someone answer "no" the survey ends. It is necessary that the answer "no" will be shown in the results (therefore Ican't use "quota").

I hope I made my point clear enough (my english is not so good).

My System:
LimeSurvey Version + Build: Version 2.05+ Build 150508
PHP Version: PHP Version 5.4.33
MySQL Version: mysqlnd 5.0.10 - 20111026
PC-System: Win 7
Browser, etc.: Mozilla Firefox (also IE)

Thanks in advance
Ninchi
Last edit: 8 years 10 months ago by ninchi.
The topic has been locked.
More
8 years 10 months ago #121128 by steve_81
Replied by steve_81 on topic condition: "end survey" or "go to end"
Hi Ninchi,
you could add a relevance equation for each following group like (A1.NAOK == "2").

By the way, if you use quota, the "no" is stored in the database, but the dataset is marked as not completed. Maybe if you export the complete database including the not completed datasets you can make your further anlysis.

Stefan
The following user(s) said Thank You: ninchi
The topic has been locked.
More
8 years 10 months ago - 8 years 10 months ago #121141 by steve_81
Replied by steve_81 on topic condition: "end survey" or "go to end"
Hi,
I wondered if it is possible to interrupt the submit function and simulate the last Next-Button of a servey (called submit).
This is what I inserted to the code of the question:
Code:
<script type="text/javascript" charset="utf-8">
  $(document).ready(function () {
    $('form#limesurvey').submit(function () {
    var x = $("input:radio[name='113287X33X579']:checked").val();
       if(x == 2){
    $("#movenextbtn").attr("name", "movesubmit");
       };
    });
  });
</script>
And it worked, the survey ends with the usual Goodbye and the data is stored and marked as completed.

In my mind, this is a very unusual way, no guarantee for a proper behavior of the survey.

Stefan
Last edit: 8 years 10 months ago by steve_81. Reason: Missing semikolon
The following user(s) said Thank You: ninchi
The topic has been locked.
  • gabrieljenik
  • gabrieljenik's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 10 months ago #121156 by gabrieljenik
Replied by gabrieljenik on topic condition: "end survey" or "go to end"
Hi,
In stead of adding relevance to question you could add it to groups. That will be easier.
Cheers!

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .

The following user(s) said Thank You: ninchi
The topic has been locked.
  • ninchi
  • ninchi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago #121161 by ninchi
Replied by ninchi on topic condition: "end survey" or "go to end"
Thank you very much for your answers!

In stead of adding relevance to question you could add it to groups. That will be easier.


I also considered this option but I wonder how I can add a condition to a whole group.

Ninchi
The topic has been locked.
  • gabrieljenik
  • gabrieljenik's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 10 months ago #121162 by gabrieljenik
Replied by gabrieljenik on topic condition: "end survey" or "go to end"

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .

The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 10 months ago #121166 by tpartner
Replied by tpartner on topic condition: "end survey" or "go to end"

...but I wonder how I can add a condition to a whole group.


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The following user(s) said Thank You: ninchi
The topic has been locked.
  • ninchi
  • ninchi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago #121168 by ninchi
Replied by ninchi on topic condition: "end survey" or "go to end"
Well, ok.... that was easy.... i must be blind :blush:

THANK YOU ALL!
The topic has been locked.
  • ninchi
  • ninchi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago #121215 by ninchi
Replied by ninchi on topic condition: "end survey" or "go to end"
Thank you all, it was very helpful, I did it (or YOU did it) :)

Ninchi
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose