Welcome to the LimeSurvey Community Forum

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

Condition to end survey

  • Pszichometria
  • Pszichometria's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 months 6 days ago #264805 by Pszichometria
Condition to end survey was created by Pszichometria
Please help us help you and fill where relevant:
Your LimeSurvey version: 5.6.43
Own server or LimeSurvey hosting: own server
Survey theme/template: fruit
==================
Hello All,

I would like only respondents of a certain age to fill out my survey.
As the first question, I use a date picker to enter date of birht. 
I determine how old the respondent is. I subtract the date of birth from the current date.
I can create a condition for this and display a text saying "you are too old, you cannot fill out the questionnaire". But that's only the second question. How can I set it so that he/she cannot continue the survey, and can not go the the 3rd question, with the NEXT button?

Thanks in advance.

Istvan 

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
7 months 6 days ago #264813 by DenisChenu
Replied by DenisChenu on topic Condition to end survey

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: Pszichometria

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 months 6 days ago #264814 by Joffm
Replied by Joffm on topic Condition to end survey
Better you create the condition with a numeric result (1=ok, 0=too old)
Then you create a quota with limit 0 (you want to have 0 people in your survey)
set the condition of the quota to 0 and add your message.
[url] www.limesurvey.org/manual/Survey_quotas/en [/url]
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: Pszichometria

Please Log in to join the conversation.

  • Pszichometria
  • Pszichometria's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 months 5 days ago #264840 by Pszichometria
Replied by Pszichometria on topic Condition to end survey
Here is what I have done so far.

1. Question date of birth
2. Determine the age in days DAYS
3. Variable TOOYOUNG {if(DAYS < 1095, 1, 0)}
4. Variable TOOOLD {if(DAYS < 1095, 1, 0)}
5. Quota young set to 0, if TOOYOUNG=1
5. Quota old set to 0, if TOOOLD=1
Quotas set to "Allow user to modify their last answers before termianting the survey. "
Quota message: "The date of birth is incorrect, please correct it""

Problem
At the Quota message, the BACK button does not work, so visitor can not correct the date of birth field

How should I fix it?

Thanks
Istvan

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 months 5 days ago - 7 months 5 days ago #264841 by Joffm
Replied by Joffm on topic Condition to end survey
Your question was "condition to end survey".
Not
"The respondent shall be pushed to enter a wrong age to be able to continue"
This you do with question validation.

Joffm 
​​​​​​
Why do you expect a "Back"-Button in the quota message.
When this message appears the survey is; finished, the respondent is screened out.
Read the manual about it.
​​​

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 7 months 5 days ago by Joffm.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
7 months 5 days ago #264842 by DenisChenu
Replied by DenisChenu on topic Condition to end survey
> the BACK button does not work

Can you give more detail ?

Else : equation and quota are in same group than age ?

Else : i don't understand, why not

QuotaAge : choice between OK,YOUNG,OLD
SetQuotaAge : {QuotaAge = join(if(DAYS < 1095,"YOUNG"),if(DAYS > XXXX,"OLD"), if(DAYS >= 1095 AND DAYS <= XXXX,"OK"))}

(seems you have an issue for your TOOOLD)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

  • Pszichometria
  • Pszichometria's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 months 5 days ago - 7 months 5 days ago #264847 by Pszichometria
Replied by Pszichometria on topic Condition to end survey
You are right, make it precise:

For tooyoung or tooold: Correct your birth date, otherwise you can not continue the survey.

Question validation: Not good, because I am asking for the date of birth, not the age. So I need to calculate the age.

You wrote: "Why do you expect a "Back"-Button in the quota message.
When this message appears the survey is; finished, the respondent is screened out.
Read the manual about it."

If it is the end of the survey, why is there a BACK button?
Last edit: 7 months 5 days ago by Pszichometria. Reason: missed a thought

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
7 months 5 days ago #264848 by DenisChenu
Replied by DenisChenu on topic Condition to end survey
For quota :

> the BACK button does not work

Can you give more detail ?

Else : equation and quota are in same group than age ?


About Question validation : something like this can work, no ?

(strtotime(BirthDate) - strtotime("today")/24/60/60 > 1095

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: Pszichometria

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 months 5 days ago #264849 by Joffm
Replied by Joffm on topic Condition to end survey

If it is the end of the survey, why is there a BACK button?

I do not see any button in the screen out message

 

 

Either you have an error in your design, or...
So send the lss export.

Question validation: Not good, because I am asking for the date of birth, not the age. So I need to calculate the age.


As @Denis: You can calculate in your validation equation

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
7 months 5 days ago #264850 by DenisChenu
Replied by DenisChenu on topic Condition to end survey

If it is the end of the survey, why is there a BACK button?

I do not see any button in the screen out message
 
You muts choose "Allow user to modify their last answers before terminating the survey." to have a button "Previous"

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 months 5 days ago #264851 by Joffm
Replied by Joffm on topic Condition to end survey

You muts choose "Allow user to modify their last answers before terminating the survey." to have a button "Previous"

Oh, thanks.

The option for panel members to lie to earn some money? 
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 months 5 days ago #264860 by holch
Replied by holch on topic Condition to end survey
Yeah, allowing people to change their date of birth in a screen out seems quite weird to me as well. A screen out is there to finish the survey for profiles you don't want in your survey.

Now if you allow them to correct their answer, this is rather counter productive, in my opinion.

Also: Who gets their date of birth wrong???

It seems like you are not giving us the whole story here and the date of birth is just a placeholder for something else.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose