Edit Contact form in HTML Templates

Each of our HTML templates has a ready-to-use contact form. The form.php processing file is located at the root of the “build” folder along with the .html file of the form.

To customize the form start by editing the form’s html code. For example, if the form is on a contact page, you should edit the contact.html file and make changes between the <form>...</form> tags

In addition to changing form fields, you should also pay attention to the line

action="form.php"

This is the path to the form processing file. If the form.php file has been moved or renamed the action path must be changed accordingly.

Once you’ve edited the html form code, you have to customize the action file.

step 1

Open the form.php file.

step 2

Edit/add fields according to html form to read value.

Read the form value
step 3

Edit the header of the message, where you must enter your email in line:

$to = "name@domain.com";
step 4

Edit the body message according to the form fields.

Message body

If everything is set up correctly but the messages are not received to your email, please make sure you have configurated the PHP mail correctly on your host.

Was this article helpful to you?