Multiselect dropdown in Html form entry

The obs tag currently only allows you to select only one answer in a dropdown. For selecting multiple answers we have been using checkboxes. We would like to propose creating a multiselect tag that allows you to select multiple answers in a dropdown. What do you guys think. If we get an approval, we can get to work and push the changes soon.

Tagging @mksd @mogoodrich

tagging @mseaton @manek

Thanks @sameermotwani11. My understanding is that you have already developed this, correct? In which case would it be possible to share a screenshot of the end result?

Yes, if it’s already been implemented, please share screenshots, would be great to see it and consider if for inclusion!

This is how it looks like. We will have to make a few changes and write some tests before we have to push this.

Thanks @sameermotwani11. I think generally UX design is not in favor of multi-select dropdowns these days, but if you’ve built it I have no problem with offering it as an option.

Please issue a pull request when you are ready… I will likely have some feedback after doing a code review… :slight_smile:

Thanks again! Mark

Out of curiosity, and without having dug in deeper, what are the constraints here? I mean what can we use easily? jQuery I would assume?

If Angular was an option there are some nice ones there. But that’s just out of a quick Googling.

jQuery is definitely available in the Html Form Entry context… I haven’t given much thought about making Angular available (I don’t think it currently is). That’s something we could consider… but if the team is happy with the multi-select they’ve created, assuming the code looks fine, I’d be interested in merging that in as-is.

Take care, Mark

Sure. Let’s get this merged faster rather than later…

Hi,

I was wondering if an ObsGroup is needed for the submission. I say this because there might be a need to club the various answers into a logical unit.

For example, in the snapshot shared by @sameermotwani11 above, the values “Ablah MP” and “AlQubbeh Prison” seem to be places and could be saved as observations against a concept named “Place” Also, we might need a new concept, “Place of detention” that could have both the selected answers as part of an observation group.

Is this a valid thought?

Hi, we have been considering to use simple HTML elements via the tag with the hope that the developer using the tag can extend the same to the UI (s)he wishes to as in the case here.

Thanks @prateektiwari for creating HTML-685. I went an edited the ticket a little. However about this:

The tag should generate a UI widget that allows multiple selections of answers and that could submit the observations into as group members of the given group.

Should this be re-tagged as <multiSelectObsGroup/> then, or would you envision other use cases than submitting obs groups?

There aren’t an acceptance criteria set, you might also want to expand there a little on the ticket.

Thanks for creating the ticket @prateektiwari… I guess if it’s easy enough to the non-obs-group use case I’ d build it that way and rely on the implementor to add the obs group so you could do all three of the following

<multilSelectObs conceptId="1234">

<obsgroup conceptId="5678">
      <multilSelectObs conceptId="1234">
</obsgroup>

<obsgroup conceptId="5678">
       <multilSelectObs conceptId="1234">
       <obs conceptId="9999"> <!-- some other obs we want to include in the group -->
</obsgroup>

The key point here would be to make sure we can build the logic correctly to link the obs back to the form when in edit mode.

Take care, Mark