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.
- Click "New".
- Title: Extra Contact Details
- Save the field group and make sure your next screen looks like this:
- Click "Fields" in the left-hand sidebar.
- Again, choose "Mail" in the dropdown menu:
- Click "New".
- Title: What is Your Question About?
- Type: Checkboxes
- Field Group: Extra Contact Details
- Checkbox Values: Enter topics that people might be contacting you about.
- Click the "Permissions" tab.
- Set "Edit Custom Field Value" to "Allowed". This will allow anyone to enter data into this field.
- Visit the front of your site and your contact form will now have a custom field: