Contact Form Builder – a plugin for creating contact and feedback forms - Version 1.0.27

Version Description

Fixed: Javascript conflict with some themes.

Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Contact Form Builder – a plugin for creating contact and feedback forms
Version 1.0.27
Comparing to
See all releases

Code changes from version 1.0.26 to 1.0.27

contact-form-builder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Contact Form Builder
4
  * Plugin URI: http://web-dorado.com/products/wordpress-contact-form-builder.html
5
  * Description: Contact Form Builder is an advanced plugin to add contact forms into your website. It comes along with multiple default templates which can be customized.
6
- * Version: 1.0.26
7
  * Author: WebDorado
8
  * Author URI: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -170,7 +170,7 @@ if (class_exists('WP_Widget')) {
170
  // Activate plugin.
171
  function contact_form_maker_activate() {
172
  $version = get_option("wd_contact_form_maker_version");
173
- $new_version = '1.0.26';
174
  if ($version && version_compare($version, $new_version, '<')) {
175
  require_once WD_CFM_DIR . "/contact-form-builder-update.php";
176
  contact_form_maker_update($version);
3
  * Plugin Name: Contact Form Builder
4
  * Plugin URI: http://web-dorado.com/products/wordpress-contact-form-builder.html
5
  * Description: Contact Form Builder is an advanced plugin to add contact forms into your website. It comes along with multiple default templates which can be customized.
6
+ * Version: 1.0.27
7
  * Author: WebDorado
8
  * Author URI: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
170
  // Activate plugin.
171
  function contact_form_maker_activate() {
172
  $version = get_option("wd_contact_form_maker_version");
173
+ $new_version = '1.0.27';
174
  if ($version && version_compare($version, $new_version, '<')) {
175
  require_once WD_CFM_DIR . "/contact-form-builder-update.php";
176
  contact_form_maker_update($version);
frontend/models/CFMModelForm_maker.php CHANGED
@@ -38,7 +38,7 @@ class CFMModelForm_maker {
38
  return FALSE;
39
  }
40
  }
41
- $pattern = '/\/\/(.+)\r\n/';
42
  $form_theme = preg_replace($pattern, ' ', $form_theme);
43
  $form_theme = str_replace('//', ' ', $form_theme);
44
  $label_id = array();
38
  return FALSE;
39
  }
40
  }
41
+ $pattern = '/\/\/(.+)(\r\n|\r|\n)/';
42
  $form_theme = preg_replace($pattern, ' ', $form_theme);
43
  $form_theme = str_replace('//', ' ', $form_theme);
44
  $label_id = array();
frontend/views/CFMViewForm_maker.php CHANGED
@@ -23,9 +23,6 @@ class CFMViewForm_maker {
23
  // Public Methods //
24
  ////////////////////////////////////////////////////////////////////////////////////////
25
  public function display($id) {
26
- // if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
27
- // @session_start();
28
- // }
29
  $form_maker_front_end = "";
30
  $result = $this->model->showform($id);
31
  if (!$result) {
@@ -747,13 +744,15 @@ class CFMViewForm_maker {
747
  }
748
  $check_js .= '
749
  if (x.find(jQuery("div[wdid='.$id1.']")).length != 0) {
750
- if (jQuery("#wdform_'.$id1.'_element'.$form_id.'").val() != "" && jQuery("#wdform_'.$id1.'_element'.$form_id.'").val().search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1) {
751
- alert("' . addslashes(__("This is not a valid email address.", 'contact_form_maker')) . '");
752
- old_bg=x.find(jQuery("div[wdid='.$id1.']")).css("background-color");
753
- x.find(jQuery("div[wdid='.$id1.']")).effect( "shake", {}, 500 ).css("background-color","#FF8F8B").animate({backgroundColor: old_bg}, {duration: 500, queue: false });
754
- jQuery("#wdform_'.$id1.'_element'.$form_id.'").focus();
755
- return false;
756
- }
 
 
757
  }';
758
  break;
759
  }
@@ -1086,24 +1085,27 @@ class CFMViewForm_maker {
1086
  ?>
1087
  <script type="text/javascript">
1088
  function contactformOnload<?php echo $id; ?>() {
1089
- /*if (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) === 8) {*/
1090
- if (navigator.userAgent.toLowerCase().indexOf('msie') != -1 && parseInt(navigator.userAgent.toLowerCase().split('msie')[1]) === 8) {
1091
- jQuery("#contactform<?php echo $id; ?>").find(jQuery("input[type='radio']")).click(function() {jQuery("input[type='radio']+label").removeClass('if-ie-div-label'); jQuery("input[type='radio']:checked+label").addClass('if-ie-div-label')});
1092
- jQuery("#contactform<?php echo $id; ?>").find(jQuery("input[type='radio']:checked+label")).addClass('if-ie-div-label');
1093
- jQuery("#contactform<?php echo $id; ?>").find(jQuery("input[type='checkbox']")).click(function() {jQuery("input[type='checkbox']+label").removeClass('if-ie-div-label'); jQuery("input[type='checkbox']:checked+label").addClass('if-ie-div-label')});
1094
- jQuery("#contactform<?php echo $id; ?>").find(jQuery("input[type='checkbox']:checked+label")).addClass('if-ie-div-label');
 
1095
  }
1096
  jQuery("div[type='type_text'] input, div[type='type_number'] input, div[type='type_phone'] input, div[type='type_name'] input, div[type='type_submitter_mail'] input, div[type='type_textarea'] textarea").focus(function() {delete_value(this)}).blur(function() {return_value(this)});
1097
  jQuery("div[type='type_number'] input, div[type='type_phone'] input").keypress(function(evt) {return check_isnum(evt)});
1098
 
1099
  jQuery('.wdform-element-section').each(function() {
1100
- if (!jQuery(this).parent()[0].style.width && parseInt(jQuery(this).width()) != 0) {
1101
- if (jQuery(this).css('display') == "table-cell") {
1102
- if (jQuery(this).parent().attr('type') != "type_captcha") {
1103
- jQuery(this).parent().css('width', parseInt(jQuery(this).width()) + parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15);
1104
- }
1105
- else {
1106
- jQuery(this).parent().css('width', (parseInt(jQuery(this).parent().find(jQuery(".captcha_input"))[0].style.width)*2+50) + parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15);
 
 
1107
  }
1108
  }
1109
  }
@@ -1166,8 +1168,10 @@ class CFMViewForm_maker {
1166
  x = jQuery("#contactform<?php echo $form_id; ?>");
1167
  <?php echo $check_js; ?>;
1168
  var a = [];
1169
- if (typeof a[<?php echo $form_id ?>] !== 'undefined' && a[<?php echo $form_id ?>] == 1) {
1170
- return;
 
 
1171
  }
1172
  <?php echo $onsubmit_js; ?>;
1173
  a[<?php echo $form_id ?>] = 1;
23
  // Public Methods //
24
  ////////////////////////////////////////////////////////////////////////////////////////
25
  public function display($id) {
 
 
 
26
  $form_maker_front_end = "";
27
  $result = $this->model->showform($id);
28
  if (!$result) {
744
  }
745
  $check_js .= '
746
  if (x.find(jQuery("div[wdid='.$id1.']")).length != 0) {
747
+ if (jQuery("#wdform_'.$id1.'_element'.$form_id.'").val() != "") {
748
+ if (jQuery("#wdform_'.$id1.'_element'.$form_id.'").val().search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1) {
749
+ alert("' . addslashes(__("This is not a valid email address.", 'contact_form_maker')) . '");
750
+ old_bg=x.find(jQuery("div[wdid='.$id1.']")).css("background-color");
751
+ x.find(jQuery("div[wdid='.$id1.']")).effect( "shake", {}, 500 ).css("background-color","#FF8F8B").animate({backgroundColor: old_bg}, {duration: 500, queue: false });
752
+ jQuery("#wdform_'.$id1.'_element'.$form_id.'").focus();
753
+ return false;
754
+ }
755
+ }
756
  }';
757
  break;
758
  }
1085
  ?>
1086
  <script type="text/javascript">
1087
  function contactformOnload<?php echo $id; ?>() {
1088
+ if (navigator.userAgent.toLowerCase().indexOf('msie') != -1) {
1089
+ if (parseInt(navigator.userAgent.toLowerCase().split('msie')[1]) === 8) {
1090
+ jQuery("#contactform<?php echo $id; ?>").find(jQuery("input[type='radio']")).click(function() {jQuery("input[type='radio']+label").removeClass('if-ie-div-label'); jQuery("input[type='radio']:checked+label").addClass('if-ie-div-label')});
1091
+ jQuery("#contactform<?php echo $id; ?>").find(jQuery("input[type='radio']:checked+label")).addClass('if-ie-div-label');
1092
+ jQuery("#contactform<?php echo $id; ?>").find(jQuery("input[type='checkbox']")).click(function() {jQuery("input[type='checkbox']+label").removeClass('if-ie-div-label'); jQuery("input[type='checkbox']:checked+label").addClass('if-ie-div-label')});
1093
+ jQuery("#contactform<?php echo $id; ?>").find(jQuery("input[type='checkbox']:checked+label")).addClass('if-ie-div-label');
1094
+ }
1095
  }
1096
  jQuery("div[type='type_text'] input, div[type='type_number'] input, div[type='type_phone'] input, div[type='type_name'] input, div[type='type_submitter_mail'] input, div[type='type_textarea'] textarea").focus(function() {delete_value(this)}).blur(function() {return_value(this)});
1097
  jQuery("div[type='type_number'] input, div[type='type_phone'] input").keypress(function(evt) {return check_isnum(evt)});
1098
 
1099
  jQuery('.wdform-element-section').each(function() {
1100
+ if (!jQuery(this).parent()[0].style.width) {
1101
+ if (parseInt(jQuery(this).width()) != 0) {
1102
+ if (jQuery(this).css('display') == "table-cell") {
1103
+ if (jQuery(this).parent().attr('type') != "type_captcha") {
1104
+ jQuery(this).parent().css('width', parseInt(jQuery(this).width()) + parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15);
1105
+ }
1106
+ else {
1107
+ jQuery(this).parent().css('width', (parseInt(jQuery(this).parent().find(jQuery(".captcha_input"))[0].style.width)*2+50) + parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15);
1108
+ }
1109
  }
1110
  }
1111
  }
1168
  x = jQuery("#contactform<?php echo $form_id; ?>");
1169
  <?php echo $check_js; ?>;
1170
  var a = [];
1171
+ if (typeof a[<?php echo $form_id ?>] !== 'undefined') {
1172
+ if (a[<?php echo $form_id ?>] == 1) {
1173
+ return;
1174
+ }
1175
  }
1176
  <?php echo $onsubmit_js; ?>;
1177
  a[<?php echo $form_id ?>] = 1;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://web-dorado.com/products/wordpress-contact-form-builder.html
4
  Tags: form, forms, contact form, contact forms, contact form plugin, contact forms plugin, forms plugin, Contact Form Builder, contact form manager, multiple contact forms, custom form, Contact Form Builder with recaptcha, contact form with google map, feedback form, feedback forms, contact us, wordpress contact form, email form, feedback, web form, contact me, email, contact manager, contact us form, admin, captcha, contact, database, email, javascript, jquery, page, plugin, survey, widget, custom form, forms creator, text input, validation, send copy, form with captcha, advanced form, recaptcha, contact form with captcha
5
  Requires at least: 3.4
6
  Tested up to: 4.2
7
- Stable tag: 1.0.26
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -138,6 +138,9 @@ After downloading the ZIP file,
138
 
139
  == Changelog ==
140
 
 
 
 
141
  = 1.0.26 =
142
  Changed: Shortcode.
143
 
4
  Tags: form, forms, contact form, contact forms, contact form plugin, contact forms plugin, forms plugin, Contact Form Builder, contact form manager, multiple contact forms, custom form, Contact Form Builder with recaptcha, contact form with google map, feedback form, feedback forms, contact us, wordpress contact form, email form, feedback, web form, contact me, email, contact manager, contact us form, admin, captcha, contact, database, email, javascript, jquery, page, plugin, survey, widget, custom form, forms creator, text input, validation, send copy, form with captcha, advanced form, recaptcha, contact form with captcha
5
  Requires at least: 3.4
6
  Tested up to: 4.2
7
+ Stable tag: 1.0.27
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
138
 
139
  == Changelog ==
140
 
141
+ = 1.0.27 =
142
+ Fixed: Javascript conflict with some themes.
143
+
144
  = 1.0.26 =
145
  Changed: Shortcode.
146