Thank you for purchasing the Sophisticated Contact Form! This document will guide you through the installation and usage of this elegant and refined contact form.
contactform-TF/
└── documentation/
├── flat.html
├── minimal.html
├── modern.html
├── retro.html
├── sophisticated.html
└── preview/
├──
└──
├── common.css
├── contact-form-flat.html
├── contact-form-flat.css
├── contact-form-flat.js
├── contact-form-minimal.html
├── contact-form-minimal.css
├── contact-form-minimal.js
├── contact-form-modern.html
├── contact-form-modern.css
├── contact-form-modern.js
├── contact-form-retro.html
├── contact-form-retro.css
├── contact-form-retro.js
├── contact-form-sophisticated.html
├── contact-form-sophisticated.css
├── contact-form-sophitiscated.js
├── README.txt
To install the Sophisticated Contact Form, simply include the contact-form-sophisticated.html, contact-form-sophisticated.css, and contact-form-sophisticated.js files in your HTML project.
Here's a visual representation of the required files:
Copy the HTML code from contact-form-sophisticated.html into the desired location in your website's HTML structure. Make sure to link the contact-form-sophisticated.css file in the <head> section and include the contact-form-sophisticated.js file before the closing <body> tag.
<head>
<link rel="stylesheet" href="path/to/contact-form-sophisticated.css">
</head>
<body>
<!-- Your content -->
<form class="contact-form sophisticated" action="#" method="POST" novalidate>
<div class="form-group">
<label for="name-sophisticated">Name:</label>
<input type="text" id="name-sophisticated" name="name" required aria-required="true" placeholder="Your name">
<span class="validation-icon success"><svg ...></svg></span>
<span class="validation-icon error"><svg ...></svg></span>
</div>
<div class="form-group">
<label for="email-sophisticated">Email:</label>
<input type="email" id="email-sophisticated" name="email" required aria-required="true" placeholder="Your email">
<span class="validation-icon success"><svg ...></svg></span>
<span class="validation-icon error"><svg ...></svg></span>
</div>
<div class="form-group">
<label for="message-sophisticated">Message:</label>
<textarea id="message-sophisticated" name="message" rows="5" required aria-required="true" placeholder="Your message"></textarea>
<span class="validation-icon success"><svg ...></svg></span>
<span class="validation-icon error"><svg ...></svg></span>
</div>
<button type="submit">Send Message</button>
</form>
<script src="path/to/contact-form-sophisticated.js"></script>
</body>
The Sophisticated Contact Form offers an elegant design with subtle yet impactful accents. You can customize its appearance by modifying the CSS rules in the contact-form-sophisticated.css file. Here's how to adjust key visual elements:
Modify the following CSS properties to personalize the color scheme of the form:
background-color property of the .contact-form.sophisticated class.
.contact-form.sophisticated {
background-color: #f8f8f8; /* Default very light gray */
/* For a light beige background: */
/* background-color: #f5f5dc; */
}
color property of the .contact-form.sophisticated label rule.
.contact-form.sophisticated label {
color: #555; /* Default medium gray */
/* For a dark charcoal label text: */
/* color: #36454f; */
}
border-color property in the rules for .contact-form.sophisticated input[type="text"], .contact-form.sophisticated input[type="email"], .contact-form.sophisticated input[type="tel"], and .contact-form.sophisticated textarea.
.contact-form.sophisticated input[type="text"],
.contact-form.sophisticated input[type="email"],
.contact-form.sophisticated input[type="tel"],
.contact-form.sophisticated textarea {
border: 1px solid #ddd; /* Default very light gray */
/* For a light silver border: */
/* border-color: #c0c0c0; */
}
border-color and box-shadow of the .contact-form.sophisticated input:focus and .contact-form.sophisticated textarea:focus rules.
.contact-form.sophisticated input:focus,
.contact-form.sophisticated textarea:focus {
border-color: #aaa; /* Default light gray focus */
box-shadow: 0 0 8px rgba(0, 0, 0, 0.15); /* Subtle shadow */
/* For a soft blue focus: */
/* border-color: #64b5f6; */
/* box-shadow: 0 0 8px rgba(100, 181, 246, 0.2); */
}
background-color of the .contact-form.sophisticated button[type="submit"] rule.
.contact-form.sophisticated button[type="submit"] {
background-color: #22a030; /* Default sophisticated green */
/* For a deep purple button: */
/* background-color: #673ab7; */
}
color property in the .contact-form.sophisticated button[type="submit"] rule. The default is white.
.contact-form.sophisticated button[type="submit"] {
color: white; /* Default white */
/* For light yellow text: */
/* color: #fffacd; */
}
background-color and box-shadow in the .contact-form.sophisticated button[type="submit"]:hover rule.
.contact-form.sophisticated button[type="submit"]:hover {
background-color: #1e842c; /* Default darker green */
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* More pronounced shadow */
/* For a darker purple hover: */
/* background-color: #512da8; */
}
box-shadow in the .contact-form.sophisticated button[type="submit"]:focus rule.
.contact-form.sophisticated button[type="submit"]:focus {
outline: none;
box-shadow: 0 0 0 0.2rem rgba(103, 58, 183, 0.5); /* Default purple focus shadow */
/* For a green focus shadow: */
/* box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.5); */
}
color property of the .contact-form.sophisticated .validation-icon.success (default: #4caf50) and .contact-form.sophisticated .validation-icon.error (default: #f44336) rules.
.contact-form.sophisticated .validation-icon.success {
color: #4caf50; /* Default green */
/* For a bright blue success icon: */
/* color: #2196f3; */
}
.contact-form.sophisticated .validation-icon.error {
color: #f44336; /* Default red */
/* For an orange error icon: */
/* color: #ff9800; */
}
border-color and box-shadow of the .contact-form.sophisticated input.is-invalid and .contact-form.sophisticated textarea.is-invalid rules.
.contact-form.sophisticated input.is-invalid,
.contact-form.sophisticated textarea.is-invalid {
border-color: #f44336; /* Default red border */
box-shadow: 0 0 5px rgba(244, 67, 54, 0.4); /* Red shadow */
/* For a dark orange border and shadow: */
/* border-color: #ff5722; */
/* box-shadow: 0 0 5px rgba(255, 87, 34, 0.4); */
}
color property of the .contact-form.sophisticated .error-message rule.
.contact-form.sophisticated .error-message {
color: #f44336; /* Default red */
/* For a dark red error message: */
/* color: #d32f2f; */
}
To customize the font used in the form, modify the font-family property in the CSS rules for .contact-form.sophisticated label, .contact-form.sophisticated input, .contact-form.sophisticated textarea, and .contact-form.sophisticated button. Refer to the "Typography" section in the Minimal style documentation for instructions on integrating Google Fonts.
Adjust the size and spacing of the form elements by modifying properties like max-width, padding, and margin in the CSS rules for the respective elements (.contact-form.sophisticated, .contact-form.sophisticated .form-group, .contact-form.sophisticated input, .contact-form.sophisticated textarea, .contact-form.sophisticated button). The principles are similar to those described in the Minimal style documentation.
As with the other styles, you can use the .d-none utility class from common.css to hide optional fields by adding it to the .form-group of the field in your HTML. Ensure that common.css is linked in the <head> of your HTML file.
The text for the labels and the submit button can be directly changed within the contact-form-sophisticated.html file by editing the text content of the <label> and <button> elements.
Important: This contact form provides the front-end structure and client-side validation only. To handle the form submission (sending emails, storing data), you will need to integrate a backend solution using a server-side language (like PHP, Node.js, Python) or a third-party service (like Formspree, Netlify Forms).
You would typically create a PHP script to handle the form submission when the user clicks "Send Message". The action attribute of the <form> tag would point to this PHP script.
<form class="contact-form sophisticated" action="process_form.php" method="POST" novalidate>
<!-- ... form fields ... -->
<button type="submit">Send Message</button>
</form>
Your process_form.php file would then handle the data submitted via the $_POST superglobal, perform server-side validation, and send the email.
Formspree is a service that allows you to receive emails from your HTML forms without writing any backend code.
action attribute of your HTML form with this URL.
<form class="contact-form sophisticated" action="https://formspree.io/f/your_form_endpoint" method="POST" novalidate>
<!-- ... form fields ... -->
<button type="submit">
<button type="submit">Send Message</button>
</form>
Formspree can also handle basic spam protection and email notifications.
Remember that client-side validation (provided by the JavaScript) is for user convenience. You must implement server-side validation to protect your website from malicious input and ensure data integrity.
To translate the form labels and any potential JavaScript error messages, you will need to modify the text content directly in the contact-form-sophisticated.html file for the labels and in the contact-form-sophisticated.js file for the error messages.
This contact form is designed with accessibility in mind:
<label> elements associated with their respective inputs using the for attribute.aria-required="true" for required fields.The form is lightweight and optimized for performance with minimal CSS and JavaScript.
For any questions or issues, please refer to the ThemeForest support section for this item.
Thank you again for your purchase!