Bootstrap 3 Contact Form with Captcha
A simple bootstrap 3 contact form using SecureImage Captcha.
- Bootstrap 3 version >3.1
- PHP (version > 5.2.0) installed on your server Must have gd library enabled
- SecureImage Captcha Captcha (included in library/vender/securimage/**)
- jQuery
- The HTML for the contact form, which can be extracted from index.html
- Optional International Telephone Input (included in assets/vender/intl-tel-input/**)- This is used to validate and format the phone input field. Only need this if the phone field is present.
The Optional Fields of Title, Company and Website are commented out in index.html; to add these simply uncomment the the code in index.html and uncomment the corresponding values in $fields_req in sendmail.php. To add or remove additional fields from the contact form:
- Add or remove the HTML element from the form (the form-group)
- When adding, if the field is optional, then add the class
.optional
to the input within the form group
- Add or remove an entry from the
$fields_req
array (map) in sendmail.php (if the field is required the map entry's value must be true, otherwise false)
- Required Change the MY_EMAIL constant in library/sendmail.php to the email address you want the contant form data to get submitted to. You can also change the email subject by editing EMAIL_SUBJECT.
- By default required field inputs are appended with an asterisk. If you want to remove this feature, add the class
.no-asterisk
to the required input of the form group.
Demo: http://jonbake.com/demos/contact-form/
Blog Post: http://jonbake.com/blog/?p=115