form builder - control event not working with multi-select

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?

1 Like

I have got the same problem in form builder 2, event. image_2020_01_29T09_30_21_444Z

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

@snehabagri didn’t you guys have similar requirements?

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.


In the above example, if 'Decreased' is selected for 'Tuberculosis, Chest Pain', then 'Date' concept is showed.

1 Like