If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)


Featured templates

How to activate HTML contact form in the template

1) In the .html file with the contact form locate the <form> tag. It may look something like this
<form id="form" class="contact-form">
you should add (or modify) attributes action=”contact.php” and method=”post”. The first one defines a file to be processed after the form has been submitted, and the second attribute – the data transport method. So the final result should look similar to this
<form action="contact.php" method="post" id="form" class="contact-form">

2) Now identify the inputs for the Name, E-mail and Message fields. To each of them you should add name=” ” attribute.

name=”cf_name” should be added to the Name input

name=”cf_email” – to the E-mail input

name=”cf_message” – to the Message textarea

Note, the name attributes are already defined in contact.php file, so if you’d like to use some custom names instead of cf_name, cf_email, cf_message, you need to update those also in contact.php file (2-4th lines of code)

3) Now download contact-php.zip package and extract the contact.php file. Then place it into the folder with the .html files of your template (site). Open contact.php file with any HTML or text editor and change the email on the 6th line of code to your e-mail address
$mail_to = 'test@test-mail.com';

4) That’s all, now upload the updated files to the server and test the contact form
You can also check the video tutorial on how to activate HTML contact from in the templateHow to activate HTML contact from in the template by the link below
  • Godkoble

    Well done. Very easy, and it works like a charm specially after watching the video. Now my question is if you have more than 1 form (registration to newsletter, contact for sending comments) on the same page, should there be one contact.php file for registration and one for comments or all forms processing can be combined and handled by one contact.php.

    No votes yet.
    Please wait...
  • Rahul Dubey

    This was really very helpful. Thank you very much!!!

    No votes yet.
    Please wait...
  • skipy

    would be nice if you could zoom in on the lines that you were editing so people trying to follow along can actually see what lines are being edited.

    No votes yet.
    Please wait...
  • Mark

    Thank you very much its working 100% thumbs up! :’)

    No votes yet.
    Please wait...
  • Germán Bobadilla

    This was great, man. I’m moving from WordPress.org to HTML5, and something as simple as this code could not cross my mind. Thank you.

    No votes yet.
    Please wait...
Start chat