Limiting Choice depending on an answer to the preceding question

Hi,

I am building this XLS form with some controls as follows;

Q1. What is your current status? (Select one)
a). Pregnant
b). Lactating
c) Mother of under 5
d) Caregiver

Q2. What services did you seek today at the health facility? (Select one)
a). Ante-Natal
b). Post-Natal
c). Other

If the respondent is pregnant, only Ante-Natal and Other are relevant. How do how put a control to ensure only relevant choices are feasible?

Alex.

Hi @AlexRutto77,

You could do the same as outlined in the image below:

In the survey tab of your xlsform:

In the choices tab of your xlsform:
Image 2

Data entry as seen in Enketo: Constant active when entering the data in a wrong way!

Data entry as seen in Enketo: * Constraint passive when entering the data in a correct way!*

Reference xlsform:
Constraint.xlsx (14.0 KB)

Have a great day!

1 Like

This worked very well. Thanks @Kal_Lam

2 Likes

@Kal_Lam , I am trying to do a similar thing for multiple response question (in this case question should be multiple select not select one as in the example. Please help

@RayRay, could you provide more details on this so that the community should be able to help you out?

Q1. Respondent type? (select one)
a. Treatment
b. control
Q2. Relation with the partner? (multiple select)
a. Full employee
b. Ingrower
c. Seasonal employer
d. No relation with partner

The chosen response in question should limit what you can select in question 2. If you select “control” in question 1, then you can only select “no relation with partner” in question 2. But if you select “treatment” in question 1, you should be able to select many options except “No relation with partner” in question 2.

I tried with the example above and it works if question 2 is select one and not select multiple.

Thanks

1 Like

@RayRay,

I think cascading-questions works best for this.

Here is a support article for that:
https://support.kobotoolbox.org/cascading_select.html

Hope this works.
Best,

1 Like

@hakan_cetinkaya, this is helpful. Thanks

2 Likes