# Add support for multi-select fields in DiscourseConnect protocol

**URL:** https://meta.discourse.org/t/add-support-for-multi-select-fields-in-discourseconnect-protocol/219302
**Category:** Feature
**Tags:** sso
**Created:** [February 24, 2022, 6:22pm UTC](https://meta.discourse.org/t/add-support-for-multi-select-fields-in-discourseconnect-protocol/219302 "2022-02-24T18:22:17Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [February 24, 2022, 6:22pm UTC](https://meta.discourse.org/t/add-support-for-multi-select-fields-in-discourseconnect-protocol/219302/1 "2022-02-24T18:22:17Z")

</div>

Continuing the discussion from [Custom field in discourseconnect](https://meta.discourse.org/t/custom-field-in-discourseconnect/219094/4):

While site admins can create multiselect fields in Admin → Customize → User Fields in Discourse, at the moment it’s not possible to populate those fields with multiple values via a [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) payload.

The plan is to add support for array params in the SSO payload like:

```plaintext
custom.user_field_1[]=valueA&custom.user_field_1[]=valueB

```

This almost works but is garbled by this line:

> <https://github.com/discourse/discourse/blob/main/lib/discourse_connect_base.rb#L151>

where the `Array.to_s` means it gets persisted as

```plaintext
 ['valueA', 'valueB'].to_s
=> "[\"valueA\", \"valueB\"]"

```

Restricting the persisted values to the existing options in the Discourse Admin screen is not necessary.

---

<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: [February 24, 2022, 8:50pm UTC](https://meta.discourse.org/t/add-support-for-multi-select-fields-in-discourseconnect-protocol/219302/3 "2022-02-24T20:50:48Z")

</div>

Love the syntax being proposed here 🤗 go head and make the change to add support for arrays
