Contact Form 7 Redirection - Version 1.2.9

Version Description

  • Fixed a bug: when passing specific fields as URL query parameters, not all the fields were passed.
Download this release

Release Info

Developer yuvalsabar
Plugin Icon 128x128 Contact Form 7 Redirection
Version 1.2.9
Comparing to
See all releases

Code changes from version 1.2.8 to 1.2.9

admin/wpcf7-redirect-admin-script.js CHANGED
@@ -1,52 +1,52 @@
1
- jQuery(document).ready(function($) {
2
- // field - open in a new tab
3
- jQuery( '#wpcf7-redirect-open-in-new-tab' ).change(function() {
4
- if ( jQuery( this ).is( ":checked" ) ) {
5
- jQuery( '.field-notice-alert' ).removeClass( 'field-notice-hidden' );
6
- } else {
7
- jQuery( '.field-notice-alert' ).addClass( 'field-notice-hidden' );
8
- }
9
- });
10
-
11
- if ( jQuery( '#wpcf7-redirect-open-in-new-tab' ).is( ":checked" ) ) {
12
- jQuery( '.field-notice-alert' ).removeClass( 'field-notice-hidden' );
13
- }
14
-
15
- // fields - http build query
16
- jQuery( '#wpcf7-redirect-http-build-query-selectively' ).change(function() {
17
- if ( jQuery( this ).is( ":checked" ) ) {
18
- jQuery( '#wpcf7-redirect-http-build-query-selectively-fields' ).removeClass( 'field-hidden' );
19
- }
20
- });
21
-
22
- jQuery( '#wpcf7-redirect-http-build-query' ).change(function() {
23
- if ( jQuery( this ).is( ":checked" ) ) {
24
- jQuery( '#wpcf7-redirect-http-build-query-selectively-fields' ).addClass( 'field-hidden' );
25
- }
26
- });
27
-
28
- if ( jQuery( '#wpcf7-redirect-http-build-query-selectively' ).is( ":checked" ) ) {
29
- jQuery( '#wpcf7-redirect-http-build-query-selectively-fields' ).removeClass( 'field-hidden' );
30
- }
31
-
32
- jQuery('.checkbox-radio-1').change(function() {
33
- var checked = jQuery(this).is(':checked');
34
- jQuery('.checkbox-radio-1').prop('checked', false);
35
- if ( checked ) {
36
- jQuery(this).prop('checked',true);
37
- }
38
- });
39
-
40
- // field - after sent script
41
- jQuery( '#wpcf7-redirect-after-sent-script' ).keyup(function(event) {
42
- if ( jQuery(this).val().length != 0 ) {
43
- jQuery( '.field-warning-alert' ).removeClass( 'field-notice-hidden' );
44
- } else {
45
- jQuery( '.field-warning-alert' ).addClass( 'field-notice-hidden' );
46
- }
47
- });
48
-
49
- if ( jQuery( '#wpcf7-redirect-after-sent-script' ).val() ) {
50
- jQuery( '.field-warning-alert' ).removeClass( 'field-notice-hidden' );
51
- }
52
- });
1
+ jQuery(document).ready(function($) {
2
+ // field - open in a new tab
3
+ jQuery( '#wpcf7-redirect-open-in-new-tab' ).change(function() {
4
+ if ( jQuery( this ).is( ":checked" ) ) {
5
+ jQuery( '.field-notice-alert' ).removeClass( 'field-notice-hidden' );
6
+ } else {
7
+ jQuery( '.field-notice-alert' ).addClass( 'field-notice-hidden' );
8
+ }
9
+ });
10
+
11
+ if ( jQuery( '#wpcf7-redirect-open-in-new-tab' ).is( ":checked" ) ) {
12
+ jQuery( '.field-notice-alert' ).removeClass( 'field-notice-hidden' );
13
+ }
14
+
15
+ // fields - http build query
16
+ jQuery( '#wpcf7-redirect-http-build-query-selectively' ).change(function() {
17
+ if ( jQuery( this ).is( ":checked" ) ) {
18
+ jQuery( '#wpcf7-redirect-http-build-query-selectively-fields' ).removeClass( 'field-hidden' );
19
+ }
20
+ });
21
+
22
+ jQuery( '#wpcf7-redirect-http-build-query' ).change(function() {
23
+ if ( jQuery( this ).is( ":checked" ) ) {
24
+ jQuery( '#wpcf7-redirect-http-build-query-selectively-fields' ).addClass( 'field-hidden' );
25
+ }
26
+ });
27
+
28
+ if ( jQuery( '#wpcf7-redirect-http-build-query-selectively' ).is( ":checked" ) ) {
29
+ jQuery( '#wpcf7-redirect-http-build-query-selectively-fields' ).removeClass( 'field-hidden' );
30
+ }
31
+
32
+ jQuery('.checkbox-radio-1').change(function() {
33
+ var checked = jQuery(this).is(':checked');
34
+ jQuery('.checkbox-radio-1').prop('checked', false);
35
+ if ( checked ) {
36
+ jQuery(this).prop('checked',true);
37
+ }
38
+ });
39
+
40
+ // field - after sent script
41
+ jQuery( '#wpcf7-redirect-after-sent-script' ).keyup(function(event) {
42
+ if ( jQuery(this).val().length != 0 ) {
43
+ jQuery( '.field-warning-alert' ).removeClass( 'field-notice-hidden' );
44
+ } else {
45
+ jQuery( '.field-warning-alert' ).addClass( 'field-notice-hidden' );
46
+ }
47
+ });
48
+
49
+ if ( jQuery( '#wpcf7-redirect-after-sent-script' ).val() ) {
50
+ jQuery( '.field-warning-alert' ).removeClass( 'field-notice-hidden' );
51
+ }
52
+ });
admin/wpcf7-redirect-admin-style.css CHANGED
@@ -1,54 +1,54 @@
1
- #redirect-panel .field-wrap {
2
- margin-bottom: 10px;
3
- }
4
- #redirect-panel .field-wrap [type='url'],
5
- #redirect-panel .field-wrap [type='select'] {
6
- height: 28px;
7
- }
8
- #redirect-panel .field-wrap [type='url'],
9
- #redirect-panel .field-wrap [type='text'] {
10
- width: 100%;
11
- }
12
- #redirect-panel .field-wrap [type='checkbox'] {
13
- margin-top: 1px;
14
- }
15
- #redirect-panel .field-wrap textarea {
16
- direction: ltr;
17
- width: 100%;
18
- }
19
- #redirect-panel .field-wrap-after-sent-script {
20
- margin-top: 10px;
21
- }
22
- #redirect-panel .field-wrap-page-id label,
23
- #redirect-panel .field-wrap-after-sent-script label {
24
- display: block;
25
- margin-bottom: 5px;
26
- }
27
- #redirect-panel .field-wrap-http-build-query-selectively [type='text'] {
28
- margin-top: 10px;
29
- }
30
- #redirect-panel .field-wrap-after-sent-script .field-message {
31
- margin-bottom: 10px;
32
- }
33
- #redirect-panel .field-notice {
34
- margin-top: 10px;
35
- margin-bottom: 20px;
36
- padding: 15px;
37
- border: 1px solid;
38
- border-radius: 4px;
39
- background: #fff;
40
- }
41
- #redirect-panel .field-notice-alert {
42
- color: #8a6d3b;
43
- border: 1px solid #faebcc;
44
- background-color: #fcf8e3;
45
- }
46
- #redirect-panel .field-hidden,
47
- #redirect-panel .field-notice-hidden {
48
- display: none;
49
- }
50
- #redirect-panel .field-warning-alert {
51
- color: #a94442;
52
- border-color: #ebccd1;
53
- background-color: #f2dede;
54
- }
1
+ #redirect-panel .field-wrap {
2
+ margin-bottom: 10px;
3
+ }
4
+ #redirect-panel .field-wrap [type='url'],
5
+ #redirect-panel .field-wrap [type='select'] {
6
+ height: 28px;
7
+ }
8
+ #redirect-panel .field-wrap [type='url'],
9
+ #redirect-panel .field-wrap [type='text'] {
10
+ width: 100%;
11
+ }
12
+ #redirect-panel .field-wrap [type='checkbox'] {
13
+ margin-top: 1px;
14
+ }
15
+ #redirect-panel .field-wrap textarea {
16
+ direction: ltr;
17
+ width: 100%;
18
+ }
19
+ #redirect-panel .field-wrap-after-sent-script {
20
+ margin-top: 10px;
21
+ }
22
+ #redirect-panel .field-wrap-page-id label,
23
+ #redirect-panel .field-wrap-after-sent-script label {
24
+ display: block;
25
+ margin-bottom: 5px;
26
+ }
27
+ #redirect-panel .field-wrap-http-build-query-selectively [type='text'] {
28
+ margin-top: 10px;
29
+ }
30
+ #redirect-panel .field-wrap-after-sent-script .field-message {
31
+ margin-bottom: 10px;
32
+ }
33
+ #redirect-panel .field-notice {
34
+ margin-top: 10px;
35
+ margin-bottom: 20px;
36
+ padding: 15px;
37
+ border: 1px solid;
38
+ border-radius: 4px;
39
+ background: #fff;
40
+ }
41
+ #redirect-panel .field-notice-alert {
42
+ color: #8a6d3b;
43
+ border: 1px solid #faebcc;
44
+ background-color: #fcf8e3;
45
+ }
46
+ #redirect-panel .field-hidden,
47
+ #redirect-panel .field-notice-hidden {
48
+ display: none;
49
+ }
50
+ #redirect-panel .field-warning-alert {
51
+ color: #a94442;
52
+ border-color: #ebccd1;
53
+ background-color: #f2dede;
54
+ }
js/wpcf7-redirect-script.js CHANGED
@@ -25,7 +25,7 @@ function wpcf7_redirect_mailsent_handler() {
25
  redirect_url = redirect_url + '?' + http_query;
26
  } else if ( form.http_build_query_selectively ) {
27
  http_query = '?';
28
- selective_fields = form.http_build_query_selectively_fields.replace(' ', '').split(',');
29
  event.detail.inputs.forEach( function(element, index) {
30
  if ( selective_fields.indexOf( element.name ) != -1 ) {
31
  http_query += element.name + '=' + element.value + '&';
25
  redirect_url = redirect_url + '?' + http_query;
26
  } else if ( form.http_build_query_selectively ) {
27
  http_query = '?';
28
+ selective_fields = form.http_build_query_selectively_fields.split(' ').join('');
29
  event.detail.inputs.forEach( function(element, index) {
30
  if ( selective_fields.indexOf( element.name ) != -1 ) {
31
  http_query += element.name + '=' + element.value + '&';
lang/readme.txt CHANGED
@@ -1,3 +1,3 @@
1
- Translations have moved to https://translate.wordpress.org/projects/wp-plugins/wpcf7-redirect
2
-
3
- Your are more than welcome contribute :)
1
+ Translations have moved to https://translate.wordpress.org/projects/wp-plugins/wpcf7-redirect
2
+
3
+ Your are more than welcome contribute :)
readme.txt CHANGED
@@ -1,78 +1,99 @@
1
- === Contact Form 7 Redirection ===
2
- Tags: contact form 7 redirect, contact form 7 thank you page, redirect cf7, redirect contact form 7, contact form 7 success page, cf7 redirect
3
- Contributors: yuvalsabar
4
- Requires at least: 4.7.0
5
- Tested up to: 4.9.8
6
- Stable tag: 1.2.8
7
- License: GPLv3 or later
8
- License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
-
10
- A simple add-on for Contact Form 7 that adds a redirect option after form sent successfully.
11
-
12
- == Description ==
13
-
14
- A straightforward add-on plugin for Contact Form 7 - adds the option to redirect to any page you choose after mail sent successfully, with DOM Events and without AJAX being disabled.
15
- NOTE: This plugin requires Contact Form 7 version 4.8 or later.
16
-
17
- == Usage ==
18
-
19
- Simply go to your form settings, choose the "Redirect Settings" tab and set the page you want to be redirected to.
20
-
21
- == Installation ==
22
-
23
- Installing Contact Form 7 Redirection can be done either by searching for "Contact Form 7 Redirection" via the "Plugins > Add New" screen in your WordPress dashboard, or by using the following steps:
24
-
25
- 1. Download the plugin via WordPress.org.
26
- 2. Upload the ZIP file through the "Plugins > Add New > Upload" screen in your WordPress dashboard.
27
- 3. Activate the plugin through the 'Plugins' menu in WordPress
28
- 4. Visit the settings screen and configure, as desired.
29
-
30
- == Frequently Asked Questions ==
31
-
32
- = Does the plugin disables Contact Form 7 Ajax? =
33
-
34
- No, it doesn't. The plugin does not disables any of Contact Form 7 normal behavior, unlike all other plugins that do the same.
35
-
36
- = Does this plugin uses "on_sent_ok" additional setting? =
37
-
38
- No. One of the reasons we developed this plugin, is because on_send_ok is now deprecated, and is going to be abolished by the end of 2017. This plugin is the only redirect plugin for Contact Form 7 that has been updated to use [DOM events](https://contactform7.com/dom-events/) to perform redirect, as Contact Form 7 developer Takayuki Miyoshi recommends.
39
-
40
- == Screenshots ==
41
-
42
- 1. Redirect Settings tab
43
-
44
- == Changelog ==
45
-
46
- = 1.2.8 =
47
- * New feature: Pass specific fields from the form as URL query parameters.
48
- * Minor dev improvements.
49
-
50
- = 1.2.7 =
51
- * Script field now accepts special characters, such as < and >.
52
-
53
- = 1.2.6 =
54
- * Added support for browsers that don't support AJAX.
55
- * Minor CSS changes.
56
-
57
- = 1.2.5 =
58
- * Added error message if Contact Form 7 version is earlier than 4.8.
59
-
60
- = 1.2.4 =
61
- * Fixed a bug regarding sanitizing URL, causing & to change to #038;
62
- * Unnecessary variables removed.
63
-
64
- = 1.2.2 =
65
- * New feature: Pass all fields from the form as URL query parameters.
66
- * Minor CSS changes.
67
- * Dev improvements.
68
-
69
- = 1.2 =
70
- * Added option to add script after the form has been sent successfully.
71
-
72
- = 1.0.2 =
73
- * Added full support for form duplication.
74
- * Added option to open page in a new tab.
75
- * Added plugin class CF7_Redirect.
76
-
77
- = 1.0.0 =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  * Initial release.
1
+ === Contact Form 7 Redirection ===
2
+ Tags: contact form 7 redirect, contact form 7 thank you page, redirect cf7, redirect contact form 7, contact form 7 success page, cf7 redirect
3
+ Contributors: yuvalsabar
4
+ Requires at least: 4.7.0
5
+ Tested up to: 5.0
6
+ Stable tag: 1.2.9
7
+ License: GPLv3 or later
8
+ License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
+
10
+ A simple add-on for Contact Form 7 that adds a redirect option after form sent successfully.
11
+
12
+ == Description ==
13
+
14
+ A straightforward add-on plugin for Contact Form 7 - adds the option to redirect to any page you choose after mail sent successfully, with DOM Events and without AJAX being disabled.
15
+ NOTE: This plugin requires Contact Form 7 version 4.8 or later.
16
+
17
+ == Usage ==
18
+
19
+ Simply go to your form settings, choose the "Redirect Settings" tab and set the page you want to be redirected to.
20
+
21
+ == Features ==
22
+
23
+ * Redirect to any URL
24
+ * Open page in a new tab
25
+ * Run JavaScript after form submission (great for conversion management)
26
+ * Pass fields from the form as URL query parameters
27
+ * **[Pro]** Redirect rules
28
+ * **[Pro]** Conditional logic for each action
29
+ * **[Pro]** Manage email notifications by conditional logic
30
+ * **[Pro]** Fire custom JavaScript events by conditional logic
31
+ * **[Pro]** Send data to remote servers (3rd-party integration)
32
+ * **[Pro]** Send RESTful Json/XML to remote servers
33
+ * **[Pro]** Send RESTful POST/GET to remote servers
34
+ * **[Pro]** Manage Facebook conversion pixels
35
+ * **[Pro]** Manage Google Adwords conversion pixels
36
+
37
+ > Note: some features are availible only in the Pro version. Which means you need Contact Form 7 Redirection Pro to unlock those features. You can [get Contact Form 7 Redirection Pro here](http://querysol.com/blog/product/contact-form-7-redirection/)!
38
+
39
+ == Installation ==
40
+
41
+ Installing Contact Form 7 Redirection can be done either by searching for "Contact Form 7 Redirection" via the "Plugins > Add New" screen in your WordPress dashboard, or by using the following steps:
42
+
43
+ 1. Download the plugin via WordPress.org.
44
+ 2. Upload the ZIP file through the "Plugins > Add New > Upload" screen in your WordPress dashboard.
45
+ 3. Activate the plugin through the 'Plugins' menu in WordPress
46
+ 4. Visit the settings screen and configure, as desired.
47
+
48
+ == Frequently Asked Questions ==
49
+
50
+ = Does the plugin disables Contact Form 7 Ajax? =
51
+
52
+ No, it doesn't. The plugin does not disables any of Contact Form 7 normal behavior, unlike all other plugins that do the same.
53
+
54
+ = Does this plugin uses "on_sent_ok" additional setting? =
55
+
56
+ No. One of the reasons we developed this plugin, is because on_send_ok is now deprecated, and is going to be abolished by the end of 2017. This plugin is the only redirect plugin for Contact Form 7 that has been updated to use [DOM events](https://contactform7.com/dom-events/) to perform redirect, as Contact Form 7 developer Takayuki Miyoshi recommends.
57
+
58
+ == Screenshots ==
59
+
60
+ 1. Redirect Settings tab
61
+
62
+ == Changelog ==
63
+
64
+ = 1.2.9 =
65
+ * Fixed a bug: when passing specific fields as URL query parameters, not all the fields were passed.
66
+
67
+ = 1.2.8 =
68
+ * New feature: Pass specific fields from the form as URL query parameters.
69
+ * Minor dev improvements.
70
+
71
+ = 1.2.7 =
72
+ * Script field now accepts special characters, such as < and >.
73
+
74
+ = 1.2.6 =
75
+ * Added support for browsers that don't support AJAX.
76
+ * Minor CSS changes.
77
+
78
+ = 1.2.5 =
79
+ * Added error message if Contact Form 7 version is earlier than 4.8.
80
+
81
+ = 1.2.4 =
82
+ * Fixed a bug regarding sanitizing URL, causing & to change to #038;
83
+ * Unnecessary variables removed.
84
+
85
+ = 1.2.2 =
86
+ * New feature: Pass all fields from the form as URL query parameters.
87
+ * Minor CSS changes.
88
+ * Dev improvements.
89
+
90
+ = 1.2 =
91
+ * Added option to add script after the form has been sent successfully.
92
+
93
+ = 1.0.2 =
94
+ * Added full support for form duplication.
95
+ * Added option to open page in a new tab.
96
+ * Added plugin class CF7_Redirect.
97
+
98
+ = 1.0.0 =
99
  * Initial release.
wpcf7-redirect.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Contact Form 7 Redirection
4
  * Plugin URI: http://querysol.com/blog/product/contact-form-7-redirection/
5
  * Description: Contact Form 7 Add-on - Redirect after mail sent.
6
- * Version: 1.2.8
7
  * Author: Query Solutions
8
  * Author URI: http://querysol.com
9
  * Contributors: querysolutions, yuvalsabar
@@ -31,7 +31,7 @@ class WPCF7_Redirect {
31
  public function __construct() {
32
  $this->plugin_url = plugin_dir_url( __FILE__ );
33
  $this->plugin_path = plugin_dir_path( __FILE__ );
34
- $this->version = '1.2.8';
35
  $this->add_actions();
36
  }
37
 
3
  * Plugin Name: Contact Form 7 Redirection
4
  * Plugin URI: http://querysol.com/blog/product/contact-form-7-redirection/
5
  * Description: Contact Form 7 Add-on - Redirect after mail sent.
6
+ * Version: 1.2.9
7
  * Author: Query Solutions
8
  * Author URI: http://querysol.com
9
  * Contributors: querysolutions, yuvalsabar
31
  public function __construct() {
32
  $this->plugin_url = plugin_dir_url( __FILE__ );
33
  $this->plugin_path = plugin_dir_path( __FILE__ );
34
+ $this->version = '1.2.9';
35
  $this->add_actions();
36
  }
37