# 在下拉用户字段中选择多个选项的功能

**URL:** https://meta.discourse.org/t/ability-to-select-multiple-options-on-a-dropdown-user-field/92752
**Category:** UX
**Created:** [2018年七月19日 19:23 UTC](https://meta.discourse.org/t/ability-to-select-multiple-options-on-a-dropdown-user-field/92752 "2018-07-19T19:23:45Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![ArMK](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@ArMK](https://meta.discourse.org/u/ArMK)
#### Post date: [2018年七月19日 19:23 UTC](https://meta.discourse.org/t/ability-to-select-multiple-options-on-a-dropdown-user-field/92752/1 "2018-07-19T19:23:45Z")

</div>

I’m wondering if there is a way for users to be able to select multiple options from a custom dropdown list. For example, admin is able to create a custom user field as dropbdown list; however, currently a user is able to select only one option from the dropdown. It would be great to allow the user to selecti multiple options from the dropdown list.

Has anyone done this before? Does the current version of Discourse allow it?

Thanks.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2018年七月19日 23:32 UTC](https://meta.discourse.org/t/ability-to-select-multiple-options-on-a-dropdown-user-field/92752/2 "2018-07-19T23:32:11Z")

</div>

This isn’t supported at the current time.

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [2018年八月30日 20:19 UTC](https://meta.discourse.org/t/ability-to-select-multiple-options-on-a-dropdown-user-field/92752/3 "2018-08-30T20:19:08Z")

</div>

Would this be #pr-welcome? I would be willing to take this on if it is. Otherwise, we’ll likely build a plugin for it.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2018年八月30日 21:19 UTC](https://meta.discourse.org/t/ability-to-select-multiple-options-on-a-dropdown-user-field/92752/4 "2018-08-30T21:19:01Z")

</div>

Is there a specific use case for core? What is the specific use case for your plugin?

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [2018年八月30日 23:10 UTC](https://meta.discourse.org/t/ability-to-select-multiple-options-on-a-dropdown-user-field/92752/5 "2018-08-30T23:10:01Z")

</div>

We’re using User Fields as a way to help users find each other. So it would allow business owners to locate marketers or web devs. The key is allowing users to choose what they want to be known as within the community and in most cases we assume users will want to select multiple roles.

So one user can select “Business Owner” and “ Marketer” as their expertise (User Field).

From a plugin stance, I could see this as an entrance into more flexibility on the Group Pages, too. I know I have done a few of those projects already. We customized the group user list or the user directory to include User Fields.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2018年八月31日 00:32 UTC](https://meta.discourse.org/t/ability-to-select-multiple-options-on-a-dropdown-user-field/92752/6 "2018-08-31T00:32:38Z")

</div>

I think the best approach here is start by building it in your plugin, then share some screenshots etc with us and @j.jaffeux can review.

I am uneasy adding any component into core that is never used by core.

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [2018年八月31日 12:39 UTC](https://meta.discourse.org/t/ability-to-select-multiple-options-on-a-dropdown-user-field/92752/7 "2018-08-31T12:39:19Z")

</div>

> [@sam](#):
>
> I think the best approach here is start by building it in your plugin, then share some screenshots etc with us and @joffreyjaffeux can review.

That’s fine. We can do that.

> [@sam](#):
>
> I am uneasy adding any component into core that is never used by core.

How are User Fields used by core currently? I thought they were only used by admins to configure extra data on users.

---

<div class="post-metadata">

### Author: ![ArMK](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@ArMK](https://meta.discourse.org/u/ArMK)
#### Post date: [2018年九月20日 00:58 UTC](https://meta.discourse.org/t/ability-to-select-multiple-options-on-a-dropdown-user-field/92752/8 "2018-09-20T00:58:50Z")

</div>

In my case, it would be admins configuring extra data as well as these selected userfields would automatically show up on the user’s profile, helping them stand out among other users.

I hadn’t thought of the additional use suggested by @joebuhlig in that these userfields can be a huge help in users searching for and finding each other based on what they have specified in their drop-down menu style userfield with multiple options.

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [2018年九月20日 15:56 UTC](https://meta.discourse.org/t/ability-to-select-multiple-options-on-a-dropdown-user-field/92752/9 "2018-09-20T15:56:32Z")

</div>

For those interested, here’s the plugin we developed for this:

[https://github.com/procourse/discourse-multiselect-user-field](https://github.com/procourse/discourse-multiselect-user-field)

We’ll look into submitting a proper PR on this at some point in the future. But for now, this serves our purposes.

---

<div class="post-metadata">

### Author: ![zaino](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zaino/32/130057_2.png) [@zaino](https://meta.discourse.org/u/zaino)
#### Post date: [2019年一月28日 21:56 UTC](https://meta.discourse.org/t/ability-to-select-multiple-options-on-a-dropdown-user-field/92752/10 "2019-01-28T21:56:01Z")

</div>

Hey Joe,

Thanks so much for creating this plugin. This is pretty essential for us… I got it working, but the output looks a bit funky: Multi: [“One”,“Two”,“Three”]

It would be great if the output looked more normal, like: One, Two, Three

Any pointers on how to tweak that myself?

Thanks! 🕶

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [2019年一月30日 02:53 UTC](https://meta.discourse.org/t/ability-to-select-multiple-options-on-a-dropdown-user-field/92752/11 "2019-01-30T02:53:10Z")

</div>

Makes sense to me. I’ll get this added to the ProCourse queue. But like I mentioned elsewhere, this one isn’t on the list of ProCourse owned plugins, so it’ll have to be done as we can get to it.

---

<div class="post-metadata">

### Author: ![zaino](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zaino/32/130057_2.png) [@zaino](https://meta.discourse.org/u/zaino)
#### Post date: [2019年一月30日 19:33 UTC](https://meta.discourse.org/t/ability-to-select-multiple-options-on-a-dropdown-user-field/92752/12 "2019-01-30T19:33:10Z")

</div>

Awesome. Thanks for taking a look. 😀
