Conditional Fields for Contact Form 7 - Version 2.0.4

Version Description

(2021-07-19) = * Fix issue with required file fields * Fully tested with Contact Form 7 version 5.4.2

Download this release

Release Info

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

Code changes from version 2.0.3 to 2.0.4

cf7cf.php CHANGED
@@ -170,13 +170,7 @@ class CF7CF {
170
  } else {
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
  }
170
  } else {
171
  foreach ($invalid_fields as $invalid_field_key => $invalid_field_data) {
172
  if (!in_array($invalid_field_key, $this->hidden_fields)) {
173
+ $return_result->invalidate($invalid_field_key, $invalid_field_data['reason']);
 
 
 
 
 
 
174
  }
175
  }
176
  }
contact-form-7-conditional-fields.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
  /**
3
- * Plugin Name: Contact Form 7 Conditional Fields
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.3
8
  * Author URI: http://bdwm.be/
9
  * Text Domain: cf7-conditional-fields
10
  * License: GPL v2 or later
@@ -37,7 +37,7 @@ if ( function_exists( 'wpcf7cf_pro_deactivate_free_version_notice' ) ) {
37
  <div class="notice notice-error is-dismissible">
38
  <p><?php
39
  // translators: 1. <a>, 2. </a>
40
- printf( __( '<strong>Contact Form 7 - Conditional Fields</strong> needs to %1$sdeactivate the free plugin%1$s', 'cf7-conditional-fields' ), '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=cf7-conditional-fields%2Fcontact-form-7-conditional-fields.php&amp;plugin_status=all&amp;paged=1&amp;s=', 'deactivate-plugin_cf7-conditional-fields/contact-form-7-conditional-fields.php' ) . '">', '</a>' );
41
  ?></p>
42
  </div>
43
  <?php
1
  <?php
2
  /**
3
+ * Plugin Name: Conditional Fields for Contact Form 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.4
8
  * Author URI: http://bdwm.be/
9
  * Text Domain: cf7-conditional-fields
10
  * License: GPL v2 or later
37
  <div class="notice notice-error is-dismissible">
38
  <p><?php
39
  // translators: 1. <a>, 2. </a>
40
+ printf( __( '<strong>Conditional Fields for Contact Form 7</strong> needs to %1$sdeactivate the free plugin%1$s', 'cf7-conditional-fields' ), '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=cf7-conditional-fields%2Fcontact-form-7-conditional-fields.php&amp;plugin_status=all&amp;paged=1&amp;s=', 'deactivate-plugin_cf7-conditional-fields/contact-form-7-conditional-fields.php' ) . '">', '</a>' );
41
  ?></p>
42
  </div>
43
  <?php
init.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
 
3
- if (!defined('WPCF7CF_VERSION')) define( 'WPCF7CF_VERSION', '2.0.3' );
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.1' );
6
  if (!defined('WPCF7CF_REQUIRED_WP_VERSION')) define( 'WPCF7CF_REQUIRED_WP_VERSION', '4.1' );
7
  if (!defined('WPCF7CF_PLUGIN')) define( 'WPCF7CF_PLUGIN', __FILE__ );
8
  if (!defined('WPCF7CF_PLUGIN_BASENAME')) define( 'WPCF7CF_PLUGIN_BASENAME', plugin_basename( WPCF7CF_PLUGIN ) );
1
  <?php
2
 
3
+ if (!defined('WPCF7CF_VERSION')) define( 'WPCF7CF_VERSION', '2.0.4' );
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.2' );
6
  if (!defined('WPCF7CF_REQUIRED_WP_VERSION')) define( 'WPCF7CF_REQUIRED_WP_VERSION', '4.1' );
7
  if (!defined('WPCF7CF_PLUGIN')) define( 'WPCF7CF_PLUGIN', __FILE__ );
8
  if (!defined('WPCF7CF_PLUGIN_BASENAME')) define( 'WPCF7CF_PLUGIN_BASENAME', plugin_basename( WPCF7CF_PLUGIN ) );
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 Sun May 02 2021 15:00:47 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 Jul 20 2021 23:14:19 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 Sun May 02 2021 15:00:47 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 Jul 20 2021 23:14:19 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 Sun May 02 2021 15:00:47 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 Jul 20 2021 23:14:19 GMT+0200 (Midden-Europese zomertijd)
1363
  </footer>
1364
 
1365
  <script> prettyPrint(); </script>
readme.txt CHANGED
@@ -1,12 +1,12 @@
1
- === Contact Form 7 - Conditional Fields ===
2
  Contributors: Jules Colle
3
  Donate link: https://shop.bdwm.be/contact-form-7-conditional-fields-pro/
4
  Author: Jules Colle
5
  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.1
9
- Stable tag: 2.0.3
10
  Requires PHP: 7.0
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -71,7 +71,7 @@ Pro features include:
71
  * Custom conditions with JavaScript functions
72
  * Additional operators ( greater than, less than, .. )
73
 
74
- [Get Conditional Fields PRO!](https://conditional-fields-cf7.bdwm.be/contact-form-7-conditional-fields-pro/)
75
 
76
  == Installation ==
77
 
@@ -123,6 +123,10 @@ Make sure to also update CF7 to the latest version! (Version 2.0 is only compati
123
 
124
  == Changelog ==
125
 
 
 
 
 
126
  = 2.0.3 (2021-05-02) =
127
  * Fully tested with Contact Form 7 version 5.4.1
128
  * (dev note: fixed automated tests)
1
+ === Conditional Fields for Contact Form 7 ===
2
  Contributors: Jules Colle
3
  Donate link: https://shop.bdwm.be/contact-form-7-conditional-fields-pro/
4
  Author: Jules Colle
5
  Website: http://bdwm.be
6
  Tags: wordpress, contact form 7, forms, conditional fields
7
  Requires at least: 5.0
8
+ Tested up to: 5.8
9
+ Stable tag: 2.0.4
10
  Requires PHP: 7.0
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
71
  * Custom conditions with JavaScript functions
72
  * Additional operators ( greater than, less than, .. )
73
 
74
+ [Get the PRO version of Conditional Fields for Contact Form 7!](https://conditional-fields-cf7.bdwm.be/contact-form-7-conditional-fields-pro/)
75
 
76
  == Installation ==
77
 
123
 
124
  == Changelog ==
125
 
126
+ = 2.0.4 (2021-07-19) =
127
+ * Fix issue with required file fields
128
+ * Fully tested with Contact Form 7 version 5.4.2
129
+
130
  = 2.0.3 (2021-05-02) =
131
  * Fully tested with Contact Form 7 version 5.4.1
132
  * (dev note: fixed automated tests)
wpcf7cf-options.php CHANGED
@@ -85,11 +85,11 @@ function wpcf7cf_options_page() {
85
  ?>
86
 
87
  <div class="wrap wpcf7cf-admin-wrap">
88
- <h2><?php _e( 'Contact Form 7 - Conditional Fields Settings', 'cf7-conditional-fields'); ?></h2>
89
  <?php if (!$settings['notice_dismissed']) { ?>
90
  <div class="wpcf7cf-admin-notice notice notice-warning is-dismissible" data-notice-id="">
91
  <div style="padding: 10px 0;">
92
- <?php _e( '<strong>Notice</strong>: These are global settings for Contact Form 7 - Conditional Fields.', 'cf7-conditional-fields'); ?>
93
  <br><br>
94
  <strong><?php _e( 'How to create/edit conditional fields?', 'cf7-conditional-fields'); ?></strong>
95
  <ol>
@@ -133,8 +133,8 @@ function wpcf7cf_options_page() {
133
 
134
  if (!WPCF7CF_IS_PRO) {
135
  ?>
136
- <h3><?php _e( 'Conditional Fields PRO', 'cf7-conditional-fields'); ?></h3>
137
- <?php _e( 'Get Conditional Fields PRO to unlock the full potential of CF7', 'cf7-conditional-fields'); ?>
138
  <ul class="wpcf7cf-list">
139
  <li><?php _e( 'Repeaters', 'cf7-conditional-fields'); ?></li>
140
  <li><?php _e( 'Regular expressions', 'cf7-conditional-fields'); ?></li>
85
  ?>
86
 
87
  <div class="wrap wpcf7cf-admin-wrap">
88
+ <h2><?php _e( 'Conditional Fields for Contact Form 7 Settings', 'cf7-conditional-fields'); ?></h2>
89
  <?php if (!$settings['notice_dismissed']) { ?>
90
  <div class="wpcf7cf-admin-notice notice notice-warning is-dismissible" data-notice-id="">
91
  <div style="padding: 10px 0;">
92
+ <?php _e( '<strong>Notice</strong>: These are global settings for Conditional Fields for Contact Form 7.', 'cf7-conditional-fields'); ?>
93
  <br><br>
94
  <strong><?php _e( 'How to create/edit conditional fields?', 'cf7-conditional-fields'); ?></strong>
95
  <ol>
133
 
134
  if (!WPCF7CF_IS_PRO) {
135
  ?>
136
+ <h3><?php _e( 'Conditional Fields PRO', 'cf7-conditional-fields'); ?></h3>
137
+ <?php _e( 'Get Conditional Fields PRO to unlock the full potential of CF7', 'cf7-conditional-fields'); ?>
138
  <ul class="wpcf7cf-list">
139
  <li><?php _e( 'Repeaters', 'cf7-conditional-fields'); ?></li>
140
  <li><?php _e( 'Regular expressions', 'cf7-conditional-fields'); ?></li>