Welcome, Guest
Username: Password: Remember me

TOPIC: can i allow a specified maximum _number_ of people to participate to a survey?

can i allow a specified maximum _number_ of people to participate to a survey? 2 years 9 months ago #63060

  • m_ardito
  • m_ardito's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Thank you received: 1
  • Karma: 1
i need to allow only a fixed amount (say, 20) of (anonymous) users to access a defined survey, and from the 21st do not allow them to access _this_ survey, but perhaps show them a small text (maybe pointing them to a URL)

i would really like a "allow only [20] people to complete this survey" setting, as an alternative to the start/expiry date in the general survey settings, eg.

is there any way to use quota to do exactly this and how..?

Many thanks, Marco
Last Edit: 2 years 9 months ago by m_ardito. Reason: typo
The administrator has disabled public write access.

Re: can i allow a specified maximum _number_ of people to participate to a survey? 2 years 9 months ago #63066

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 3834
  • Thank you received: 687
  • Karma: 329
Yes. you can use a quota - docs.limesurvey.org/quotas&structure=Eng...tions+for+LimeSurvey.

Depending on your survey structure, you may need to use a hidden question populated by JavaScript for the quota.
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: can i allow a specified maximum _number_ of people to participate to a survey? 2 years 9 months ago #63084

  • m_ardito
  • m_ardito's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Thank you received: 1
  • Karma: 1
Hi, thanks for replying.

i've read that page before, and i've set a first simple yes/no question, a second text answer, in a single group, and put the first yes/no question under the only quota (limit: 3 if YES) for a test survey.
what i get is that:
* i can access and complete the survey, 2 times without any warning or else
* i can access and complete the survey the third time, both first and second question, but THEN, after all the questions, i get the "sorry quota exceeded" message.
* then i can access and complete the survey any times i wish, but i always get the "sorry quota exceeded" message at the end... all the answer are recorded, i can see all of them, and they seem all identical, complete, for what i can see...

so, i've read that page again: somwhere it says <<All data is saved when the participant clicks the "Next" button. Even if the quota is full, the data submitted until the survey is terminated will be recorded. Nevertheless, such id is marked as "No Completed">>

if i understand what's written (english is not my natural language) it states that the survey should be terminated, but it is not clearly said WHEN this happens. i am only able to show the "sorry" message when the quota is reached, but the survey

this is not what i need, as you can read above...

i need to "stop" people accessing the survey after (say) 3 people complete the survey, like:
* up to 3 pepole access the survey,answer the first, "quota" question (like: "would you like to fill a few questions?" yes/no):
>if the answer is YES -> no problem, go on with the other questions if you complete will add your submission to the quota
>if the answer is NO -> the survey should terminate

* when a 4th guy answer the first, "quota" question (like: "would you like to fill a fee questions?" yes/no):
>if the answer is YES -> "sorry message, quota exceeded"
>if the answer is NO -> the survey should terminate, anyway.

does anybody ever tried this?

somehow i feel this is not possible... am i wrong?

Thanks, Marco
The administrator has disabled public write access.

Re: can i allow a specified maximum _number_ of people to participate to a survey? 2 years 9 months ago #63086

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 933
  • Thank you received: 193
  • Karma: 62
Marco,
try for some ideas my attached demo-survey with first question checking for general quotas...

Settings:
- Set to 2 submitted surveys for the test...
- Group by group or question by question presentation only
- Above the quota, answers will be recorded and marked as "No Completed" but only until question #1 (always prefilled and submitted with default answer)

Note: there is a Javascript snippet to skip the 'checking for quota' question (#1) ...So look at the source for this question

Benoît

File Attachment:

File Name: quotas_69892.lss
File Size: 15 KB
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
Last Edit: 2 years 9 months ago by Ben_V.
The administrator has disabled public write access.
The following user(s) said Thank You: m_ardito

Re: can i allow a specified maximum _number_ of people to participate to a survey? 2 years 9 months ago #63119

  • m_ardito
  • m_ardito's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Thank you received: 1
  • Karma: 1
ok, btw upgraded my 187+ to 191+ and now can import lss files (previously failed) and... your survey works, rughly as expected. Thanks.

and tried my previos, still work in the (in my needs) wrong way.... definitely studying your kind example.. worth 1M words...

Thx Marco
The administrator has disabled public write access.

Re: can i allow a specified maximum _number_ of people to participate to a survey? 2 years 9 months ago #63147

  • m_ardito
  • m_ardito's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Thank you received: 1
  • Karma: 1
ok, i think i now understand how to make this work, it was quite simple (it always is, when you know the answer, isn't it? :) )

I just want to report here on the forum what i "discovered", so that other users can benefit from my experience, as the wiki page wasn't clear enough for me...

1) the first, fundamental, point is: the "quota evaluation" seems to be always made ONLY when the "page" where the "quota trigger" question is showed is submitted.
This implies that, depending on the "presentation" settings of your survey, the "quota evaluation" will be made after
* each question, if you choose "show one question per page"
* each group, if you choose "show one group of questions per page"
* each survey, if you choose "show all questions in one page": i was doing this...and therefore my survey didn't work as I expected
This is what i mainly missed from the wiki page...

2) user benitov inserted
* a first group with a single question which was auto-answered, and the group auto-submitted, as you can read below.
* a second group with the real questions, presented to the users: read below why it's better.

3) "quota trigger" question type:
* the "quota trigger" question can be (among others) of the YES/NO type, so I chose a YES/NO type question as "quota trigger" question (it was the simplest in my mind) but this question does not allow for a "default answer" (although i tihnk you can add some javascript to auto-select a value...)
* user benitov instead chose a "radio buttons listbox", which instead allows a default value: read below why it's better.

4) * user benitov
* created a single value for his "radio buttons listbox", and
* set that only value as default, and
* then inserted a small javascript code to auto-submit this question:
<script>
jQuery(document).ready(function($) {
document.limesurvey.submit();});
</script>

5) all together, in this way, with the thanks-to-default-value-and-javascript "hidden" question, which always triggers the "quota evaluation", incrementing its count, users are presented only the real survey questions, and their "quota" has already been cuonted before.

Interestingly the "quota increment" due to each user is really valid only if the survey is fully answered so, if a user enters the survey, but doesn't answer, eg: closes the window, the quota is not incremented... as expected...

Hope it helps. Thanks, benitov.

Marco
Last Edit: 2 years 9 months ago by m_ardito. Reason: post typos world champion...
The administrator has disabled public write access.

Re: can i allow a specified maximum _number_ of people to participate to a survey? 2 years 9 months ago #63154

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 933
  • Thank you received: 193
  • Karma: 62
Good news if it's allright and thanks for your feedback. Sure that it could be useful for other users !
Enjoy your 1.91 ;)
Benoît
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.161 seconds
Donation Image