Multiple numeric entries

More
2 months 3 weeks ago - 2 months 3 weeks ago #157164 by mblaise
mblaise created the topic: Multiple numeric entries
Hi everyone,

I am creating a new survey.
It is a multiple numeric entry : each person answers with numbers on the subquestions, and the total has to be 30.

My question : is it possible to limit the total number of each subquestion

Ex : Marie is answering the survey as follows :
Subquestion 1 : 10
Subquestion 2 : 20
Subquestion 3 : 0
Total of Marie's choices : 30

--> is it possible to limit the number on Subquestion 2, for example:
Subquestion 2 is limited to 40 in total
Jim answered 30 to subquestion 2
When Marie wants to answer 20 to subquestion 2, she gets an error message : "only 10 is left for subquestion 2 !"

I hope this is clear, let me know !
Last Edit: 2 months 3 weeks ago by mblaise. Reason: didn't finish my message !

Please Log in to join the conversation.

More
2 months 3 weeks ago #157176 by tpartner
tpartner replied the topic: Multiple numeric entries
Out of the box, there is no access to previous results.

I suppose you could code an AJAX call that queries the database but how would you handle concurrent respondents?

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: mblaise

Please Log in to join the conversation.

More
2 months 3 weeks ago #157193 by mblaise
mblaise replied the topic: Multiple numeric entries
The idea would be for the respondents to not be able to answer a number that would make the sum of responses excede a certain amount

Please Log in to join the conversation.

More
2 months 3 weeks ago #157214 by holch
holch replied the topic: Multiple numeric entries
As Tpartner says: This is not possible out of the box and requires custom coding.

But even with custom coding: What happens with people answering at the same time? How would you handle that?

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
2 months 2 weeks ago #157233 by DenisChenu
DenisChenu replied the topic: Multiple numeric entries
ajax or javascript solution currently.
With help from framagit.org/SondagePro-LimeSurvey-plugin/getStatInSurvey for javascript for example.

Project : put this in a future version (with a clean system to add it via plugins).

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
2 months 2 weeks ago #157250 by mblaise
mblaise replied the topic: Multiple numeric entries
Yeah good point. Could one of the respondents be blocked while the first finishes answering ?
If so i'll try and get custom coding

Please Log in to join the conversation.

More
2 months 2 weeks ago #157259 by DenisChenu
DenisChenu replied the topic: Multiple numeric entries
I use it with javascript and css.
<span class="{if('[Q.nb.A1]'<10,'hidden','')}"> Answer for A1</span>[code]
[code]$("#question{QID} .hidden").each(function(){
$(this).closest('.answer-item').remove();
});

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
1 month 4 weeks ago #157749 by mblaise
mblaise replied the topic: Multiple numeric entries
OK thanks. I'm not a coder so i'll try and find someone to help me with that :)

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now