Can you limit an amount of money spend within multiple choice questions?

More
8 months 1 day ago #191923 by sonja3
Hello,

we made a multiple choice question that asks the user to chose items for a breakfast, that they would like to buy. But they are only allowed to use 10 Euros. Is it possible to add a logic that makes them notice that they have used up their budget using multiple choice answers?

I am attaching the file with the question.

I hope you can help us solve this problem.

Regards,
Sonja

File Attachment:

File Name: limesurvey...3204.lsq
File Size:23 KB
Attachments:

Please Log in to join the conversation.

LimeSurvey Partners
More
8 months 1 day ago #191929 by Joffm
Hi, Sonja,
1. Use the question validation to sum up the prices of selected items with the condition: This sum is less than 10€.
Like:
sum(if(B2_SQ001=="Y",0.69,0),if(B2_SQ002=="Y",1.14,0),if(B2_SQ003=="Y",1."0.98,0),....)< 10

2. Or you may just display the sum in the help text or the question text to show a warning if thy spend more than 10€.

Joffm

Please, never send lsq or lsg files. Always lss.
Import of lsq and lsg is language sensitive.
To import your file I had to create a new survey, guessing the correct base language (or opening your lsq file with a text editor to check).
And all other settings of your survey that might affect your question are not included (as the condition on this question)


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

Please Log in to join the conversation.

More
8 months 1 day ago #191938 by Joffm
Hi, Sonja,

here two examples.
I used only eight items without pictures.
But you see the structure.
1. just the display of the spent money.


2. validation



Of course you can combine both.

Here the survey

File Attachment:

File Name: limesurvey...9157.lss
File Size:26 KB


Joffm

By the way: In my opinion you should resize the pictures, so they have the same height.


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

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now