Contact Form 7 Multi-Step Forms - Version 1.4.1

Version Description

Fixed bug where tapping the Submit button on the final step submits form even with validation errors.

Download this release

Release Info

Developer webheadllc
Plugin Icon 128x128 Contact Form 7 Multi-Step Forms
Version 1.4.1
Comparing to
See all releases

Code changes from version 1.4 to 1.4.1

Files changed (2) hide show
  1. contact-form-7-multi-step-module.php +11 -17
  2. readme.txt +5 -2
contact-form-7-multi-step-module.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.mymonkeydo.com/contact-form-7-multi-step-module/
5
  Description: Enables the Contact Form 7 plugin to create multi-page, multi-step forms.
6
  Author: Webhead LLC.
7
  Author URI: http://webheadcoder.com
8
- Version: 1.4
9
  */
10
  /* Copyright 2012 Webhead LLC (email: info at webheadcoder.com)
11
 
@@ -63,20 +63,6 @@ function cf7msm_init_sessions() {
63
  }
64
  add_action('init', 'cf7msm_init_sessions');
65
 
66
- /**
67
- * Add the right hooks for the right version of cf7.
68
- */
69
- function cf7msm_init() {
70
- /*
71
- if ( class_exists( 'WPCF7_Submission' ) ) {
72
- add_filter( 'wpcf7_posted_data', 'cf7msm_store_data_steps_filter', 9 );
73
- }
74
- else {
75
- add_action( 'wpcf7_before_send_mail', 'cf7msm_store_data_steps', 9 );
76
- }
77
- */
78
- }
79
- add_action( 'init', 'cf7msm_init' );
80
 
81
  /**
82
  * Add scripts to be able to go back to a previous step.
@@ -230,14 +216,22 @@ function cf7msm_store_data_steps_filter( $cf7_posted_data ) {
230
  }
231
  else {
232
  $cf7_posted_data = array_merge($prev_data, $cf7_posted_data);
233
- cf7msm_remove('step');
234
- cf7msm_remove('cf7msm_posted_data');
235
  }
236
  }
237
  return $cf7_posted_data;
238
  }
239
  add_filter( 'wpcf7_posted_data', 'cf7msm_store_data_steps_filter', 9 );
240
 
 
 
 
 
 
 
 
 
 
 
241
  /**
242
  * Handle a multi-step cf7 form for cf7 < 3.9
243
  */
5
  Description: Enables the Contact Form 7 plugin to create multi-page, multi-step forms.
6
  Author: Webhead LLC.
7
  Author URI: http://webheadcoder.com
8
+ Version: 1.4.1
9
  */
10
  /* Copyright 2012 Webhead LLC (email: info at webheadcoder.com)
11
 
63
  }
64
  add_action('init', 'cf7msm_init_sessions');
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
 
67
  /**
68
  * Add scripts to be able to go back to a previous step.
216
  }
217
  else {
218
  $cf7_posted_data = array_merge($prev_data, $cf7_posted_data);
 
 
219
  }
220
  }
221
  return $cf7_posted_data;
222
  }
223
  add_filter( 'wpcf7_posted_data', 'cf7msm_store_data_steps_filter', 9 );
224
 
225
+ /**
226
+ * Clean things up after mail has been sent.
227
+ */
228
+ function cf7msm_mail_sent() {
229
+ cf7msm_remove('step');
230
+ cf7msm_remove('cf7msm_posted_data');
231
+ }
232
+ add_action( 'wpcf7_mail_sent', 'cf7msm_mail_sent' );
233
+
234
+
235
  /**
236
  * Handle a multi-step cf7 form for cf7 < 3.9
237
  */
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: webheadllc
3
  Tags: contact form 7, multistep form, form, multiple pages, store form
4
  Requires at least: 3.4.1
5
- Tested up to: 3.9.2
6
- Stable tag: 1.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -69,6 +69,9 @@ This plugin is free for a reason. Please go through the video tutorial provided
69
 
70
  == Changelog ==
71
 
 
 
 
72
  = 1.4 =
73
  Updated to be compatible with Contact Form 7 version 3.9.
74
 
2
  Contributors: webheadllc
3
  Tags: contact form 7, multistep form, form, multiple pages, store form
4
  Requires at least: 3.4.1
5
+ Tested up to: 4.0
6
+ Stable tag: 1.4.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
69
 
70
  == Changelog ==
71
 
72
+ = 1.4.1 =
73
+ Fixed bug where tapping the Submit button on the final step submits form even with validation errors.
74
+
75
  = 1.4 =
76
  Updated to be compatible with Contact Form 7 version 3.9.
77