Form Maker by WD – user-friendly drag & drop Form Builder plugin - Version 1.7.94

Version Description

Add: Progress bar for csv/xml export

Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Form Maker by WD – user-friendly drag & drop Form Builder plugin
Version 1.7.94
Comparing to
See all releases

Code changes from version 1.7.93 to 1.7.94

admin/models/FMModelGenerete_csv.php CHANGED
@@ -71,11 +71,11 @@ class FMModelGenerete_csv {
71
 
72
  $m = count($sorted_labels);
73
 
74
- $query = $wpdb->prepare("SELECT group_id, ip, date, user_id_wd, GROUP_CONCAT( element_label SEPARATOR ',') as element_label, GROUP_CONCAT( element_value SEPARATOR '*:*el_value*:*') as element_value FROM " . $wpdb->prefix . "formmaker_submits where form_id= %d GROUP BY group_id ORDER BY date ASC limit %d, %d", $form_id, $limitstart, 3000);
75
  $rows = $wpdb->get_results($query, OBJECT_K);
76
 
77
  $data = array();
78
- $group_id_s_count = $limitstart + 3000 < count($group_id_s) ? $limitstart + 3000 : count($group_id_s);
79
 
80
  for ($www = $limitstart; $www < $group_id_s_count; $www++) {
81
  $i = $group_id_s[$www];
71
 
72
  $m = count($sorted_labels);
73
 
74
+ $query = $wpdb->prepare("SELECT group_id, ip, date, user_id_wd, GROUP_CONCAT( element_label SEPARATOR ',') as element_label, GROUP_CONCAT( element_value SEPARATOR '*:*el_value*:*') as element_value FROM " . $wpdb->prefix . "formmaker_submits where form_id= %d GROUP BY group_id ORDER BY date ASC limit %d, %d", $form_id, $limitstart, 1000);
75
  $rows = $wpdb->get_results($query, OBJECT_K);
76
 
77
  $data = array();
78
+ $group_id_s_count = $limitstart + 1000 < count($group_id_s) ? $limitstart + 1000 : count($group_id_s);
79
 
80
  for ($www = $limitstart; $www < $group_id_s_count; $www++) {
81
  $i = $group_id_s[$www];
admin/models/FMModelGenerete_xml.php CHANGED
@@ -72,11 +72,11 @@ class FMModelGenerete_xml {
72
 
73
  $m = count($sorted_labels);
74
 
75
- $query = $wpdb->prepare("SELECT group_id, ip, date, user_id_wd, GROUP_CONCAT( element_label SEPARATOR ',') as element_label, GROUP_CONCAT( element_value SEPARATOR '*:*el_value*:*') as element_value FROM " . $wpdb->prefix . "formmaker_submits where form_id= %d GROUP BY group_id ORDER BY date ASC limit %d, %d", $form_id, $limitstart, 3000);
76
  $rows = $wpdb->get_results($query, OBJECT_K);
77
 
78
  $data = array();
79
- $group_id_s_count = $limitstart + 3000 < count($group_id_s) ? $limitstart + 3000 : count($group_id_s);
80
 
81
  for ($www = $limitstart; $www < $group_id_s_count; $www++) {
82
  $i = $group_id_s[$www];
72
 
73
  $m = count($sorted_labels);
74
 
75
+ $query = $wpdb->prepare("SELECT group_id, ip, date, user_id_wd, GROUP_CONCAT( element_label SEPARATOR ',') as element_label, GROUP_CONCAT( element_value SEPARATOR '*:*el_value*:*') as element_value FROM " . $wpdb->prefix . "formmaker_submits where form_id= %d GROUP BY group_id ORDER BY date ASC limit %d, %d", $form_id, $limitstart, 1000);
76
  $rows = $wpdb->get_results($query, OBJECT_K);
77
 
78
  $data = array();
79
+ $group_id_s_count = $limitstart + 1000 < count($group_id_s) ? $limitstart + 1000 : count($group_id_s);
80
 
81
  for ($www = $limitstart; $www < $group_id_s_count; $www++) {
82
  $i = $group_id_s[$www];
admin/views/FMViewGenerete_csv.php CHANGED
@@ -46,6 +46,8 @@ class FMViewGenerete_csv {
46
  }
47
 
48
  $tempfile = WD_FM_DIR . '/export'.$form_id.'.txt';
 
 
49
  $output = fopen($tempfile, "a");
50
  if($limitstart == 0) {
51
  fputcsv($output, str_replace('PAYPAL_', '', $keys_array));
@@ -73,12 +75,6 @@ class FMViewGenerete_csv {
73
 
74
  }
75
 
76
- public function cleanData(&$str) {
77
- $str = preg_replace("/\t/", "\\t", $str);
78
- $str = preg_replace("/\r?\n/", "\\n", $str);
79
- if (strstr($str, '"'))
80
- $str = '"' . str_replace('"', '""', $str) . '"';
81
- }
82
  ////////////////////////////////////////////////////////////////////////////////////////
83
  // Getters & Setters //
84
  ////////////////////////////////////////////////////////////////////////////////////////
46
  }
47
 
48
  $tempfile = WD_FM_DIR . '/export'.$form_id.'.txt';
49
+ if($limitstart == 0 && file_exists ($tempfile))
50
+ unlink($tempfile);
51
  $output = fopen($tempfile, "a");
52
  if($limitstart == 0) {
53
  fputcsv($output, str_replace('PAYPAL_', '', $keys_array));
75
 
76
  }
77
 
 
 
 
 
 
 
78
  ////////////////////////////////////////////////////////////////////////////////////////
79
  // Getters & Setters //
80
  ////////////////////////////////////////////////////////////////////////////////////////
admin/views/FMViewGenerete_xml.php CHANGED
@@ -32,6 +32,8 @@ class FMViewGenerete_xml {
32
  define('PHP_TAB', "\t");
33
 
34
  $tempfile = WD_FM_DIR . '/export'.$form_id.'.txt';
 
 
35
  $output = fopen($tempfile, "a");
36
  if($limitstart == 0) {
37
  fwrite($output, '<?xml version="1.0" encoding="utf-8" ?>'.PHP_EOL);
32
  define('PHP_TAB', "\t");
33
 
34
  $tempfile = WD_FM_DIR . '/export'.$form_id.'.txt';
35
+ if($limitstart == 0 && file_exists ($tempfile))
36
+ unlink($tempfile);
37
  $output = fopen($tempfile, "a");
38
  if($limitstart == 0) {
39
  fwrite($output, '<?xml version="1.0" encoding="utf-8" ?>'.PHP_EOL);
admin/views/FMViewSubmissions_fm.php CHANGED
@@ -59,20 +59,46 @@ class FMViewSubmissions_fm {
59
  ?>
60
  <script type="text/javascript">
61
  function export_submissions(type, limit) {
62
- body = jQuery('body');
 
 
 
 
 
 
63
  jQuery.ajax({
64
  type: "POST",
65
  url:"<?php echo add_query_arg(array('form_id' => $form_id, 'send_header' => 0), admin_url('admin-ajax.php')); ?>&action=generete_"+type+"&limitstart="+limit,
66
  beforeSend: function() {
67
- body.addClass("fm_loading");
 
68
  },
69
  success: function(data) {
70
  if(limit < <?php echo $subs_count; ?>) {
71
- limit += 3000;
72
  export_submissions(type, limit);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  }
74
  else{
75
- body.removeClass("fm_loading");
 
 
 
 
 
76
  window.location = "<?php echo add_query_arg(array('form_id' => $form_id, 'send_header' => 1), admin_url('admin-ajax.php')); ?>&action=generete_"+type+"&limitstart="+limit;
77
  }
78
  }
@@ -176,7 +202,10 @@ class FMViewSubmissions_fm {
176
  });
177
  });
178
  </script>
179
- <div class="fm_modal"></div>
 
 
 
180
  <div id="sbox-overlay" onclick="toggleChBDiv(false)"
181
  style="z-index: 65555; position: fixed; top: 0px; left: 0px; visibility: visible; zoom: 1; background-color: #000000; opacity: 0.7; filter: alpha(opacity=70); display: none;">
182
  </div>
59
  ?>
60
  <script type="text/javascript">
61
  function export_submissions(type, limit) {
62
+ var progressbar = jQuery( "#fm-progressbar" );
63
+ var progressLabel = jQuery( ".fm-progress-label" );
64
+
65
+ progressbar.progressbar({
66
+ max: <?php echo $subs_count; ?>
67
+ });
68
+
69
  jQuery.ajax({
70
  type: "POST",
71
  url:"<?php echo add_query_arg(array('form_id' => $form_id, 'send_header' => 0), admin_url('admin-ajax.php')); ?>&action=generete_"+type+"&limitstart="+limit,
72
  beforeSend: function() {
73
+ if(<?php echo $subs_count; ?> >= 1000 )
74
+ jQuery('.fm_modal').show();
75
  },
76
  success: function(data) {
77
  if(limit < <?php echo $subs_count; ?>) {
78
+ limit += 1000;
79
  export_submissions(type, limit);
80
+ progressbar.progressbar( "value", limit);
81
+ loaded_percent = Math.round((progressbar.progressbar( "value" ) * 100)/ parseInt(<?php echo $subs_count; ?>));
82
+ progressLabel.text( loaded_percent + ' %');
83
+ progressbarValue = progressbar.find( ".fm-progress-label" );
84
+ if( loaded_percent >= 46 ) {
85
+ progressbarValue.css({
86
+ "color": '#fff',
87
+ });
88
+ }
89
+ else {
90
+ progressbarValue.css({
91
+ "color": '#444',
92
+ });
93
+ }
94
  }
95
  else{
96
+ jQuery('.fm_modal').hide();
97
+ progressbar.progressbar( "value", 0);
98
+ progressLabel.text( 'Loading ...' );
99
+ progressbarValue.css({
100
+ "color": '#444',
101
+ });
102
  window.location = "<?php echo add_query_arg(array('form_id' => $form_id, 'send_header' => 1), admin_url('admin-ajax.php')); ?>&action=generete_"+type+"&limitstart="+limit;
103
  }
104
  }
202
  });
203
  });
204
  </script>
205
+ <div class="fm_modal">
206
+ <div id="fm-progressbar" ><div class="fm-progress-label">Loading...</div></div>
207
+ </div>
208
+ <div class="export_progress" style="position: fixed; z-index: 1003; height: 100%;width: 100%;top: 56%; left: 45%; font-size:15px; color:#000; display:none;"><span class="exp_count"><?php echo $subs_count; ?></span> left from <?php echo $subs_count; ?></div>
209
  <div id="sbox-overlay" onclick="toggleChBDiv(false)"
210
  style="z-index: 65555; position: fixed; top: 0px; left: 0px; visibility: visible; zoom: 1; background-color: #000000; opacity: 0.7; filter: alpha(opacity=70); display: none;">
211
  </div>
css/style.css CHANGED
@@ -384,16 +384,34 @@ display:inline-block
384
  left: 0;
385
  height: 100%;
386
  width: 100%;
387
- background: rgba( 255, 255, 255, .8 )
388
- url('http://i.stack.imgur.com/FhHRx.gif')
389
- 50% 50%
390
- no-repeat;
391
  }
392
 
393
- .fm_loading {
394
- overflow: hidden;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
395
  }
396
 
397
- .fm_loading .fm_modal {
398
- display: block;
 
 
399
  }
384
  left: 0;
385
  height: 100%;
386
  width: 100%;
387
+ background: rgba( 255, 255, 255, .8 );
 
 
 
388
  }
389
 
390
+
391
+ .ui-progressbar {
392
+ position: relative;
393
+ }
394
+
395
+ #fm-progressbar {
396
+ position: fixed;
397
+ z-index: 1003;
398
+ width: 35%;
399
+ left: 0;
400
+ top: 0;
401
+ bottom: 0;
402
+ right: 0;
403
+ margin: auto;
404
+ font-size: 14px;
405
+ color: #444;
406
+ }
407
+
408
+ #fm-progressbar .ui-progressbar-value {
409
+ background: #3CB9F5;
410
+ border-right: #3CB9F5;
411
  }
412
 
413
+ .fm-progress-label {
414
+ position: absolute;
415
+ left: 46%;
416
+ top: 4px;
417
  }
form-maker.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Form Maker
4
  * Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
5
  * Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
6
- * Version: 1.7.93
7
  * Author: WebDorado
8
  * Author URI: https://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -269,7 +269,7 @@ function register_fmemailverification_cpt(){
269
  // Activate plugin.
270
  function form_maker_activate() {
271
  $version = get_option("wd_form_maker_version");
272
- $new_version = '1.7.93';
273
  global $wpdb;
274
  if (!$version) {
275
  add_option("wd_form_maker_version", $new_version, '', 'no');
@@ -395,6 +395,7 @@ function form_maker_submissions_scripts() {
395
  }
396
  }
397
  wp_enqueue_script('jquery');
 
398
  wp_enqueue_script('jquery-ui-sortable');
399
  wp_enqueue_script('jquery-ui-widget');
400
  wp_enqueue_script('jquery-ui-slider');
3
  * Plugin Name: Form Maker
4
  * Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
5
  * Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
6
+ * Version: 1.7.94
7
  * Author: WebDorado
8
  * Author URI: https://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
269
  // Activate plugin.
270
  function form_maker_activate() {
271
  $version = get_option("wd_form_maker_version");
272
+ $new_version = '1.7.94';
273
  global $wpdb;
274
  if (!$version) {
275
  add_option("wd_form_maker_version", $new_version, '', 'no');
395
  }
396
  }
397
  wp_enqueue_script('jquery');
398
+ wp_enqueue_script( 'jquery-ui-progressbar' );
399
  wp_enqueue_script('jquery-ui-sortable');
400
  wp_enqueue_script('jquery-ui-widget');
401
  wp_enqueue_script('jquery-ui-slider');
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-form.html
4
  Tags: form, forms, form builder, form maker, form manager, form plugin, form with recaptcha, forms plugin, multiple forms, paypal form, survey form, feedback form, feedback forms, contact form,contact form plugin, contact form builder, form creator, email form, secure form, web form, form to email, contact forms, custom forms, form widget, captcha form, wordpress contact form ,recaptcha contact form, form creation, contact form with auto reply, widget contact form, builder, feedback, contacts form plugin , custom contact form, contact us form, formular, formulario, admin, captcha, contact, database, email, javascript, jquery, page, plugin, survey, widget, custom form, forms creator, input, validation, send copy, form with captcha , pdf
5
  Requires at least: 3.4
6
  Tested up to: 4.3
7
- Stable tag: 1.7.93
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -299,6 +299,9 @@ The Form Maker (Pro version) has simple PayPal integration. This allows the user
299
 
300
  == Changelog ==
301
 
 
 
 
302
  = 1.7.93 =
303
  Fixed: Bug in mailing
304
  Changed: Calendar styles
4
  Tags: form, forms, form builder, form maker, form manager, form plugin, form with recaptcha, forms plugin, multiple forms, paypal form, survey form, feedback form, feedback forms, contact form,contact form plugin, contact form builder, form creator, email form, secure form, web form, form to email, contact forms, custom forms, form widget, captcha form, wordpress contact form ,recaptcha contact form, form creation, contact form with auto reply, widget contact form, builder, feedback, contacts form plugin , custom contact form, contact us form, formular, formulario, admin, captcha, contact, database, email, javascript, jquery, page, plugin, survey, widget, custom form, forms creator, input, validation, send copy, form with captcha , pdf
5
  Requires at least: 3.4
6
  Tested up to: 4.3
7
+ Stable tag: 1.7.94
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
299
 
300
  == Changelog ==
301
 
302
+ = 1.7.94 =
303
+ Add: Progress bar for csv/xml export
304
+
305
  = 1.7.93 =
306
  Fixed: Bug in mailing
307
  Changed: Calendar styles