# Select field as multiple selector

**URL:** <https://community.auth0.com/t/select-field-as-multiple-selector/50464>\
**Category:** Get Help\
**Tags:** signup, lock, universal-login\
**Created:** [September 25, 2020, 4:44pm UTC](https://community.auth0.com/t/select-field-as-multiple-selector/50464 "2020-09-25T16:44:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hgiraldo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hgiraldo/32/24489_2.png) [@hgiraldo](https://community.auth0.com/u/hgiraldo)\
**Post date:** [September 25, 2020, 4:44pm UTC](https://community.auth0.com/t/select-field-as-multiple-selector/50464/1 "2020-09-25T16:44:59Z")

</div>

Hi All.

I was wondering if there is an option to allow multiple selections in a single select field and storage it as an array in the user\_metadata space? Or could be a checkboxes field an alternative?

```
var options = {
  additionalSignUpFields: [{
    type: "select",
    name: "preferences",
    placeholder: "My Preferences",
    options: [
      {value: "a", label: "Preference Yellow"},
      {value: "b", label: "Preference Red"},
      {value: "c", label: "Preference Green"},
      {value: "d", label: "Preference Purple"},
      {value: "e", label: "Preference Black"}
    ],
    // The following properties are optional
    icon: "https://example.com/assests/location_icon.png",
    prefill: "us"
  }]
}

```

And save it as:

```
{
    "user_metadata": {
        "preferences": [
            {
                "value": "a" // Yellow
            },
            {
                "value": "d" // Purple
            }
        ]
    }
}

```

---

<div class="post-metadata">

**Author:** ![joseantonio.rey](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joseantonio.rey/32/14670_2.png) [@joseantonio.rey](https://community.auth0.com/u/joseantonio.rey)\
**Post date:** [September 25, 2020, 4:48pm UTC](https://community.auth0.com/t/select-field-as-multiple-selector/50464/2 "2020-09-25T16:48:34Z")

</div>

Hello, @hgiraldo - welcome to the Auth0 Community!

Unfortunately, not. The best way to achieve this would be to use multiple [Checkbox Fields](https://auth0.com/docs/libraries/lock/lock-configuration#checkbox-field), and maybe you can edit the metadata with a [Rule](https://auth0.com/docs/rules)? You could call them all with the `preference_` prefix, and then use the Rule to modify any `user_metadata` values that have multiple `preference_` fields into just one. Of course, this would require some extra coding.

---

<div class="post-metadata">

**Author:** ![hgiraldo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hgiraldo/32/24489_2.png) [@hgiraldo](https://community.auth0.com/u/hgiraldo)\
**Post date:** [September 25, 2020, 5:21pm UTC](https://community.auth0.com/t/select-field-as-multiple-selector/50464/3 "2020-09-25T17:21:40Z")

</div>

> [@joseantonio.rey](#):
>
> Checkbox Fields

Thanks Jose, understood.

Last thing, Can a Markup be added before an additionalSignUpFields is printed? I would like to add an h2 (As group title) tag before the checkboxes or it must be added by js?

---

<div class="post-metadata">

**Author:** ![joseantonio.rey](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joseantonio.rey/32/14670_2.png) [@joseantonio.rey](https://community.auth0.com/u/joseantonio.rey)\
**Post date:** [September 25, 2020, 7:17pm UTC](https://community.auth0.com/t/select-field-as-multiple-selector/50464/4 "2020-09-25T19:17:01Z")

</div>

Hey @hgiraldo,

This would have to be added by Javascript - you would have to edit Lock in order to display that text with that tag.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [October 10, 2020, 7:17pm UTC](https://community.auth0.com/t/select-field-as-multiple-selector/50464/5 "2020-10-10T19:17:14Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
