Today, we’re going to review the ContactMe tool which allows you to create contact forms on your PHP site. It’s a very easy-to-use tool and allows you to set up different kinds of contact forms for any requirements.
As a site owner, you might like to have feedback from your users and customers about your services—that helps you to serve them better. Thus, a contact form on your website is one of the must-have features to collect feedback from your users.
There are plenty of extensions and scripts available for creating contact forms on your PHP website. And of course, you’ll also find commercial options that provide ready-to-use features and extended support. In the case of commercial options, you can also expect quality code, bug fixes, and new enhancements.
PHP20 Best PHP Email Forms
PHPComparing the 5 Best PHP Form Builders
PHP12 Best Contact Form PHP Scripts
PHPBuild Your Own CAPTCHA and Contact Form in PHP
PHPCreate Beautiful Forms With PHP Form Builder
In this post, we’re going to discuss the ContactMe tool, available at CodeCanyon for purchase at a very reasonable price. It provides a variety of contact forms and themes out-of-the-box, and as the script supports customization, you could create your own combination of forms as well.
Let’s quickly go through the important features it provides:
- ready-to-use forms in 28 combinations
- built-in examples
- support for themes
- responsive and mobile-friendly
- no database needed
- SMTP support to send emails
- spam protection
- and much more
The ContactMe tool provides a lot of useful features which allow you to set up contact forms quickly. Throughout the course of this tutorial, we’ll explore the different features provided by this script.
To start with, we’ll see how to download and install the ContactMe script from the CodeCanyon marketplace.
Installation and Configuration
In this section, we’ll see how to install and configure the ContactMe tool once you’ve purchased and downloaded it from CodeCanyon.
As soon as you purchase it, you’ll be able to download the zip file. Extract it, and you will find the directory with the main script code: contactme. Copy this directory to your PHP application. For example, if your project is configured at /web/demo-app/public_html, you should copy the contactme directory to /web/demo-app/public_html/contactme.
The contactme directory contains the PHP code which handles the form validation and submission. Of course, it also sends an email containing the supplied information to the email address which is configured with the application.
On the PHP side, you need to configure a few settings. Go ahead and open the contactme/configs.php file. There are three settings that you need to configure in that file as shown in the following snippet.
$configs['from_name'] = 'My Demo Site'; $configs['from_address'] = '[email protected]'; $configs['to_addresses'] = array('[email protected]');
from_address configuration values indicate the source of the email. The
to_addresses configuration value is used to specify the email address which receives all the form submissions.
In the next section, we’ll discuss how to set up the necessary HTML code with the help of the ContactMe script to display contact form on your site.
How to Set Up the Contact Us Form
When you extract the ContactMe zip file, you’ll find a index.html file which contains everything you need to get started setting up your contact form. In fact, it contains the HTML code for all the different types of contact forms supported by the script along with all the different themes. So you could handpick the code of the form which you would like to use in your application.
In the following example, we’ll set up the General form with the modern theme. If you want to display a form other than the General form, you just need to copy the HTML code of that specific form instead.
Copy HTML Code
From the contactme/index.html file copy the code between
comments and paste it in your HTML page in the
In our case, we want to use the modern theme instead of the default theme, so we just need to change the