Made with HTML, CSS, JavaScript & PHP - Fully customizable
Prerequisites
Step-by-step instructions
Download kontaktformular.com.zip from the downloads section.
Unzip the file kontaktformular.com.zip in a folder on your hard drive.
Open config.php with an HTML editor (we recommend using Notepad2 or Brackets).
Insert your email address between the quotation marks in line 3 and your (company) name in line 5. The exact position is specified in a comment in the file.
You can toggle the mandatory field to consent to the data privacy policy (EU GDPR) in line 7. Type 1 to activate the field and 0 to deactivate it. If you want to change the link to the data privacy policy, you can do so in line 9. In line 11, you can customize the link to the thank-you page. (Pro tip: Have the thank-you page appear outside the iFrame.)
Spam protection options: Activate or deactivate any spam protection options (honeypot, click check, time-out, or bad word filter, among others) you like in lines 18 to 38. To activate or deactivate visible spam protection functions (security code or question), edit lines 18 and 20 respectively.
Copy to sender: This option (line 45) lets you determine when the user receives a copy of the message: always, never or only with the user’s authorization.
HTML5 error messages (optional):: Edit line 47 to activate or deactivate modern HTML5 error messages.
SMTP function (optional): Add any applicable information in lines 56 to 66.
Attachment / Upload function (optional): Add any applicable information in lines 75 to 92.
Save the config.php file.
Upload all files to your server or web space. Important: Do not alter the directory structure (see image).
Open the file test.php in your browser and enter your email address. (Ideally: info@your-domain.com, as external email providers [e.g., Yahoo, GMX, Gmail, T-Online] are often blocked by hosting providers.) Click on "Send" afterwards. This will test whether PHP function mail() is installed on your server. You should receive a test email within a couple of seconds. For security reasons, delete the test.php file after completing the test. You did not receive an email? Click here!
The contact form is now ready to use!
Open contact.php in your browser.
Read the FAQ for answers to frequently asked questions (layout, technical issues) and any potential error messages.
There are two ways of inserting the contact form into your website. You can either use an iFrame (very easy, also supports responsive design) or a PHP include command. Embedding the form with an iFrame is the simplest solution. (it also works in WordPress!)
Insert this HTML code into the website where you want the form to appear:
<iframe src="contact.php" style="border: none; width:100%; height:700px; margin: 0 0 0 1%;"></iframe>
Note: This iFrame does not yet include automatic height adjustment.
» Go to iFrame with automatic height adjustment!
Ensure that the path to contact.php is correct. If the file is in a directory (e.g. contact_form), change the path to: "contact_form/contact.php".
Use the "height" attribute to define the height of the iFrame. Alternatively, you can automatically adjust the height as well using this responsive iFrame.
Info: Use a frame breaker script for the thank-you page if you use the responsive iFrame.
You’re done!
If after installing the form it does not display a security code, open document_root.php (in the captcha folder) in your browser. You will now see the absolute server path.
In my example, it is: /home/www/
Select the absolute server path and copy it to the clipboard. (right-click with the mouse - copy)
Open captcha.php (in the captcha folder) in the editor and scroll down to line 64. ($ttf = "/Imperator.ttf";)
Important: Insert the absolute server path from the clipboard in front of /imperator.ttf. (right-click with the mouse - insert)
In my example, this would be: $ttf = "/home/www/Imperator.ttf";
The font is not in the root directory (main directory) of your server, so you will have to specify the location in the path.
If, for example, the contact form is in the contact-form folder, the path needs to look like this: $ttf = "/home/www/contact-form/captcha/Imperator.ttf";
(You should also remember to insert the captcha folder, as the font is stored in there. ;-) )
Now you should be able to see the security code.
Should you have any problems installing or configuring the software, our free installation service is available to you at any time. Use our contact form to let us know and provide your contact information. We will get in touch with you within 24 hours!
This script lets your visitors contact you. The form is sent to the web master by email. The security code fends off spam. As an option, you can also include a field for an email attachment. Do not remove the copyright notice in the footer of the script. If you want to remove it, you will have to purchase a non-copyright license. Please fill out this order form to do so. If you want to use the contact form on a commercial website, please purchase a commercial license. You can also use the same order form to do so. Before downloading, you have agreed to this by accepting the licensing conditions.