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

Version Description

  • Added: Option to enable/disable WP Editor.
  • Added: Additional security checks against bots.
  • Changed: Field validation on form options page.
  • Fixed: Error on deactivation.
  • Fixed: Port for connecting to a remote Database with SQL mapping.
  • Fixed: Displaying Form on all posts instead of the selected.
  • Fixed: Filled values of payment fields should not be lost on an error.
  • Fixed: Form is not saved if you click Publish before the page is loaded.
  • Fixed: Table of fields validation.
  • Fixed: Add shortcode functionality on Beaver, Elementor, SiteOrigin and Visual Composer builders.
  • Fixed: If you Sort/Filter the data via some column, then hit next page button, the sort reverts to the default sort order.
  • Fixed: Select all in Submissions should apply to the current page only.
  • Fixed: Do not change the page after IP block in submissions page.
  • Fixed: Do not change the page after deleting submission in submissions page.
Download this release

Release Info

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

Code changes from version 1.12.32 to 1.12.33

admin/controllers/FormMakerSQLMapping.php CHANGED
@@ -81,6 +81,9 @@ class FMControllerFormMakerSQLMapping extends FMAdminController {
81
  $host = $temp[0];
82
  $temp = explode('***wdfportwdf***', $temp[1]);
83
  $port = $temp[0];
 
 
 
84
  $temp = explode('***wdfusernamewdf***', $temp[1]);
85
  $username = $temp[0];
86
  $temp = explode('***wdfpasswordwdf***', $temp[1]);
81
  $host = $temp[0];
82
  $temp = explode('***wdfportwdf***', $temp[1]);
83
  $port = $temp[0];
84
+ if ($port) {
85
+ $host .= ':' . $port;
86
+ }
87
  $temp = explode('***wdfusernamewdf***', $temp[1]);
88
  $username = $temp[0];
89
  $temp = explode('***wdfpasswordwdf***', $temp[1]);
admin/controllers/Manage_fm.php CHANGED
@@ -310,6 +310,9 @@ class FMControllerManage_fm extends FMAdminController {
310
  public function add() {
311
  $backup_id = 0;
312
  $params = array();
 
 
 
313
  $params['id'] = $backup_id;
314
  $params['row'] = $this->model->get_row_data_new($backup_id);
315
  $params['page_url'] = $this->page_url;
@@ -360,6 +363,7 @@ class FMControllerManage_fm extends FMAdminController {
360
  public function edit( $id = 0, $backup_id = 0 ) {
361
  $fm_settings = get_option(WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
362
  $fm_advanced_layout = isset($fm_settings['fm_advanced_layout']) && $fm_settings['fm_advanced_layout'] == '1' ? 1 : 0;
 
363
  if ( $id && !$fm_advanced_layout ) {
364
  $fm_advanced_layout = !$this->model->get_autogen_layout($id);
365
  }
@@ -401,6 +405,7 @@ class FMControllerManage_fm extends FMAdminController {
401
  $params['default_theme'] = $this->model->get_default_theme_id();
402
 
403
  $params['form_preview_link'] = $this->model->get_form_preview_post();
 
404
 
405
  if ( $id ) {
406
  $params['form_options_url'] = add_query_arg( array( 'page' => $this->page , 'task' => 'form_options', 'current_id' => $id ), $this->page_url );
@@ -882,10 +887,10 @@ function after_submit() {
882
  WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display'), admin_url('admin.php') ) );
883
  }
884
  $params['row'] = $this->model->get_display_options($id);
885
- $params['page_title'] = '"'. $params['row_form']->title . '" ' . __('display options', WDFMInstance(self::PLUGIN)->prefix);
886
  $params['animation_effects'] = $this->animation_effects;
887
- $params['posts_and_pages'] = $this->model->fm_posts_query();
888
- $params['all_display_posts'] = $this->model->get_all_display_posts();
889
  $params['categories'] = $this->model->fm_categories_query();
890
  $params['selected_categories'] = explode(',', $params['row']->display_on_categories);
891
  $params['current_categories_array'] = explode(',', $params['row']->current_categories);
@@ -1340,9 +1345,9 @@ function after_submit() {
1340
  }
1341
 
1342
  public function fm_live_search() {
1343
- $search_string = !empty($_POST['pp_live_search']) ? sanitize_text_field($_POST['pp_live_search']) : '';
1344
- $post_type = !empty($_POST['pp_post_type']) ? sanitize_text_field($_POST['pp_post_type']) : 'any';
1345
- $full_content = !empty($_POST['pp_full_content']) ? sanitize_text_field($_POST['pp_full_content']) : 'true';
1346
  $args['s'] = $search_string;
1347
  $results = $this->fm_posts_query($args, $post_type);
1348
  $output = '<ul class="pp_search_results">';
@@ -1365,25 +1370,16 @@ function after_submit() {
1365
  */
1366
  public function fm_posts_query( $args = array(), $include_post_type = '' ) {
1367
  if ( 'only_pages' === $include_post_type ) {
1368
- $pt_names = array( 'page' );
1369
  }
1370
  elseif ( 'any' === $include_post_type || 'only_posts' === $include_post_type ) {
1371
- $default_post_types = array( 'post', 'page' );
1372
- $custom_post_types = get_post_types(array(
1373
- 'public' => TRUE,
1374
- '_builtin' => FALSE,
1375
- ));
1376
- $post_types = array_merge($default_post_types, $custom_post_types);
1377
- $pt_names = array_values($post_types);
1378
- if ( 'only_posts' === $include_post_type ) {
1379
- unset($pt_names[1]);
1380
- }
1381
  }
1382
  else {
1383
- $pt_names = $include_post_type;
1384
  }
1385
  $query = array(
1386
- 'post_type' => $pt_names,
1387
  'suppress_filters' => TRUE,
1388
  'update_post_term_cache' => FALSE,
1389
  'update_post_meta_cache' => FALSE,
310
  public function add() {
311
  $backup_id = 0;
312
  $params = array();
313
+ $fm_settings = get_option(WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
314
+ $fm_enable_wp_editor = !isset( $fm_settings['fm_enable_wp_editor'] ) ? 1 : $fm_settings['fm_enable_wp_editor'];
315
+ $params['fm_enable_wp_editor'] = $fm_enable_wp_editor;
316
  $params['id'] = $backup_id;
317
  $params['row'] = $this->model->get_row_data_new($backup_id);
318
  $params['page_url'] = $this->page_url;
363
  public function edit( $id = 0, $backup_id = 0 ) {
364
  $fm_settings = get_option(WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
365
  $fm_advanced_layout = isset($fm_settings['fm_advanced_layout']) && $fm_settings['fm_advanced_layout'] == '1' ? 1 : 0;
366
+ $fm_enable_wp_editor = !isset( $fm_settings['fm_enable_wp_editor'] ) ? 1 : $fm_settings['fm_enable_wp_editor'];
367
  if ( $id && !$fm_advanced_layout ) {
368
  $fm_advanced_layout = !$this->model->get_autogen_layout($id);
369
  }
405
  $params['default_theme'] = $this->model->get_default_theme_id();
406
 
407
  $params['form_preview_link'] = $this->model->get_form_preview_post();
408
+ $params['fm_enable_wp_editor'] = $fm_enable_wp_editor;
409
 
410
  if ( $id ) {
411
  $params['form_options_url'] = add_query_arg( array( 'page' => $this->page , 'task' => 'form_options', 'current_id' => $id ), $this->page_url );
887
  WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display'), admin_url('admin.php') ) );
888
  }
889
  $params['row'] = $this->model->get_display_options($id);
890
+ $params['page_title'] = '"'. $params['row_form']->title . '" ' . __('display options', WDFMInstance(self::PLUGIN)->prefix);
891
  $params['animation_effects'] = $this->animation_effects;
892
+ $params['display_on_list'] = array('everything' => 'All', 'home' => 'Homepage', 'archive' => 'Archives', 'post' => 'Post', 'page' => 'Page');
893
+ $params['posts_and_pages'] = $this->model->fm_posts_query();
894
  $params['categories'] = $this->model->fm_categories_query();
895
  $params['selected_categories'] = explode(',', $params['row']->display_on_categories);
896
  $params['current_categories_array'] = explode(',', $params['row']->current_categories);
1345
  }
1346
 
1347
  public function fm_live_search() {
1348
+ $search_string = !empty($_POST['pp_live_search']) ? sanitize_text_field($_POST['pp_live_search']) : '';
1349
+ $post_type = !empty($_POST['pp_post_type']) ? sanitize_text_field($_POST['pp_post_type']) : 'any';
1350
+ $full_content = !empty($_POST['pp_full_content']) ? sanitize_text_field($_POST['pp_full_content']) : 'true';
1351
  $args['s'] = $search_string;
1352
  $results = $this->fm_posts_query($args, $post_type);
1353
  $output = '<ul class="pp_search_results">';
1370
  */
1371
  public function fm_posts_query( $args = array(), $include_post_type = '' ) {
1372
  if ( 'only_pages' === $include_post_type ) {
1373
+ $post_type = array('page');
1374
  }
1375
  elseif ( 'any' === $include_post_type || 'only_posts' === $include_post_type ) {
1376
+ $post_type = array('post');
 
 
 
 
 
 
 
 
 
1377
  }
1378
  else {
1379
+ $post_type = $include_post_type;
1380
  }
1381
  $query = array(
1382
+ 'post_type' => $post_type,
1383
  'suppress_filters' => TRUE,
1384
  'update_post_term_cache' => FALSE,
1385
  'update_post_meta_cache' => FALSE,
admin/controllers/Submissions_fm.php CHANGED
@@ -104,6 +104,7 @@ class FMControllerSubmissions_fm extends FMAdminController {
104
  * @param string $task
105
  */
106
  public function bulk_action( $task = '' ) {
 
107
  $form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
108
  $check = WDW_FM_Library(self::PLUGIN)->get('check', '');
109
 
@@ -125,7 +126,20 @@ class FMControllerSubmissions_fm extends FMAdminController {
125
  $message = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $successfully_updated, WDFMInstance(self::PLUGIN)->prefix), $successfully_updated, $this->actions[$task][$block_action]);
126
  }
127
  }
128
- WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display', 'current_id' => $form_id, ($message === 2 ? 'message' : 'msg') => $message), admin_url('admin.php') ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  }
130
 
131
  /**
@@ -140,6 +154,8 @@ class FMControllerSubmissions_fm extends FMAdminController {
140
  $params['page_url'] = $this->page_url;
141
  $params['page_title'] = __('Submissions', WDFMInstance(self::PLUGIN)->prefix);
142
  $params['forms'] = $this->model->get_forms();
 
 
143
 
144
  $this->view->forms($params);
145
  }
@@ -157,11 +173,11 @@ class FMControllerSubmissions_fm extends FMAdminController {
157
  $params['page_title'] = __('Submissions', WDFMInstance(self::PLUGIN)->prefix);
158
  $params['actions'] = $this->actions;
159
 
160
- // Set pagination params.
161
- $params['pagination_url'] = add_query_arg( array( 'task' => 'display', 'current_id' => $id ), $this->page_url );
162
- $params['page_per_num'] = $this->page_per_num;
163
- $page = (int) WDW_FM_Library(self::PLUGIN)->get('paged', 1);
164
- $page_num = $page ? ($page - 1) * $params['page_per_num'] : 0;
165
 
166
  $params['forms'] = $this->model->get_forms();
167
  $params['statistics'] = $this->model->get_statistics( $id );
@@ -183,8 +199,9 @@ class FMControllerSubmissions_fm extends FMAdminController {
183
  $params['where_choices'] = $labels_parameters[7];
184
  $params['searched_ids'] = $labels_parameters[8] ? implode(',', $labels_parameters[8]) : '';
185
  $params['groupids'] = $labels_parameters[8] ? array_reverse($labels_parameters[8]) : array();
186
- $params['order_by'] = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
187
- $params['asc_or_desc'] = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'asc') ? 'asc' : 'desc');
 
188
 
189
  $lists = $labels_parameters[2];
190
  $params['lists'] = $lists;
@@ -198,19 +215,67 @@ class FMControllerSubmissions_fm extends FMAdminController {
198
  $params['oder_class_default'] = "manage-column column-autor sortable desc";
199
  $params['oder_class'] = "manage-column column-autor column-title sorted " . $params['asc_or_desc'];
200
  $params['m'] = count($params['sorted_label_names']);
201
-
 
202
  $is_search = false;
203
- foreach($lists as $list_key => $list_val){
204
- if(!empty($_POST[$list_key])) {
 
205
  $is_search = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  }
 
 
 
 
 
 
207
  }
208
- $params['is_search'] = $is_search; // (($lists['ip_search'] || $lists['startdate'] || $lists['enddate'] || $lists['username_search'] || $lists['useremail_search'] || $lists['id_search']) ? true : false );
209
- $params['is_stats'] = FALSE;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
 
211
  $params['rows_data'] = $lists;
212
  $params['rows'] = $labels_parameters[5];
213
  $params['subs_count'] = $labels_parameters[2]['total'];
 
 
 
 
 
214
 
215
  $option_key = (WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
216
  $params['fm_settings'] = get_option($option_key);
@@ -465,6 +530,7 @@ class FMControllerSubmissions_fm extends FMAdminController {
465
  * @return int
466
  */
467
  public function delete( $id = 0, $bulk = FALSE ) {
 
468
  $form_id = (int) WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
469
  $delete = $this->model->delete_row($id);
470
  $message = 2;
@@ -475,13 +541,18 @@ class FMControllerSubmissions_fm extends FMAdminController {
475
  if ( $bulk ) {
476
  return $message;
477
  }
478
-
479
- WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
480
- 'page' => $this->page,
481
- 'task' => 'display',
482
- 'current_id'=> $form_id,
483
- 'message' => $message,
484
- ), admin_url('admin.php')));
 
 
 
 
 
485
  }
486
 
487
  /**
@@ -495,6 +566,7 @@ class FMControllerSubmissions_fm extends FMAdminController {
495
  public function block_ip( $id = 0, $bulk = FALSE ) {
496
  global $wpdb;
497
 
 
498
  $form_id = (int) WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
499
  $q = $wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id ="%d"', $id);
500
  $row = $wpdb->get_row($q);
@@ -513,12 +585,17 @@ class FMControllerSubmissions_fm extends FMAdminController {
513
  return $message;
514
  }
515
 
516
- WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg( array(
517
- 'page' => $this->page,
518
- 'task' => 'display',
519
- 'current_id'=> $form_id,
520
- 'message' => $message,
521
- ), admin_url('admin.php')) );
 
 
 
 
 
522
  }
523
 
524
  /**
@@ -532,6 +609,7 @@ class FMControllerSubmissions_fm extends FMAdminController {
532
  public function unblock_ip( $id = 0, $bulk = FALSE ) {
533
  global $wpdb;
534
 
 
535
  $form_id = (int) WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
536
  $q = $wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id ="%d"', $id);
537
  $row = $wpdb->get_row($q);
@@ -550,11 +628,16 @@ class FMControllerSubmissions_fm extends FMAdminController {
550
  return $message;
551
  }
552
 
553
- WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg( array(
554
- 'page' => $this->page,
555
- 'task' => 'display',
556
- 'current_id'=> $form_id,
557
- 'message' => $message,
558
- ), admin_url('admin.php')) );
 
 
 
 
 
559
  }
560
  }
104
  * @param string $task
105
  */
106
  public function bulk_action( $task = '' ) {
107
+ $paged = (int) WDW_FM_Library(self::PLUGIN)->get('current_page', 1);
108
  $form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
109
  $check = WDW_FM_Library(self::PLUGIN)->get('check', '');
110
 
126
  $message = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $successfully_updated, WDFMInstance(self::PLUGIN)->prefix), $successfully_updated, $this->actions[$task][$block_action]);
127
  }
128
  }
129
+
130
+ $url_args = array(
131
+ 'page' => $this->page,
132
+ 'task' => 'display',
133
+ 'current_id' => $form_id,
134
+ 'paged' => $paged,
135
+ ($message === 2 ? 'message' : 'msg') => $message);
136
+
137
+ $delete_keys = array_merge($url_args, array('form_id' => '', WDFMInstance(self::PLUGIN)->nonce => ''));
138
+ $new_url_args = WDW_FM_Library(self::PLUGIN)->array_remove_keys($_GET, $delete_keys);
139
+ $redirect = add_query_arg( array_merge($url_args, $new_url_args), admin_url('admin.php') );
140
+
141
+ WDW_FM_Library(self::PLUGIN)->fm_redirect( $redirect, false );
142
+
143
  }
144
 
145
  /**
154
  $params['page_url'] = $this->page_url;
155
  $params['page_title'] = __('Submissions', WDFMInstance(self::PLUGIN)->prefix);
156
  $params['forms'] = $this->model->get_forms();
157
+ $params['order_by'] = 'group_id';
158
+ $params['asc_or_desc'] = 'desc';
159
 
160
  $this->view->forms($params);
161
  }
173
  $params['page_title'] = __('Submissions', WDFMInstance(self::PLUGIN)->prefix);
174
  $params['actions'] = $this->actions;
175
 
176
+ // Set pagination params.
177
+ $paged = (int) WDW_FM_Library(self::PLUGIN)->get('paged', 1);
178
+ $params['page_per_num'] = $this->page_per_num;
179
+ $params['page_number'] = $paged;
180
+ $page_num = $paged ? ($paged - 1) * $params['page_per_num'] : 0;
181
 
182
  $params['forms'] = $this->model->get_forms();
183
  $params['statistics'] = $this->model->get_statistics( $id );
199
  $params['where_choices'] = $labels_parameters[7];
200
  $params['searched_ids'] = $labels_parameters[8] ? implode(',', $labels_parameters[8]) : '';
201
  $params['groupids'] = $labels_parameters[8] ? array_reverse($labels_parameters[8]) : array();
202
+
203
+ $params['order_by'] = $order_by = WDW_FM_Library(self::PLUGIN)->get('order_by', 'group_id');
204
+ $params['asc_or_desc'] = $asc_or_desc = WDW_FM_Library(self::PLUGIN)->get('asc_or_desc', 'desc');
205
 
206
  $lists = $labels_parameters[2];
207
  $params['lists'] = $lists;
215
  $params['oder_class_default'] = "manage-column column-autor sortable desc";
216
  $params['oder_class'] = "manage-column column-autor column-title sorted " . $params['asc_or_desc'];
217
  $params['m'] = count($params['sorted_label_names']);
218
+ /* sort/filter logics */
219
+ $is_sort = false;
220
  $is_search = false;
221
+ $post_url_args = array();
222
+ foreach ( $lists as $list_key => $list_val ) {
223
+ if ( !empty($_POST[$list_key]) ) {
224
  $is_search = true;
225
+ $post_url_args[$list_key] = urlencode($_POST[$list_key]);
226
+ $post_url_args['is_search'] = 1;
227
+ }
228
+ }
229
+ /* Get sorting value on $_POST for redirect */
230
+ if ( !empty($_POST['order_by']) || !empty($_POST['asc_or_desc']) ) {
231
+ $is_sort = true;
232
+ $order_by = $_POST['order_by'];
233
+ $asc_or_desc = $_POST['asc_or_desc'];
234
+ }
235
+ if ( !empty($is_search) || $is_sort || isset($_POST['current_page']) ) {
236
+ if ( !empty($_POST['fm_is_search']) ) {
237
+ $post_url_args['paged'] = 1;
238
+ } else {
239
+ $post_url_args['paged'] = WDW_FM_Library(self::PLUGIN)->get('current_page', 1);
240
+ if ( isset($_POST['current_page']) ) {
241
+ $post_url_args['paged'] = $_POST['current_page'];
242
+ }
243
  }
244
+ $url_args = array_merge(
245
+ array('page' => $this->page, 'task' => 'display', 'current_id' => $id, 'order_by' => $order_by, 'asc_or_desc' => $asc_or_desc),
246
+ $post_url_args
247
+ );
248
+ $redirect = add_query_arg( $url_args, admin_url('admin.php') );
249
+ WDW_FM_Library(self::PLUGIN)->fm_redirect( $redirect, false );
250
  }
251
+
252
+ $pagination_url_args = array();
253
+ foreach ( $lists as $list_key => $list_val ) {
254
+ if ( !empty($_GET[$list_key]) ) {
255
+ $lists[$list_key] = urlencode(WDW_FM_Library(self::PLUGIN)->get($list_key));
256
+ $pagination_url_args[$list_key] = WDW_FM_Library(self::PLUGIN)->get($list_key);
257
+ $pagination_url_args['is_search'] = 1;
258
+ }
259
+ }
260
+ $pagination_url = array_merge(
261
+ array('page' => $this->page, 'task' => 'display', 'current_id' => $id, 'order_by' => $order_by, 'asc_or_desc' => $asc_or_desc),
262
+ $pagination_url_args
263
+ );
264
+ $params['pagination_url'] = add_query_arg( $pagination_url , admin_url('admin.php') );
265
+ $params['pagination_url_args'] = $pagination_url_args;
266
+
267
+ $params['lists'] = $lists;
268
+ $params['is_search'] = WDW_FM_Library(self::PLUGIN)->get('is_search', 0);
269
+ $params['is_stats'] = FALSE;
270
 
271
  $params['rows_data'] = $lists;
272
  $params['rows'] = $labels_parameters[5];
273
  $params['subs_count'] = $labels_parameters[2]['total'];
274
+ /* If not result redirect to first page */
275
+ if ( empty($params['group_id_s']) && $paged > 1 ) {
276
+ $redirect = add_query_arg( array_merge( $pagination_url, array('paged' => 1) ), admin_url('admin.php') );
277
+ WDW_FM_Library(self::PLUGIN)->fm_redirect( $redirect );
278
+ }
279
 
280
  $option_key = (WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
281
  $params['fm_settings'] = get_option($option_key);
530
  * @return int
531
  */
532
  public function delete( $id = 0, $bulk = FALSE ) {
533
+ $paged = (int) WDW_FM_Library(self::PLUGIN)->get('paged', 1);
534
  $form_id = (int) WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
535
  $delete = $this->model->delete_row($id);
536
  $message = 2;
541
  if ( $bulk ) {
542
  return $message;
543
  }
544
+
545
+ $url_args = array(
546
+ 'page' => $this->page,
547
+ 'task' => 'display',
548
+ 'current_id' => $form_id,
549
+ 'paged' => $paged,
550
+ 'message' => $message);
551
+ $delete_keys = array_merge($url_args, array('form_id' => '', WDFMInstance(self::PLUGIN)->nonce => ''));
552
+ $new_url_args = WDW_FM_Library(self::PLUGIN)->array_remove_keys($_GET, $delete_keys);
553
+
554
+ $redirect = add_query_arg( array_merge($url_args, $new_url_args), admin_url('admin.php') );
555
+ WDW_FM_Library(self::PLUGIN)->fm_redirect( $redirect );
556
  }
557
 
558
  /**
566
  public function block_ip( $id = 0, $bulk = FALSE ) {
567
  global $wpdb;
568
 
569
+ $paged = (int) WDW_FM_Library(self::PLUGIN)->get('paged', 1);
570
  $form_id = (int) WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
571
  $q = $wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id ="%d"', $id);
572
  $row = $wpdb->get_row($q);
585
  return $message;
586
  }
587
 
588
+ $url_args = array(
589
+ 'page' => $this->page,
590
+ 'task' => 'display',
591
+ 'current_id' => $form_id,
592
+ 'paged' => $paged,
593
+ 'message' => $message);
594
+ $delete_keys = array_merge($url_args, array('form_id' => '', WDFMInstance(self::PLUGIN)->nonce => ''));
595
+ $new_url_args = WDW_FM_Library(self::PLUGIN)->array_remove_keys($_GET, $delete_keys);
596
+
597
+ $redirect = add_query_arg( array_merge($url_args, $new_url_args), admin_url('admin.php') );
598
+ WDW_FM_Library(self::PLUGIN)->fm_redirect( $redirect );
599
  }
600
 
601
  /**
609
  public function unblock_ip( $id = 0, $bulk = FALSE ) {
610
  global $wpdb;
611
 
612
+ $paged = (int) WDW_FM_Library(self::PLUGIN)->get('paged', 1);
613
  $form_id = (int) WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
614
  $q = $wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id ="%d"', $id);
615
  $row = $wpdb->get_row($q);
628
  return $message;
629
  }
630
 
631
+ $url_args = array(
632
+ 'page' => $this->page,
633
+ 'task' => 'display',
634
+ 'current_id' => $form_id,
635
+ 'paged' => $paged,
636
+ 'message' => $message);
637
+ $delete_keys = array_merge($url_args, array('form_id' => '', WDFMInstance(self::PLUGIN)->nonce => ''));
638
+ $new_url_args = WDW_FM_Library(self::PLUGIN)->array_remove_keys($_GET, $delete_keys);
639
+
640
+ $redirect = add_query_arg( array_merge($url_args, $new_url_args), admin_url('admin.php') );
641
+ WDW_FM_Library(self::PLUGIN)->fm_redirect( $redirect );
642
  }
643
  }
admin/models/FMSelectDataFromDb.php CHANGED
@@ -37,6 +37,10 @@ class FMModelSelect_data_from_db extends FMAdminModel {
37
  $password = WDW_FM_Library(self::PLUGIN)->get('password', '');
38
  $database = WDW_FM_Library(self::PLUGIN)->get('database', '');
39
  $host = WDW_FM_Library(self::PLUGIN)->get('host', '');
 
 
 
 
40
  $wpdb_temp = new wpdb($username, $password, $database, $host);
41
  $query = "SHOW TABLES";
42
  $tables = $wpdb_temp->get_col($query);
@@ -93,6 +97,10 @@ class FMModelSelect_data_from_db extends FMAdminModel {
93
  $password = WDW_FM_Library(self::PLUGIN)->get('password', '');
94
  $database = WDW_FM_Library(self::PLUGIN)->get('database', '');
95
  $host = WDW_FM_Library(self::PLUGIN)->get('host', '');
 
 
 
 
96
  $wpdb_temp = new wpdb($username, $password, $database, $host);
97
  $table_struct = $wpdb_temp->get_results($query);
98
  }
37
  $password = WDW_FM_Library(self::PLUGIN)->get('password', '');
38
  $database = WDW_FM_Library(self::PLUGIN)->get('database', '');
39
  $host = WDW_FM_Library(self::PLUGIN)->get('host', '');
40
+ $port = WDW_FM_Library(self::PLUGIN)->get('port', '');
41
+ if ($port) {
42
+ $host .= ':' . $port;
43
+ }
44
  $wpdb_temp = new wpdb($username, $password, $database, $host);
45
  $query = "SHOW TABLES";
46
  $tables = $wpdb_temp->get_col($query);
97
  $password = WDW_FM_Library(self::PLUGIN)->get('password', '');
98
  $database = WDW_FM_Library(self::PLUGIN)->get('database', '');
99
  $host = WDW_FM_Library(self::PLUGIN)->get('host', '');
100
+ $port = WDW_FM_Library(self::PLUGIN)->get('port', '');
101
+ if ($port) {
102
+ $host .= ':' . $port;
103
+ }
104
  $wpdb_temp = new wpdb($username, $password, $database, $host);
105
  $table_struct = $wpdb_temp->get_results($query);
106
  }
admin/models/FMSqlMapping.php CHANGED
@@ -49,6 +49,10 @@ class FMModelFormMakerSQLMapping extends FMAdminModel {
49
  $password = WDW_FM_Library(self::PLUGIN)->get('password', '');
50
  $database = WDW_FM_Library(self::PLUGIN)->get('database', '');
51
  $host = WDW_FM_Library(self::PLUGIN)->get('host', '');
 
 
 
 
52
  $wpdb_temp = new wpdb($username, $password, $database, $host);
53
  $query = "SHOW TABLES";
54
  $tables = $wpdb_temp->get_col($query);
@@ -89,6 +93,10 @@ class FMModelFormMakerSQLMapping extends FMAdminModel {
89
  $password = WDW_FM_Library(self::PLUGIN)->get('password', '');
90
  $database = WDW_FM_Library(self::PLUGIN)->get('database', '');
91
  $host = WDW_FM_Library(self::PLUGIN)->get('host', '');
 
 
 
 
92
  $wpdb_temp = new wpdb($username, $password, $database, $host);
93
  $table_struct = $wpdb_temp->get_results($query);
94
  }
49
  $password = WDW_FM_Library(self::PLUGIN)->get('password', '');
50
  $database = WDW_FM_Library(self::PLUGIN)->get('database', '');
51
  $host = WDW_FM_Library(self::PLUGIN)->get('host', '');
52
+ $port = WDW_FM_Library(self::PLUGIN)->get('port', '');
53
+ if ($port) {
54
+ $host .= ':' . $port;
55
+ }
56
  $wpdb_temp = new wpdb($username, $password, $database, $host);
57
  $query = "SHOW TABLES";
58
  $tables = $wpdb_temp->get_col($query);
93
  $password = WDW_FM_Library(self::PLUGIN)->get('password', '');
94
  $database = WDW_FM_Library(self::PLUGIN)->get('database', '');
95
  $host = WDW_FM_Library(self::PLUGIN)->get('host', '');
96
+ $port = WDW_FM_Library(self::PLUGIN)->get('port', '');
97
+ if ($port) {
98
+ $host .= ':' . $port;
99
+ }
100
  $wpdb_temp = new wpdb($username, $password, $database, $host);
101
  $table_struct = $wpdb_temp->get_results($query);
102
  }
admin/models/Manage_fm.php CHANGED
@@ -3523,39 +3523,10 @@ class FMModelManage_fm extends FMAdminModel {
3523
  return $row;
3524
  }
3525
 
3526
- /**
3527
- * Get all display posts.
3528
- *
3529
- * @return $post_types array
3530
- */
3531
- public function get_all_display_posts() {
3532
- $def_post_types = array('everything' => 'All', 'home' => 'Homepage', 'archive' => 'Archives', 'post' => 'Post', 'page' => 'Page');
3533
- $custom_post_types = get_post_types( array(
3534
- 'public' => true,
3535
- '_builtin' => false,
3536
- ) );
3537
-
3538
- if ( !empty($custom_post_types) ) {
3539
- foreach ( WDW_FM_Library(self::PLUGIN)->not_display_posts() as $key ) {
3540
- if ( isset($custom_post_types[$key]) ) {
3541
- unset($custom_post_types[$key]);
3542
- }
3543
- }
3544
- }
3545
- $post_types = array_merge($def_post_types, $custom_post_types);
3546
- return $post_types;
3547
- }
3548
-
3549
  public function fm_posts_query() {
3550
  $default_post_types = array( 'post', 'page' );
3551
- $custom_post_types = get_post_types(array(
3552
- 'public' => TRUE,
3553
- '_builtin' => FALSE,
3554
- ));
3555
- $post_types = array_merge($default_post_types, $custom_post_types);
3556
- $pt_names = array_values($post_types);
3557
  $query = array(
3558
- 'post_type' => $pt_names,
3559
  'suppress_filters' => TRUE,
3560
  'update_post_term_cache' => FALSE,
3561
  'update_post_meta_cache' => FALSE,
@@ -3570,13 +3541,14 @@ class FMModelManage_fm extends FMAdminModel {
3570
  $results = array();
3571
  foreach ( $posts as $post ) {
3572
  $post_id = (int) $post->ID;
3573
- $post_type = $post->post_type;
3574
- $post_title = trim(esc_html(strip_tags(get_the_title($post))));
3575
  $results[$post_id] = array(
3576
  'title' => $post_title,
3577
  'post_type' => $post->post_type,
3578
  );
3579
  }
 
3580
  wp_reset_postdata();
3581
  return $results;
3582
  }
3523
  return $row;
3524
  }
3525
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3526
  public function fm_posts_query() {
3527
  $default_post_types = array( 'post', 'page' );
 
 
 
 
 
 
3528
  $query = array(
3529
+ 'post_type' => $default_post_types,
3530
  'suppress_filters' => TRUE,
3531
  'update_post_term_cache' => FALSE,
3532
  'update_post_meta_cache' => FALSE,
3541
  $results = array();
3542
  foreach ( $posts as $post ) {
3543
  $post_id = (int) $post->ID;
3544
+ $post_type = $post->post_type;
3545
+ $post_title = trim(esc_html(strip_tags(get_the_title($post))));
3546
  $results[$post_id] = array(
3547
  'title' => $post_title,
3548
  'post_type' => $post->post_type,
3549
  );
3550
  }
3551
+
3552
  wp_reset_postdata();
3553
  return $results;
3554
  }
admin/models/Options_fm.php CHANGED
@@ -15,6 +15,7 @@ class FMModelOptions_fm extends FMAdminModel {
15
  $csv_delimiter = (isset($_POST['csv_delimiter']) && $_POST['csv_delimiter'] != '' ? esc_html(stripslashes($_POST['csv_delimiter'])) : ',');
16
  $fm_shortcode = (isset($_POST['fm_shortcode']) ? "old" : '');
17
  $fm_advanced_layout = WDW_FM_Library(self::PLUGIN)->get('fm_advanced_layout', '0');
 
18
  $map_key = WDW_FM_Library(self::PLUGIN)->get('map_key', '');
19
  update_option( $option_key, array(
20
  'public_key' => $public_key,
@@ -23,6 +24,7 @@ class FMModelOptions_fm extends FMAdminModel {
23
  'map_key' => $map_key,
24
  'fm_shortcode' => $fm_shortcode,
25
  'fm_advanced_layout' => $fm_advanced_layout,
 
26
  'ajax_export_per_page' => !empty($fm_settings['ajax_export_per_page']) ? $fm_settings['export_per_page'] : 1000
27
  ));
28
  return 8;
15
  $csv_delimiter = (isset($_POST['csv_delimiter']) && $_POST['csv_delimiter'] != '' ? esc_html(stripslashes($_POST['csv_delimiter'])) : ',');
16
  $fm_shortcode = (isset($_POST['fm_shortcode']) ? "old" : '');
17
  $fm_advanced_layout = WDW_FM_Library(self::PLUGIN)->get('fm_advanced_layout', '0');
18
+ $fm_enable_wp_editor = WDW_FM_Library(self::PLUGIN)->get('fm_enable_wp_editor', '1');
19
  $map_key = WDW_FM_Library(self::PLUGIN)->get('map_key', '');
20
  update_option( $option_key, array(
21
  'public_key' => $public_key,
24
  'map_key' => $map_key,
25
  'fm_shortcode' => $fm_shortcode,
26
  'fm_advanced_layout' => $fm_advanced_layout,
27
+ 'fm_enable_wp_editor' => $fm_enable_wp_editor,
28
  'ajax_export_per_page' => !empty($fm_settings['ajax_export_per_page']) ? $fm_settings['export_per_page'] : 1000
29
  ));
30
  return 8;
admin/models/Submissions_fm.php CHANGED
@@ -128,16 +128,16 @@ class FMModelSubmissions_fm extends FMAdminModel {
128
  $sorted_label_names_original = array();
129
  $where_labels = array();
130
  $where2 = array();
131
- $order_by = ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
132
- $asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'asc') ? 'asc' : 'desc');
133
 
134
- $lists['hide_label_list'] = ((isset($_POST['hide_label_list'])) ? esc_html(stripslashes($_POST['hide_label_list'])) : '');
135
- $lists['startdate'] = ((isset($_POST['startdate'])) ? esc_html(stripslashes($_POST['startdate'])) : '');
136
- $lists['enddate'] = ((isset($_POST['enddate'])) ? esc_html(stripslashes($_POST['enddate'])) : '');
137
- $lists['ip_search'] = ((isset($_POST['ip_search'])) ? esc_html(stripslashes($_POST['ip_search'])) : '');
138
- $lists['username_search'] = ((isset($_POST['username_search'])) ? esc_html(stripslashes($_POST['username_search'])) : '');
139
- $lists['useremail_search'] = ((isset($_POST['useremail_search'])) ? esc_html(stripslashes($_POST['useremail_search'])) : '');
140
- $lists['id_search'] = ((isset($_POST['id_search'])) ? esc_html(stripslashes($_POST['id_search'])) : '');
 
 
141
  if ( $lists['ip_search'] ) {
142
  $where[] = 'ip LIKE "%' . $lists['ip_search'] . '%"';
143
  }
@@ -203,25 +203,26 @@ class FMModelSubmissions_fm extends FMAdminModel {
203
  array_push($sorted_label_names, $label_names[$key]);
204
  array_push($sorted_label_types, $label_types[$key]);
205
  array_push($sorted_label_names_original, $label_names_original[$key]);
206
- if ( isset($_POST[$form_id . '_' . $label_id . '_search']) ) {
207
- $search_temp = esc_html($_POST[$form_id . '_' . $label_id . '_search']);
 
 
208
  }
209
- else {
210
- $search_temp = '';
211
- }
212
- $search_temp = strtolower($search_temp);
 
213
  $lists[$form_id . '_' . $label_id . '_search'] = $search_temp;
214
  if ( $search_temp ) {
215
  $join_query[] = 'search';
216
  $join_where[] = array( 'label' => $label_id, 'search' => $search_temp );
217
  }
 
218
  if ( isset($_POST[$form_id . '_' . $label_id . '_search_verified']) ) {
219
  $search_verified = $_POST[$form_id . '_' . $label_id . '_search_verified'];
220
  $lists[$form_id . '_' . $label_id . '_search_verified'] = $search_verified;
221
  }
222
- else {
223
- $search_verified = '';
224
- }
225
  if ( $search_verified && isset($ver_emails_array[$label_id]) ) {
226
  $join_query[] = 'search';
227
  $join_where[] = NULL;
@@ -306,8 +307,8 @@ class FMModelSubmissions_fm extends FMAdminModel {
306
  }
307
  $total = $wpdb->get_var($query);
308
  $query_sub_count = "SELECT count(distinct group_id) from " . $wpdb->prefix . "formmaker_submits";
309
- $sub_count = (int) $wpdb->get_var($query_sub_count);
310
- $query = $join . ' ' . $orderby . ' LIMIT ' . $page_num . ', '. $per_num;
311
  $results = $wpdb->get_results($query);
312
  for ( $i = 0; $i < count($results); $i++ ) {
313
  array_push($rows_ord, $results[$i]->group_id);
@@ -324,7 +325,7 @@ class FMModelSubmissions_fm extends FMAdminModel {
324
  $where2[] = "group_id='" . $rows_ordd . "'";
325
  }
326
  $where2 = (count($where2) ? ' WHERE ' . implode(' OR ', $where2) . '' : '');
327
- $query = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits ' . $where2;
328
  $rows = $wpdb->get_results($query);
329
  $group_ids = $rows_ord;
330
  $lists['total'] = $total;
@@ -883,6 +884,9 @@ class FMModelSubmissions_fm extends FMAdminModel {
883
  $host = $temp[0];
884
  $temp = explode('@@@wdfportwdf@@@', $temp[1]);
885
  $port = $temp[0];
 
 
 
886
  $temp = explode('@@@wdfusernamewdf@@@', $temp[1]);
887
  $username = $temp[0];
888
  $temp = explode('@@@wdfpasswordwdf@@@', $temp[1]);
@@ -918,6 +922,9 @@ class FMModelSubmissions_fm extends FMAdminModel {
918
  $host = $temp[0];
919
  $temp = explode('@@@wdfportwdf@@@', $temp[1]);
920
  $port = $temp[0];
 
 
 
921
  $temp = explode('@@@wdfusernamewdf@@@', $temp[1]);
922
  $username = $temp[0];
923
  $temp = explode('@@@wdfpasswordwdf@@@', $temp[1]);
128
  $sorted_label_names_original = array();
129
  $where_labels = array();
130
  $where2 = array();
 
 
131
 
132
+ $order_by = WDW_FM_Library(self::PLUGIN)->get('order_by', 'group_id');
133
+ $asc_or_desc = WDW_FM_Library(self::PLUGIN)->get('asc_or_desc', 'desc');
134
+ $lists['hide_label_list'] = WDW_FM_Library(self::PLUGIN)->get('hide_label_list', '');
135
+ $lists['startdate'] = WDW_FM_Library(self::PLUGIN)->get('startdate', '');
136
+ $lists['enddate'] = WDW_FM_Library(self::PLUGIN)->get('enddate', '');
137
+ $lists['ip_search'] = WDW_FM_Library(self::PLUGIN)->get('ip_search', '');
138
+ $lists['username_search'] = WDW_FM_Library(self::PLUGIN)->get('username_search', '');
139
+ $lists['useremail_search'] = WDW_FM_Library(self::PLUGIN)->get('useremail_search', '');
140
+ $lists['id_search'] = WDW_FM_Library(self::PLUGIN)->get('id_search', '');
141
  if ( $lists['ip_search'] ) {
142
  $where[] = 'ip LIKE "%' . $lists['ip_search'] . '%"';
143
  }
203
  array_push($sorted_label_names, $label_names[$key]);
204
  array_push($sorted_label_types, $label_types[$key]);
205
  array_push($sorted_label_names_original, $label_names_original[$key]);
206
+ $search_temp = '';
207
+ $_search_key = $form_id . '_' . $label_id . '_search';
208
+ if ( WDW_FM_Library(self::PLUGIN)->get($_search_key, '') ) {
209
+ $search_temp = WDW_FM_Library(self::PLUGIN)->get($_search_key, '');
210
  }
211
+ $search_temp = urldecode($search_temp);
212
+ /* TODO conflict other DB version
213
+ $search_temp = html_entity_decode($search_temp, ENT_QUOTES);
214
+ */
215
+
216
  $lists[$form_id . '_' . $label_id . '_search'] = $search_temp;
217
  if ( $search_temp ) {
218
  $join_query[] = 'search';
219
  $join_where[] = array( 'label' => $label_id, 'search' => $search_temp );
220
  }
221
+ $search_verified = '';
222
  if ( isset($_POST[$form_id . '_' . $label_id . '_search_verified']) ) {
223
  $search_verified = $_POST[$form_id . '_' . $label_id . '_search_verified'];
224
  $lists[$form_id . '_' . $label_id . '_search_verified'] = $search_verified;
225
  }
 
 
 
226
  if ( $search_verified && isset($ver_emails_array[$label_id]) ) {
227
  $join_query[] = 'search';
228
  $join_where[] = NULL;
307
  }
308
  $total = $wpdb->get_var($query);
309
  $query_sub_count = "SELECT count(distinct group_id) from " . $wpdb->prefix . "formmaker_submits";
310
+ $sub_count = (int) $wpdb->get_var($query_sub_count);
311
+ $query = $join . ' ' . $orderby . ' LIMIT ' . $page_num . ', '. $per_num;
312
  $results = $wpdb->get_results($query);
313
  for ( $i = 0; $i < count($results); $i++ ) {
314
  array_push($rows_ord, $results[$i]->group_id);
325
  $where2[] = "group_id='" . $rows_ordd . "'";
326
  }
327
  $where2 = (count($where2) ? ' WHERE ' . implode(' OR ', $where2) . '' : '');
328
+ $query = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits ' . $where2;
329
  $rows = $wpdb->get_results($query);
330
  $group_ids = $rows_ord;
331
  $lists['total'] = $total;
884
  $host = $temp[0];
885
  $temp = explode('@@@wdfportwdf@@@', $temp[1]);
886
  $port = $temp[0];
887
+ if ($port) {
888
+ $host .= ':' . $port;
889
+ }
890
  $temp = explode('@@@wdfusernamewdf@@@', $temp[1]);
891
  $username = $temp[0];
892
  $temp = explode('@@@wdfpasswordwdf@@@', $temp[1]);
922
  $host = $temp[0];
923
  $temp = explode('@@@wdfportwdf@@@', $temp[1]);
924
  $port = $temp[0];
925
+ if ($port) {
926
+ $host .= ':' . $port;
927
+ }
928
  $temp = explode('@@@wdfusernamewdf@@@', $temp[1]);
929
  $username = $temp[0];
930
  $temp = explode('@@@wdfpasswordwdf@@@', $temp[1]);
admin/views/FMSqlMapping.php CHANGED
@@ -32,6 +32,9 @@ class FMViewFormMakerSQLMapping extends FMAdminView {
32
  $host = $temp[0];
33
  $temp = explode('***wdfportwdf***', $temp[1]);
34
  $port = $temp[0];
 
 
 
35
  $temp = explode('***wdfusernamewdf***', $temp[1]);
36
  $username = $temp[0];
37
  $temp = explode('***wdfpasswordwdf***', $temp[1]);
32
  $host = $temp[0];
33
  $temp = explode('***wdfportwdf***', $temp[1]);
34
  $port = $temp[0];
35
+ if ($port) {
36
+ $host .= ':' . $port;
37
+ }
38
  $temp = explode('***wdfusernamewdf***', $temp[1]);
39
  $username = $temp[0];
40
  $temp = explode('***wdfpasswordwdf***', $temp[1]);
admin/views/Manage_fm.php CHANGED
@@ -338,7 +338,7 @@ class FMViewManage_fm extends FMAdminView {
338
  }
339
  }
340
  ?>
341
- <button class="button button-primary button-large" onclick="if (fm_check_required('title', '<?php _e('Form Title', WDFMInstance(self::PLUGIN)->prefix); ?>') || !FormManageSubmitButton()) {return false;}; fm_set_input_value('task', 'apply');">
342
  <?php
343
  if ($row->title) {
344
  _e('Update', WDFMInstance(self::PLUGIN)->prefix);
@@ -417,13 +417,13 @@ class FMViewManage_fm extends FMAdminView {
417
  </div>
418
  <div class="fm-row">
419
  <label><?php _e('Description:', WDFMInstance(self::PLUGIN)->prefix); ?></label>
420
- <div id="description_editor" style="display: inline-block; vertical-align: middle;">
421
  <input type="hidden" id="header_description_initial_value" value="<?php echo rawurlencode($row->header_description); ?>" />
422
- <?php if (user_can_richedit()) {
423
  wp_editor($row->header_description, 'header_description', array('teeny' => TRUE, 'textarea_name' => 'header_description', 'media_buttons' => FALSE, 'textarea_rows' => 5));
424
  }
425
  else { ?>
426
- <textarea name="header_description" id="header_description" cols="40" rows="5" style="height: 350px;" class="mce_editable fm-check-change" aria-hidden="true" data-initial-value="<?php echo $row->header_description; ?>"><?php echo $row->header_description; ?></textarea>
427
  <?php
428
  }
429
  ?>
@@ -489,7 +489,7 @@ class FMViewManage_fm extends FMAdminView {
489
  </div>
490
 
491
  <div type="type_text" class="wdform_field">
492
- <div class="add-new-button button-primary" onclick="if (fm_check_something_really_important()) return; popup_ready(); Enable(); return false;">
493
  <span class="dashicons dashicons-move"></span>
494
  <?php _e('New Field', WDFMInstance(self::PLUGIN)->prefix); ?>
495
  </div>
@@ -678,7 +678,7 @@ class FMViewManage_fm extends FMAdminView {
678
  <input type="hidden" id="editing_id" />
679
  <input type="hidden" value="<?php echo WDFMInstance(self::PLUGIN)->plugin_url; ?>" id="form_plugins_url" />
680
  <div id="main_editor" style="position: fixed; display: none; z-index: 140;">
681
- <?php if ( user_can_richedit() ) {
682
  wp_editor('', 'form_maker_editor', array(
683
  'teeny' => TRUE,
684
  'textarea_name' => 'form_maker_editor',
@@ -687,7 +687,7 @@ class FMViewManage_fm extends FMAdminView {
687
  ));
688
  }
689
  else { ?>
690
- <textarea name="form_maker_editor" id="form_maker_editor" cols="40" rows="5" style="width: 440px; height: 350px;" class="mce_editable" aria-hidden="true"></textarea>
691
  <?php
692
  }
693
  ?>
@@ -1017,7 +1017,7 @@ class FMViewManage_fm extends FMAdminView {
1017
  <div class="wd-box-content">
1018
  <div class="wd-group wd-has-placeholder">
1019
  <label class="wd-label" for="mail"><?php _e('Email to send submissions to', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1020
- <input type="text" id="mail" name="mail" value="<?php echo $row->mail; ?>" />
1021
  <span class="dashicons dashicons-list-view" data-id="mail"></span>
1022
  <p class="description"><?php _e('Specify the email address(es), to which submitted form information will be sent. For multiple email addresses separate with commas.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1023
  </div>
@@ -1082,7 +1082,7 @@ class FMViewManage_fm extends FMAdminView {
1082
  <input style="<?php echo ($fields_count == 1) ? 'display:none;' : ''; ?>" class="wd-radio" type="radio" id="other" name="from_mail" value="other" <?php echo ($is_other) ? 'checked="checked"' : ''; ?> onclick="wdshow('mail_from_other_wrap')" />
1083
  <label style="<?php echo ($fields_count == 1) ? 'display:none;' : ''; ?>" class="wd-label-radio" for="other"><?php _e('Other', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1084
  <p style="display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="mail_from_other_wrap">
1085
- <input type="text" name="mail_from_other" id="mail_from_other" value="<?php echo ($is_other) ? $row->from_mail : ''; ?>" />
1086
  </p>
1087
  <p class="description"><?php _e('Specify the email address from which the administrator will receive the email.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1088
  </div>
@@ -1116,18 +1116,18 @@ class FMViewManage_fm extends FMAdminView {
1116
  <input style="<?php echo ($fields_count == 1) ? 'display: none;' : ''; ?>" class="wd-radio" type="radio" id="other1" name="reply_to" value="other" <?php echo ($is_other) ? 'checked="checked"' : ''; ?> onclick="wdshow('reply_to_other_wrap')" />
1117
  <label style="<?php echo ($fields_count == 1) ? 'display: none;' : ''; ?>" class="wd-label-radio" for="other1"><?php _e('Other', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1118
  <p style="display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="reply_to_other_wrap">
1119
- <input type="text" name="reply_to_other" value="<?php echo ($is_other && $row->reply_to) ? $row->reply_to : ''; ?>" id="reply_to_other" />
1120
  </p>
1121
  <p class="description"><?php _e('Specify an alternative email address, to which the administrator will be able to reply upon receiving the message.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1122
  </div>
1123
  <div class="wd-group">
1124
  <label class="wd-label" for="mail_cc"><?php _e('CC', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1125
- <input type="text" id="mail_cc" name="mail_cc" value="<?php echo $row->mail_cc ?>" />
1126
  <p class="description"><?php _e('Provide additional email addresses to send the submission or confirmation email to. The receiver will be able to view all other recipients.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1127
  </div>
1128
  <div class="wd-group">
1129
  <label class="wd-label" for="mail_bcc"><?php _e('BCC', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1130
- <input type="text" id="mail_bcc" name="mail_bcc" value="<?php echo $row->mail_bcc ?>" />
1131
  <p class="description"><?php _e('Write additional email addresses to send the submission or confirmation email to. The receiver will not be able to view other recipients.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1132
  </div>
1133
  <div class="wd-group">
@@ -1225,7 +1225,7 @@ class FMViewManage_fm extends FMAdminView {
1225
  <div class="inside">
1226
  <div class="wd-group">
1227
  <label class="wd-label" for="mail_from_user"><?php _e('Email From', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1228
- <input type="text" id="mail_from_user" name="mail_from_user" value="<?php echo $row->mail_from_user; ?>" />
1229
  <p class="description"><?php _e('Specify the email address from which the submitter will receive the email.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1230
  </div>
1231
  <div class="wd-group wd-has-placeholder">
@@ -1236,17 +1236,17 @@ class FMViewManage_fm extends FMAdminView {
1236
  </div>
1237
  <div class="wd-group">
1238
  <label class="wd-label" for="reply_to_user"><?php _e('Reply to (if different from "Email From")', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1239
- <input type="text" name="reply_to_user" value="<?php echo $row->reply_to_user; ?>" id="reply_to_user" />
1240
  <p class="description"><?php _e('Specify an alternative email address, to which the submitter will be able to reply upon receiving the message.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1241
  </div>
1242
  <div class="wd-group">
1243
  <label class="wd-label" for="mail_cc_user"><?php _e('CC', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1244
- <input type="text" name="mail_cc_user" value="<?php echo $row->mail_cc_user ?>" id="mail_cc_user" />
1245
  <p class="description"><?php _e('Provide additional email addresses to send the submission or confirmation email to. The receiver will be able to view all other recipients.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1246
  </div>
1247
  <div class="wd-group">
1248
  <label class="wd-label" for="mail_bcc_user"><?php _e('BCC', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1249
- <input type="text" name="mail_bcc_user" value="<?php echo $row->mail_bcc_user ?>" id="mail_bcc_user" />
1250
  <p class="description"><?php _e('Write additional email addresses to send the submission or confirmation email to. The receiver will not be able to view other recipients.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1251
  </div>
1252
  <div class="wd-group">
@@ -1295,85 +1295,85 @@ class FMViewManage_fm extends FMAdminView {
1295
  <div class="wd-table-col-70">
1296
  <div class="wd-box-section">
1297
  <div class="wd-box-content">
1298
- <span class="wd-group">
1299
- <label class="wd-label"><?php _e('Action type', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1300
- <input type="radio" name="submit_text_type" id="text_type_none" onclick="set_type('none')" value="1" <?php echo ($row->submit_text_type != 2 && $row->submit_text_type != 3 && $row->submit_text_type != 4 && $row->submit_text_type != 5) ? "checked" : ""; ?> />
1301
- <label for="text_type_none"><?php _e('Stay on Form', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1302
- <br>
1303
- <input type="radio" name="submit_text_type" id="text_type_post" onclick="set_type('post')" value="2" <?php echo ($row->submit_text_type == 2) ? "checked" : ""; ?> />
1304
- <label for="text_type_post"><?php _e('Post', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1305
- <br>
1306
- <input type="radio" name="submit_text_type" id="text_type_page" onclick="set_type('page')" value="5" <?php echo ($row->submit_text_type == 5) ? "checked" : ""; ?> />
1307
- <label for="text_type_page"><?php _e('Page', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1308
- <br>
1309
- <input type="radio" name="submit_text_type" id="text_type_custom_text" onclick="set_type('custom_text')" value="3" <?php echo ($row->submit_text_type == 3) ? "checked" : ""; ?> />
1310
- <label for="text_type_custom_text"><?php _e('Custom Text', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1311
- <br>
1312
- <input type="radio" name="submit_text_type" id="text_type_url" onclick="set_type('url')" value="4" <?php echo ($row->submit_text_type == 4) ? "checked" : ""; ?> />
1313
- <label for="text_type_url"><?php _e('URL', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1314
- </span>
1315
- <span class="wd-group">
1316
- <div id="post" <?php echo(($row->submit_text_type != 2) ? 'style="display:none"' : ''); ?>>
1317
- <label class="wd-label"><?php _e('Post', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1318
- <select id="post_name" name="post_name">
1319
- <option value="0">- Select Post -</option>
1320
- <?php
1321
- $args = array( 'posts_per_page' => 10000 );
1322
- query_posts($args);
1323
- while ( have_posts() ) : the_post();
1324
- ?>
1325
- <option value="<?php $x = get_permalink(get_the_ID());
1326
- echo $x; ?>" <?php echo(($row->article_id == $x) ? 'selected="selected"' : ''); ?>><?php the_title(); ?></option>
1327
- <?php
1328
- endwhile;
1329
- wp_reset_query();
1330
- ?>
1331
- </select>
1332
- </div>
1333
- <div id="page" <?php echo(($row->submit_text_type != 5) ? 'style="display:none"' : ''); ?>>
1334
- <label class="wd-label"><?php _e('Page', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1335
- <select id="page_name" name="page_name">
1336
- <option value="0">- Select Page -</option>
1337
- <?php
1338
- $pages = get_pages();
1339
- foreach ( $pages as $page ) {
1340
- $page_id = get_page_link($page->ID);
1341
- ?>
1342
- <option value="<?php echo $page_id; ?>" <?php echo(($row->article_id == $page_id) ? 'selected="selected"' : ''); ?>><?php echo $page->post_title; ?></option>
1343
- <?php
1344
- }
1345
- wp_reset_query();
1346
- ?>
1347
- </select>
1348
- </div>
1349
- <div id="custom_text" <?php echo(($row->submit_text_type != 3) ? 'style="display: none;"' : ''); ?>>
1350
- <label class="wd-label"><?php _e('Text', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1351
- <div class="wd-editor-placeholder">
1352
- <span class="dashicons dashicons-list-view" data-id="submit_text"></span>
1353
- </div>
1354
- <?php
1355
- if ( user_can_richedit() ) {
1356
- wp_editor($row->submit_text, 'submit_text', array(
1357
- 'teeny' => TRUE,
1358
- 'textarea_name' => 'submit_text',
1359
- 'media_buttons' => FALSE,
1360
- 'textarea_rows' => 5
1361
- ));
1362
- }
1363
- else {
1364
- ?>
1365
- <textarea cols="36" rows="5" id="submit_text" name="submit_text" style="resize: vertical; width:100%">
1366
- <?php echo $row->submit_text; ?>
1367
- </textarea>
1368
- <?php
1369
- }
1370
- ?>
1371
- </div>
1372
- <div id="url" <?php echo(($row->submit_text_type != 4) ? 'style="display:none"' : ''); ?>>
1373
- <label class="wd-label"><?php _e('URL', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1374
- <input type="text" id="url" name="url" value="<?php echo $row->url; ?>" />
1375
- </div>
1376
- </span>
1377
  </div>
1378
  </div>
1379
  </div>
@@ -1442,7 +1442,7 @@ class FMViewManage_fm extends FMAdminView {
1442
  </div>
1443
  <div class="wd-group <?php if(WDFMInstance(self::PLUGIN)->is_free) { echo 'fm-free-option'; } ?>">
1444
  <label class="wd-label" for="paypal_email"><?php _e('Paypal email', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1445
- <input type="text" name="paypal_email" id="paypal_email" value="<?php echo $row->paypal_email; ?>" class="text_area" <?php disabled(WDFMInstance(self::PLUGIN)->is_free, true) ?> />
1446
  <p class="description"><?php _e('Provide the email address of a valid PayPal account. It will receive the payments made through your form.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1447
  </div>
1448
  </div>
@@ -1477,9 +1477,9 @@ class FMViewManage_fm extends FMAdminView {
1477
  <div class="wd-table-col-100">
1478
  <div class="wd-box-section">
1479
  <div class="wd-box-content">
1480
- <span class="wd-group">
1481
- <textarea cols="60" rows="30" name="javascript" id="form_javascript"><?php echo $row->javascript; ?></textarea>
1482
- </span>
1483
  </div>
1484
  </div>
1485
  </div>
@@ -2137,7 +2137,7 @@ class FMViewManage_fm extends FMAdminView {
2137
  $row = $params['row'];
2138
  $page_title = $params['page_title'];
2139
  $posts_and_pages = $params['posts_and_pages'];
2140
- $all_display_posts = $params['all_display_posts'];
2141
  $animation_effects = $params['animation_effects'];
2142
  $back_url = $params['back_url'];
2143
 
@@ -2348,7 +2348,7 @@ class FMViewManage_fm extends FMAdminView {
2348
  $selected_types = explode(',', $row->display_on);
2349
  $show_cats = in_array('post', $selected_types);
2350
  $m = 0;
2351
- foreach($all_display_posts as $post_key => $post_type){
2352
  $checked = in_array('everything', $selected_types) || in_array($post_key, $selected_types) ? 'checked="checked"' : '';
2353
  $postclass = $post_key != 'page' && in_array($post_key, array_keys($def_post_types)) ? 'class="catpost"' : '';
2354
  echo '<li><input id="pt' . $m . '" type="checkbox" name="display_on[]" value="' . $post_key . '" ' . $checked . ' ' . $postclass . '/><label for="pt'.$m.'">'.$post_type.'</label></li>';
@@ -2363,14 +2363,21 @@ class FMViewManage_fm extends FMAdminView {
2363
  $categories = $params['categories'];
2364
  $selected_categories = $params['selected_categories'];
2365
  $current_categories_array = $params['current_categories_array'];
 
2366
  $m = 0;
2367
- foreach($categories as $cat_key => $category){
2368
- $checked = ((!$row->current_categories && !$row->display_on_categories) || in_array($cat_key, $selected_categories) || (in_array('auto_check_new', $selected_categories) && !in_array($cat_key, $current_categories_array))) ? 'checked="checked"' : '';
2369
- echo '<li><input id="cat'.$m.'" type="checkbox" name="display_on_categories[]" value="'.$cat_key.'" '.$checked.'/><label for="cat'.$m.'">'.$category.'</label></li>';
 
 
 
2370
  $m++;
 
 
 
 
 
2371
  }
2372
- $auto_check = (!$row->current_categories && !$row->display_on_categories) || in_array('auto_check_new', $selected_categories) ? 'checked="checked"' : '';
2373
- echo '<li><br/><input id="cat'.$m.'" type="checkbox" name="display_on_categories[]" value="auto_check_new" '.$auto_check.'/><label for="cat'.$m.'">Automatically check new categories</label></li>';
2374
  $current_categories = !$row->current_categories && !$row->display_on_categories ? implode(',', array_keys($categories)) : $row->current_categories;
2375
  ?>
2376
  </ul>
@@ -2379,20 +2386,19 @@ class FMViewManage_fm extends FMAdminView {
2379
  <span class="wd-group fm-popover fm-topbar fm-scrollbox fm-posts-show <?php echo (in_array('everything', $selected_types) || in_array('post', $selected_types)) && $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
2380
  <label class="wd-label"><?php _e('Display on these posts', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2381
  <div class="fm-mini-heading">
2382
- <?php _e('Click on input area to view the list of posts.', WDFMInstance(self::PLUGIN)->prefix); ?>
2383
- <?php _e('If left empty the form will appear on all posts.', WDFMInstance(self::PLUGIN)->prefix); ?>
2384
  </div>
2385
- <p><?php _e('Posts defined below will override all settings above.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
2386
  <ul class="fm-pp">
2387
  <li class="pp_selected">
2388
  <?php
2389
- if($row->posts_include){
2390
  $posts_include = explode(',', $row->posts_include);
2391
  foreach($posts_include as $post_exclude){
2392
  if(isset($posts_and_pages[$post_exclude])){
2393
  $ptitle = $posts_and_pages[$post_exclude]['title'];
2394
  $ptype = $posts_and_pages[$post_exclude]['post_type'];
2395
- echo '<span data-post_id="'.$post_exclude.'">['.$ptype.'] - '.$ptitle.'<span class="pp_selected_remove">x</span></span>';
2396
  }
2397
  }
2398
  } ?></li>
@@ -2402,19 +2408,16 @@ class FMViewManage_fm extends FMAdminView {
2402
  <span class="fm-loading"></span>
2403
  </li>
2404
  <li class="pp_live_search fm-hide">
2405
- <ul class="pp_search_results">
2406
-
2407
- </ul>
2408
  </li>
2409
  </ul>
2410
  </span>
2411
  <span class="wd-group fm-popover fm-topbar fm-scrollbox fm-pages-show <?php echo (in_array('everything', $selected_types) || in_array('page', $selected_types)) && $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
2412
  <label class="wd-label"><?php _e('Display on these pages', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2413
  <div class="fm-mini-heading">
2414
- <?php _e('Click on input area to view the list of pages. ', WDFMInstance(self::PLUGIN)->prefix); ?>
2415
- <?php _e('If left empty the form will appear on all pages.', WDFMInstance(self::PLUGIN)->prefix); ?>
2416
  </div>
2417
- <p><?php _e('Pages defined below will override all settings above.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
2418
  <ul class="fm-pp">
2419
  <li class="pp_selected"><?php if($row->pages_include){
2420
  $pages_include = explode(',', $row->pages_include);
@@ -2432,8 +2435,7 @@ class FMViewManage_fm extends FMAdminView {
2432
  <span class="fm-loading"></span>
2433
  </li>
2434
  <li class="pp_live_search fm-hide">
2435
- <ul class="pp_search_results">
2436
- </ul>
2437
  </li>
2438
  </ul>
2439
  </span>
338
  }
339
  }
340
  ?>
341
+ <button class="button button-primary button-large" onclick="if (fm_check_required('title', '<?php _e('Form Title', WDFMInstance(self::PLUGIN)->prefix); ?>') || (jQuery('#form_id_tempform_view_img'+form_view_max).length <= 0) || !FormManageSubmitButton()) {return false;}; fm_set_input_value('task', 'apply');">
342
  <?php
343
  if ($row->title) {
344
  _e('Update', WDFMInstance(self::PLUGIN)->prefix);
417
  </div>
418
  <div class="fm-row">
419
  <label><?php _e('Description:', WDFMInstance(self::PLUGIN)->prefix); ?></label>
420
+ <div id="description_editor">
421
  <input type="hidden" id="header_description_initial_value" value="<?php echo rawurlencode($row->header_description); ?>" />
422
+ <?php if (user_can_richedit() && $params['fm_enable_wp_editor']) {
423
  wp_editor($row->header_description, 'header_description', array('teeny' => TRUE, 'textarea_name' => 'header_description', 'media_buttons' => FALSE, 'textarea_rows' => 5));
424
  }
425
  else { ?>
426
+ <textarea name="header_description" id="header_description" class="mce_editable fm-check-change" aria-hidden="true" data-initial-value="<?php echo $row->header_description; ?>"><?php echo $row->header_description; ?></textarea>
427
  <?php
428
  }
429
  ?>
489
  </div>
490
 
491
  <div type="type_text" class="wdform_field">
492
+ <div class="add-new-button button-primary" onclick="if (fm_check_something_really_important()) return; popup_ready(); Enable(); return false;">
493
  <span class="dashicons dashicons-move"></span>
494
  <?php _e('New Field', WDFMInstance(self::PLUGIN)->prefix); ?>
495
  </div>
678
  <input type="hidden" id="editing_id" />
679
  <input type="hidden" value="<?php echo WDFMInstance(self::PLUGIN)->plugin_url; ?>" id="form_plugins_url" />
680
  <div id="main_editor" style="position: fixed; display: none; z-index: 140;">
681
+ <?php if ( user_can_richedit() && $params['fm_enable_wp_editor']) {
682
  wp_editor('', 'form_maker_editor', array(
683
  'teeny' => TRUE,
684
  'textarea_name' => 'form_maker_editor',
687
  ));
688
  }
689
  else { ?>
690
+ <textarea name="form_maker_editor" id="form_maker_editor" class="mce_editable" aria-hidden="true"></textarea>
691
  <?php
692
  }
693
  ?>
1017
  <div class="wd-box-content">
1018
  <div class="wd-group wd-has-placeholder">
1019
  <label class="wd-label" for="mail"><?php _e('Email to send submissions to', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1020
+ <input class="fm-validate" data-type="email" data-callback="fm_validate_email" data-callback-parameter="" data-tab-id="emailTab" data-content-id="emailTab_fieldset" type="text" id="mail" name="mail" value="<?php echo $row->mail; ?>" />
1021
  <span class="dashicons dashicons-list-view" data-id="mail"></span>
1022
  <p class="description"><?php _e('Specify the email address(es), to which submitted form information will be sent. For multiple email addresses separate with commas.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1023
  </div>
1082
  <input style="<?php echo ($fields_count == 1) ? 'display:none;' : ''; ?>" class="wd-radio" type="radio" id="other" name="from_mail" value="other" <?php echo ($is_other) ? 'checked="checked"' : ''; ?> onclick="wdshow('mail_from_other_wrap')" />
1083
  <label style="<?php echo ($fields_count == 1) ? 'display:none;' : ''; ?>" class="wd-label-radio" for="other"><?php _e('Other', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1084
  <p style="display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="mail_from_other_wrap">
1085
+ <input class="fm-validate" data-type="email" data-callback="fm_validate_email" data-callback-parameter="" data-tab-id="emailTab" data-content-id="emailTab_fieldset" type="text" name="mail_from_other" id="mail_from_other" value="<?php echo ($is_other) ? $row->from_mail : ''; ?>" />
1086
  </p>
1087
  <p class="description"><?php _e('Specify the email address from which the administrator will receive the email.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1088
  </div>
1116
  <input style="<?php echo ($fields_count == 1) ? 'display: none;' : ''; ?>" class="wd-radio" type="radio" id="other1" name="reply_to" value="other" <?php echo ($is_other) ? 'checked="checked"' : ''; ?> onclick="wdshow('reply_to_other_wrap')" />
1117
  <label style="<?php echo ($fields_count == 1) ? 'display: none;' : ''; ?>" class="wd-label-radio" for="other1"><?php _e('Other', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1118
  <p style="display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="reply_to_other_wrap">
1119
+ <input class="fm-validate" data-type="email" data-callback="fm_validate_email" data-callback-parameter="" data-tab-id="emailTab" data-content-id="emailTab_fieldset" type="text" name="reply_to_other" value="<?php echo ($is_other && $row->reply_to) ? $row->reply_to : ''; ?>" id="reply_to_other" />
1120
  </p>
1121
  <p class="description"><?php _e('Specify an alternative email address, to which the administrator will be able to reply upon receiving the message.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1122
  </div>
1123
  <div class="wd-group">
1124
  <label class="wd-label" for="mail_cc"><?php _e('CC', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1125
+ <input class="fm-validate" data-type="email" data-callback="fm_validate_email" data-callback-parameter="" data-tab-id="emailTab" data-content-id="emailTab_fieldset" type="text" id="mail_cc" name="mail_cc" value="<?php echo $row->mail_cc ?>" />
1126
  <p class="description"><?php _e('Provide additional email addresses to send the submission or confirmation email to. The receiver will be able to view all other recipients.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1127
  </div>
1128
  <div class="wd-group">
1129
  <label class="wd-label" for="mail_bcc"><?php _e('BCC', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1130
+ <input class="fm-validate" data-type="email" data-callback="fm_validate_email" data-callback-parameter="" data-tab-id="emailTab" data-content-id="emailTab_fieldset" type="text" id="mail_bcc" name="mail_bcc" value="<?php echo $row->mail_bcc ?>" />
1131
  <p class="description"><?php _e('Write additional email addresses to send the submission or confirmation email to. The receiver will not be able to view other recipients.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1132
  </div>
1133
  <div class="wd-group">
1225
  <div class="inside">
1226
  <div class="wd-group">
1227
  <label class="wd-label" for="mail_from_user"><?php _e('Email From', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1228
+ <input class="fm-validate" data-type="email" data-callback="fm_validate_email" data-callback-parameter="" data-tab-id="emailTab" data-content-id="emailTab_fieldset" type="text" id="mail_from_user" name="mail_from_user" value="<?php echo $row->mail_from_user; ?>" />
1229
  <p class="description"><?php _e('Specify the email address from which the submitter will receive the email.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1230
  </div>
1231
  <div class="wd-group wd-has-placeholder">
1236
  </div>
1237
  <div class="wd-group">
1238
  <label class="wd-label" for="reply_to_user"><?php _e('Reply to (if different from "Email From")', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1239
+ <input class="fm-validate" data-type="email" data-callback="fm_validate_email" data-callback-parameter="" data-tab-id="emailTab" data-content-id="emailTab_fieldset" type="text" name="reply_to_user" value="<?php echo $row->reply_to_user; ?>" id="reply_to_user" />
1240
  <p class="description"><?php _e('Specify an alternative email address, to which the submitter will be able to reply upon receiving the message.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1241
  </div>
1242
  <div class="wd-group">
1243
  <label class="wd-label" for="mail_cc_user"><?php _e('CC', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1244
+ <input class="fm-validate" data-type="email" data-callback="fm_validate_email" data-callback-parameter="" data-tab-id="emailTab" data-content-id="emailTab_fieldset" type="text" name="mail_cc_user" value="<?php echo $row->mail_cc_user ?>" id="mail_cc_user" />
1245
  <p class="description"><?php _e('Provide additional email addresses to send the submission or confirmation email to. The receiver will be able to view all other recipients.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1246
  </div>
1247
  <div class="wd-group">
1248
  <label class="wd-label" for="mail_bcc_user"><?php _e('BCC', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1249
+ <input class="fm-validate" data-type="email" data-callback="fm_validate_email" data-callback-parameter="" data-tab-id="emailTab" data-content-id="emailTab_fieldset" type="text" name="mail_bcc_user" value="<?php echo $row->mail_bcc_user ?>" id="mail_bcc_user" />
1250
  <p class="description"><?php _e('Write additional email addresses to send the submission or confirmation email to. The receiver will not be able to view other recipients.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1251
  </div>
1252
  <div class="wd-group">
1295
  <div class="wd-table-col-70">
1296
  <div class="wd-box-section">
1297
  <div class="wd-box-content">
1298
+ <span class="wd-group">
1299
+ <label class="wd-label"><?php _e('Action type', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1300
+ <input type="radio" name="submit_text_type" id="text_type_none" onclick="set_type('none')" value="1" <?php echo ($row->submit_text_type != 2 && $row->submit_text_type != 3 && $row->submit_text_type != 4 && $row->submit_text_type != 5) ? "checked" : ""; ?> />
1301
+ <label for="text_type_none"><?php _e('Stay on Form', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1302
+ <br>
1303
+ <input type="radio" name="submit_text_type" id="text_type_post" onclick="set_type('post')" value="2" <?php echo ($row->submit_text_type == 2) ? "checked" : ""; ?> />
1304
+ <label for="text_type_post"><?php _e('Post', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1305
+ <br>
1306
+ <input type="radio" name="submit_text_type" id="text_type_page" onclick="set_type('page')" value="5" <?php echo ($row->submit_text_type == 5) ? "checked" : ""; ?> />
1307
+ <label for="text_type_page"><?php _e('Page', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1308
+ <br>
1309
+ <input type="radio" name="submit_text_type" id="text_type_custom_text" onclick="set_type('custom_text')" value="3" <?php echo ($row->submit_text_type == 3) ? "checked" : ""; ?> />
1310
+ <label for="text_type_custom_text"><?php _e('Custom Text', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1311
+ <br>
1312
+ <input type="radio" name="submit_text_type" id="text_type_url" onclick="set_type('url')" value="4" <?php echo ($row->submit_text_type == 4) ? "checked" : ""; ?> />
1313
+ <label for="text_type_url"><?php _e('URL', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1314
+ </span>
1315
+ <span class="wd-group">
1316
+ <div id="post" <?php echo(($row->submit_text_type != 2) ? 'style="display:none"' : ''); ?>>
1317
+ <label class="wd-label"><?php _e('Post', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1318
+ <select id="post_name" name="post_name">
1319
+ <option value="0">- Select Post -</option>
1320
+ <?php
1321
+ $args = array( 'posts_per_page' => 10000 );
1322
+ query_posts($args);
1323
+ while ( have_posts() ) : the_post();
1324
+ ?>
1325
+ <option value="<?php $x = get_permalink(get_the_ID());
1326
+ echo $x; ?>" <?php echo(($row->article_id == $x) ? 'selected="selected"' : ''); ?>><?php the_title(); ?></option>
1327
+ <?php
1328
+ endwhile;
1329
+ wp_reset_query();
1330
+ ?>
1331
+ </select>
1332
+ </div>
1333
+ <div id="page" <?php echo(($row->submit_text_type != 5) ? 'style="display:none"' : ''); ?>>
1334
+ <label class="wd-label"><?php _e('Page', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1335
+ <select id="page_name" name="page_name">
1336
+ <option value="0">- Select Page -</option>
1337
+ <?php
1338
+ $pages = get_pages();
1339
+ foreach ( $pages as $page ) {
1340
+ $page_id = get_page_link($page->ID);
1341
+ ?>
1342
+ <option value="<?php echo $page_id; ?>" <?php echo(($row->article_id == $page_id) ? 'selected="selected"' : ''); ?>><?php echo $page->post_title; ?></option>
1343
+ <?php
1344
+ }
1345
+ wp_reset_query();
1346
+ ?>
1347
+ </select>
1348
+ </div>
1349
+ <div id="custom_text" <?php echo(($row->submit_text_type != 3) ? 'style="display: none;"' : ''); ?>>
1350
+ <label class="wd-label"><?php _e('Text', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1351
+ <div class="wd-editor-placeholder">
1352
+ <span class="dashicons dashicons-list-view" data-id="submit_text"></span>
1353
+ </div>
1354
+ <?php
1355
+ if ( user_can_richedit() ) {
1356
+ wp_editor($row->submit_text, 'submit_text', array(
1357
+ 'teeny' => TRUE,
1358
+ 'textarea_name' => 'submit_text',
1359
+ 'media_buttons' => FALSE,
1360
+ 'textarea_rows' => 5
1361
+ ));
1362
+ }
1363
+ else {
1364
+ ?>
1365
+ <textarea cols="36" rows="5" id="submit_text" name="submit_text" style="resize: vertical; width:100%">
1366
+ <?php echo $row->submit_text; ?>
1367
+ </textarea>
1368
+ <?php
1369
+ }
1370
+ ?>
1371
+ </div>
1372
+ <div id="url" <?php echo(($row->submit_text_type != 4) ? 'style="display:none"' : ''); ?>>
1373
+ <label class="wd-label"><?php _e('URL', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1374
+ <input type="text" id="url" name="url" value="<?php echo $row->url; ?>" />
1375
+ </div>
1376
+ </span>
1377
  </div>
1378
  </div>
1379
  </div>
1442
  </div>
1443
  <div class="wd-group <?php if(WDFMInstance(self::PLUGIN)->is_free) { echo 'fm-free-option'; } ?>">
1444
  <label class="wd-label" for="paypal_email"><?php _e('Paypal email', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1445
+ <input class="fm-validate" data-type="email" data-callback="fm_validate_email" data-callback-parameter="#paypal_mode1" data-tab-id="payment" data-content-id="payment_fieldset" type="text" name="paypal_email" id="paypal_email" value="<?php echo $row->paypal_email; ?>" class="text_area" <?php disabled(WDFMInstance(self::PLUGIN)->is_free, true) ?> />
1446
  <p class="description"><?php _e('Provide the email address of a valid PayPal account. It will receive the payments made through your form.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1447
  </div>
1448
  </div>
1477
  <div class="wd-table-col-100">
1478
  <div class="wd-box-section">
1479
  <div class="wd-box-content">
1480
+ <span class="wd-group">
1481
+ <textarea cols="60" rows="30" name="javascript" id="form_javascript"><?php echo $row->javascript; ?></textarea>
1482
+ </span>
1483
  </div>
1484
  </div>
1485
  </div>
2137
  $row = $params['row'];
2138
  $page_title = $params['page_title'];
2139
  $posts_and_pages = $params['posts_and_pages'];
2140
+ $display_on_list = $params['display_on_list'];
2141
  $animation_effects = $params['animation_effects'];
2142
  $back_url = $params['back_url'];
2143
 
2348
  $selected_types = explode(',', $row->display_on);
2349
  $show_cats = in_array('post', $selected_types);
2350
  $m = 0;
2351
+ foreach ( $display_on_list as $post_key => $post_type ) {
2352
  $checked = in_array('everything', $selected_types) || in_array($post_key, $selected_types) ? 'checked="checked"' : '';
2353
  $postclass = $post_key != 'page' && in_array($post_key, array_keys($def_post_types)) ? 'class="catpost"' : '';
2354
  echo '<li><input id="pt' . $m . '" type="checkbox" name="display_on[]" value="' . $post_key . '" ' . $checked . ' ' . $postclass . '/><label for="pt'.$m.'">'.$post_type.'</label></li>';
2363
  $categories = $params['categories'];
2364
  $selected_categories = $params['selected_categories'];
2365
  $current_categories_array = $params['current_categories_array'];
2366
+ $auto_check = ( in_array('select_all_categories', $selected_categories) && count($categories) == count($selected_categories) - 1 ) ? 'checked="checked"' : '';
2367
  $m = 0;
2368
+ echo '<li>
2369
+ <br/>
2370
+ <input id="cat'.$m.'" class="fm-display-all-categories" data-categories-count="' . count($categories) . '" type="checkbox" name="display_on_categories[]" value="select_all_categories" '. $auto_check .' />
2371
+ <label for="cat'.$m.'">' . __('All categories', WDFMInstance(self::PLUGIN)->prefix) .' </label>
2372
+ </li>';
2373
+ foreach ( $categories as $cat_key => $category ) {
2374
  $m++;
2375
+ $checked = ( in_array($cat_key, $selected_categories) ) ? 'checked="checked"' : '';
2376
+ echo '<li>
2377
+ <input id="cat'.$m.'" type="checkbox" name="display_on_categories[]" value="'.$cat_key.'" '.$checked.'/>
2378
+ <label for="cat'.$m.'">'.$category.'</label>
2379
+ </li>';
2380
  }
 
 
2381
  $current_categories = !$row->current_categories && !$row->display_on_categories ? implode(',', array_keys($categories)) : $row->current_categories;
2382
  ?>
2383
  </ul>
2386
  <span class="wd-group fm-popover fm-topbar fm-scrollbox fm-posts-show <?php echo (in_array('everything', $selected_types) || in_array('post', $selected_types)) && $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
2387
  <label class="wd-label"><?php _e('Display on these posts', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2388
  <div class="fm-mini-heading">
2389
+ <?php _e('Click on input area to view the list of posts.', WDFMInstance(self::PLUGIN)->prefix); ?>
2390
+ <?php _e('If left empty the form will appear on all posts.', WDFMInstance(self::PLUGIN)->prefix); ?>
2391
  </div>
 
2392
  <ul class="fm-pp">
2393
  <li class="pp_selected">
2394
  <?php
2395
+ if ( $row->posts_include ) {
2396
  $posts_include = explode(',', $row->posts_include);
2397
  foreach($posts_include as $post_exclude){
2398
  if(isset($posts_and_pages[$post_exclude])){
2399
  $ptitle = $posts_and_pages[$post_exclude]['title'];
2400
  $ptype = $posts_and_pages[$post_exclude]['post_type'];
2401
+ echo '<span data-post_id="'.$post_exclude.'">['. $ptype .'] - '. $ptitle .'<span class="pp_selected_remove">x</span></span>';
2402
  }
2403
  }
2404
  } ?></li>
2408
  <span class="fm-loading"></span>
2409
  </li>
2410
  <li class="pp_live_search fm-hide">
2411
+ <ul class="pp_search_results"></ul>
 
 
2412
  </li>
2413
  </ul>
2414
  </span>
2415
  <span class="wd-group fm-popover fm-topbar fm-scrollbox fm-pages-show <?php echo (in_array('everything', $selected_types) || in_array('page', $selected_types)) && $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
2416
  <label class="wd-label"><?php _e('Display on these pages', WDFMInstance(self::PLUGIN)->prefix); ?></label>
2417
  <div class="fm-mini-heading">
2418
+ <?php _e('Click on input area to view the list of pages. ', WDFMInstance(self::PLUGIN)->prefix); ?>
2419
+ <?php _e('If left empty the form will appear on all pages.', WDFMInstance(self::PLUGIN)->prefix); ?>
2420
  </div>
 
2421
  <ul class="fm-pp">
2422
  <li class="pp_selected"><?php if($row->pages_include){
2423
  $pages_include = explode(',', $row->pages_include);
2435
  <span class="fm-loading"></span>
2436
  </li>
2437
  <li class="pp_live_search fm-hide">
2438
+ <ul class="pp_search_results"></ul>
 
2439
  </li>
2440
  </ul>
2441
  </span>
admin/views/Options_fm.php CHANGED
@@ -55,6 +55,8 @@ class FMViewOptions_fm extends FMAdminView {
55
  $private_key = isset($fm_settings['private_key']) ? $fm_settings['private_key'] : '';
56
  $csv_delimiter = isset($fm_settings['csv_delimiter']) ? $fm_settings['csv_delimiter'] : ',';
57
  $fm_advanced_layout = isset($fm_settings['fm_advanced_layout']) && $fm_settings['fm_advanced_layout'] == '1' ? '1' : '0';
 
 
58
  $map_key = isset($fm_settings['map_key']) ? $fm_settings['map_key'] : '';
59
  $uninstall_href = add_query_arg( array( 'page' => 'uninstall' . WDFMInstance(self::PLUGIN)->menu_postfix), admin_url('admin.php') );
60
  ?>
@@ -117,6 +119,15 @@ class FMViewOptions_fm extends FMAdminView {
117
  <label class="wd-label-radio" for="fm_advanced_layout-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
118
  <p class="description"><?php _e('If you wish to build your form with HTML, instead of using Form Maker’s user-friendly interface, you can enable Advanced Layout. It can be accessed from the form editor.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
119
  </span>
 
 
 
 
 
 
 
 
 
120
  <span class="wd-group">
121
  <label class="wd-label"><?php echo sprintf(__('Uninstall %s', WDFMInstance(self::PLUGIN)->prefix), WDFMInstance(self::PLUGIN)->nicename); ?></label>
122
  <a class="button" href="<?php echo $uninstall_href ?>"><?php _e('Uninstall', WDFMInstance(self::PLUGIN)->prefix); ?></a>
55
  $private_key = isset($fm_settings['private_key']) ? $fm_settings['private_key'] : '';
56
  $csv_delimiter = isset($fm_settings['csv_delimiter']) ? $fm_settings['csv_delimiter'] : ',';
57
  $fm_advanced_layout = isset($fm_settings['fm_advanced_layout']) && $fm_settings['fm_advanced_layout'] == '1' ? '1' : '0';
58
+ $fm_enable_wp_editor = !isset($fm_settings['fm_enable_wp_editor']) ? '1' : $fm_settings['fm_enable_wp_editor'];
59
+
60
  $map_key = isset($fm_settings['map_key']) ? $fm_settings['map_key'] : '';
61
  $uninstall_href = add_query_arg( array( 'page' => 'uninstall' . WDFMInstance(self::PLUGIN)->menu_postfix), admin_url('admin.php') );
62
  ?>
119
  <label class="wd-label-radio" for="fm_advanced_layout-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
120
  <p class="description"><?php _e('If you wish to build your form with HTML, instead of using Form Maker’s user-friendly interface, you can enable Advanced Layout. It can be accessed from the form editor.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
121
  </span>
122
+ <span class="wd-group">
123
+ <label class="wd-label"><?php _e('Enable HTML editor', WDFMInstance(self::PLUGIN)->prefix); ?></label>
124
+ <input <?php echo checked($fm_enable_wp_editor, '1'); ?> id="fm_enable_wp_editor-1" class="wd-radio" value="1" name="fm_enable_wp_editor" type="radio"/>
125
+ <label class="wd-label-radio" for="fm_enable_wp_editor-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
126
+ <input <?php echo checked($fm_enable_wp_editor, '0'); ?> id="fm_enable_wp_editor-0" class="wd-radio" value="0" name="fm_enable_wp_editor" type="radio"/>
127
+ <label class="wd-label-radio" for="fm_enable_wp_editor-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
128
+ <p class="description"><?php _e('Form Header Description text and Layout fields boxes of Form Maker will use TinyMCE editor, in case this setting is enabled.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
129
+ </span>
130
+
131
  <span class="wd-group">
132
  <label class="wd-label"><?php echo sprintf(__('Uninstall %s', WDFMInstance(self::PLUGIN)->prefix), WDFMInstance(self::PLUGIN)->nicename); ?></label>
133
  <a class="button" href="<?php echo $uninstall_href ?>"><?php _e('Uninstall', WDFMInstance(self::PLUGIN)->prefix); ?></a>
admin/views/Submissions_fm.php CHANGED
@@ -45,11 +45,13 @@ class FMViewSubmissions_fm extends FMAdminView {
45
  // TODO: Change this function to standard.
46
  echo $this->topbar();
47
 
48
- $id = $params['id'];
49
- $page = $params['page'];
50
  $page_title = $params['page_title'];
51
  $page_url = $params['page_url'];
52
  $forms = $params['forms'];
 
 
53
  echo '<div class="wrap">';
54
  echo $this->title(array(
55
  'title' => $page_title,
@@ -59,7 +61,7 @@ class FMViewSubmissions_fm extends FMAdminView {
59
  <br>
60
  <div class="tablenav top">
61
  <div class="alignleft">
62
- <?php echo $this->saelect_form( array('id' => $id, 'forms' => $forms, 'page' => $page, 'page_url' => $page_url) ); ?>
63
  </div>
64
  <div class="fm-export-tools">
65
  <?php $blocked_ips_link = add_query_arg(array( 'page' => 'blocked_ips' . WDFMInstance(self::PLUGIN)->menu_postfix ), $page_url); ?>
@@ -87,18 +89,25 @@ class FMViewSubmissions_fm extends FMAdminView {
87
  $id = $params['id'];
88
  $page = $params['page'];
89
  $page_url = $params['page_url'];
 
 
 
 
90
  ob_start();
91
  $unexpected_error_message = sprintf( __('An unexpected error occurred while exporting data. %s Please contact Web-Dorado (10Web) Customer Care. %s', WDFMInstance(self::PLUGIN)->prefix), '<a href="https://web-dorado.com/support/contact-us.html" target="_blank">','</a>');
92
  echo '<div class="fm-unexpected_error_message fm-hide">' . WDW_FM_Library(self::PLUGIN)->message_id('', $unexpected_error_message, 'error') . '</div>';
93
  echo $this->body($params);
94
-
95
  // Pass the content to form.
 
 
 
 
96
  $form_attr = array(
97
  // 'id' => WDFMInstance(self::PLUGIN)->prefix . '_submissions',
98
  'id' => 'admin_form',
99
  'name' => WDFMInstance(self::PLUGIN)->prefix . '_submissions',
100
  'class' => WDFMInstance(self::PLUGIN)->prefix . '_submissions fm-table-submissions wd-form',
101
- 'action' => add_query_arg( array('page' => $page, 'task' => 'display', 'current_id' => $id ), $page_url),
102
  );
103
  echo $this->form(ob_get_clean(), $form_attr);
104
  }
@@ -116,6 +125,7 @@ class FMViewSubmissions_fm extends FMAdminView {
116
  $page_url = $params['page_url'];
117
  $page_title = $params['page_title'];
118
  $pagination_url = $params['pagination_url'];
 
119
  $page_per_num = $params['page_per_num'];
120
 
121
  $forms = $params['forms'];
@@ -159,9 +169,6 @@ class FMViewSubmissions_fm extends FMAdminView {
159
  $subs_count = $params['subs_count'];
160
  $pdf_data = $params['pdf_data'];
161
 
162
- $is_search = $params['is_search'];
163
- $is_stats = $params['is_stats'];
164
-
165
  $verified_emails = array();
166
 
167
  echo $this->title(array(
@@ -171,7 +178,7 @@ class FMViewSubmissions_fm extends FMAdminView {
171
  ?>
172
  <br>
173
  <div>
174
- <?php echo $this->saelect_form( array('id' => $form_id, 'forms' => $forms, 'page' => $page, 'page_url' => $page_url) ); ?>
175
  <div class="fm-reports">
176
  <div class="fm-tools-button">
177
  <div class="fm-total_entries"><?php echo $statistics["total_entries"]; ?></div>
@@ -338,6 +345,7 @@ class FMViewSubmissions_fm extends FMAdminView {
338
  <th class="fm-column-not-hide"></th>
339
  <th class="submitid_fc" <?php echo $style_id; ?> >
340
  <input type="text" name="id_search" id="id_search" value="<?php echo $lists['id_search'] ?>" style="width:30px" />
 
341
  </th>
342
  <th class="submitdate_fc fm-column-not-hide" <?php echo $style_date; ?>>
343
  <table align="center" style="margin:auto" class="simple_table">
@@ -434,7 +442,7 @@ class FMViewSubmissions_fm extends FMAdminView {
434
  break;
435
  default: ?>
436
  <th class="<?php echo $sorted_labels_id[$i]; ?>_fc" <?php echo $styleStr; ?>>
437
- <input name="<?php echo $form_id . '_' . $sorted_labels_id[$i] . '_search'; ?>" id="<?php echo $form_id . '_' . $sorted_labels_id[$i] . '_search'; ?>" type="text" value="<?php echo $lists[$form_id . '_' . $sorted_labels_id[$i] . '_search']; ?>">
438
  </th>
439
  <?php
440
  break;
@@ -475,10 +483,10 @@ class FMViewSubmissions_fm extends FMAdminView {
475
  'TB_iframe' => '1',
476
  ), admin_url('admin-ajax.php'));
477
 
478
- $edit_url = add_query_arg( array( 'task' => 'edit', 'current_id' => $data->group_id, 'form_id' => $form_id ), $page_url );
479
- $delete_url = add_query_arg( array( 'task' => 'delete', 'current_id' => $data->group_id, 'form_id' => $form_id ), $page_url );
480
- $block_url = add_query_arg( array( 'task' => 'block_ip', 'current_id' => $data->group_id, 'form_id' => $form_id ), $page_url );
481
- $unblock_url = add_query_arg( array( 'task' => 'unblock_ip', 'current_id' => $data->group_id, 'form_id' => $form_id ), $page_url );
482
 
483
  $ip_infoin_popup_url = add_query_arg( array(
484
  'action' => 'FormMakerIpinfoinPopup' . WDFMInstance(self::PLUGIN)->plugin_postfix,
@@ -494,7 +502,7 @@ class FMViewSubmissions_fm extends FMAdminView {
494
  <span><a href="<?php echo $view_url; ?>" class="thickbox thickbox-preview" title="<?php _e("View submission", WDFMInstance(self::PLUGIN)->prefix); ?>"><?php _e('View', WDFMInstance(self::PLUGIN)->prefix); ?></a> |</span>
495
  <span><a href="<?php echo $edit_url; ?>" target="_blank" title="<?php _e("Edit submission", WDFMInstance(self::PLUGIN)->prefix); ?>"><?php _e('Edit', WDFMInstance(self::PLUGIN)->prefix); ?></a> |</span>
496
  <?php if ( $pdf_data && isset($pdf_data[$group_id_s[$www]]) ){ ?>
497
- <span><a href="<?php echo site_url() . '/' . $pdf_data[$group_id_s[$www]]; ?>" download ><?php _e('Download PDF', WDFMInstance(self::PLUGIN)->prefix); ?></a> |</span>
498
  <?php } ?>
499
  <span class="trash"><a href="<?php echo $delete_url; ?>" title="<?php _e("Edit submission", WDFMInstance(self::PLUGIN)->prefix); ?>" onclick="if (!confirm('<?php echo addslashes(__('Do you want to delete selected item?', WDFMInstance(self::PLUGIN)->prefix)); ?>')) {return false;}"><?php _e('Delete', WDFMInstance(self::PLUGIN)->prefix); ?></a></span>
500
 
@@ -626,7 +634,7 @@ class FMViewSubmissions_fm extends FMAdminView {
626
  ?>
627
  <td class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?> data-colname="<?php echo !empty($label_name_ids[$sorted_labels_id[$h]]) ? $label_name_ids[$sorted_labels_id[$h]] : ''; ?>">
628
  <p><?php echo $temp[$g]->element_value; ?>
629
- <span style="color:#2DA068;">( Verified <img src="<?php echo WDFMInstance(self::PLUGIN)->plugin_url . '/images/verified.png'; ?>" /> )</span>
630
  </p>
631
  </td>
632
  <?php }
@@ -1349,20 +1357,22 @@ class FMViewSubmissions_fm extends FMAdminView {
1349
 
1350
  /**
1351
  * Print saelect form.
1352
- *
1353
  * @param array $params
1354
  */
1355
  private function saelect_form( $params = array() ) {
1356
- if ( !empty($params['forms']) ) {
1357
  $page = $params['page'];
1358
  $page_url = $params['page_url'];
 
 
1359
  ?>
1360
  <select name="form_id" id="form_id">
1361
  <option value="0"><?php _e('- Select a form -', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1362
  <?php
1363
  foreach ( $params['forms'] as $form ) {
1364
  $selected = ( $form->id == $params['id'] ) ? 'selected="selected"' : '';
1365
- $show_url = add_query_arg( array( 'page' => $page, 'task' => 'display', 'current_id' => $form->id ), admin_url('admin.php'));
1366
  echo '<option value="' . $form->id . '" ' . $selected . ' data-submission-href="' . $show_url . '">' . $form->title . '</option>';
1367
  }
1368
  ?>
45
  // TODO: Change this function to standard.
46
  echo $this->topbar();
47
 
48
+ $id = $params['id'];
49
+ $page = $params['page'];
50
  $page_title = $params['page_title'];
51
  $page_url = $params['page_url'];
52
  $forms = $params['forms'];
53
+ $order_by = $params['order_by'];
54
+ $asc_or_desc = $params['asc_or_desc'];
55
  echo '<div class="wrap">';
56
  echo $this->title(array(
57
  'title' => $page_title,
61
  <br>
62
  <div class="tablenav top">
63
  <div class="alignleft">
64
+ <?php echo $this->saelect_form( array('id' => $id, 'forms' => $forms, 'page' => $page, 'page_url' => $page_url, 'order_by' => $order_by, 'asc_or_desc' => $asc_or_desc) ); ?>
65
  </div>
66
  <div class="fm-export-tools">
67
  <?php $blocked_ips_link = add_query_arg(array( 'page' => 'blocked_ips' . WDFMInstance(self::PLUGIN)->menu_postfix ), $page_url); ?>
89
  $id = $params['id'];
90
  $page = $params['page'];
91
  $page_url = $params['page_url'];
92
+ $page_number = $params['page_number'];
93
+ $order_by = $params['order_by'];
94
+ $asc_or_desc = $params['asc_or_desc'];
95
+ $pagination_url_args = $params['pagination_url_args'];
96
  ob_start();
97
  $unexpected_error_message = sprintf( __('An unexpected error occurred while exporting data. %s Please contact Web-Dorado (10Web) Customer Care. %s', WDFMInstance(self::PLUGIN)->prefix), '<a href="https://web-dorado.com/support/contact-us.html" target="_blank">','</a>');
98
  echo '<div class="fm-unexpected_error_message fm-hide">' . WDW_FM_Library(self::PLUGIN)->message_id('', $unexpected_error_message, 'error') . '</div>';
99
  echo $this->body($params);
 
100
  // Pass the content to form.
101
+ $action = add_query_arg( array_merge(
102
+ array('page' => $page, 'task' => 'display', 'current_id' => $id, 'paged' => $page_number, 'order_by' => $order_by, 'asc_or_desc' => $asc_or_desc ),
103
+ $pagination_url_args
104
+ ), $page_url);
105
  $form_attr = array(
106
  // 'id' => WDFMInstance(self::PLUGIN)->prefix . '_submissions',
107
  'id' => 'admin_form',
108
  'name' => WDFMInstance(self::PLUGIN)->prefix . '_submissions',
109
  'class' => WDFMInstance(self::PLUGIN)->prefix . '_submissions fm-table-submissions wd-form',
110
+ 'action' => $action
111
  );
112
  echo $this->form(ob_get_clean(), $form_attr);
113
  }
125
  $page_url = $params['page_url'];
126
  $page_title = $params['page_title'];
127
  $pagination_url = $params['pagination_url'];
128
+ $page_number = $params['page_number'];
129
  $page_per_num = $params['page_per_num'];
130
 
131
  $forms = $params['forms'];
169
  $subs_count = $params['subs_count'];
170
  $pdf_data = $params['pdf_data'];
171
 
 
 
 
172
  $verified_emails = array();
173
 
174
  echo $this->title(array(
178
  ?>
179
  <br>
180
  <div>
181
+ <?php echo $this->saelect_form( array('id' => $form_id, 'forms' => $forms, 'page' => $page, 'page_url' => $page_url, 'order_by' => $order_by, 'asc_or_desc' => $asc_or_desc) ); ?>
182
  <div class="fm-reports">
183
  <div class="fm-tools-button">
184
  <div class="fm-total_entries"><?php echo $statistics["total_entries"]; ?></div>
345
  <th class="fm-column-not-hide"></th>
346
  <th class="submitid_fc" <?php echo $style_id; ?> >
347
  <input type="text" name="id_search" id="id_search" value="<?php echo $lists['id_search'] ?>" style="width:30px" />
348
+ <input type="hidden" name="fm_is_search" id="fm_is_search" value="0" />
349
  </th>
350
  <th class="submitdate_fc fm-column-not-hide" <?php echo $style_date; ?>>
351
  <table align="center" style="margin:auto" class="simple_table">
442
  break;
443
  default: ?>
444
  <th class="<?php echo $sorted_labels_id[$i]; ?>_fc" <?php echo $styleStr; ?>>
445
+ <input name="<?php echo $form_id . '_' . $sorted_labels_id[$i] . '_search'; ?>" id="<?php echo $form_id . '_' . $sorted_labels_id[$i] . '_search'; ?>" type="text" value="<?php echo stripslashes( urldecode($lists[$form_id . '_' . $sorted_labels_id[$i] . '_search'] ) ); ?>">
446
  </th>
447
  <?php
448
  break;
483
  'TB_iframe' => '1',
484
  ), admin_url('admin-ajax.php'));
485
 
486
+ $edit_url = add_query_arg( array( 'task' => 'edit', 'current_id' => $data->group_id, 'form_id' => $form_id, 'paged' => $page_number, WDFMInstance(self::PLUGIN)->nonce => wp_create_nonce(WDFMInstance(self::PLUGIN)->nonce) ), $pagination_url );
487
+ $delete_url = add_query_arg( array( 'task' => 'delete', 'current_id' => $data->group_id, 'form_id' => $form_id, 'paged' => $page_number, WDFMInstance(self::PLUGIN)->nonce => wp_create_nonce(WDFMInstance(self::PLUGIN)->nonce) ), $pagination_url );
488
+ $block_url = add_query_arg( array( 'task' => 'block_ip', 'current_id' => $data->group_id, 'form_id' => $form_id, 'paged' => $page_number, WDFMInstance(self::PLUGIN)->nonce => wp_create_nonce(WDFMInstance(self::PLUGIN)->nonce) ), $pagination_url );
489
+ $unblock_url = add_query_arg( array( 'task' => 'unblock_ip', 'current_id' => $data->group_id, 'form_id' => $form_id, 'paged' => $page_number, WDFMInstance(self::PLUGIN)->nonce => wp_create_nonce(WDFMInstance(self::PLUGIN)->nonce) ), $pagination_url );
490
 
491
  $ip_infoin_popup_url = add_query_arg( array(
492
  'action' => 'FormMakerIpinfoinPopup' . WDFMInstance(self::PLUGIN)->plugin_postfix,
502
  <span><a href="<?php echo $view_url; ?>" class="thickbox thickbox-preview" title="<?php _e("View submission", WDFMInstance(self::PLUGIN)->prefix); ?>"><?php _e('View', WDFMInstance(self::PLUGIN)->prefix); ?></a> |</span>
503
  <span><a href="<?php echo $edit_url; ?>" target="_blank" title="<?php _e("Edit submission", WDFMInstance(self::PLUGIN)->prefix); ?>"><?php _e('Edit', WDFMInstance(self::PLUGIN)->prefix); ?></a> |</span>
504
  <?php if ( $pdf_data && isset($pdf_data[$group_id_s[$www]]) ){ ?>
505
+ <span class="no-wrap"><a href="<?php echo site_url() . '/' . $pdf_data[$group_id_s[$www]]; ?>" download ><?php _e('Download PDF', WDFMInstance(self::PLUGIN)->prefix); ?></a> |</span>
506
  <?php } ?>
507
  <span class="trash"><a href="<?php echo $delete_url; ?>" title="<?php _e("Edit submission", WDFMInstance(self::PLUGIN)->prefix); ?>" onclick="if (!confirm('<?php echo addslashes(__('Do you want to delete selected item?', WDFMInstance(self::PLUGIN)->prefix)); ?>')) {return false;}"><?php _e('Delete', WDFMInstance(self::PLUGIN)->prefix); ?></a></span>
508
 
634
  ?>
635
  <td class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?> data-colname="<?php echo !empty($label_name_ids[$sorted_labels_id[$h]]) ? $label_name_ids[$sorted_labels_id[$h]] : ''; ?>">
636
  <p><?php echo $temp[$g]->element_value; ?>
637
+ <div style="color:#2DA068;">( <?php _e("Verified", WDFMInstance(self::PLUGIN)->prefix); ?> <img src="<?php echo WDFMInstance(self::PLUGIN)->plugin_url . '/images/verified.png'; ?>" /> )</div>
638
  </p>
639
  </td>
640
  <?php }
1357
 
1358
  /**
1359
  * Print saelect form.
1360
+ *
1361
  * @param array $params
1362
  */
1363
  private function saelect_form( $params = array() ) {
1364
+ if ( !empty($params['forms']) ) {
1365
  $page = $params['page'];
1366
  $page_url = $params['page_url'];
1367
+ $order_by = $params['order_by'];
1368
+ $asc_or_desc = $params['asc_or_desc'];
1369
  ?>
1370
  <select name="form_id" id="form_id">
1371
  <option value="0"><?php _e('- Select a form -', WDFMInstance(self::PLUGIN)->prefix); ?></option>
1372
  <?php
1373
  foreach ( $params['forms'] as $form ) {
1374
  $selected = ( $form->id == $params['id'] ) ? 'selected="selected"' : '';
1375
+ $show_url = add_query_arg( array( 'page' => $page, 'task' => 'display', 'current_id' => $form->id, 'order_by' => $order_by, 'asc_or_desc' => $asc_or_desc ), admin_url('admin.php'));
1376
  echo '<option value="' . $form->id . '" ' . $selected . ' data-submission-href="' . $show_url . '">' . $form->title . '</option>';
1377
  }
1378
  ?>
css/form_maker_tables.css CHANGED
@@ -2614,4 +2614,37 @@ button:focus {
2614
  }
2615
  .fm-opacity-40 {
2616
  opacity: 0.4;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2617
  }
2614
  }
2615
  .fm-opacity-40 {
2616
  opacity: 0.4;
2617
+ }
2618
+
2619
+ p.fm-validate-description {
2620
+ color: #FF0000;
2621
+ }
2622
+
2623
+ .fm-validate-field {
2624
+ border: 1px solid #FF0000 !important;
2625
+ }
2626
+
2627
+ #description_editor {
2628
+ display: inline-block;
2629
+ vertical-align: middle;
2630
+ width: 100%;
2631
+ max-width: 487px;
2632
+ }
2633
+ #header_description {
2634
+ width: 100%;
2635
+ height: 100px;
2636
+ }
2637
+
2638
+ #form_maker_editor {
2639
+ width: 100%;
2640
+ height: 100%;
2641
+ min-height: 150px;
2642
+ }
2643
+
2644
+ .row-actions {
2645
+ word-break: keep-all;
2646
+ }
2647
+
2648
+ .no-wrap {
2649
+ white-space: nowrap;
2650
  }
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.12.32
7
  * Author: WebDorado Form Builder Team
8
  * Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -95,8 +95,8 @@ final class WDFM {
95
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
96
  $this->front_urls = $this->get_front_urls();
97
  $this->main_file = plugin_basename(__FILE__);
98
- $this->plugin_version = '1.12.32';
99
- $this->db_version = '2.12.32';
100
  $this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
101
  $this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
102
  $this->menu_slug = 'manage' . $this->menu_postfix;
@@ -198,7 +198,7 @@ final class WDFM {
198
  add_filter('set-screen-option', array($this, 'set_option_submissions'), 10, 3);
199
 
200
  // Check add-ons versions.
201
- if ($this->is_free != 2) {
202
  add_action('admin_notices', array($this, 'fm_check_addons_compatibility'));
203
  }
204
 
@@ -364,6 +364,8 @@ final class WDFM {
364
  if ($this->is_free != 2) {
365
  do_action('fm_init_addons');
366
  }
 
 
367
  }
368
 
369
  /**
@@ -525,6 +527,11 @@ final class WDFM {
525
  wp_register_script($this->handle_prefix . '-manage-edit', $this->plugin_url . '/js/form_maker_manage_edit.js', array(), $this->plugin_version);
526
  wp_register_script($this->handle_prefix . '-formmaker_div', $this->plugin_url . '/js/formmaker_div.js', array(), $this->plugin_version);
527
  wp_register_script($this->handle_prefix . '-form-options', $this->plugin_url . '/js/form_maker_form_options.js', array(), $this->plugin_version);
 
 
 
 
 
528
  wp_register_script($this->handle_prefix . '-form-advanced-layout', $this->plugin_url . '/js/form_maker_form_advanced_layout.js', array(), $this->plugin_version);
529
  wp_register_script($this->handle_prefix . '-add-fields', $this->plugin_url . '/js/add_field.js', array($this->handle_prefix . '-formmaker_div'), $this->plugin_version);
530
  wp_localize_script($this->handle_prefix . '-add-fields', 'form_maker', array(
@@ -752,7 +759,6 @@ final class WDFM {
752
  $id = WDW_FM_Library(self::PLUGIN)->get('wdform_id', 0);
753
  $display_options = WDW_FM_Library(self::PLUGIN)->display_options( $id );
754
  $type = $display_options->type;
755
-
756
  $attrs = array( 'id' => $id );
757
  if ($type == "embedded") {
758
  ob_start();
@@ -1008,10 +1014,13 @@ final class WDFM {
1008
  update_option("wd_form_maker_version", $new_version);
1009
 
1010
  if ( FALSE === $fm_settings = get_option($option_key) ) {
1011
- $recaptcha_keys = $wpdb->get_row('SELECT `public_key`, `private_key` FROM ' . $wpdb->prefix . 'formmaker WHERE public_key!="" and private_key!=""', ARRAY_A);
1012
- $public_key = isset($recaptcha_keys['public_key']) ? $recaptcha_keys['public_key'] : '';
1013
- $private_key = isset($recaptcha_keys['private_key']) ? $recaptcha_keys['private_key'] : '';
1014
- add_option($option_key, array('public_key' => $public_key, 'private_key' => $private_key, 'csv_delimiter' => ',', 'map_key' => '', 'ajax_export_per_page' => 1000));
 
 
 
1015
  }
1016
  }
1017
  }
@@ -1160,15 +1169,15 @@ final class WDFM {
1160
  $add_ons = array(
1161
  'form-maker-export-import' => array('version' => '2.0.7', 'file' => 'fm_exp_imp.php'),
1162
  'form-maker-save-progress' => array('version' => '1.0.1', 'file' => 'fm_save.php'),
1163
- 'form-maker-conditional-emails' => array('version' => '1.1.2', 'file' => 'fm_conditional_emails.php'),
1164
- 'form-maker-pushover' => array('version' => '1.0.1', 'file' => 'fm_pushover.php'),
1165
- 'form-maker-mailchimp' => array('version' => '1.0.1', 'file' => 'fm_mailchimp.php'),
1166
- 'form-maker-reg' => array('version' => '1.1.0', 'file' => 'fm_reg.php'),
1167
  'form-maker-post-generation' => array('version' => '1.0.2', 'file' => 'fm_post_generation.php'),
1168
  'form-maker-dropbox-integration' => array('version' => '1.1.1', 'file' => 'fm_dropbox_integration.php'),
1169
  'form-maker-gdrive-integration' => array('version' => '1.0.0', 'file' => 'fm_gdrive_integration.php'),
1170
  'form-maker-pdf-integration' => array('version' => '1.1.3', 'file' => 'fm_pdf_integration.php'),
1171
- 'form-maker-stripe' => array('version' => '1.0.1', 'file' => 'fm_stripe.php'),
1172
  'form-maker-calculator' => array('version' => '1.0.3', 'file' => 'fm_calculator.php'),
1173
  );
1174
 
@@ -1180,7 +1189,7 @@ final class WDFM {
1180
  if (is_plugin_active($add_on_key . '/' . $add_on_value['file'])) {
1181
  $addon = get_plugin_data($addon_path); // array
1182
  if (version_compare($addon['Version'], $add_on_value['version'], '<=')) { //compare versions
1183
- deactivate_plugins($addon_path);
1184
  array_push($add_ons_notice, $addon['Name']);
1185
  }
1186
  }
@@ -1199,8 +1208,8 @@ final class WDFM {
1199
  function fm_addons_compatibility_notice($add_ons_notice) {
1200
  $addon_names = implode($add_ons_notice, ', ');
1201
  $count = count($add_ons_notice);
1202
- $single = __('Please update the %s add-on to start using.', $this->prefix);
1203
- $plural = __('Please update the %s add-ons to start using.', $this->prefix);
1204
  echo '<div class="error"><p>' . sprintf( _n($single, $plural, $count, $this->prefix), $addon_names ) .'</p></div>';
1205
  }
1206
 
@@ -1208,6 +1217,18 @@ final class WDFM {
1208
  $vars[] = 'form_id';
1209
  return $vars;
1210
  }
 
 
 
 
 
 
 
 
 
 
 
 
1211
  }
1212
 
1213
  /**
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.12.33
7
  * Author: WebDorado Form Builder Team
8
  * Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
95
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
96
  $this->front_urls = $this->get_front_urls();
97
  $this->main_file = plugin_basename(__FILE__);
98
+ $this->plugin_version = '1.12.33';
99
+ $this->db_version = '2.12.33';
100
  $this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
101
  $this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
102
  $this->menu_slug = 'manage' . $this->menu_postfix;
198
  add_filter('set-screen-option', array($this, 'set_option_submissions'), 10, 3);
199
 
200
  // Check add-ons versions.
201
+ if ( $this->is_free != 2 && isset( $_GET[ 'page' ] ) && strpos( esc_html( $_GET[ 'page' ] ), '_' . $this->handle_prefix ) !== FALSE ) {
202
  add_action('admin_notices', array($this, 'fm_check_addons_compatibility'));
203
  }
204
 
364
  if ($this->is_free != 2) {
365
  do_action('fm_init_addons');
366
  }
367
+ // Prevent adding shortcode conflict with some builders.
368
+ $this->before_shortcode_add_builder_editor();
369
  }
370
 
371
  /**
527
  wp_register_script($this->handle_prefix . '-manage-edit', $this->plugin_url . '/js/form_maker_manage_edit.js', array(), $this->plugin_version);
528
  wp_register_script($this->handle_prefix . '-formmaker_div', $this->plugin_url . '/js/formmaker_div.js', array(), $this->plugin_version);
529
  wp_register_script($this->handle_prefix . '-form-options', $this->plugin_url . '/js/form_maker_form_options.js', array(), $this->plugin_version);
530
+ wp_localize_script($this->handle_prefix . '-form-options', 'form_maker', array(
531
+ 'not_valid_value' => __('Enter a valid value.', $this->prefix),
532
+ 'required_field' => __('Field is required.', $this->prefix),
533
+ 'not_valid_email' => __('Enter a valid email address.', $this->prefix),
534
+ ));
535
  wp_register_script($this->handle_prefix . '-form-advanced-layout', $this->plugin_url . '/js/form_maker_form_advanced_layout.js', array(), $this->plugin_version);
536
  wp_register_script($this->handle_prefix . '-add-fields', $this->plugin_url . '/js/add_field.js', array($this->handle_prefix . '-formmaker_div'), $this->plugin_version);
537
  wp_localize_script($this->handle_prefix . '-add-fields', 'form_maker', array(
759
  $id = WDW_FM_Library(self::PLUGIN)->get('wdform_id', 0);
760
  $display_options = WDW_FM_Library(self::PLUGIN)->display_options( $id );
761
  $type = $display_options->type;
 
762
  $attrs = array( 'id' => $id );
763
  if ($type == "embedded") {
764
  ob_start();
1014
  update_option("wd_form_maker_version", $new_version);
1015
 
1016
  if ( FALSE === $fm_settings = get_option($option_key) ) {
1017
+ $recaptcha_keys = $wpdb->get_row('SELECT `public_key`, `private_key` FROM ' . $wpdb->prefix . 'formmaker WHERE public_key!="" and private_key!=""', ARRAY_A);
1018
+ $public_key = isset($recaptcha_keys['public_key']) ? $recaptcha_keys['public_key'] : '';
1019
+ $private_key = isset($recaptcha_keys['private_key']) ? $recaptcha_keys['private_key'] : '';
1020
+ add_option($option_key, array('public_key' => $public_key, 'private_key' => $private_key, 'csv_delimiter' => ',', 'map_key' => '', 'ajax_export_per_page' => 1000));
1021
+ } elseif ( !isset($fm_settings['fm_enable_wp_editor']) ) {
1022
+ $fm_settings['fm_enable_wp_editor'] = 1;
1023
+ update_option( $option_key, $fm_settings );
1024
  }
1025
  }
1026
  }
1169
  $add_ons = array(
1170
  'form-maker-export-import' => array('version' => '2.0.7', 'file' => 'fm_exp_imp.php'),
1171
  'form-maker-save-progress' => array('version' => '1.0.1', 'file' => 'fm_save.php'),
1172
+ 'form-maker-conditional-emails' => array('version' => '1.1.4', 'file' => 'fm_conditional_emails.php'),
1173
+ 'form-maker-pushover' => array('version' => '1.0.2', 'file' => 'fm_pushover.php'),
1174
+ 'form-maker-mailchimp' => array('version' => '1.0.2', 'file' => 'fm_mailchimp.php'),
1175
+ 'form-maker-reg' => array('version' => '1.2.2', 'file' => 'fm_reg.php'),
1176
  'form-maker-post-generation' => array('version' => '1.0.2', 'file' => 'fm_post_generation.php'),
1177
  'form-maker-dropbox-integration' => array('version' => '1.1.1', 'file' => 'fm_dropbox_integration.php'),
1178
  'form-maker-gdrive-integration' => array('version' => '1.0.0', 'file' => 'fm_gdrive_integration.php'),
1179
  'form-maker-pdf-integration' => array('version' => '1.1.3', 'file' => 'fm_pdf_integration.php'),
1180
+ 'form-maker-stripe' => array('version' => '1.1.3', 'file' => 'fm_stripe.php'),
1181
  'form-maker-calculator' => array('version' => '1.0.3', 'file' => 'fm_calculator.php'),
1182
  );
1183
 
1189
  if (is_plugin_active($add_on_key . '/' . $add_on_value['file'])) {
1190
  $addon = get_plugin_data($addon_path); // array
1191
  if (version_compare($addon['Version'], $add_on_value['version'], '<=')) { //compare versions
1192
+ // deactivate_plugins($addon_path);
1193
  array_push($add_ons_notice, $addon['Name']);
1194
  }
1195
  }
1208
  function fm_addons_compatibility_notice($add_ons_notice) {
1209
  $addon_names = implode($add_ons_notice, ', ');
1210
  $count = count($add_ons_notice);
1211
+ $single = __('The current version of %s add-on is not compatible with Form Maker. Some functions may not work correctly. Please update the add-on to fully use its features.', $this->prefix);
1212
+ $plural = __('The current version of %s add-ons are not compatible with Form Maker. Some functions may not work correctly. Please update the add-ons to fully use its features.', $this->prefix);
1213
  echo '<div class="error"><p>' . sprintf( _n($single, $plural, $count, $this->prefix), $addon_names ) .'</p></div>';
1214
  }
1215
 
1217
  $vars[] = 'form_id';
1218
  return $vars;
1219
  }
1220
+
1221
+ /**
1222
+ * Prevent adding shortcode conflict with some builders.
1223
+ */
1224
+ private function before_shortcode_add_builder_editor() {
1225
+ if ( defined('ELEMENTOR_VERSION') ) {
1226
+ add_action('elementor/editor/before_enqueue_scripts', array( $this, 'form_maker_admin_ajax' ));
1227
+ }
1228
+ if ( class_exists('FLBuilder') ) {
1229
+ add_action('wp_enqueue_scripts', array( $this, 'form_maker_admin_ajax' ));
1230
+ }
1231
+ }
1232
  }
1233
 
1234
  /**
framework/WDW_FM_Library.php CHANGED
@@ -861,8 +861,17 @@ class WDW_FM_Library {
861
  <?php
862
  }
863
 
864
- public static function fm_redirect($url) {
865
- $url = html_entity_decode(wp_nonce_url($url, WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce));
 
 
 
 
 
 
 
 
 
866
  ?>
867
  <script>
868
  window.location = "<?php echo $url; ?>";
@@ -5085,10 +5094,6 @@ class WDW_FM_Library {
5085
  }
5086
  }
5087
 
5088
- public static function not_display_posts() {
5089
- return array('fmemailverification','cfmemailverification','form-maker','form-maker_fmc');
5090
- }
5091
-
5092
  public static function get_user_submission_ids( $email_address ) {
5093
  global $wpdb;
5094
  $user = get_user_by( 'email', $email_address );
@@ -5200,6 +5205,24 @@ class WDW_FM_Library {
5200
  'done' => true,
5201
  );
5202
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5203
  }
5204
 
5205
  /*
861
  <?php
862
  }
863
 
864
+ /**
865
+ * FM Redirect.
866
+ *
867
+ * @param $url
868
+ * @param bool $nonce
869
+ */
870
+ public static function fm_redirect( $url, $nonce = true ) {
871
+ $url = html_entity_decode($url);
872
+ if ( $nonce ) {
873
+ $url = html_entity_decode(wp_nonce_url($url, WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce));
874
+ }
875
  ?>
876
  <script>
877
  window.location = "<?php echo $url; ?>";
5094
  }
5095
  }
5096
 
 
 
 
 
5097
  public static function get_user_submission_ids( $email_address ) {
5098
  global $wpdb;
5099
  $user = get_user_by( 'email', $email_address );
5205
  'done' => true,
5206
  );
5207
  }
5208
+
5209
+ /**
5210
+ * Array remove keys.
5211
+ *
5212
+ * @param array $array
5213
+ * @param array $keys
5214
+ * @return array
5215
+ */
5216
+ public static function array_remove_keys( $array = array(), $keys = array() ) {
5217
+ if ( !empty($array) ) {
5218
+ foreach ( $array as $key => $val ) {
5219
+ if ( isset($keys[$key]) ) {
5220
+ unset($array[$key]);
5221
+ }
5222
+ }
5223
+ }
5224
+ return $array;
5225
+ }
5226
  }
5227
 
5228
  /*
frontend/controllers/form_maker.php CHANGED
@@ -57,15 +57,17 @@ class FMControllerForm_maker {
57
  if ( !$result ) {
58
  return;
59
  }
60
- $ok = $this->model->savedata($result[0], $id);
61
- if ( is_numeric($ok) ) {
62
- $this->model->remove($ok);
 
 
 
63
  }
64
- $this->model->increment_views_count($id);
65
  return $this->view->display($result, $fm_settings, $id, $type);
66
  }
67
  else {
68
- // Get all forms.
69
  $forms = $this->model->all_forms();
70
  return $this->autoload_form($forms, $fm_settings);
71
  }
@@ -80,7 +82,6 @@ class FMControllerForm_maker {
80
  */
81
  public function autoload_form( $forms = array(), $fm_settings = array() ) {
82
  $fm_forms = array();
83
-
84
  foreach ($forms as $key => $form) {
85
  $display_on_this = FALSE;
86
  $error = 'success';
@@ -144,39 +145,29 @@ class FMControllerForm_maker {
144
  }
145
  break;
146
  case 'post':
147
- if (!$posts_include || in_array($page_id, $posts_include)) {
148
  $display_on_this = TRUE;
149
  }
150
  else {
151
  $categories = get_the_terms($page_id, 'category');
152
  $post_cats = array();
153
- if ($categories) {
154
- foreach ($categories as $category) {
155
  $post_cats[] = $category->term_id;
156
  }
157
  }
158
- foreach ($post_cats as $single_cat) {
159
- if (in_array($single_cat, $categories_display)) {
160
  $display_on_this = TRUE;
161
  }
162
  }
163
- if (FALSE === $display_on_this && !in_array('auto_select_new', $categories_display)) {
164
- foreach ($post_cats as $single_cat) {
165
- if (!in_array($single_cat, $current_categories)) {
166
- $display_on_this = TRUE;
167
- }
168
- }
169
- }
170
- else {
171
- $display_on_this = TRUE;
172
- }
173
  }
174
- break;
175
  default:
176
  if (in_array($current_post_type, $display_on)) {
177
  $display_on_this = TRUE;
178
  }
179
- break;
180
  }
181
  }
182
  }
@@ -192,24 +183,44 @@ class FMControllerForm_maker {
192
  if ( !$form_result ) {
193
  continue;
194
  }
195
- $ok = $this->model->savedata($form_result[0], $id);
196
- if ( is_numeric($ok) ) {
197
- $this->model->remove($ok);
 
 
 
198
  }
199
- $this->model->increment_views_count($id);
200
  $params = array();
201
- $params['id'] = $id;
202
- $params['type'] = $type;
203
- $params['form'] = $form;
204
- $params['display_on_this'] = $display_on_this;
205
- $params['show_for_admin'] = $show_for_admin;
206
- $params['form_result'] = $form_result;
207
- $params['fm_settings'] = $fm_settings;
208
- $params['error'] = $error;
209
- $params['message'] = $message;
210
- $fm_forms[$id] = $this->view->autoload_form( $params );
211
  }
212
 
213
  return implode($fm_forms);
214
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
215
  }
57
  if ( !$result ) {
58
  return;
59
  }
60
+ if( $this->fm_bot_validation( $id ) ){
61
+ $ok = $this->model->savedata($result[0], $id);
62
+ if ( is_numeric($ok) ) {
63
+ $this->model->remove($ok);
64
+ }
65
+ $this->model->increment_views_count($id);
66
  }
 
67
  return $this->view->display($result, $fm_settings, $id, $type);
68
  }
69
  else {
70
+ // Get all forms.
71
  $forms = $this->model->all_forms();
72
  return $this->autoload_form($forms, $fm_settings);
73
  }
82
  */
83
  public function autoload_form( $forms = array(), $fm_settings = array() ) {
84
  $fm_forms = array();
 
85
  foreach ($forms as $key => $form) {
86
  $display_on_this = FALSE;
87
  $error = 'success';
145
  }
146
  break;
147
  case 'post':
148
+ if ( !empty($posts_include) && in_array($page_id, $posts_include) ) {
149
  $display_on_this = TRUE;
150
  }
151
  else {
152
  $categories = get_the_terms($page_id, 'category');
153
  $post_cats = array();
154
+ if ( $categories ) {
155
+ foreach ( $categories as $category ) {
156
  $post_cats[] = $category->term_id;
157
  }
158
  }
159
+ foreach ( $post_cats as $single_cat ) {
160
+ if ( in_array($single_cat, $categories_display) ) {
161
  $display_on_this = TRUE;
162
  }
163
  }
 
 
 
 
 
 
 
 
 
 
164
  }
165
+ break;
166
  default:
167
  if (in_array($current_post_type, $display_on)) {
168
  $display_on_this = TRUE;
169
  }
170
+ break;
171
  }
172
  }
173
  }
183
  if ( !$form_result ) {
184
  continue;
185
  }
186
+ if( $this->fm_bot_validation( $id ) ) {
187
+ $ok = $this->model->savedata($form_result[0], $id);
188
+ if ( is_numeric($ok) ) {
189
+ $this->model->remove($ok);
190
+ }
191
+ $this->model->increment_views_count($id);
192
  }
 
193
  $params = array();
194
+ $params['id'] = $id;
195
+ $params['type'] = $type;
196
+ $params['form'] = $form;
197
+ $params['display_on_this'] = $display_on_this;
198
+ $params['show_for_admin'] = $show_for_admin;
199
+ $params['form_result'] = $form_result;
200
+ $params['fm_settings'] = $fm_settings;
201
+ $params['error'] = $error;
202
+ $params['message'] = $message;
203
+ $fm_forms[$id] = $this->view->autoload_form( $params );
204
  }
205
 
206
  return implode($fm_forms);
207
  }
208
+
209
+ /**
210
+ * Bot validation.
211
+ *
212
+ * @param int $form_id
213
+ *
214
+ * @return bool
215
+ */
216
+ public function fm_bot_validation( $form_id ) {
217
+ if ( (isset( $_POST[ "fm_bot_validation" . $form_id ] ) && $_POST[ "fm_bot_validation" . $form_id ] != '') || (isset($_POST["counter" . $form_id]) && !isset($_POST[ "fm_bot_validation" . $form_id ])) ){
218
+ WDW_FM_Library(self::PLUGIN)->start_session();
219
+ $_SESSION['massage_after_submit' . $form_id] = addslashes(addslashes(__('Error, something went wrong.', WDFMInstance(self::PLUGIN)->prefix)));;
220
+ $_SESSION['error_or_no' . $form_id] = TRUE;
221
+ return false;
222
+ }
223
+ return true;
224
+ }
225
+
226
  }
frontend/models/form_maker.php CHANGED
@@ -1197,9 +1197,13 @@ class FMModelForm_maker {
1197
  }
1198
  else {
1199
  $result_temp = $this->save_db( $id_for_old );
 
 
 
 
 
1200
  if ( isset( $result_temp[ 'error' ] ) ) {
1201
  $this->remove( $result_temp['group_id'] );
1202
- $_SESSION[ 'massage_after_submit' . $id ] = $result_temp[ 'message' ];
1203
  $_SESSION[ 'error_or_no' . $id ] = 1;
1204
  }
1205
  else {
@@ -1233,6 +1237,10 @@ class FMModelForm_maker {
1233
  $temp = explode( '@@@wdfhostwdf@@@', $db_info );
1234
  $host = $temp[ 0 ];
1235
  $temp = explode( '@@@wdfportwdf@@@', $temp[ 1 ] );
 
 
 
 
1236
  $temp = explode( '@@@wdfusernamewdf@@@', $temp[ 1 ] );
1237
  $username = $temp[ 0 ];
1238
  $temp = explode( '@@@wdfpasswordwdf@@@', $temp[ 1 ] );
@@ -1267,6 +1275,10 @@ class FMModelForm_maker {
1267
  $temp = explode( '@@@wdfhostwdf@@@', $db_info );
1268
  $host = $temp[ 0 ];
1269
  $temp = explode( '@@@wdfportwdf@@@', $temp[ 1 ] );
 
 
 
 
1270
  $temp = explode( '@@@wdfusernamewdf@@@', $temp[ 1 ] );
1271
  $username = $temp[ 0 ];
1272
  $temp = explode( '@@@wdfpasswordwdf@@@', $temp[ 1 ] );
@@ -2148,6 +2160,10 @@ class FMModelForm_maker {
2148
  $temp = explode( '***wdfhostwdf***', $temp[ 1 ] );
2149
  $host = $temp[ 0 ];
2150
  $temp = explode( '***wdfportwdf***', $temp[ 1 ] );
 
 
 
 
2151
  $temp = explode( '***wdfusernamewdf***', $temp[ 1 ] );
2152
  $username = $temp[ 0 ];
2153
  $temp = explode( '***wdfpasswordwdf***', $temp[ 1 ] );
@@ -2337,9 +2353,26 @@ class FMModelForm_maker {
2337
  $frontend_parmas['custom_fields'] = $custom_fields;
2338
  $frontend_parmas['all_files'] = json_encode($all_files);
2339
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2340
  do_action( 'fm_addon_frontend_init', $frontend_parmas );
2341
  }
2342
  $return_value = array( 'group_id' => $group_id, 'all_files' => $all_files, 'redirect_url' => $str );
 
2343
  $return_value = apply_filters('fm_save_submission_return_value', $return_value);
2344
  return $return_value;
2345
  }
@@ -3163,7 +3196,8 @@ class FMModelForm_maker {
3163
 
3164
  foreach ( $send_tos as $index => $send_to ) {
3165
  $send_to = str_replace( '*', '', $send_to );
3166
- if ( $row->mail_verify && $verification_link !== NULL && (strpos( $new_script, "{verificationlink}" ) > -1 || strpos( $new_script, "%Verification link%" ) > -1) ) {
 
3167
  $ver_link = $row->mail_mode_user ? "<a href =" . add_query_arg( array(
3168
  'gid' => $_SESSION[ 'gid' ],
3169
  'h' => $_SESSION[ 'hash' ][ $index ] . '@' . $send_to,
@@ -3360,7 +3394,10 @@ class FMModelForm_maker {
3360
  }
3361
 
3362
  if ( $row->submit_text_type != 4 ) {
3363
- $_SESSION[ 'massage_after_submit' . $id ] = $msg;
 
 
 
3364
  if ( $row->type == 'popover' || $row->type == 'topbar' || $row->type == 'scrollbox' ) {
3365
  $_SESSION[ 'fm_hide_form_after_submit' . $id ] = 1;
3366
  }
1197
  }
1198
  else {
1199
  $result_temp = $this->save_db( $id_for_old );
1200
+ // Enqueue any message from an add-on to display.
1201
+ if ( isset( $result_temp[ 'message' ] ) ) {
1202
+ $_SESSION[ 'massage_after_submit' . $id ] = $result_temp[ 'message' ];
1203
+ $_SESSION[ 'error_or_no' . $id ] = 0;
1204
+ }
1205
  if ( isset( $result_temp[ 'error' ] ) ) {
1206
  $this->remove( $result_temp['group_id'] );
 
1207
  $_SESSION[ 'error_or_no' . $id ] = 1;
1208
  }
1209
  else {
1237
  $temp = explode( '@@@wdfhostwdf@@@', $db_info );
1238
  $host = $temp[ 0 ];
1239
  $temp = explode( '@@@wdfportwdf@@@', $temp[ 1 ] );
1240
+ $port = $temp[ 0 ];
1241
+ if ($port) {
1242
+ $host .= ':' . $port;
1243
+ }
1244
  $temp = explode( '@@@wdfusernamewdf@@@', $temp[ 1 ] );
1245
  $username = $temp[ 0 ];
1246
  $temp = explode( '@@@wdfpasswordwdf@@@', $temp[ 1 ] );
1275
  $temp = explode( '@@@wdfhostwdf@@@', $db_info );
1276
  $host = $temp[ 0 ];
1277
  $temp = explode( '@@@wdfportwdf@@@', $temp[ 1 ] );
1278
+ $port = $temp[0];
1279
+ if ($port) {
1280
+ $host .= ':' . $port;
1281
+ }
1282
  $temp = explode( '@@@wdfusernamewdf@@@', $temp[ 1 ] );
1283
  $username = $temp[ 0 ];
1284
  $temp = explode( '@@@wdfpasswordwdf@@@', $temp[ 1 ] );
2160
  $temp = explode( '***wdfhostwdf***', $temp[ 1 ] );
2161
  $host = $temp[ 0 ];
2162
  $temp = explode( '***wdfportwdf***', $temp[ 1 ] );
2163
+ $port = $temp[0];
2164
+ if ($port) {
2165
+ $host .= ':' . $port;
2166
+ }
2167
  $temp = explode( '***wdfusernamewdf***', $temp[ 1 ] );
2168
  $username = $temp[ 0 ];
2169
  $temp = explode( '***wdfpasswordwdf***', $temp[ 1 ] );
2353
  $frontend_parmas['custom_fields'] = $custom_fields;
2354
  $frontend_parmas['all_files'] = json_encode($all_files);
2355
 
2356
+ // Send stripe receipt to logged in user email or first email address in user emails list.
2357
+ $user_email = $wp_useremail;
2358
+ if ( !$user_email && $form->send_to ) {
2359
+ $send_tos = explode( '**', $form->send_to );
2360
+ foreach ( $send_tos as $index => $send_to ) {
2361
+ $send_to = str_replace( '*', '', $send_to );
2362
+
2363
+ $recipient = isset( $_POST[ 'wdform_' . str_replace( '*', '', $send_to ) . "_element" . $id ] ) ? $_POST[ 'wdform_' . $send_to . "_element" . $id ] : NULL;
2364
+ if ( $recipient ) {
2365
+ $user_email = $recipient;
2366
+ break;
2367
+ }
2368
+ }
2369
+ }
2370
+ $frontend_parmas['user_email'] = $user_email;
2371
+
2372
  do_action( 'fm_addon_frontend_init', $frontend_parmas );
2373
  }
2374
  $return_value = array( 'group_id' => $group_id, 'all_files' => $all_files, 'redirect_url' => $str );
2375
+ // Get output from add-ons.
2376
  $return_value = apply_filters('fm_save_submission_return_value', $return_value);
2377
  return $return_value;
2378
  }
3196
 
3197
  foreach ( $send_tos as $index => $send_to ) {
3198
  $send_to = str_replace( '*', '', $send_to );
3199
+ if ( $row->mail_verify && $verification_link !== NULL
3200
+ && (strpos( $new_script, "{verificationlink}" ) > -1 || strpos( $new_script, "%Verification link%" ) > -1) ) {
3201
  $ver_link = $row->mail_mode_user ? "<a href =" . add_query_arg( array(
3202
  'gid' => $_SESSION[ 'gid' ],
3203
  'h' => $_SESSION[ 'hash' ][ $index ] . '@' . $send_to,
3394
  }
3395
 
3396
  if ( $row->submit_text_type != 4 ) {
3397
+ // This ensures that no message is enqueued by an add-on.
3398
+ if ( !$_SESSION[ 'massage_after_submit' . $id ] ) {
3399
+ $_SESSION[ 'massage_after_submit' . $id ] = $msg;
3400
+ }
3401
  if ( $row->type == 'popover' || $row->type == 'topbar' || $row->type == 'scrollbox' ) {
3402
  $_SESSION[ 'fm_hide_form_after_submit' . $id ] = 1;
3403
  }
frontend/views/form_maker.php CHANGED
@@ -134,6 +134,7 @@ class FMViewForm_maker {
134
 
135
  $form_maker_front_end .= '<input type="hidden" id="counter' . $form_id . '" value="' . $row->counter . '" name="counter' . $form_id . '" />';
136
  $form_maker_front_end .= '<input type="hidden" id="Itemid' . $form_id . '" value="" name="Itemid' . $form_id . '" />';
 
137
 
138
  if ( !$fm_hide_form_after_submit ) {
139
  // Form header.
@@ -1906,7 +1907,7 @@ class FMViewForm_maker {
1906
  }
1907
  }
1908
  if ( $onload_js ) {
1909
- $onload_js = 'jQuery(document).ready(function () {' . $onload_js . '})';
1910
  }
1911
  if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
1912
  wp_add_inline_script( WDFMInstance(self::PLUGIN)->handle_prefix . '-script-' . $id, $onload_js);
@@ -2287,7 +2288,6 @@ class FMViewForm_maker {
2287
  $param['w_choices_params'] = explode('***', $param['w_choices_params']);
2288
  }
2289
  $post_value = isset($_POST["counter" . $form_id]) ? esc_html($_POST["counter" . $form_id]) : NULL;
2290
-
2291
  $param['id'] = '';
2292
  $param['w_class'] .= ' wd-flex-wrap' . ($param['w_flow'] != 'hor' ? ' wd-flex-column' : ' wd-flex-row');
2293
 
@@ -2329,7 +2329,13 @@ class FMViewForm_maker {
2329
  $param['w_choices_checked'][$key] = (isset($_POST['wdform_' . $id1 . "_element" . $form_id]) ? 'checked="checked"' : '');
2330
  }
2331
  $html .= '<div class="radio-div wd-choice wd-flex ' . (($param['w_field_option_pos'] == "right") ? 'wd-flex-row' : 'wd-flex-row-reverse wd-justify-content' ) . '">';
2332
- $html .= '<input type="radio" ' . (($param['w_allow_other'] == "yes" && $param['w_allow_other_num'] == $key) ? 'other="1"' : '') . ' id="wdform_' . $id1 . '_element' . $form_id . '' . ($key1 + $k) . '" name="wdform_' . $id1 . '_element' . $form_id . '" value="' . htmlspecialchars($choice_value[0]) . '" onclick="set_default(&quot;wdform_' . $id1 . '&quot;,&quot;' . ($key1 + $k) . '&quot;,&quot;' . $form_id . '&quot;); ' . (($param['w_allow_other'] == "yes" && $param['w_allow_other_num'] == $key) ? 'show_other_input(&quot;wdform_' . $id1 . '&quot;,&quot;' . $form_id . '&quot;);' : '') . '" ' . $param['w_choices_checked'][$key] . ' ' . $param['attributes'] . ' />';
 
 
 
 
 
 
2333
  $html .= '<label class="wd-align-items-center wd-flex ' . ($param['w_field_option_pos'] == "right" ? "wd-flex-row" : "wd-flex-row-reverse wd-justify-content wd-width-100") . '" for="wdform_' . $id1 . '_element' . $form_id . '' . ($key1 + $k) . '"><span></span>' . $choice_label[0] . '</label>';
2334
  $html .= '</div>';
2335
  }
@@ -2438,7 +2444,6 @@ class FMViewForm_maker {
2438
  $param['w_value_disabled'] = 'no';
2439
  }
2440
  $post_value = isset($_POST["counter" . $form_id]) ? esc_html($_POST["counter" . $form_id]) : NULL;
2441
-
2442
  $param['id'] = $id1;
2443
  $param['w_class'] .= ' wd-flex-row';
2444
 
@@ -3040,7 +3045,6 @@ class FMViewForm_maker {
3040
  }
3041
  $param['w_countries'] = explode('***', $param['w_countries']);
3042
  $post_value = isset($_POST["counter" . $form_id]) ? esc_html($_POST["counter" . $form_id]) : NULL;
3043
-
3044
  $param['id'] = $id1;
3045
  $param['w_class'] .= ' wd-flex-row';
3046
 
@@ -3598,7 +3602,6 @@ class FMViewForm_maker {
3598
  $param['w_class'] .= ' wd-flex-row';
3599
 
3600
  $html = '<div id="wdform_' . $id1 . '_element' . $form_id . '" class="wd-width-100 wdform-matrix-table" ' . $param['attributes'] . '>';
3601
- $html .= '<input type="hidden" name="wdform_' . $id1 . '_element' . $form_id . '" value="" />';
3602
  $html .= '<div class="wd-table-group">';
3603
  $html .= '<div class="wdform-matrix-head">';
3604
  $html .= '<div class="wd-table-cell"></div>';
@@ -3606,6 +3609,7 @@ class FMViewForm_maker {
3606
  $html .= '</div>';
3607
  $html .= $rows_columns;
3608
  $html .= '</div>';
 
3609
  $html .= '</div>';
3610
 
3611
  // Generate field.
134
 
135
  $form_maker_front_end .= '<input type="hidden" id="counter' . $form_id . '" value="' . $row->counter . '" name="counter' . $form_id . '" />';
136
  $form_maker_front_end .= '<input type="hidden" id="Itemid' . $form_id . '" value="" name="Itemid' . $form_id . '" />';
137
+ $form_maker_front_end .= '<input type="hidden" value="" name="fm_bot_validation' . $form_id . '" />';
138
 
139
  if ( !$fm_hide_form_after_submit ) {
140
  // Form header.
1907
  }
1908
  }
1909
  if ( $onload_js ) {
1910
+ $onload_js = 'jQuery(document).ready( function () {' . $onload_js . '})';
1911
  }
1912
  if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
1913
  wp_add_inline_script( WDFMInstance(self::PLUGIN)->handle_prefix . '-script-' . $id, $onload_js);
2288
  $param['w_choices_params'] = explode('***', $param['w_choices_params']);
2289
  }
2290
  $post_value = isset($_POST["counter" . $form_id]) ? esc_html($_POST["counter" . $form_id]) : NULL;
 
2291
  $param['id'] = '';
2292
  $param['w_class'] .= ' wd-flex-wrap' . ($param['w_flow'] != 'hor' ? ' wd-flex-column' : ' wd-flex-row');
2293
 
2329
  $param['w_choices_checked'][$key] = (isset($_POST['wdform_' . $id1 . "_element" . $form_id]) ? 'checked="checked"' : '');
2330
  }
2331
  $html .= '<div class="radio-div wd-choice wd-flex ' . (($param['w_field_option_pos'] == "right") ? 'wd-flex-row' : 'wd-flex-row-reverse wd-justify-content' ) . '">';
2332
+ $html .= '<input type="radio" ';
2333
+ $html .= (($param['w_allow_other'] == "yes" && $param['w_allow_other_num'] == $key) ? 'other="1"' : '');
2334
+ $html .= ' id="wdform_' . $id1 . '_element' . $form_id . '' . ($key1 + $k);
2335
+ $html .= '" name="wdform_' . $id1 . '_element' . $form_id;
2336
+ $html .= '" value="' . htmlspecialchars($choice_value[0]);
2337
+ $html .= '" onclick="set_default(&quot;wdform_' . $id1 . '&quot;,&quot;' . ($key1 + $k) . '&quot;,&quot;' . $form_id . '&quot;); ' . (($param['w_allow_other'] == "yes" && $param['w_allow_other_num'] == $key) ? 'show_other_input(&quot;wdform_' . $id1 . '&quot;,&quot;' . $form_id . '&quot;);' : '') . '" ' . $param['w_choices_checked'][$key] . ' ' . $param['attributes'] . ' />';
2338
+
2339
  $html .= '<label class="wd-align-items-center wd-flex ' . ($param['w_field_option_pos'] == "right" ? "wd-flex-row" : "wd-flex-row-reverse wd-justify-content wd-width-100") . '" for="wdform_' . $id1 . '_element' . $form_id . '' . ($key1 + $k) . '"><span></span>' . $choice_label[0] . '</label>';
2340
  $html .= '</div>';
2341
  }
2444
  $param['w_value_disabled'] = 'no';
2445
  }
2446
  $post_value = isset($_POST["counter" . $form_id]) ? esc_html($_POST["counter" . $form_id]) : NULL;
 
2447
  $param['id'] = $id1;
2448
  $param['w_class'] .= ' wd-flex-row';
2449
 
3045
  }
3046
  $param['w_countries'] = explode('***', $param['w_countries']);
3047
  $post_value = isset($_POST["counter" . $form_id]) ? esc_html($_POST["counter" . $form_id]) : NULL;
 
3048
  $param['id'] = $id1;
3049
  $param['w_class'] .= ' wd-flex-row';
3050
 
3602
  $param['w_class'] .= ' wd-flex-row';
3603
 
3604
  $html = '<div id="wdform_' . $id1 . '_element' . $form_id . '" class="wd-width-100 wdform-matrix-table" ' . $param['attributes'] . '>';
 
3605
  $html .= '<div class="wd-table-group">';
3606
  $html .= '<div class="wdform-matrix-head">';
3607
  $html .= '<div class="wd-table-cell"></div>';
3609
  $html .= '</div>';
3610
  $html .= $rows_columns;
3611
  $html .= '</div>';
3612
+ $html .= '<input type="hidden" name="wdform_' . $id1 . '_element' . $form_id . '" value="" />';
3613
  $html .= '</div>';
3614
 
3615
  // Generate field.
js/form_maker_admin.js CHANGED
@@ -61,10 +61,7 @@ function fm_toggle_postbox(that) {
61
  }
62
 
63
  function fm_option_tabs_mail_validation() {
64
- if (fm_check_email('email') || fm_check_email('fm_email_to') || fm_check_email('mail_bcc_user') || fm_check_email('mail_cc_user') || fm_check_email('reply_to_other') || fm_check_email('mail_cc') || fm_check_email('mail_bcc') || fm_check_email('mail') || fm_check_email('from_mail') || fm_check_email('reply_to') || fm_check_email('mail_from_user') || fm_check_email('reply_to_user') || fm_check_email('mail_from_other') || fm_check_email('reply_to_other') || fm_check_email('paypal_email')) {
65
- return false;
66
- }
67
- return true;
68
  }
69
  /**
70
  * Set null value no input.
@@ -118,15 +115,15 @@ function input_search(e, that) {
118
  function input_pagination(e, that) {
119
  var key_code = (e.keyCode ? e.keyCode : e.which);
120
  if (key_code == 13) { /*Enter keycode*/
 
121
  var to_page = jQuery(that).val();
122
  var pages_count = jQuery(that).parents(".pagination-links").data("pages-count");
123
- var form = jQuery(that).parents("form");
124
- if (to_page <= pages_count) {
125
- var search = jQuery("input[name='s']").val() ? ("&s=" + jQuery("input[name='s']").val()) : "";
126
-
127
- form.attr("action", window.location + "&paged=" + to_page + search);
128
  }
129
- form.submit();
130
  }
131
  return true;
132
  }
@@ -582,6 +579,29 @@ jQuery(document).ready(function () {
582
  this_item.remove();
583
  return false;
584
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
585
  });
586
 
587
  function fm_toggle_posts(that) {
61
  }
62
 
63
  function fm_option_tabs_mail_validation() {
64
+ return true;
 
 
 
65
  }
66
  /**
67
  * Set null value no input.
115
  function input_pagination(e, that) {
116
  var key_code = (e.keyCode ? e.keyCode : e.which);
117
  if (key_code == 13) { /*Enter keycode*/
118
+ var form = jQuery(that).parents("form");
119
  var to_page = jQuery(that).val();
120
  var pages_count = jQuery(that).parents(".pagination-links").data("pages-count");
121
+ if ( to_page <= pages_count && to_page > 0 ) {
122
+ var nonceRE = new RegExp("&nonce_fm="+ nonce_fm +"","g");
123
+ var action = form.attr("action").replace(nonceRE, '').replace(/&paged=(\d+)/, '') + '&paged=' + to_page;
124
+ form.attr("action", action);
125
+ location.href = action;
126
  }
 
127
  }
128
  return true;
129
  }
579
  this_item.remove();
580
  return false;
581
  });
582
+ jQuery('body').on('click', '.pp_display_on_categories input[name="display_on_categories[]"]', function () {
583
+ var all_checkbox = jQuery('.pp_display_on_categories input[name="display_on_categories[]"]');
584
+ var all_categories = jQuery('.fm-display-all-categories');
585
+ var val = jQuery(this).val();
586
+ if ( val == 'select_all_categories') {
587
+ if ( jQuery(this).is(':checked') ) {
588
+ all_checkbox.prop('checked', true);
589
+ } else {
590
+ all_checkbox.prop('checked', false);
591
+ }
592
+ }
593
+ else {
594
+ var checked_count = jQuery('input[name="display_on_categories[]"]:checked').length;
595
+ var all_categories_count = parseInt(all_categories.attr('data-categories-count'));
596
+ if ( !jQuery(this).prop('checked') ) {
597
+ checked_count = checked_count - 1;
598
+ }
599
+ all_categories.prop('checked', false);
600
+ if ( checked_count == all_categories_count) {
601
+ all_categories.prop('checked', true);
602
+ }
603
+ }
604
+ });
605
  });
606
 
607
  function fm_toggle_posts(that) {
js/form_maker_form_options.js CHANGED
@@ -41,12 +41,12 @@ jQuery(document).ready(function () {
41
  jQuery(window).on('load', function () {
42
  var fieldset_id = jQuery("#fieldset_id").val();
43
  form_maker_options_tabs(fieldset_id);
44
-
 
45
  if ( fieldset_id == 'javascript' ) {
46
  codemirror_for_javascript();
47
  }
48
-
49
- fm_change_payment_method(payment_method);
50
  fm_popup();
51
  function hide_email_labels(event) {
52
  var e = event.toElement || event.relatedTarget;
@@ -115,14 +115,107 @@ function filter_placeholders(that) {
115
  }
116
  }
117
 
118
- function wd_fm_apply_options(task) {
119
- var submit = fm_option_tabs_mail_validation();
120
- if(submit === true){
121
- set_condition();
122
- fm_set_input_value('task', task);
123
- return true;
124
- }
125
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  }
127
 
128
  function fm_placeholders_popup(input_id) {
41
  jQuery(window).on('load', function () {
42
  var fieldset_id = jQuery("#fieldset_id").val();
43
  form_maker_options_tabs(fieldset_id);
44
+ fm_change_payment_method(jQuery('input[name=paypal_mode]:checked').val());
45
+
46
  if ( fieldset_id == 'javascript' ) {
47
  codemirror_for_javascript();
48
  }
49
+
 
50
  fm_popup();
51
  function hide_email_labels(event) {
52
  var e = event.toElement || event.relatedTarget;
115
  }
116
  }
117
 
118
+ function wd_fm_apply_options(task) {
119
+ var success = true;
120
+ jQuery(".fm-validate").each(function() {
121
+ var type = jQuery(this).attr("data-type");
122
+ var message = form_maker.not_valid_value;
123
+ if ( type == 'required' ) {
124
+ message = form_maker.required_field;
125
+ }
126
+ else if ( type == 'email' ) {
127
+ message = form_maker.not_valid_email;
128
+ }
129
+ message = "<p class='description fm-validate-description'>" + message + "</p>";
130
+ var callback = jQuery(this).attr("data-callback");
131
+ var callbackParameter = jQuery(this).attr("data-callback-parameter");
132
+ var tabId = jQuery(this).attr("data-tab-id");
133
+ var contentId = jQuery(this).attr("data-content-id");
134
+ var value = jQuery(this).val();
135
+
136
+ if ( typeof window[callback] == "function" && !window[callback](value, callbackParameter ) ) { /* Check validation.*/
137
+ /* Remove active class from all tabs.*/
138
+ jQuery(".fm_fieldset_active").addClass("fm_fieldset_deactive").removeClass("fm_fieldset_active");
139
+ jQuery(".fm_fieldset_tab").removeClass("active");
140
+ /* Add active class to required tab.*/
141
+ jQuery("#" + contentId).removeClass("fm_fieldset_deactive").addClass("fm_fieldset_active");
142
+ jQuery("#" + tabId).addClass("active");
143
+ jQuery("#fieldset_id").val(tabId);
144
+ /* Add error message to the field.*/
145
+ if ( jQuery(this).parent().find(".fm-validate-description").length === 0 ) {
146
+ var description_container = jQuery(this).parent().find(".description");
147
+ if ( description_container.length ) {
148
+ /* Show error message before description, if description container exist.*/
149
+ description_container.before(message);
150
+ }
151
+ else {
152
+ jQuery(this).parent().append(message);
153
+ }
154
+
155
+ jQuery(this).addClass("fm-validate-field");
156
+ }
157
+ jQuery('html, body').animate({
158
+ scrollTop: jQuery(this).offset().top - 200
159
+ }, 500);
160
+ success = false;
161
+ return false; /* To break loop.*/
162
+ }
163
+ });
164
+
165
+ if ( success ) {
166
+ set_condition();
167
+ fm_set_input_value('task', task);
168
+ }
169
+
170
+ return success;
171
+ }
172
+
173
+ jQuery(document).ready(function () {
174
+ // Remove validation errors on key press.
175
+ jQuery(".fm-validate").each(function() {
176
+ jQuery(this).on("keypress", function () {
177
+ jQuery(this).parent().find(".fm-validate-description").remove();
178
+ jQuery(this).removeClass("fm-validate-field");
179
+ });
180
+ });
181
+ });
182
+
183
+ function fm_validate_email(value, obj) {
184
+ if ( obj != "" && !jQuery(obj).is(':checked') ) { /* No need to check, if option is disabled.*/
185
+ return true;
186
+ }
187
+
188
+ var emails = value.split(',');
189
+ var re = /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,61}$/;
190
+ var rePlaceholder = /^({)[0-9]+(})$/;
191
+
192
+ var allowed_placeholders = ['{adminemail}', '{useremail}'];
193
+
194
+ for ( var i in emails ) {
195
+ var email = emails[i].replace(/^\s+|\s+$/g, '');
196
+ if ( !allowed_placeholders.includes(email) ) {
197
+ if ( email && !re.test(email) && !rePlaceholder.test(email) ) {
198
+ return false;
199
+ }
200
+ }
201
+ }
202
+
203
+ return true;
204
+ }
205
+
206
+ function fm_add_inline_email_validation_message(obj) {
207
+ var value = jQuery(obj).val();
208
+ if ( !fm_validate_email(value, '') ) {
209
+ jQuery(obj).after("<p class='description fm-validate-description'>" + form_maker.not_valid_value + "</p>");
210
+ jQuery(obj).addClass("fm-validate-field");
211
+ jQuery('html, body').animate({
212
+ scrollTop: jQuery(this).offset().top - 200
213
+ }, 500);
214
+
215
+ return false;
216
+ }
217
+
218
+ return true;
219
  }
220
 
221
  function fm_placeholders_popup(input_id) {
js/form_maker_manage.js CHANGED
@@ -160,14 +160,11 @@ function fm_delete_mail(img, value) {
160
  }
161
 
162
  function form_maker_options_tabs(id) {
163
- var tab = fm_option_tabs_mail_validation();
164
- if ( tab === true ) {
165
- jQuery("#fieldset_id").val(id);
166
- jQuery(".fm_fieldset_active").removeClass("fm_fieldset_active").addClass("fm_fieldset_deactive");
167
- jQuery("#" + id + "_fieldset").removeClass("fm_fieldset_deactive").addClass("fm_fieldset_active");
168
- jQuery(".fm_fieldset_tab").removeClass("active");
169
- jQuery("#" + id).addClass("active");
170
- }
171
 
172
  return false;
173
  }
@@ -811,7 +808,6 @@ function check_stripe_required_fields() {
811
  }
812
  for (i=0; i < fields.length; i++) {
813
  if (!jQuery('#' + fields[i]).val()) {
814
- form_maker_options_tabs('payment');
815
  jQuery('#' + fields[i]).focus();
816
  alert(fields_titles[i] + ' is required.');
817
  return true;
160
  }
161
 
162
  function form_maker_options_tabs(id) {
163
+ jQuery("#fieldset_id").val(id);
164
+ jQuery(".fm_fieldset_active").removeClass("fm_fieldset_active").addClass("fm_fieldset_deactive");
165
+ jQuery("#" + id + "_fieldset").removeClass("fm_fieldset_deactive").addClass("fm_fieldset_active");
166
+ jQuery(".fm_fieldset_tab").removeClass("active");
167
+ jQuery("#" + id).addClass("active");
 
 
 
168
 
169
  return false;
170
  }
808
  }
809
  for (i=0; i < fields.length; i++) {
810
  if (!jQuery('#' + fields[i]).val()) {
 
811
  jQuery('#' + fields[i]).focus();
812
  alert(fields_titles[i] + ' is required.');
813
  return true;
js/form_maker_manage_edit.js CHANGED
@@ -234,7 +234,7 @@ function FormManageSubmitButton(check_for_changes) {
234
  form_changed = true;
235
  }
236
  });
237
- if (tinyMCE.get('header_description') != null) {
238
  if (tinyMCE.get('header_description').isDirty()) {
239
  form_changed = true;
240
  }
234
  form_changed = true;
235
  }
236
  });
237
+ if (typeof tinyMCE != 'undefined' && tinyMCE.get('header_description') != null) {
238
  if (tinyMCE.get('header_description').isDirty()) {
239
  form_changed = true;
240
  }
js/form_maker_submissions.js CHANGED
@@ -53,6 +53,7 @@ jQuery(window).on("resize", function () {
53
  function filter_fields_submit() {
54
  jQuery('#fm-fields-filter').find('input').keypress( function(e) {
55
  if ( e.which == 13 ) {
 
56
  fm_form_submit(false, 'admin_form');
57
  }
58
  });
53
  function filter_fields_submit() {
54
  jQuery('#fm-fields-filter').find('input').keypress( function(e) {
55
  if ( e.which == 13 ) {
56
+ jQuery('#fm-fields-filter').find('#fm_is_search').val(1);
57
  fm_form_submit(false, 'admin_form');
58
  }
59
  });
js/shortcode.js CHANGED
@@ -112,7 +112,7 @@ function get_textarea_selection(id) {
112
  function insert_shortcode(type) {
113
  window.parent.window.jQuery(window.parent.document).trigger("onOpenShortcode");
114
  var form = jQuery("select[name='form_maker_id']");
115
- if (form.val() != 0) {
116
  var shortcode = '[Form id="' + form.val() + '"';
117
  if (type != 'form') {
118
  shortcode += ' type="submission"';
112
  function insert_shortcode(type) {
113
  window.parent.window.jQuery(window.parent.document).trigger("onOpenShortcode");
114
  var form = jQuery("select[name='form_maker_id']");
115
+ if ( form.val() != 0 ) {
116
  var shortcode = '[Form id="' + form.val() + '"';
117
  if (type != 'form') {
118
  shortcode += ' type="submission"';
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: webdorado,10web,wdsupport,formmakersupport
3
  Tags: form, form builder, contact form, custom form, feedback, contact, web contact form, captcha, email, form manager, forms, survey
4
  Requires at least: 4.6
5
  Tested up to: 4.9
6
- Stable tag: 1.12.32
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -452,6 +452,22 @@ Where **{{field_id}}** is the ID of the field you wish to prefill. Also, **{{par
452
 
453
  == Changelog ==
454
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
455
  = 1.12.32 =
456
  * Fixed: Include styles/scripts on form pages only.
457
 
3
  Tags: form, form builder, contact form, custom form, feedback, contact, web contact form, captcha, email, form manager, forms, survey
4
  Requires at least: 4.6
5
  Tested up to: 4.9
6
+ Stable tag: 1.12.33
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
452
 
453
  == Changelog ==
454
 
455
+ = 1.12.33 =
456
+ * Added: Option to enable/disable WP Editor.
457
+ * Added: Additional security checks against bots.
458
+ * Changed: Field validation on form options page.
459
+ * Fixed: Error on deactivation.
460
+ * Fixed: Port for connecting to a remote Database with SQL mapping.
461
+ * Fixed: Displaying Form on all posts instead of the selected.
462
+ * Fixed: Filled values of payment fields should not be lost on an error.
463
+ * Fixed: Form is not saved if you click Publish before the page is loaded.
464
+ * Fixed: Table of fields validation.
465
+ * Fixed: Add shortcode functionality on Beaver, Elementor, SiteOrigin and Visual Composer builders.
466
+ * Fixed: If you Sort/Filter the data via some column, then hit next page button, the sort reverts to the default sort order.
467
+ * Fixed: Select all in Submissions should apply to the current page only.
468
+ * Fixed: Do not change the page after IP block in submissions page.
469
+ * Fixed: Do not change the page after deleting submission in submissions page.
470
+
471
  = 1.12.32 =
472
  * Fixed: Include styles/scripts on form pages only.
473