22 Nov 2017

Adding extra fields to the Joomla contact form

The default Joomla contact form component does allow us to modify it slightly and add new fields to the contact form. New fields are contained within a field group. Follow the steps below and view the video tutorial for further explanation on these concepts.

  • Go to "Components" and "Contacts".
  • Click "Field Groups" in the left-hand sidebar.
  • This is the important new task: choose "Mail" from the dropdown menu. This means your fields will be attached to contact forms that users can rely on to send email. If we choose "Contact" or "Category", our fields will only be available to site administrators. If you choose "Contact", this will be similar to the Address, City or Suburb, etc fields we saw above.

Adding extra fields to the Joomla contact form  1

  • Click "New".
  • Title: Extra Contact Details
  • Save the field group and make sure your next screen looks like this:

Adding extra fields to the Joomla contact form   2

  • Click "Fields" in the left-hand sidebar.
  • Again, choose "Mail" in the dropdown menu:

Adding extra fields to the Joomla contact form   3

  • Click "New".
  • Title: What is Your Question About?
  • Type: Checkboxes

Adding extra fields to the Joomla contact form   4

  • Field Group: Extra Contact Details
  • Checkbox Values: Enter topics that people might be contacting you about.

Adding extra fields to the Joomla contact form   5

  • Click the "Permissions" tab.
  • Set "Edit Custom Field Value" to "Allowed". This will allow anyone to enter data into this field.

Adding extra fields to the Joomla contact form   6

  • Visit the front of your site and your contact form will now have a custom field:

Adding extra fields to the Joomla contact form   7