Categories

Featured templates

How to activate HTML contact form in the template

Gordon J. Blair March 30, 2011
Rating: 3.2. From 24 votes.
Please wait...
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 template How to activate HTML contact from in the template by the link below
This entry was posted in Working with HTML and tagged contact, contact form, form, HTML. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket