# Creating and configuring custom user fields

**URL:** https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192
**Category:** Site Management
**Tags:** how-to, user-custom-fields, users
**Created:** [April 2, 2019, 1:42am UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192 "2019-04-02T01:42:35Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [April 2, 2019, 1:42am UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/1 "2019-04-02T01:42:35Z")

</div>

> 🔖 This guide explains how to create and configure custom user fields in Discourse, including how to add them to the signup form, user profiles, and user directory.
> 
> 🙋 Required user level: Administrator

Custom user fields allow you to collect additional information from your users beyond the standard profile fields. These fields can be displayed on user cards, user summary pages, and even retrieved using the [Data Explorer](https://meta.discourse.org/t/32566?silent=true) plugin. This guide will walk you through the process of creating and configuring custom user fields.

## Adding a user field

1. Go to Admin \> Community \> User Fields (`discourse.example.com/admin/config/user-fields`).

2. If you haven’t created any user fields yet, you’ll see this screen:  

3. Click the “Add user field” button to add a new field.  

## Choosing a field type

The field type determines the input field users will see on the signup form. Choose based on the kind of information you’re collecting:

### Text field

- Use for short questions with many possible answers (e.g., “What company do you work for?”)
- Displays as a single-line HTML text input  
 ![User text field](https://global.discourse-cdn.com/meta/original/4X/d/7/3/d7391ac0942dd194eb598ac4ce83fb98f0087caf.png)

### Textarea

- Use for questions that may require longer, multi-line answers (e.g., “Tell us about yourself”)
- Displays as a multi-line HTML textarea input

### Date

- Use for collecting date values (e.g., “What is your date of birth?”)
- Displays as a date picker input

### Confirmation

- Use for yes/no questions (e.g., “Would you like to sign up for our newsletter?”)
- Displays as an HTML checkbox  
 ![User confirmation field](https://global.discourse-cdn.com/meta/original/4X/d/d/6/dd6a80afea4aff5a3482dee900ed0afd1f3a9091.png)

### Dropdown

- Use for questions with a set number of possible answers (e.g., “What is your gender?”)
- Displays as an HTML select input  
 ![Dropdown user field](https://global.discourse-cdn.com/meta/original/4X/3/b/f/3bfbf91e48ab3f269b0d8f9a89ef5a367d9aa1e9.png)

To add options for a dropdown field:

1. Click on the option input
2. Type an answer and click “Create”
3. Repeat for additional options  
 ![Dropdown user field option creation](https://global.discourse-cdn.com/meta/original/4X/0/f/5/0f5ef97853e9ca64bdd1390fdef933d6d32d6bd5.png)

The completed options should look similar to this:

 ![Dropdown user field options](https://global.discourse-cdn.com/meta/original/4X/0/4/1/04171e7e213f6a8f4b0232ad0860f09d97e97d48.png)

### Multiselect

- Use for questions where users can choose multiple answers from a set of options (e.g., “Which topics interest you?”)
- Displays as a multi-select input
- Options are configured the same way as dropdown fields

## Setting the field name and description

- **Field Name** : Appears before the input on the signup form and user profile
- **Field Description** : Appears after the input to help users complete the field

> ℹ Both the field name and description are required to save a field.

Here’s how custom fields appear on the signup form:

 ![Sign in custom fields](https://global.discourse-cdn.com/meta/original/4X/1/8/6/1865403fd295dc30fb1134780246132461b47298.png)

## Configuring user field options

### Field Requirements

- **Optional** - Optional fields may be left empty by users
- **For all users** - When a field is required by all users, every account, including logged on users will be forced to fill it. This is very useful for cases such as a terms-of-service (ToS) requirement.
- **On signup** - All new account will be required to fill the field.

Additionally, at the bottom of the creation form, you’ll find these preference checkboxes:

- **Editable after signup** : Allows users to update the field from their profile page
- **Show on public profile** : Displays the field value on the user’s summary page
- **Show on user card** : Shows the field value on the user card
- **Searchable** : Enables searching for users based on this field’s value in the user directory
- **Show on signup form** : Controls whether the field appears on the signup form. This is automatically enabled (and cannot be disabled) when the field requirement is “For all users” or “On signup”, or when the field is not editable after signup.

### Show on public profile

When enabled, the field value will be shown on the user’s profile page:

 ![User profile custom field](https://global.discourse-cdn.com/meta/original/4X/4/e/4/4e4927878e3ac8c71dcf319754ebedec05d92ad9.png)

### Show on user card

When enabled, the field value will be displayed on the user card:

 ![User card custom field](https://global.discourse-cdn.com/meta/original/4X/f/0/e/f0e9cd0c7c34565d0d42c5e63fef84f10c64962c.png)

### Searchable

When enabled, you can search for users based on their custom field values:

 ![Searchable user custom field](https://global.discourse-cdn.com/meta/original/4X/9/5/7/9572deb237ae034bc1ecc781196a57cfea077b05.png)

## Saving and editing fields

1. Click “Save” to add the field to your site’s list of user fields
2. To edit a field, click the “Edit” button next to it in the list
3. To delete a field, click the ellipsis menu (⋮) next to it and select “Delete”

 ![Custom user field list](https://global.discourse-cdn.com/meta/original/4X/3/6/2/362d0d5e257fdb726998317d35138ba03899f8e2.png)

## Adding custom fields to the user directory

1. Go to the user directory
2. Click the wrench icon:

 ![Wrench icon in the user directory](https://global.discourse-cdn.com/meta/original/4X/6/7/e/67e3040072fefbffd51945141270197d4f8897c2.png)

1. Check the custom user fields you want to display
2. Click “Save”

 ![Add custom user field to the user directory](https://global.discourse-cdn.com/meta/original/4X/c/5/0/c50e11d072ca9c5c0ddd62712d1139ffcc65589f.png)

The selected custom fields will now appear in the user directory table:

 ![Custom fields in user directory](https://global.discourse-cdn.com/meta/original/4X/8/f/8/8f81b373d002ce3ab57cf8bfb161912325db4c72.png)

> Last edited by @fzngagan 2025-07-17T09:12:38Z
> 
> Last checked by @hugh 2024-08-27T04:45:20Z
> 
> > **Check document**
> >
> > Perform check on document:

---

<div class="post-metadata">

### Author: ![traceymoko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/traceymoko/32/483235_2.png) [@traceymoko](https://meta.discourse.org/u/traceymoko)
#### Post date: [April 15, 2024, 11:29am UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/61 "2024-04-15T11:29:04Z")

</div>

I think two images are missing under these headings:

- **[Adding a User Field](https://meta.discourse.org/t/create-and-configure-custom-user-fields/113192#adding-a-user-field-1)**
- **[Show on user card](https://meta.discourse.org/t/create-and-configure-custom-user-fields/113192#show-on-user-card-11)**

Not sure if it’s related to [Missing images at Meta.discourse.org](https://meta.discourse.org/t/missing-images-at-meta-discourse-org/302963) – will post there too.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [April 15, 2024, 11:56am UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/62 "2024-04-15T11:56:35Z")

</div>

I can see those images? (also in an anon window)

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [April 15, 2024, 11:59am UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/63 "2024-04-15T11:59:25Z")

</div>

I cannot see theose

> [@simon](#):
>
> like this:
> 
> ![image](https://global.discourse-cdn.com/meta/original/4X/e/8/c/e8ce7414a924a354987eb161302725796f4c1d21.png)

> [@simon](#):
>
> ### Show on user card
> 
> Select this option to show the field on the user card. The value of the field will be displayed next to the Field Name.
> 
> ![User card custom field](https://global.discourse-cdn.com/meta/original/4X/9/c/5/9c5375ff13b57924d5002963871de3081c01dfa1.png)
> 
> ### Searchable

But the second one works in my quote.

Edit

---

<div class="post-metadata">

### Author: ![traceymoko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/traceymoko/32/483235_2.png) [@traceymoko](https://meta.discourse.org/u/traceymoko)
#### Post date: [April 15, 2024, 12:05pm UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/64 "2024-04-15T12:05:24Z")

</div>

Interestingly I can see the second picture in the quote, but not in the original post^^

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [April 15, 2024, 12:21pm UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/65 "2024-04-15T12:21:33Z")

</div>

Hmm. That’s interesting. I think there is a fix coming for the [Missing images at Meta.discourse.org](https://meta.discourse.org/t/missing-images-at-meta-discourse-org/302963) issue, so hopefully it will be resolved by that. 🤞

---

<div class="post-metadata">

### Author: ![Hifihedgehog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hifihedgehog/32/140207_2.png) [@Hifihedgehog](https://meta.discourse.org/u/Hifihedgehog)
#### Post date: [May 12, 2024, 2:41am UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/66 "2024-05-12T02:41:07Z")

</div>

Is there a setting I have to modify to specify the maximum length of a custom user field? Right now, in this “Test” field that I created as a test user field, I cannot enter even a single character on my user profile (or even “Test”, as shown).

 ![image](https://global.discourse-cdn.com/meta/original/4X/0/c/e/0ce6c81f0143115f0e6c21ce20f63c2997b6b653.png)

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/f/5/6f556aa05e1fa2f5a0a52248b74c1950714d5cf6.png)

---

<div class="post-metadata">

### Author: ![Vaping\_Community](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vaping_community/32/89248_2.png) [@Vaping\_Community](https://meta.discourse.org/u/Vaping_Community)
#### Post date: [July 30, 2024, 6:55pm UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/67 "2024-07-30T18:55:14Z")

</div>

I would love a field type: link / URL is that possible?

---

<div class="post-metadata">

### Author: ![maiki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/maiki/32/233950_2.png) [@maiki](https://meta.discourse.org/u/maiki)
#### Post date: [July 30, 2024, 7:21pm UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/68 "2024-07-30T19:21:32Z")

</div>

As URLs are text, the text field technically works, @Vaping_Community. However, you may be asking for additional details such as value validation or similar.

You might search or create a #Contribute > Feature topic with what you have in mind. 🙂

---

<div class="post-metadata">

### Author: ![MachineScholar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/machinescholar/32/424719_2.png) [@MachineScholar](https://meta.discourse.org/u/MachineScholar)
#### Post date: [July 14, 2025, 7:34am UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/70 "2025-07-14T07:34:40Z")

</div>

Are there any plans to allow multiline/composer for custom user fields? 🙏

> [@Is it possible to have a multi-line/longer text field in the signup form?](https://meta.discourse.org/t/is-it-possible-to-have-a-multi-line-longer-text-field-in-the-signup-form/257642):
>
> Sorry I don’t have a current installation to see for myself. I am planning to create a community that requires approval from a moderator to join. I’d like to have a custom field in the signup form where people can write a short note about themselves. Is this currently possible? If not please consider this as a feature request. Thank you!

---

<div class="post-metadata">

### Author: ![langstonb](https://avatars.discourse-cdn.com/v4/letter/l/e99b99/32.png) [@langstonb](https://meta.discourse.org/u/langstonb)
#### Post date: [July 22, 2025, 5:30pm UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/71 "2025-07-22T17:30:14Z")

</div>

Note that if you want to embed a link into one of the custom user fields, you need to use HTML syntax!  
`<a href="url">link text</a>`

For example, to acknowledge [community guidelines](https://meta.discourse.org/guidelines) / policies:

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/0/3/503c395e4e14740591a549948bcfd264048c9f3f.png)

---

<div class="post-metadata">

### Author: ![rey.riel](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@rey.riel](https://meta.discourse.org/u/rey.riel)
#### Post date: [October 6, 2025, 4:56pm UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/75 "2025-10-06T16:56:27Z")

</div>

Am I able to tie in a custom claim from my Auth0 SSO to a custom field? Currently the user enters field information in auth0, then has to enter it a second time when signing up. I’d like the value to be mapped over if possible

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [October 7, 2025, 2:12pm UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/76 "2025-10-07T14:12:10Z")

</div>

It’s possible, yes:

> <https://github.com/discourse/discourse/blob/main/spec/requests/session_controller_spec.rb#L843-L851>

Within your SSO endpoint, you have the capability to map the claim to the payload, e.g.:

```plaintext
const ssoPayload = {
  nonce: nonce,
  email: user.email,
  external_id: user.sub,
  username: user.nickname,
  name: user.name,
  add_groups: a_custom_group,
  'custom.user_field_1': user['https://yourdomain.com/company_id'],
  'custom.user_field_2': [etc...]

```

---

<div class="post-metadata">

### Author: ![rey.riel](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@rey.riel](https://meta.discourse.org/u/rey.riel)
#### Post date: [October 7, 2025, 2:44pm UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/77 "2025-10-07T14:44:52Z")

</div>

Thanks @dax

Is there a way to verify the field name in the db? For example, we have a first name field, I tried `custom.firstname`, `custom.first_name` and `custom.firstName`, none of which resulted in the fields being populated in the sign up screen.

I’ve checked the error logs to confirm the token fields are coming in as shown above.

---

<div class="post-metadata">

### Author: ![rey.riel](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@rey.riel](https://meta.discourse.org/u/rey.riel)
#### Post date: [October 7, 2025, 3:10pm UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/78 "2025-10-07T15:10:43Z")

</div>

digging more into the code here, is this only for a [Discourse Connect](https://meta.discourse.org/t/13045?silent=true) SSO? We’re using the Auth0 plugin

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [October 7, 2025, 4:51pm UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/79 "2025-10-07T16:51:41Z")

</div>

> [@rey.riel](#):
>
> we have a first name field, I tried `custom.firstname`, `custom.first_name` and `custom.firstName`

The syntax needs to be `custom.user_field_x`, where `x` is the numeric field ID shown in `/admin/config/user-fields/{x}/edit`.

> [@rey.riel](#):
>
> We’re using the Auth0 plugin

That mapping feature is not available in the Auth0 plugin directly.

That said, there are still options to achieve what you’re describing:

- creating a theme component. You can add a small front-end script that automatically syncs a Discourse custom user field with a value already stored in Auth0. For example, when a user logs in and the field is empty, the script can call a secure endpoint (a small cloud function) that fetches the field value from Auth0 and updates the Discourse profile via API.
- using automation tools. You could also use external automation services like Zapier or Make to perform that sync outside of Discourse. The advantage is that you don’t have to write/maintain code but only pay for the third-party service
- custom development. We can extend the Auth0 plugin itself to natively support mapping custom claims into user fields on login, or build a custom plugin that works in pair with the Auth0 plugin.

A clear drawback of the theme component approach is that you’d need to write and maintain custom code yourself, while also being careful from a security standpoint to avoid introducing potential bugs or vulnerabilities. Honestly, it’s not a solution I’d recommend for a production site like yours.

If I were in your position, I’d lean more toward the second option, using third-party tools, or consider submitting a feature request or custom work request (depending on our project managers’ evaluation) to enhance the Auth0 plugin itself.

If you’re interested in exploring the last option, we can continue the discussion privately.

---

<div class="post-metadata">

### Author: ![stephtara](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephtara/32/517827_2.png) [@stephtara](https://meta.discourse.org/u/stephtara)
#### Post date: [February 8, 2026, 2:30pm UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/80 "2026-02-08T14:30:20Z")

</div>

I’m wondering if there is a less fiddly way to reorganise a long list of user fields than single-clicking on the little arrows to move them up or down one step at a time…? 🫣

---

<div class="post-metadata">

### Author: ![stephtara](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephtara/32/517827_2.png) [@stephtara](https://meta.discourse.org/u/stephtara)
#### Post date: [February 8, 2026, 2:39pm UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/81 "2026-02-08T14:39:30Z")

</div>

In the user field listing overview, I can’t see how to distinguish fields that are on the signup from and are compulsory (Je suis… Pays for example) and those that are on the signup form but optional (Mes attentes). Am I missing something or is this an oversight? It’s quite cumbersome to have to edit the field to see if it’s optional or not. (Not sure if this is the right place for this, wasn’t sure where to put it.)

 ![Screenshot 2026-02-08 at 15.35.53](https://global.discourse-cdn.com/meta/original/4X/a/2/6/a2654bf8b3abe8eb6890b8966ce9156ec2cb1087.png)

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [February 8, 2026, 2:54pm UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/82 "2026-02-08T14:54:42Z")

</div>

Maybe the json which provides the data can be a little help. It’s not beautiful but you can look at `/admin/config/user-fields.json` and get something like

```plaintext
    {
      "id": 18,
      "name": "Age",
      "description": "How old are you?",
      "field_type": "text",
      "editable": true,
      "required": false,
      "requirement": "optional",
      "show_on_profile": false,
      "show_on_user_card": false,
      "show_on_signup": false,
      "searchable": false,
      "position": 9
    },
    {
      "id": 17,
      "name": "pets",
      "description": "choose your favourite",
      "field_type": "dropdown",
      "editable": true,
      "required": false,
      "requirement": "optional",
      "show_on_profile": false,
      "show_on_user_card": false,
      "show_on_signup": false,
      "searchable": false,
      "position": 10,
      "options": [
        "cat",
        "mouse",
        "dog"
      ]
    },

```

But of course that’s not as beautiful as information in the interface

---

<div class="post-metadata">

### Author: ![stephtara](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephtara/32/517827_2.png) [@stephtara](https://meta.discourse.org/u/stephtara)
#### Post date: [February 8, 2026, 2:57pm UTC](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192/83 "2026-02-08T14:57:14Z")

</div>

oh that is honestly much more easy for me to work with!  
Does that mean I can just edit that file and be done with it? Does it exist somewhere as such on my server, and where do I find it? 😍😍😍

[Next page](https://meta.discourse.org/t/creating-and-configuring-custom-user-fields/113192.md?page=2)
