Contact Form 7 Multi-Step Forms - Version 2.24

Version Description

Contact From 7 version 4.8 or above is required for this version.
fixed not redirecting to next step on older iPad browsers.
fixed illegal offset exception warning.
added JSON_UNESCAPED_UNICODE for czech language.

Download this release

Release Info

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

Code changes from version 2.23 to 2.24

Files changed (2) hide show
  1. contact-form-7-multi-step-module.php +10 -6
  2. readme.txt +9 -3
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: 2.23
9
  */
10
  /* Copyright 2012 Webhead LLC (email: info at webheadcoder.com)
11
 
@@ -24,7 +24,7 @@ Version: 2.23
24
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25
  */
26
 
27
- define( 'CF7MSM_VERSION', '2.23' );
28
  define( 'CF7MSM_PLUGIN', __FILE__ );
29
  define( 'CF7MSM_FREE_TEXT_PREFIX_RADIO', '_wpcf7_radio_free_text_' );
30
  define( 'CF7MSM_FREE_TEXT_PREFIX_CHECKBOX', '_wpcf7_checkbox_free_text_' );
@@ -139,8 +139,10 @@ function cf7msm_scripts() {
139
  CF7MSM_VERSION
140
  );
141
 
142
- //this makes the script useful even when cookies aren't used.
143
  $cf7msm_posted_data = cf7msm_get('cf7msm_posted_data');
 
 
 
144
  $cf7msm_posted_data['cf7msm_prev_urls'] = cf7msm_get('cf7msm_prev_urls');
145
  wp_localize_script( 'cf7msm', 'cf7msm_posted_data', $cf7msm_posted_data);
146
  }
@@ -154,7 +156,7 @@ function cf7msm_set($var_name, $var_value) {
154
  $_SESSION[$var_name] = $var_value;
155
  }
156
  else {
157
- setcookie($var_name, json_encode( $var_value ), 0, COOKIEPATH, COOKIE_DOMAIN);
158
  }
159
  }
160
 
@@ -362,8 +364,10 @@ function cf7msm_mail_sent() {
362
  else {
363
  $wpcf7 = WPCF7_ContactForm::get_current();
364
  $formstring = $wpcf7->prop('form');
365
- // redirect when ajax is disabled.
366
- if ( !wpcf7_load_js() ) {
 
 
367
  //get url from saved form, not $_POST. be safe.
368
  $redirect_url = parse_form_for_multistep( $wpcf7 );
369
  if ( empty( $redirect_url ) ) {
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: 2.24
9
  */
10
  /* Copyright 2012 Webhead LLC (email: info at webheadcoder.com)
11
 
24
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25
  */
26
 
27
+ define( 'CF7MSM_VERSION', '2.24' );
28
  define( 'CF7MSM_PLUGIN', __FILE__ );
29
  define( 'CF7MSM_FREE_TEXT_PREFIX_RADIO', '_wpcf7_radio_free_text_' );
30
  define( 'CF7MSM_FREE_TEXT_PREFIX_CHECKBOX', '_wpcf7_checkbox_free_text_' );
139
  CF7MSM_VERSION
140
  );
141
 
 
142
  $cf7msm_posted_data = cf7msm_get('cf7msm_posted_data');
143
+ if ( empty( $cf7msm_posted_data ) ) {
144
+ $cf7msm_posted_data = array();
145
+ }
146
  $cf7msm_posted_data['cf7msm_prev_urls'] = cf7msm_get('cf7msm_prev_urls');
147
  wp_localize_script( 'cf7msm', 'cf7msm_posted_data', $cf7msm_posted_data);
148
  }
156
  $_SESSION[$var_name] = $var_value;
157
  }
158
  else {
159
+ setcookie($var_name, json_encode( $var_value, JSON_UNESCAPED_UNICODE ), 0, COOKIEPATH, COOKIE_DOMAIN);
160
  }
161
  }
162
 
364
  else {
365
  $wpcf7 = WPCF7_ContactForm::get_current();
366
  $formstring = $wpcf7->prop('form');
367
+ // redirect when ajax is disabled and not doing rest and not doing ajax
368
+ if ( !wpcf7_load_js() || (
369
+ !( defined( 'REST_REQUEST' ) && REST_REQUEST )
370
+ && !( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) ) {
371
  //get url from saved form, not $_POST. be safe.
372
  $redirect_url = parse_form_for_multistep( $wpcf7 );
373
  if ( empty( $redirect_url ) ) {
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: webheadllc
3
  Donate Link: http://webheadcoder.com/donate-cf7-multi-step-forms
4
  Tags: contact form 7, multistep form, form, multiple pages, store form, contact, multi, step
5
- Requires at least: 4.5
6
- Tested up to: 4.8
7
- Stable tag: 2.23
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -100,6 +100,12 @@ The `multistep` form tag is a hidden field and tries not to add any spacing to y
100
 
101
  == Changelog ==
102
 
 
 
 
 
 
 
103
  = 2.23 =
104
  **Contact From 7 version 4.8 or above is required for this version**.
105
  fixed back button on firefox.
2
  Contributors: webheadllc
3
  Donate Link: http://webheadcoder.com/donate-cf7-multi-step-forms
4
  Tags: contact form 7, multistep form, form, multiple pages, store form, contact, multi, step
5
+ Requires at least: 4.7
6
+ Tested up to: 4.8.1
7
+ Stable tag: 2.24
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
100
 
101
  == Changelog ==
102
 
103
+ = 2.24 =
104
+ **Contact From 7 version 4.8 or above is required for this version**.
105
+ fixed not redirecting to next step on older iPad browsers.
106
+ fixed illegal offset exception warning.
107
+ added JSON_UNESCAPED_UNICODE for czech language.
108
+
109
  = 2.23 =
110
  **Contact From 7 version 4.8 or above is required for this version**.
111
  fixed back button on firefox.