# form builder - control event not working with multi-select

**URL:** <https://talk.openmrs.org/t/form-builder-control-event-not-working-with-multi-select/20487>\
**Category:** Bahmni\
**Created:** [November 6, 2018, 8:48am UTC](https://talk.openmrs.org/t/form-builder-control-event-not-working-with-multi-select/20487 "2018-11-06T08:48:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wasim](https://talk.openmrs.org/letter_avatar/wasim/32/6_449c533f586939b6e5f246632a46421f.png) [@wasim](https://talk.openmrs.org/u/wasim)\
**Post date:** [November 6, 2018, 8:48am UTC](https://talk.openmrs.org/t/form-builder-control-event-not-working-with-multi-select/20487/1 "2018-11-06T08:48:47Z")

</div>

Hi,

I am facing an issue while working with form builder, bahmni v 0.9. If the field is single-select then control event works perfectly fine (for e.g: display another field when selecting other option), however, when I change the field to multi-select, the control event stops working. It does not display the field that should show up when selecting ‘other’ option. Is this a bug in form builder? has anyone else faced a similar issue?

Edited: Adding further details:

This is the form condition that works for single-select but not multi-select:

```
function(form) {
if (form.get('Lab test performed').getValue() === "Other") {
    form.get('Specify lab test').setHidden(false);
} else {
       form.get('Specify lab test').setHidden(true);
} }

```

For multi-select, form.get(‘Lab test performed’).getValue() is undefined. Is there a separate function for multi-select?

---

<div class="post-metadata">

**Author:** ![rakib.hasan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/rakib.hasan/32/8465_2.png) [@rakib.hasan](https://talk.openmrs.org/u/rakib.hasan)\
**Post date:** [January 29, 2020, 10:45am UTC](https://talk.openmrs.org/t/form-builder-control-event-not-working-with-multi-select/20487/2 "2020-01-29T10:45:09Z")

</div>

I have got the same problem in form builder 2, event. ![image_2020_01_29T09_30_21_444Z](https://talk.openmrs.org/uploads/default/original/2X/1/1c9705756c202b4bcf4001a45dd41385d21bd15e.png)

In my case, Aneurysm Site is multi-select & Side of each answer (A Com A Side, Vertebrobasilar, ICA Side, DACA Side, MCA Side, P Com A Side, PCA Side) will be hidden primarily & will be shown on click each answer of Aneurysm Site. I can get value by calling form.get(‘Aneurysm Site’).getValue() when Aneurysm Site is like radio & can’t get any value when Aneurysm Site is multi-select.

Please kindly help me on this case. How can I get multi-select field value from observation form in the event by calling form.get(‘Aneurysm Site’).getValue().@angshuonline @binduak @ramashish

---

<div class="post-metadata">

**Author:** ![angshuonline](https://talk.openmrs.org/user_avatar/talk.openmrs.org/angshuonline/32/4925_2.png) [@angshuonline](https://talk.openmrs.org/u/angshuonline)\
**Post date:** [January 29, 2020, 1:04pm UTC](https://talk.openmrs.org/t/form-builder-control-event-not-working-with-multi-select/20487/3 "2020-01-29T13:04:40Z")

</div>

@snehabagri didn’t you guys have similar requirements?

---

<div class="post-metadata">

**Author:** ![sowmika](https://talk.openmrs.org/letter_avatar/sowmika/32/6_449c533f586939b6e5f246632a46421f.png) [@sowmika](https://talk.openmrs.org/u/sowmika)\
**Post date:** [February 4, 2020, 6:14am UTC](https://talk.openmrs.org/t/form-builder-control-event-not-working-with-multi-select/20487/4 "2020-02-04T06:14:29Z")

</div>

Hi @wasim,   
Currently multiselect concept has no direct api as such. We are yet to build it in few weeks. As a work around we are following the below approach.

 ![04%20AM](https://talk.openmrs.org/uploads/default/original/2X/0/03bf3f11575b0c6540b420ed96e15de98489473c.png)  
In the above example, if `'Decreased'` is selected for `'Tuberculosis, Chest Pain'`, then `'Date'` concept is showed.
