How to add new field to the contact form?

Here's a short guide on how to add a new field to the contact form and as an example we'll add the 'address' field to the form.

  1. Open your HTML file.
  2. Search for the "contact-form-block" class.
  3. Add the 'address' input like shown in the ​screenshot, please use a unique 'name' attribute, without space, we'll use this name later to identify this input within the PHP file.
  4. Open the 'sendmail.php' file and fetch the data from the address filed like shown in the ​screenshot.
  5. Inject the information from the input to the email template like shown in the screenshot.
  6. Open the 'mail/message.html' file.
  7. Copy one table row and change the row's title and the row's value like shown in the screenshot.
Tags: add, contact, fields, form

Last update:
2016-02-29 10:32
Vlad Sargu
Average rating:0 (0 Votes)