Joomla 4 Tutorial: How to use custom fields in Joomla contact forms

Joomla 4 alpha4 version has been out for improvements and bug fixes, there are some good features that implemented in Joomla 3.x and followed by Joomla 4. Joomla offer custom fields feature in contact items, it’s very easy to add new custom fields in the Joomla contact form to get additional information. In this blog post, we will explain the steps how to create a contact page in Joomla and how to use custom fields in Joomla 4 contact.

custom fields in Joomla 4 contact form

Create contact page in Joomla:

First you need to create a Joomla contact item to show it on your contact page.

  • Create Contacts item : Go to Components > Contacts > Contacts > Click on New button.
  • Joomla 4 contact form
  • Add the contact details: Name, Image, Email, Address, Telephone etc. These details optional, it will appear with a contact form. If the fields are empty the additional information will not be shown with the contact form.
  • Joomla 4 contact page
  • Miscellaneous Information: This option is an option and depends whether you would like to show a message on the contact form or not.
  • Display Tab: Display option give you to control for the category, display formats, contact information etc.
  • Joomla 4 contact form
  • Save Contact: After configuring all fields, Save the contact item.

In the next step, you need to create a menu item to display the contact form and other contact information. Create Menu: Create a new menu item with type Contact > Single contact and save.

Joomla 4 contact menu

Open the contact us page from frontend to see Joomla 4 contact form.

Joomla 4 contact form

Add custom fields in Joomla contact form:

  • To add custom fields open components > contacts > Field Groups.
  • Select a field in which you want to add custom fields for example Mail
  • Joomla 4 contact custom fields
  • Create new field like we created: Email extra fields for Mail and save it.
  • To create custom field go to contacts > field > select Mail. Create a new field > Select type > add information and save ,it. As an example we created field with type Checkboxes
  • Joomla 4 contact cusom fields
  • Select Field group and category from right option on which you want to save this field.
  • Permission tab allows the public user group to edit custom field value so public user of site can select the checkbox values.
  • Permission settings
  • Reload the contact page to see the custom fields, The information will be used for contact form emails.
  • Joomla 4 contact form

By using these custom fields you can add multiple new fields on Joomla contact form, To know the 15 types of fields used in Joomla, kindly check this blog post.

For more information on Joomla 4 features and improvements please have a look at these blog posts:

Share
This article was first published July 27th, 2018