# Value limitation

**URL:** <https://forum.dimagi.com/t/value-limitation/11103>\
**Category:** Users\
**Created:** [August 29, 2024, 3:04pm UTC](https://forum.dimagi.com/t/value-limitation/11103 "2024-08-29T15:04:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FernandoSiavato](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/fernandosiavato/32/2600_2.png) [@FernandoSiavato](https://forum.dimagi.com/u/FernandoSiavato)\
**Post date:** [August 29, 2024, 3:04pm UTC](https://forum.dimagi.com/t/value-limitation/11103/1 "2024-08-29T15:04:41Z")

</div>

I would like to know if there is any way to limit the options of a multiple choice question?

I have a question with 7 options, but I should only mark 2 options maximum for each submission, I have already had errors with this and I cannot find a solution.

Thank you

---

<div class="post-metadata">

**Author:** ![Mazz](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/mazz/32/1004_2.png) [@Mazz](https://forum.dimagi.com/u/Mazz)\
**Post date:** [August 30, 2024, 8:09am UTC](https://forum.dimagi.com/t/value-limitation/11103/2 "2024-08-30T08:09:35Z")

</div>

make a hidden calculation  
in that calculation, use if(count-selected(yourquestion) \> 2, false()true())  
put that hidden calculation as a validation condition for your multiple choice question

---

<div class="post-metadata">

**Author:** ![hussain](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/h/f17d59/32.png) [@hussain](https://forum.dimagi.com/u/hussain)\
**Post date:** [September 4, 2024, 9:09am UTC](https://forum.dimagi.com/t/value-limitation/11103/3 "2024-09-04T09:09:20Z")

</div>

By multiple choice, I am assuming you mean checkbox question which is multi-select. If yes, then it is very simple. You need to add this **count-selected(.) \<= 2** validation condition.  
The above condition will count your selections and will let you select 2 or less than 2 options.  
Hope this helps.
