Contact Form 7 Dynamic Text Extension - Version 1.0.4.2

Version Description

  • Fixed a bug that created repeating square brackets around dynamic text values in cases where the form doesn't validate and JavaScript is deactivated.
Download this release

Release Info

Developer sevenspark
Plugin Icon wp plugin Contact Form 7 Dynamic Text Extension
Version 1.0.4.2
Comparing to
See all releases

Code changes from version 1.0.4.1 to 1.0.4.2

Files changed (2) hide show
  1. readme.txt +6 -2
  2. wpcf7_dynamic_text.php +6 -3
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://bit.ly/bVogDN
4
  Tags: Contact Form 7, Contact, Contact Form, dynamic, text, input, GET, POST, title, slug
5
  Requires at least: 2.9
6
  Tested up to: 3.0.4
7
- Stable tag: 1.0.4.1
8
 
9
  This plugin provides 2 new tag types for the Contact Form 7 Plugin. It allows the dynamic generation of content for a text input box via any shortcode.
10
  It also offers dynamic hidden field functionality, which can be utilized to dynamically set the Email Recipient (To:) address.
@@ -183,6 +183,9 @@ None. Yet.
183
 
184
  == Changelog ==
185
 
 
 
 
186
  = 1.0.4.1 =
187
  * Removed trailing whitespace to fix "Headers already sent" errors
188
 
@@ -204,6 +207,7 @@ None. Yet.
204
 
205
 
206
  == Upgrade Notice ==
 
207
  1.0.4.1 fixes a "Headers already sent" error that can occur for some users.
208
 
209
- The newest upgrade includes hidden field capability and two new shortcodes - current user info and custom post fields.
4
  Tags: Contact Form 7, Contact, Contact Form, dynamic, text, input, GET, POST, title, slug
5
  Requires at least: 2.9
6
  Tested up to: 3.0.4
7
+ Stable tag: 1.0.4.2
8
 
9
  This plugin provides 2 new tag types for the Contact Form 7 Plugin. It allows the dynamic generation of content for a text input box via any shortcode.
10
  It also offers dynamic hidden field functionality, which can be utilized to dynamically set the Email Recipient (To:) address.
183
 
184
  == Changelog ==
185
 
186
+ = 1.0.4.2 =
187
+ * Fixed a bug that created repeating square brackets around dynamic text values in cases where the form doesn't validate and JavaScript is deactivated.
188
+
189
  = 1.0.4.1 =
190
  * Removed trailing whitespace to fix "Headers already sent" errors
191
 
207
 
208
 
209
  == Upgrade Notice ==
210
+ 1.0.4.2 fixes a bug that occurs when JavaScript is disabled and a form item doesn't validate on the first try
211
  1.0.4.1 fixes a "Headers already sent" error that can occur for some users.
212
 
213
+ 1.0.4 upgrade includes hidden field capability and two new shortcodes - current user info and custom post fields.
wpcf7_dynamic_text.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Contact Form 7 - Dynamic Text Extension
5
  Plugin URI: http://sevenspark.com/wordpress-plugins/contact-form-7-dynamic-text-extension
6
  Description: Provides a dynamic text field that accepts any shortcode to generate the content. Requires Contact Form 7
7
- Version: 1.0.4.1
8
  Author: Chris Mavricos, SevenSpark
9
  Author URI: http://sevenspark.com
10
  License: GPL2
@@ -124,7 +124,9 @@ function wpcf7_dynamictext_shortcode_handler( $tag ) {
124
  $value = isset( $values[0] ) ? $values[0] : '';
125
  }
126
 
127
- $value = do_shortcode('['.$value.']');
 
 
128
  //echo '<pre>'; print_r($options);echo '</pre>';
129
  $readonly = '';
130
  if(in_array('uneditable', $options)){
@@ -268,7 +270,8 @@ function wpcf7_dynamichidden_shortcode_handler( $tag ) {
268
  $value = isset( $values[0] ) ? $values[0] : '';
269
  }
270
 
271
- $value = do_shortcode('['.$value.']');
 
272
  //echo '<pre>'; print_r($options);echo '</pre>';
273
 
274
  $html = '<input type="hidden" name="' . $name . '" value="' . esc_attr( $value ) . '"' . $atts . ' />';
4
  Plugin Name: Contact Form 7 - Dynamic Text Extension
5
  Plugin URI: http://sevenspark.com/wordpress-plugins/contact-form-7-dynamic-text-extension
6
  Description: Provides a dynamic text field that accepts any shortcode to generate the content. Requires Contact Form 7
7
+ Version: 1.0.4.2
8
  Author: Chris Mavricos, SevenSpark
9
  Author URI: http://sevenspark.com
10
  License: GPL2
124
  $value = isset( $values[0] ) ? $values[0] : '';
125
  }
126
 
127
+ $scval = do_shortcode('['.$value.']');
128
+ if($scval != '['.$value.']') $value = $scval;
129
+
130
  //echo '<pre>'; print_r($options);echo '</pre>';
131
  $readonly = '';
132
  if(in_array('uneditable', $options)){
270
  $value = isset( $values[0] ) ? $values[0] : '';
271
  }
272
 
273
+ $scval = do_shortcode('['.$value.']');
274
+ if($scval != '['.$value.']') $value = $scval;
275
  //echo '<pre>'; print_r($options);echo '</pre>';
276
 
277
  $html = '<input type="hidden" name="' . $name . '" value="' . esc_attr( $value ) . '"' . $atts . ' />';