Version Description
- fixed success message showing when not on the last step due to a change in Contact Form 7 v5.2.1.
- added Skip Save for Advanced Contact form 7 DB plugin. Thanks to @undersound.
Download this release
Release Info
Developer | webheadllc |
Plugin | Contact Form 7 Multi-Step Forms |
Version | 4.0.7 |
Comparing to | |
See all releases |
Code changes from version 4.0.2 to 4.0.7
- cf7msm.php +1 -0
- contact-form-7-multi-step-module.php +2 -2
- js_src/cf7msm.js +14 -2
- readme.txt +18 -2
- resources/cf7msm.min.js +1 -1
cf7msm.php
CHANGED
@@ -714,6 +714,7 @@ function cf7msm_skip_save( $form, $results )
|
|
714 |
2
|
715 |
);
|
716 |
remove_action( 'wpcf7_before_send_mail', 'cfdb7_before_send_mail' );
|
|
|
717 |
}
|
718 |
|
719 |
}
|
714 |
2
|
715 |
);
|
716 |
remove_action( 'wpcf7_before_send_mail', 'cfdb7_before_send_mail' );
|
717 |
+
remove_action( 'wpcf7_before_send_mail', 'vsz_cf7_before_send_email' );
|
718 |
}
|
719 |
|
720 |
}
|
contact-form-7-multi-step-module.php
CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://www.mymonkeydo.com/contact-form-7-multi-step-module/
|
|
6 |
Description: Enables the Contact Form 7 plugin to create multi-page, multi-step forms.
|
7 |
Author: Webhead LLC.
|
8 |
Author URI: http://webheadcoder.com
|
9 |
-
Version: 4.0.
|
10 |
Text Domain: contact-form-7-multi-step-module
|
11 |
*/
|
12 |
/* Copyright 2018 Webhead LLC (email: info at webheadcoder.com)
|
@@ -63,7 +63,7 @@ if ( !function_exists( 'cf7msm_fs' ) ) {
|
|
63 |
cf7msm_fs();
|
64 |
// Signal that SDK was initiated.
|
65 |
do_action( 'cf7msm_fs_loaded' );
|
66 |
-
define( 'CF7MSM_VERSION', '4.0.
|
67 |
define( 'CF7MSM_PLUGIN', __FILE__ );
|
68 |
define( 'CF7MSM_FREE_TEXT_PREFIX_RADIO', '_wpcf7_radio_free_text_' );
|
69 |
define( 'CF7MSM_FREE_TEXT_PREFIX_CHECKBOX', '_wpcf7_checkbox_free_text_' );
|
6 |
Description: Enables the Contact Form 7 plugin to create multi-page, multi-step forms.
|
7 |
Author: Webhead LLC.
|
8 |
Author URI: http://webheadcoder.com
|
9 |
+
Version: 4.0.7
|
10 |
Text Domain: contact-form-7-multi-step-module
|
11 |
*/
|
12 |
/* Copyright 2018 Webhead LLC (email: info at webheadcoder.com)
|
63 |
cf7msm_fs();
|
64 |
// Signal that SDK was initiated.
|
65 |
do_action( 'cf7msm_fs_loaded' );
|
66 |
+
define( 'CF7MSM_VERSION', '4.0.7' );
|
67 |
define( 'CF7MSM_PLUGIN', __FILE__ );
|
68 |
define( 'CF7MSM_FREE_TEXT_PREFIX_RADIO', '_wpcf7_radio_free_text_' );
|
69 |
define( 'CF7MSM_FREE_TEXT_PREFIX_CHECKBOX', '_wpcf7_checkbox_free_text_' );
|
js_src/cf7msm.js
CHANGED
@@ -73,6 +73,9 @@ jQuery(document).ready(function($) {
|
|
73 |
/* Premium Code Stripped by Freemius */
|
74 |
|
75 |
if (posted_data) {
|
|
|
|
|
|
|
76 |
$.each(posted_data, function(key, val){
|
77 |
if ( key.indexOf('[]') === key.length - 2 ) {
|
78 |
key = key.substring(0, key.length - 2 );
|
@@ -128,6 +131,10 @@ jQuery(document).ready(function($) {
|
|
128 |
|
129 |
}
|
130 |
});
|
|
|
|
|
|
|
|
|
131 |
}
|
132 |
|
133 |
var savedSubmit = wpcf7.submit;
|
@@ -267,10 +274,15 @@ jQuery(document).ready(function($) {
|
|
267 |
if (!isCF7MSM) {
|
268 |
return;
|
269 |
}
|
270 |
-
|
271 |
if (!show_success) {
|
272 |
// hide the success messages
|
273 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
274 |
}
|
275 |
|
276 |
if (hide_form) {
|
73 |
/* Premium Code Stripped by Freemius */
|
74 |
|
75 |
if (posted_data) {
|
76 |
+
|
77 |
+
/* Premium Code Stripped by Freemius */
|
78 |
+
|
79 |
$.each(posted_data, function(key, val){
|
80 |
if ( key.indexOf('[]') === key.length - 2 ) {
|
81 |
key = key.substring(0, key.length - 2 );
|
131 |
|
132 |
}
|
133 |
});
|
134 |
+
|
135 |
+
|
136 |
+
/* Premium Code Stripped by Freemius */
|
137 |
+
|
138 |
}
|
139 |
|
140 |
var savedSubmit = wpcf7.submit;
|
274 |
if (!isCF7MSM) {
|
275 |
return;
|
276 |
}
|
|
|
277 |
if (!show_success) {
|
278 |
// hide the success messages
|
279 |
+
// for cf7 5.2.1
|
280 |
+
var msg = $('#' + e.detail.unitTag).find('div.wpcf7-mail-sent-ok');
|
281 |
+
if (msg.length == 0) {
|
282 |
+
msg = $('#' + e.detail.unitTag).find('.wpcf7-response-output')
|
283 |
+
}
|
284 |
+
msg.remove();
|
285 |
+
|
286 |
}
|
287 |
|
288 |
if (hide_form) {
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: webheadllc
|
|
3 |
Donate Link: https://webheadcoder.com/donate-cf7-multi-step-forms
|
4 |
Tags: contact form 7, multistep form, form, multiple pages, contact, multi, step
|
5 |
Requires at least: 4.7
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 4.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -132,6 +132,22 @@ Make sure to check the "Skip Save" checkbox or have the skip_save attribute in t
|
|
132 |
|
133 |
== Changelog ==
|
134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
= 4.0.2 =
|
136 |
* fixed get_magic_quotes_gpc() deprecated warning when running PHP 7.4.
|
137 |
* fixed slashes appearing in free version
|
3 |
Donate Link: https://webheadcoder.com/donate-cf7-multi-step-forms
|
4 |
Tags: contact form 7, multistep form, form, multiple pages, contact, multi, step
|
5 |
Requires at least: 4.7
|
6 |
+
Tested up to: 5.5
|
7 |
+
Stable tag: 4.0.7
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
132 |
|
133 |
== Changelog ==
|
134 |
|
135 |
+
= 4.0.7 =
|
136 |
+
* fixed success message showing when not on the last step due to a change in Contact Form 7 v5.2.1.
|
137 |
+
* added Skip Save for Advanced Contact form 7 DB plugin. Thanks to @undersound.
|
138 |
+
|
139 |
+
= 4.0.6 =
|
140 |
+
* PRO: fixed fields not going through when form ids were not in the right order.
|
141 |
+
|
142 |
+
= 4.0.5 =
|
143 |
+
* PRO: fixed checkboxes not being passed on to next form.
|
144 |
+
|
145 |
+
= 4.0.4 =
|
146 |
+
* PRO: fixed fields showing up out of order when viewed in Flamingo (part 2).
|
147 |
+
|
148 |
+
= 4.0.3 =
|
149 |
+
* PRO: fixed fields showing up out of order when viewed in Flamingo.
|
150 |
+
|
151 |
= 4.0.2 =
|
152 |
* fixed get_magic_quotes_gpc() deprecated warning when running PHP 7.4.
|
153 |
* fixed slashes appearing in free version
|
resources/cf7msm.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function cf7msm_uniqueArray(e,t){for(var n={},s=[],r=2;r--;e=t)e.map((function(e){n[e]=n[e]||s.push(e)}));return s}function cf7msm_hasSS(){var e="test";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){return!1}}function quoteattr(e,t){return t=t?" ":"\n",(""+e).replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">").replace(/\r\n/g,t).replace(/[\r\n]/g,t)}function escapeattr(e){return(""+e).replace(/\\/g,"\\\\").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\u00A0/g,"\\u00A0").replace(/&/g,"\\x26").replace(/'/g,"\\x27").replace(/"/g,"\\x22").replace(/</g,"\\x3C").replace(/>/g,"\\x3E")}var cf7msm_ss;jQuery(document).ready((function(e){function t(e){n(e)}function n(t){var n=t.find("input[name='_cf7msm_multistep_tag']");0!=n.length&&(n.length>1&&(n=n.last()),e("<input />",{type:"hidden",name:"cf7msm_options",value:n.val()}).appendTo(t))}var s=cf7msm_posted_data,r=e("input[name='_cf7msm_multistep_tag']"),i,c=r.length>0;if(c||(c=(r=e("input[name='cf7msm-step']")).length>0),c){var a=r.closest("form"),o=a.find('input[name="_wpcf7"]').val();cf7msm_hasSS()?null!=(cf7msm_ss=sessionStorage.getObject("cf7msm"))&&e.each(cf7msm_ss,(function(e,t){if("cf7msm_prev_urls"==e){var n=a.find(".wpcf7-back, .wpcf7-previous"),s=window.location.href,r=!t.hasOwnProperty(s)||""==t[s];r&&(r=!t.hasOwnProperty(s.replace(/\/$/,""))||""==t[s.replace(/\/$/,"")]),r?n.hide():n.click((function(e){t.hasOwnProperty(window.location.href)&&""!=t[window.location.href]?window.location.href=t[window.location.href]:window.history.go(-1),e.preventDefault()}))}})):(e("input[name='cf7msm-no-ss']").val(1),e(".wpcf7-previous").hide()),s&&e.each(s,(function(t,n){if(t.indexOf("[]")===t.length-2&&(t=t.substring(0,t.length-2)),(0!=t.indexOf("_")||0==t.indexOf("_wpcf7_radio_free_text_")||0==t.indexOf("_wpcf7_checkbox_free_text_"))&&"cf7msm-step"!=t&&"cf7msm_options"!=t){var s=a.find('*[name="'+t+'"]:not([data-cf7msm-previous])'),r=a.find('input[name="'+t+'[]"]:not([data-cf7msm-previous])'),i=a.find('select[name="'+t+'[]"]:not([data-cf7msm-previous])');s.length>0?"radio"==s.prop("type")||"checkbox"==s.prop("type")?s.filter((function(){return e(this).val()==n})).prop("checked",!0):s.is("select")?s.find("option").filter((function(){return this.value==n})).attr("selected","selected"):s.val(n):r.length>0&&n.constructor===Array?""!=n&&n.length>0&&e.each(n,(function(t,n){r.filter((function(){return e(this).val()==n})).prop("checked",!0)})):i.length>0&&n.constructor===Array&&""!=n&&n.length>0&&e.each(n,(function(e,t){i.find("option").filter((function(){return this.value==t})).attr("selected","selected")}))}}));var f=wpcf7.submit;wpcf7.submit=function(e){t(e),f(e)},document.addEventListener("wpcf7mailsent",(function(t){if(cf7msm_hasSS()){var n=0,s=0,r=[],i={};(cf7msm_ss=sessionStorage.getObject("cf7msm"))||(cf7msm_ss={});var c=!1,a=!1,f=!0,m=!1,p=null,l=!1;if(e.each(t.detail.inputs,(function(u){var d=t.detail.inputs[u].name,
|
1 |
+
function cf7msm_uniqueArray(e,t){for(var n={},s=[],r=2;r--;e=t)e.map((function(e){n[e]=n[e]||s.push(e)}));return s}function cf7msm_hasSS(){var e="test";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){return!1}}function quoteattr(e,t){return t=t?" ":"\n",(""+e).replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">").replace(/\r\n/g,t).replace(/[\r\n]/g,t)}function escapeattr(e){return(""+e).replace(/\\/g,"\\\\").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\u00A0/g,"\\u00A0").replace(/&/g,"\\x26").replace(/'/g,"\\x27").replace(/"/g,"\\x22").replace(/</g,"\\x3C").replace(/>/g,"\\x3E")}var cf7msm_ss;jQuery(document).ready((function(e){function t(e){n(e)}function n(t){var n=t.find("input[name='_cf7msm_multistep_tag']");0!=n.length&&(n.length>1&&(n=n.last()),e("<input />",{type:"hidden",name:"cf7msm_options",value:n.val()}).appendTo(t))}var s=cf7msm_posted_data,r=e("input[name='_cf7msm_multistep_tag']"),i,c=r.length>0;if(c||(c=(r=e("input[name='cf7msm-step']")).length>0),c){var a=r.closest("form"),o=a.find('input[name="_wpcf7"]').val();cf7msm_hasSS()?null!=(cf7msm_ss=sessionStorage.getObject("cf7msm"))&&e.each(cf7msm_ss,(function(e,t){if("cf7msm_prev_urls"==e){var n=a.find(".wpcf7-back, .wpcf7-previous"),s=window.location.href,r=!t.hasOwnProperty(s)||""==t[s];r&&(r=!t.hasOwnProperty(s.replace(/\/$/,""))||""==t[s.replace(/\/$/,"")]),r?n.hide():n.click((function(e){t.hasOwnProperty(window.location.href)&&""!=t[window.location.href]?window.location.href=t[window.location.href]:window.history.go(-1),e.preventDefault()}))}})):(e("input[name='cf7msm-no-ss']").val(1),e(".wpcf7-previous").hide()),s&&e.each(s,(function(t,n){if(t.indexOf("[]")===t.length-2&&(t=t.substring(0,t.length-2)),(0!=t.indexOf("_")||0==t.indexOf("_wpcf7_radio_free_text_")||0==t.indexOf("_wpcf7_checkbox_free_text_"))&&"cf7msm-step"!=t&&"cf7msm_options"!=t){var s=a.find('*[name="'+t+'"]:not([data-cf7msm-previous])'),r=a.find('input[name="'+t+'[]"]:not([data-cf7msm-previous])'),i=a.find('select[name="'+t+'[]"]:not([data-cf7msm-previous])');s.length>0?"radio"==s.prop("type")||"checkbox"==s.prop("type")?s.filter((function(){return e(this).val()==n})).prop("checked",!0):s.is("select")?s.find("option").filter((function(){return this.value==n})).attr("selected","selected"):s.val(n):r.length>0&&n.constructor===Array?""!=n&&n.length>0&&e.each(n,(function(t,n){r.filter((function(){return e(this).val()==n})).prop("checked",!0)})):i.length>0&&n.constructor===Array&&""!=n&&n.length>0&&e.each(n,(function(e,t){i.find("option").filter((function(){return this.value==t})).attr("selected","selected")}))}}));var f=wpcf7.submit;wpcf7.submit=function(e){t(e),f(e)},document.addEventListener("wpcf7mailsent",(function(t){if(cf7msm_hasSS()){var n=0,s=0,r=[],i={};(cf7msm_ss=sessionStorage.getObject("cf7msm"))||(cf7msm_ss={});var c=!1,a=!1,f=!0,m=!1,p=null,l=!1;if(e.each(t.detail.inputs,(function(u){var d=t.detail.inputs[u].name,h=t.detail.inputs[u].value;if(d.indexOf("[]")===d.length-2?(-1===e.inArray(d,r)&&(i[d]=[]),i[d].push(h)):i[d]=h,"cf7msm-step"===d){if(-1!==h.indexOf("-")){c=!0,a=!1;var _=h.split("-");n=parseInt(_[0]),s=parseInt(_[1]),void 0!==cf7msm_redirect_urls[o]&&(p=cf7msm_redirect_urls[o]),n<s?f=!1:n===s&&(m=!0)}}else if("cf7msm_options"===d){c=!0,a=!0,f=!1;var g=JSON.parse(h);g.hasOwnProperty("next_url")&&(p=g.next_url),g.hasOwnProperty("last_step")&&(l=!0,p&&""!==p||(m=!0,f=!0))}else r.push(d)})),!c)return;if(!f){var u=e("#"+t.detail.unitTag).find("div.wpcf7-mail-sent-ok");0==u.length&&(u=e("#"+t.detail.unitTag).find(".wpcf7-response-output")),u.remove()}if(m){var d=e("#"+t.detail.unitTag+" form");d.find("*").not("div.wpcf7-response-output").hide(),d.find("div.wpcf7-response-output").parentsUntil("form").show()}if(a?l&&(cf7msm_ss={}):0!=n&&n===s&&(cf7msm_ss={}),p&&""!=p){var h={};cf7msm_ss&&cf7msm_ss.cf7msm_prev_urls&&(h=cf7msm_ss.cf7msm_prev_urls);var _=window.location.protocol+"//"+window.location.host;0!==p.indexOf(_)&&(0!==p.indexOf("/")&&(_+="/"),p=_+p),h[p]=window.location.href,cf7msm_ss.cf7msm_prev_urls=h}sessionStorage.setObject("cf7msm",cf7msm_ss),p&&""!=p&&(window.location.href=p)}}),!1)}})),Storage.prototype.setObject=function(e,t){this.setItem(e,JSON.stringify(t))},Storage.prototype.getObject=function(e){var t=this.getItem(e);return t&&JSON.parse(t)};
|