How to Create Custom Fields in Joomla 4

How to create custom fields in Joomla 4

Custom fields are a great way to add additional content, whether manually or automatically, to your articles. Custom fields can be applied to the general article creation template. So if you want to change this content from article to article you can easily type or click to add supplemental information. A popular use case for custom fields are movie and book reviews. Every book will have a title, author, and other publication information. Likewise, movies would have a title, director, and other metadata. You can create custom fields for this kind of information and simply fill it out for each article so you can reduce redundancy in your article creation process.

How to Create Custom Fields in Joomla 4

Follow along with the steps below to learn how to create your own custom fields in your Joomla site:

  1. Log into your Joomla admin area
  2. Click Fields under Content
    Click fields
  3. Click New
    Click New
  4. Provide a title
    Provide title
  5. (Optional) Select category on which you want your fields to appear
    Select optional category
  6. Click Save & Close

Those are the basic settings you will need to provide a simple text field to appear on your content. But there are more advanced options you can provide to get even more custom options.

The label field is the part of your custom field that will appear on your article when published, as in this example with a plain text field:

<Label>: <Default value> 

Default value describes the content that will appear in the text field until you edit it.

Different Types of Custom Fields

In the example above, you saw the standard “Text” field, which has two important variables: label and value. This is the most basic type of custom field content you can create for you article. But there are more advanced fields that allow you to get more creative.

You can use lists, checkboxes, images, colors, SQL queries, and even a calendar and editor window. Try out different fields and see how you can mix and match them to introduce different content into your articles.

How to Add Custom Fields to Articles

Now that you know how to create custom fields, it’s time to learn how to add these fields to your articles so you can introduce different types of additional content and metadata.

Remember when you created your custom field you had the option of associating that field with particular categories or all categories. By default, the field will be available in all categories. This means all articles will have your fields available. However, if you chose a specific category just make sure that the desired category is selected in order to access your field.

  1. Log into your Joomla admin area
  2. Click Articles under Content
    Click Articles
  3. Create a new article or edit existing
  4. Click the Fields tab
    Click Fields
  5. Fill in or select your value (depending on the field used)
  6. Click the Field button to select the field you want to add to your article
    Select field

Now, if you used a standard text field, this is the result you will see on the article:

Resulting custom field as it appears in the final article

Well done! You now know how to create custom fields and add them to articles in your Joomla site.

Discover how InMotion Hosting's virtual private servers can deliver power and performance for your Joomla site with our reliable Joomla Hosting plans.
CM
Christopher Maiorana Content Writer II

Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog.

More Articles by Christopher

Was this article helpful? Join the conversation!