Setting constraints to a matrix


I have two questions:
Would it be possible to set a constraint to the responses returned in a matrix?

For example, I have the following 5 statements and I would like to gather the opinions of an individual towards a statement


  1. I like apples but I rarely consume them
  2. I believe that apples keep the doctor away
  3. Apples have a lot of pesticides but I still consume store-bought apples
  4. I only consume organic apples
  5. I buy apples because of the health benefits it has.


  1. Agree
  2. Neutral
  3. Disagree

Out of the 5 statements, would it be possible to limit the selection of “neutral” opinions to just 2 and return a constraint message of “sorry, more than 2 neutral statements were selected”?

Also, would it be possible to sieve out statements from the matrix which the respondent agreed to in a seperate question?

Thank you!

Welcome to the community @sof! You could do the same as outlined in the image shared below:

In the survey tab of your xlsform:

In the choices tab of your xlsform:

Image 2

In the settings tab of your xlsform:

Image 3

Data entry screen as seen in Enketo: (error message not showing up when the condition is not met)

Data entry screen as seen in Enketo: (error message showing up when the condition is met)

Reference xlsform:

Matrix.xlsx (12.9 KB)

1 Like

Hi @Kal_Lam thank you for your prompt reply.

I was wondering if it’s possible to get respondents to fill up their opinions based on this format


  1. i like apples
  2. i like orange
  3. I like apple and orange
  4. i dont eat fruits
  5. i only eat oragnes when someone peels them for me
  6. i only eat cut apples
  7. i dont like fruits but i eat because i know it’s good for me
    8 i am too lazy to buy them
  8. i have recently started to eat fruits out of peer pressure


It should be possible. As you only have to mark No Opinion as Neutral where you did it before.