Contact Form Clean and Simple - Version 4.0.8

Version Description

  • Fixed a bug: When using reCAPTCHA ajax did not work.
  • Fixed a bug: Ajax validation was not checking email address were equal (server side was doing it instead)
  • Improvement: Ajax now works better.
  • Documentation update: nicer links (worked how to do them in markdown!), changelog and upgrade notice sections now correctly formatted.
Download this release

Release Info

Developer megnicholas
Plugin Icon wp plugin Contact Form Clean and Simple
Version 4.0.8
Comparing to
See all releases

Code changes from version 4.0.7 to 4.0.8

clean-and-simple-contact-form-by-meg-nicholas.php CHANGED
@@ -5,11 +5,11 @@
5
 
6
  /*
7
  Plugin Name: Clean and Simple Contact Form
8
- Plugin URI: http://megnicholas.co.uk/wordpress-plugins/clean-and-simple-contact-form
9
  Description: A clean and simple contact form with Google reCAPTCHA and Twitter Bootstrap markup.
10
- Version: 4.0.7
11
  Author: Meghan Nicholas
12
- Author URI: http://megnicholas.co.uk
13
  License: GPLv2 or later
14
  */
15
 
@@ -51,7 +51,7 @@ if (!defined('CFF_PLUGIN_URL')) define('CFF_PLUGIN_URL', WP_PLUGIN_URL . '/' . C
51
 
52
  if (!defined('CFF_VERSION_KEY')) define('CFF_VERSION_KEY', 'cff_version');
53
 
54
- if (!defined('CFF_VERSION_NUM')) define('CFF_VERSION_NUM', '4.0.7');
55
 
56
  if (!defined('CFF_OPTIONS_KEY')) define('CFF_OPTIONS_KEY', 'cff_options');
57
 
5
 
6
  /*
7
  Plugin Name: Clean and Simple Contact Form
8
+ Plugin URI: http://www.megnicholas.co.uk/wordpress-plugins/clean-and-simple-contact-form
9
  Description: A clean and simple contact form with Google reCAPTCHA and Twitter Bootstrap markup.
10
+ Version: 4.0.8
11
  Author: Meghan Nicholas
12
+ Author URI: http://www.megnicholas.co.uk
13
  License: GPLv2 or later
14
  */
15
 
51
 
52
  if (!defined('CFF_VERSION_KEY')) define('CFF_VERSION_KEY', 'cff_version');
53
 
54
+ if (!defined('CFF_VERSION_NUM')) define('CFF_VERSION_NUM', '4.0.8');
55
 
56
  if (!defined('CFF_OPTIONS_KEY')) define('CFF_OPTIONS_KEY', 'cff_options');
57
 
js/jquery.validate.contact.form.js CHANGED
@@ -3,6 +3,12 @@
3
  * Licence GPL2 */
4
 
5
  jQuery(document).ready(function($) {
 
 
 
 
 
 
6
 
7
  $('#frmContact').validate({
8
 
@@ -19,5 +25,5 @@ jQuery(document).ready(function($) {
19
 
20
 
21
  });
22
-
23
  });
3
  * Licence GPL2 */
4
 
5
  jQuery(document).ready(function($) {
6
+
7
+ $('#frmContact').submit(function() {
8
+ return $('#frmContact').valid();
9
+ //alert('here');
10
+ });
11
+
12
 
13
  $('#frmContact').validate({
14
 
25
 
26
 
27
  });
28
+
29
  });
readme.txt CHANGED
@@ -6,7 +6,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
6
  Tags: simple, contact, form, bootstrap, twitter, google, reCAPTCHA, ajax, secure
7
  Requires at least: 3.3
8
  Tested up to: 3.5
9
- Stable tag: 4.0.7
10
 
11
  A clean and simple contact form with Google reCAPTCHA and Twitter Bootstrap markup.
12
 
@@ -50,7 +50,8 @@ Here’s why:
50
 
51
  * Written by an **experienced PHP programmer** and rigorously tested as standard practice.
52
 
53
- Hopefully this plugin will fulfil all your needs, if not get in-touch http://megnicholas.co.uk/contact-me and I will customise to your exact requirements.
 
54
 
55
  == Installation ==
56
  There are two ways to install:
@@ -85,7 +86,7 @@ Here is a list of things that you can change
85
 
86
  * **Use client side validation (Ajax)**: When ticked the contact form will be validated on the client giving your user instant feedback if they have filled the form in incorrectly. If you wish the form to be validated only on the server then untick this option.
87
 
88
- * **Use reCAPTCHA**: Tick this option if you wish your form to have a reCAPTCHA box. ReCAPTCHA helps to avoid spam bots using your form by checking that the form filler is actually a real person. To use reCAPTCHA you will need to get a some special keys from google. Once you have your keys enter them into the Public key and Private key boxes
89
 
90
  * **reCAPTCHA Public Key**: Enter the public key that you obtained from here.
91
 
@@ -100,17 +101,25 @@ Here is a list of things that you can change
100
  4. Contact Form Options Screen
101
 
102
  == Demo ==
103
- This is a demonstration of this plugin working on the default Twenty Twelve theme.
104
- [Clean and Simple Contact Form Demonstration] (http://demo.megnicholas.co.uk/wordpress-clean-and-simple-contact-form Plugin Demonstration)
105
 
106
  == Frequently Asked Questions ==
107
  A clean and simple contact form with Google reCAPTCHA and Twitter Bootstrap markup.
108
 
109
  == Changelog ==
110
- Version 4.07
111
- 1: Fixed a bug: Plugin name is actually clean-and-simple-contact-form-by-meg-nicholas now (not contact-form) but this new name needed to be updated in the plugin settings definitions. I also needed to rename contact-form.php to clean-and-simple-contact-form-by-meg-nicholas.php. My thanks to Jakub for finding this bug.
112
- 2: If your webpage is ssl then recaptcha will now also use ssl mode.
 
 
 
 
 
113
 
114
 
115
  == Upgrade Notice ==
116
- Fixed a bug which occurred when plugin name was changed. Recaptcha will now use ssl if your webpage is ssl.
 
 
 
6
  Tags: simple, contact, form, bootstrap, twitter, google, reCAPTCHA, ajax, secure
7
  Requires at least: 3.3
8
  Tested up to: 3.5
9
+ Stable tag: 4.0.8
10
 
11
  A clean and simple contact form with Google reCAPTCHA and Twitter Bootstrap markup.
12
 
50
 
51
  * Written by an **experienced PHP programmer** and rigorously tested as standard practice.
52
 
53
+ Hopefully this plugin will fulfil all your needs, if not [get in-touch](http://www.megnicholas.co.uk/contact-me "Get In Touch") and I will customise to your exact requirements.
54
+
55
 
56
  == Installation ==
57
  There are two ways to install:
86
 
87
  * **Use client side validation (Ajax)**: When ticked the contact form will be validated on the client giving your user instant feedback if they have filled the form in incorrectly. If you wish the form to be validated only on the server then untick this option.
88
 
89
+ * **Use reCAPTCHA**: Tick this option if you wish your form to have a reCAPTCHA box. ReCAPTCHA helps to avoid spam bots using your form by checking that the form filler is actually a real person. To use reCAPTCHA you will need to get a some special keys from google https://www.google.com/recaptcha/admin/create. Once you have your keys enter them into the Public key and Private key boxes
90
 
91
  * **reCAPTCHA Public Key**: Enter the public key that you obtained from here.
92
 
101
  4. Contact Form Options Screen
102
 
103
  == Demo ==
104
+ This is a demonstration of this plugin working on the default Twenty Twelve theme ->
105
+ [Clean and Simple Contact Form Demonstration](http://demo.megnicholas.co.uk/wordpress-clean-and-simple-contact-form "Plugin Demonstration")
106
 
107
  == Frequently Asked Questions ==
108
  A clean and simple contact form with Google reCAPTCHA and Twitter Bootstrap markup.
109
 
110
  == Changelog ==
111
+ = 4.0.8 =
112
+ * Fixed a bug: When using reCAPTCHA ajax did not work.
113
+ * Fixed a bug: Ajax validation was not checking email address were equal (server side was doing it instead)
114
+ * Improvement: Ajax now works better.
115
+ * Documentation update: nicer links (worked how to do them in markdown!), changelog and upgrade notice sections now correctly formatted.
116
+ = 4.0.7 =
117
+ * Fixed a bug: Plugin name is actually clean-and-simple-contact-form-by-meg-nicholas now (not contact-form) but this new name needed to be updated in the plugin settings definitions. I also needed to rename contact-form.php to clean-and-simple-contact-form-by-meg-nicholas.php. My thanks to Jakub for finding this bug.
118
+ * If your webpage is ssl then reCAPTCHA will now also use ssl mode.
119
 
120
 
121
  == Upgrade Notice ==
122
+ = 4.0.8 =
123
+ Ajax now works when your form has reCAPTCHA on it. Ajax validation is now cleaner.
124
+ = 4.0.7 =
125
+ Fixed a bug which occurred when plugin name was changed. reCAPTCHA will now use ssl if your webpage is ssl.
views/contact-form-with-recaptcha.view.php CHANGED
@@ -7,7 +7,7 @@
7
 
8
  <p><?php echo $message; ?></p>
9
 
10
- <form id="contact-form" name="frmContact" method="post">
11
 
12
  <?php wp_nonce_field('cff_contact','cff_nonce'); ?>
13
 
@@ -19,13 +19,13 @@
19
  </div>
20
 
21
 
22
- <!--email address -->
23
  <div class="control-group<?php
24
  if (isset($contact->Errors['Email'])) echo ' error'; ?>">
25
  <label class="control-label" for="cf-Email">Email Address:</label>
26
  <div class="controls">
27
  <input class="input-xlarge {email:true, required:true, messages:{required:'Please give your email address.',email:'Please enter a valid email address.'}}" type="text" id="cf-Email" name="cf-Email" value="<?php echo $contact->Email; ?>" placeholder="Your Email Address">
28
- <span class="help-inline"><?php echo $contact->Errors['Email']; ?></span>
29
  </div>
30
  </div>
31
 
@@ -34,8 +34,8 @@
34
  if (isset($contact->Errors['Confirm-Email'])) echo ' error'; ?>">
35
  <label class="control-label" for="cfconfirm-email">Confirm Email Address:</label>
36
  <div class="controls">
37
- <input class="input-xlarge {email:true, required:true, equalTo:cfemail, messages:{equalTo:'Please repeat the email address above.', required:'Please give your email address.',email:'Please enter a valid email address.'}}" type="text" id="cfconfirm-email" name="cfconfirm-email" value="<?php echo $contact->ConfirmEmail; ?>" placeholder="Confirm Your Email Address">
38
- <span class="help-inline"><?php echo $contact->Errors['Confirm-Email']; ?></span>
39
  </div>
40
  </div>
41
 
@@ -45,7 +45,7 @@
45
  <label class="control-label" for="cf-Name">Name:</label>
46
  <div class="controls">
47
  <input class="input-xlarge {required:true, messages:{required:'Please give your name.'}}" type="text" id="cf-Name" name="cf-Name" value="<?php echo $contact->Name; ?>" placeholder="Your Name">
48
- <span class="help-inline"><?php echo $contact->Errors['Name']; ?></span>
49
  </div>
50
  </div>
51
 
@@ -55,10 +55,11 @@
55
  <label class="control-label" for="cf-Message">Message:</label>
56
  <div class="controls">
57
  <textarea class="input-xlarge {required:true, messages:{required:'Please give a message.'}}" id="cf-Message" name="cf-Message" rows="10" placeholder="Your Message"><?php echo $contact->Message; ?></textarea>
58
- <span class="help-inline"><?php echo $contact->Errors['Message']; ?></span>
59
  </div>
60
  </div>
61
-
 
62
  <div class="control-group<?php
63
  if (isset($contact->Errors['recaptcha'])) echo ' error'; ?>">
64
  <div id="recaptcha_div" class="controls">
7
 
8
  <p><?php echo $message; ?></p>
9
 
10
+ <form id="frmContact" name="frmContact" method="post">
11
 
12
  <?php wp_nonce_field('cff_contact','cff_nonce'); ?>
13
 
19
  </div>
20
 
21
 
22
+ <!--email address -->
23
  <div class="control-group<?php
24
  if (isset($contact->Errors['Email'])) echo ' error'; ?>">
25
  <label class="control-label" for="cf-Email">Email Address:</label>
26
  <div class="controls">
27
  <input class="input-xlarge {email:true, required:true, messages:{required:'Please give your email address.',email:'Please enter a valid email address.'}}" type="text" id="cf-Email" name="cf-Email" value="<?php echo $contact->Email; ?>" placeholder="Your Email Address">
28
+ <span for="cf-Email" generated="true" class="help-inline" style=""><?php if (isset($contact->Errors['Email'])) echo $contact->Errors['Email']; ?></span>
29
  </div>
30
  </div>
31
 
34
  if (isset($contact->Errors['Confirm-Email'])) echo ' error'; ?>">
35
  <label class="control-label" for="cfconfirm-email">Confirm Email Address:</label>
36
  <div class="controls">
37
+ <input class="input-xlarge {email:true, equalTo:'#cf-Email', messages:{equalTo:'Please enter the same email address again.'}}" type="text" id="cfconfirm-email" name="cfconfirm-email" value="<?php echo $contact->ConfirmEmail; ?>" placeholder="Confirm Your Email Address">
38
+ <span for="cfconfirm-email" generated="true" class="help-inline" style=""><?php if (isset($contact->Errors['Confirm-Email'])) echo $contact->Errors['Confirm-Email']; ?></span>
39
  </div>
40
  </div>
41
 
45
  <label class="control-label" for="cf-Name">Name:</label>
46
  <div class="controls">
47
  <input class="input-xlarge {required:true, messages:{required:'Please give your name.'}}" type="text" id="cf-Name" name="cf-Name" value="<?php echo $contact->Name; ?>" placeholder="Your Name">
48
+ <span for="cf-Name" generated="true" class="help-inline" style=""><?php if (isset($contact->Errors['Name'])) echo $contact->Errors['Name']; ?></span>
49
  </div>
50
  </div>
51
 
55
  <label class="control-label" for="cf-Message">Message:</label>
56
  <div class="controls">
57
  <textarea class="input-xlarge {required:true, messages:{required:'Please give a message.'}}" id="cf-Message" name="cf-Message" rows="10" placeholder="Your Message"><?php echo $contact->Message; ?></textarea>
58
+ <span for="cf-Message" generated="true" class="help-inline" style=""><?php if (isset($contact->Errors['Message'])) echo $contact->Errors['Message']; ?></span>
59
  </div>
60
  </div>
61
+
62
+
63
  <div class="control-group<?php
64
  if (isset($contact->Errors['recaptcha'])) echo ' error'; ?>">
65
  <div id="recaptcha_div" class="controls">
views/contact-form.view.php CHANGED
@@ -12,7 +12,7 @@
12
  <label class="control-label" for="cf-Email">Email Address:</label>
13
  <div class="controls">
14
  <input class="input-xlarge {email:true, required:true, messages:{required:'Please give your email address.',email:'Please enter a valid email address.'}}" type="text" id="cf-Email" name="cf-Email" value="<?php echo $contact->Email; ?>" placeholder="Your Email Address">
15
- <span class="help-inline"><?php if (isset($contact->Errors['Email'])) echo $contact->Errors['Email']; ?></span>
16
  </div>
17
  </div>
18
 
@@ -21,8 +21,8 @@
21
  if (isset($contact->Errors['Confirm-Email'])) echo ' error'; ?>">
22
  <label class="control-label" for="cfconfirm-email">Confirm Email Address:</label>
23
  <div class="controls">
24
- <input class="input-xlarge {email:true, required:true, equalTo:cfemail, messages:{equalTo:'Please repeat the email address above.', required:'Please give your email address.',email:'Please enter a valid email address.'}}" type="text" id="cfconfirm-email" name="cfconfirm-email" value="<?php echo $contact->ConfirmEmail; ?>" placeholder="Confirm Your Email Address">
25
- <span class="help-inline"><?php if (isset($contact->Errors['Confirm-Email'])) echo $contact->Errors['Confirm-Email']; ?></span>
26
  </div>
27
  </div>
28
 
@@ -32,7 +32,7 @@
32
  <label class="control-label" for="cf-Name">Name:</label>
33
  <div class="controls">
34
  <input class="input-xlarge {required:true, messages:{required:'Please give your name.'}}" type="text" id="cf-Name" name="cf-Name" value="<?php echo $contact->Name; ?>" placeholder="Your Name">
35
- <span class="help-inline"><?php if (isset($contact->Errors['Name'])) echo $contact->Errors['Name']; ?></span>
36
  </div>
37
  </div>
38
 
@@ -42,7 +42,7 @@
42
  <label class="control-label" for="cf-Message">Message:</label>
43
  <div class="controls">
44
  <textarea class="input-xlarge {required:true, messages:{required:'Please give a message.'}}" id="cf-Message" name="cf-Message" rows="10" placeholder="Your Message"><?php echo $contact->Message; ?></textarea>
45
- <span class="help-inline"><?php if (isset($contact->Errors['Message'])) echo $contact->Errors['Message']; ?></span>
46
  </div>
47
  </div>
48
 
12
  <label class="control-label" for="cf-Email">Email Address:</label>
13
  <div class="controls">
14
  <input class="input-xlarge {email:true, required:true, messages:{required:'Please give your email address.',email:'Please enter a valid email address.'}}" type="text" id="cf-Email" name="cf-Email" value="<?php echo $contact->Email; ?>" placeholder="Your Email Address">
15
+ <span for="cf-Email" generated="true" class="help-inline" style=""><?php if (isset($contact->Errors['Email'])) echo $contact->Errors['Email']; ?></span>
16
  </div>
17
  </div>
18
 
21
  if (isset($contact->Errors['Confirm-Email'])) echo ' error'; ?>">
22
  <label class="control-label" for="cfconfirm-email">Confirm Email Address:</label>
23
  <div class="controls">
24
+ <input class="input-xlarge {email:true, equalTo:'#cf-Email', messages:{equalTo:'Please enter the same email address again.'}}" type="text" id="cfconfirm-email" name="cfconfirm-email" value="<?php echo $contact->ConfirmEmail; ?>" placeholder="Confirm Your Email Address">
25
+ <span for="cfconfirm-email" generated="true" class="help-inline" style=""><?php if (isset($contact->Errors['Confirm-Email'])) echo $contact->Errors['Confirm-Email']; ?></span>
26
  </div>
27
  </div>
28
 
32
  <label class="control-label" for="cf-Name">Name:</label>
33
  <div class="controls">
34
  <input class="input-xlarge {required:true, messages:{required:'Please give your name.'}}" type="text" id="cf-Name" name="cf-Name" value="<?php echo $contact->Name; ?>" placeholder="Your Name">
35
+ <span for="cf-Name" generated="true" class="help-inline" style=""><?php if (isset($contact->Errors['Name'])) echo $contact->Errors['Name']; ?></span>
36
  </div>
37
  </div>
38
 
42
  <label class="control-label" for="cf-Message">Message:</label>
43
  <div class="controls">
44
  <textarea class="input-xlarge {required:true, messages:{required:'Please give a message.'}}" id="cf-Message" name="cf-Message" rows="10" placeholder="Your Message"><?php echo $contact->Message; ?></textarea>
45
+ <span for="cf-Message" generated="true" class="help-inline" style=""><?php if (isset($contact->Errors['Message'])) echo $contact->Errors['Message']; ?></span>
46
  </div>
47
  </div>
48