# Condition to the multiselect

**URL:** <https://jsonforms.discourse.group/t/condition-to-the-multiselect/206>\
**Category:** General\
**Created:** [September 30, 2020, 3:24pm UTC](https://jsonforms.discourse.group/t/condition-to-the-multiselect/206 "2020-09-30T15:24:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![discobot](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/discobot/32/3_2.png) [@discobot](https://jsonforms.discourse.group/u/discobot)\
**Post date:** [September 30, 2020, 3:24pm UTC](https://jsonforms.discourse.group/t/condition-to-the-multiselect/206/1 "2020-09-30T15:24:10Z")

</div>

Hello Team, I have implemented a custom renderer for multiselect using array. I would like to add a condition to one of the object in the array. Like, if an item 5 is selected in the array then I want to enable another field in the form. I did try using the “effect: show” and “expected value” for the condition but it is only working for dropdown but not to the array of multiselect. Any suggestions over here?

_[[original thread](https://spectrum.chat/jsonforms/general/condition-to-the-multiselect~417a2ba5-8bd6-46e0-8bc8-dd787f6db223) by Narayan2627]_

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [September 30, 2020, 3:34pm UTC](https://jsonforms.discourse.group/t/condition-to-the-multiselect/206/2 "2020-09-30T15:34:49Z")

</div>

Hi @narayan2627(narayan2627), if I understand correctly the element which is not working is your custom element right? You need to make sure to enable/disable and show/hide your element based on the props you receive from JSON Forms, then it should work. You can check how the provided renderers are implemented to implement this behavior.

In React material we mostly use a `Hidden` element around the output and handing over `disabled` flags to Material UI components. See [MaterialDateControl](https://github.com/eclipsesource/jsonforms/blob/9124df51ef2f6d216c8a9cc3ad6b55f7787a27c0/packages/material/src/controls/MaterialDateControl.tsx) for an example.
