Kevin's Guides

Custom User Fields in Joomla

Custom User Fields in Joomla
Write a comment

Custom User Fields in Joomla

In this guide, you will learn about custom user fields in Joomla. Custom user fields are pieces of information attached to each user, which can be accessed through the user profile. They can also be used by third-party extensions. We will focus on the user profile portion in this guide, not the development side.

Joomla provides several built in user profile fields you can select and enable through the plugin manager. If you're looking to add commonly used fields like phone numbers and addresses to a user's profile, check out the user profile plugin tutorial. If you need more customized fields, this guide is for you.

There are many types of custom user fields with unique properties. You can have fields for text, fields for numbers, fields for dates, fields for messages, and more.

Field Groups

Custom user fields are sorted into field groups. You don't have to put your fields in groups, but it's a good idea. If you don't put your custom fields in a group, they will just be placed under a heading that says "Fields" which isn't very descriptive.

Select the "Field Groups" option under the "Users" section of the administration menu. Then create a new field group. Give it a descriptive name and save it. For this example, I'm going to be adding custom fields related to a fictitious software development company.

new field group

Custom Fields

To create a custom field, navigate to the "Fields" option under "Users" in the administration menu. Click "New" and create a new field.

There are over a dozen different types of user fields. The most common ones you'll probably want to use include:

  • Text
    • A standard text box where users can enter a short string of characters.
  • Editor
    • Load the full WYSIWYG editor and allow users to write a longer message formatted in HTML.
  • Text Area
    • A longer version of the text box without HTML formatting. For longer messages that don't need to be formatted to HTML.
  • List
    • A dropdown list with different options set by the administrator
  • Radio
    • Radio buttons are the circle checkboxes you click that allow you to only select one option.
  • Checkboxes
    • Users can check one or multiple options.

To learn more about the specifics of each option, look at the Joomla documentation by clicking "Help" from the new user field screen. It will give you a breakdown of each option. We're going to touch on just a few of the options. The individual settings for each field type varies, but the general idea is the same.

In the screenshot, I create a new field titled "Supervisor Name" and assign it to the "Corporate Information" group I created earlier. This is going to contain the username of the person's direct supervisor/manager. So I selected the default "text" option for field type.

new field supervisor
Creating a new text field

Now when I visit my front end profile as a registered user, the field is displayed in my profile.

user profile field supervisor enabledUser Profile With Custom Supervisor Field

Note that at this time, as a registered user (not an Admin), when I click edit profile, I can see the field, but I cannot change it myself. I do not have that permission, as a registered user. The way it's currently set up, only an admin would be able to change the field for me.

supervisor field readonlyOn the Edit User Profile page, the field is read only

To edit this new custom field as an administrator, we can go to the user manager and open the user we want to edit.

A new tab will appear with our field group name under the user. Here, we can change all the fields for this particular user.

edit user field from user managerEditing the field in the user manager

Now, when I visit my front end user profile as the registered user, it tells me the name of the manager assigned.

supervisor name set on user profile frontendSupervisor Name Set On Front End

Making It User-Editable

The field can be made editable by the user themselves by changing the field permissions. To do this, open the field, go to the permissions tab, and set the "Edit Custom Field Value" to "Allowed" for registered users. Then save the field.

registered user edit custom field allowedSet the permissions to allowed.

Now, when I go to edit my profile as a registered user, I can edit the name of my direct supervisor myself.

For a field like this, I probably wouldn't actually make it user-editable. I'd only allow admins to update the user's manager information.

supervisor name editable from frontend registeredRegistered users can now edit this field themselves.

Other Common Field Types

I have added several more fields to the user profile. The screenshots show what it looks like on the back end and the front-end.

I have kept the text field, added a list field, a calendar field, and a radio field.

You can click the links below to see what my settings look like for each field.

all fields backendThe User Fields In Backend

all fields frontendFields shown on Registered user profile
Write comments...
You are a guest ( Sign Up ? )
or post as a guest
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.

Related Guides

Front End User Content Editing in Joomla
Learn how to setup your Joomla website for authors, editors, and publishers to work on articles.
Adding Two Factor Authentication to Joomla
How to enable two factor authentication to protect your user accounts in Joomla 4.
Joomla User Privacy Requests
How to use Joomla's privacy component to manage user account deletion and data export requests.
Chapter 7: Users, Registration, Access and Permissions
A complete overview of how user management, access levels, user groups, and the user registration process works in Joomla 4.
Changing The Default Cassiopeia Favicon
How to change the default favicon in the Joomla 4 Cassiopeia template.
Custom Bootstrap Styles/Variables in your Joomla Template
How to customize Bootstrap to better suit your template using Sass.
Main Menu
Kevin's Guides
Full size image will appear here.