Conditional Fields for Contact Form 7 - Version 2.0.2

Version Description

(2021-04-06) = * Fix bug: third-party required fields not triggering validation. Thanks @dedotombo!

Download this release

Release Info

Developer Jules Colle
Plugin Icon 128x128 Conditional Fields for Contact Form 7
Version 2.0.2
Comparing to
See all releases

Code changes from version 2.0.1 to 2.0.2

cf7cf.php CHANGED
@@ -171,7 +171,12 @@ class CF7CF {
171
  foreach ($invalid_fields as $invalid_field_key => $invalid_field_data) {
172
  if (!in_array($invalid_field_key, $this->hidden_fields)) {
173
  // the invalid field is not a hidden field, so we'll add it to the final validation result
174
- $return_result->invalidate($invalid_field_key, $invalid_field_data['reason']);
 
 
 
 
 
175
  }
176
  }
177
  }
171
  foreach ($invalid_fields as $invalid_field_key => $invalid_field_data) {
172
  if (!in_array($invalid_field_key, $this->hidden_fields)) {
173
  // the invalid field is not a hidden field, so we'll add it to the final validation result
174
+ //$return_result->invalidate($invalid_field_key, $invalid_field_data['reason']);
175
+ foreach ($tags as $tag) {
176
+ if ($tag->name === $invalid_field_key) {
177
+ $return_result->invalidate($tag, $invalid_field_data['reason']);
178
+ }
179
+ }
180
  }
181
  }
182
  }
contact-form-7-conditional-fields.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: http://bdwm.be/
5
  * Description: Adds support for conditional fields to Contact Form 7. This plugin depends on Contact Form 7.
6
  * Author: Jules Colle
7
- * Version: 2.0.1
8
  * Author URI: http://bdwm.be/
9
  * Text Domain: cf7-conditional-fields
10
  * License: GPL v2 or later
4
  * Plugin URI: http://bdwm.be/
5
  * Description: Adds support for conditional fields to Contact Form 7. This plugin depends on Contact Form 7.
6
  * Author: Jules Colle
7
+ * Version: 2.0.2
8
  * Author URI: http://bdwm.be/
9
  * Text Domain: cf7-conditional-fields
10
  * License: GPL v2 or later
init.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- if (!defined('WPCF7CF_VERSION')) define( 'WPCF7CF_VERSION', '2.0.1' );
4
  if (!defined('WPCF7CF_CF7_MIN_VERSION')) define( 'WPCF7CF_CF7_MIN_VERSION', '5.4' );
5
  if (!defined('WPCF7CF_CF7_MAX_VERSION')) define( 'WPCF7CF_CF7_MAX_VERSION', '5.4' );
6
  if (!defined('WPCF7CF_REQUIRED_WP_VERSION')) define( 'WPCF7CF_REQUIRED_WP_VERSION', '4.1' );
1
  <?php
2
 
3
+ if (!defined('WPCF7CF_VERSION')) define( 'WPCF7CF_VERSION', '2.0.2' );
4
  if (!defined('WPCF7CF_CF7_MIN_VERSION')) define( 'WPCF7CF_CF7_MIN_VERSION', '5.4' );
5
  if (!defined('WPCF7CF_CF7_MAX_VERSION')) define( 'WPCF7CF_CF7_MAX_VERSION', '5.4' );
6
  if (!defined('WPCF7CF_REQUIRED_WP_VERSION')) define( 'WPCF7CF_REQUIRED_WP_VERSION', '4.1' );
jsdoc-out/index.html CHANGED
@@ -56,7 +56,7 @@
56
  <br class="clear">
57
 
58
  <footer>
59
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Mar 31 2021 21:21:36 GMT+0200 (Midden-Europese zomertijd)
60
  </footer>
61
 
62
  <script> prettyPrint(); </script>
56
  <br class="clear">
57
 
58
  <footer>
59
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Tue Apr 06 2021 16:20:27 GMT+0200 (Midden-Europese zomertijd)
60
  </footer>
61
 
62
  <script> prettyPrint(); </script>
jsdoc-out/scripts_es6.js.html CHANGED
@@ -1571,7 +1571,7 @@ jQuery.fn.wpcf7ExclusiveCheckbox = function() {
1571
  <br class="clear">
1572
 
1573
  <footer>
1574
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Mar 31 2021 21:21:36 GMT+0200 (Midden-Europese zomertijd)
1575
  </footer>
1576
 
1577
  <script> prettyPrint(); </script>
1571
  <br class="clear">
1572
 
1573
  <footer>
1574
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Tue Apr 06 2021 16:20:27 GMT+0200 (Midden-Europese zomertijd)
1575
  </footer>
1576
 
1577
  <script> prettyPrint(); </script>
jsdoc-out/wpcf7cf.html CHANGED
@@ -1359,7 +1359,7 @@ Subs are either appended to or removed from the end of the repeater.</p>
1359
  <br class="clear">
1360
 
1361
  <footer>
1362
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Mar 31 2021 21:21:36 GMT+0200 (Midden-Europese zomertijd)
1363
  </footer>
1364
 
1365
  <script> prettyPrint(); </script>
1359
  <br class="clear">
1360
 
1361
  <footer>
1362
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Tue Apr 06 2021 16:20:27 GMT+0200 (Midden-Europese zomertijd)
1363
  </footer>
1364
 
1365
  <script> prettyPrint(); </script>
readme.txt CHANGED
@@ -6,7 +6,7 @@ Website: http://bdwm.be
6
  Tags: wordpress, contact form 7, forms, conditional fields
7
  Requires at least: 5.0
8
  Tested up to: 5.7
9
- Stable tag: 2.0.1
10
  Requires PHP: 7.0
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -123,6 +123,9 @@ Make sure to also update CF7 to the latest version! (Version 2.0 is only compati
123
 
124
  == Changelog ==
125
 
 
 
 
126
  = 2.0.1 (2021-03-31) =
127
  * Force height:auto on groups. (Fixes regression errors with groups inside repeaters)
128
  * Allow more funky characters as conditional fields values (there was a problem with less than sign <)
6
  Tags: wordpress, contact form 7, forms, conditional fields
7
  Requires at least: 5.0
8
  Tested up to: 5.7
9
+ Stable tag: 2.0.2
10
  Requires PHP: 7.0
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
123
 
124
  == Changelog ==
125
 
126
+ = 2.0.2 (2021-04-06) =
127
+ * Fix bug: third-party required fields not triggering validation. Thanks [@dedotombo](https://wordpress.org/support/topic/bugfix-skip_validation_for_hidden_fields-issue/)!
128
+
129
  = 2.0.1 (2021-03-31) =
130
  * Force height:auto on groups. (Fixes regression errors with groups inside repeaters)
131
  * Allow more funky characters as conditional fields values (there was a problem with less than sign <)