Custom Fields

This article helps you understand how to output the value of a custom field and any property from the field object, such as the title or the ID.

Article Custom Fields

To output the value of a custom field associated with a Joomla article, use this syntax:

{article.field.NAME}

To learn more, visit the Article Smart Tag guide.

User Custom Fields

To output the value of a custom field associated with the current logged-in User, use the syntax:

{user.field.NAME}

To learn more, visit the User Smart Tag guide.

Common Syntax

Let's see some examples with common syntax across all Smart Tags that support custom fields. 

In general, all you have to do is replace NAME with the name of the custom field you want to output information for.

For instance, let's say you have a custom field named "favoriteColor". To return its value, use:

{article.field.favoriteColor}

Returning the raw value

A custom field has both a value and a raw value, which are different in most cases. To return the field's raw value, use:

{article.field.favoriteColor.rawvalue}

Returning the field label

To return the field's label, use:

{article.field.favoriteColor.label}

Returning the field ID

To return the field's ID, use:

{article.field.favoriteColor.id}

Using subform fields

The same goes for the Subform field. Let's say you have a subform field named "customers" which consists of 2 fields, "name" and "age".

The following shortcode will return all subform rows in a bullet list.

{user.field.customers}

To display all the values of a specific row, you need to access the rawvalue property of the field and provide the row index:

{user.field.customers.rawvalue.0}

The display the value of a specific field from a specific row, access the rawvalue property of the field, and provide the row index and the field's name.

{user.field.customers.rawvalue.0.age}

Prevent shortcodes parsing

By default, the output of a custom field is processed using Joomla’s content plugin system. This is helpful when your custom field value contains shortcodes or other plugins that need to be parsed before rendering.

However, in some cases, this can lead to unexpected results or conflicts. To prevent plugins (like shortcodes) from being parsed in the field output, you can disable this behavior by adding the prepareCustomFields=false modifier to the Smart Tag.

For example, if you have the Email Cloak plugin enabled and you’re trying to output the value of an email-type custom field, Joomla may automatically cloak the email address. Using this modifier will bypass the content plugin parsing and ensure the email is shown in its original form.

{user.field.email --prepareCustomFields=false}
Last updated on Jun 19th 2025 14:06