Contact Form by WD – responsive drag & drop contact form builder tool - Version 1.12.36

Version Description

  • Improved: Uninstall interface and texts.
  • Fixed: "New Field" button drag and drop issue in Firefox and Safari.
  • Fixed: Do not show hidden amounts in total.
  • Added: GDPR compliance required checkbox on front end.
  • Added: Warn user if the email address does not belong to the site domain.
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Contact Form by WD – responsive drag & drop contact form builder tool
Version 1.12.36
Comparing to
See all releases

Code changes from version 1.12.35 to 1.12.36

admin/controllers/Manage_fm.php CHANGED
@@ -475,8 +475,7 @@ class FMControllerManage_fmc extends CFMAdminController {
475
  $params[ 'back_url' ] = add_query_arg( array(
476
  'page' => 'manage' . WDFMInstance(self::PLUGIN)->menu_postfix,
477
  'task' => 'edit',
478
- 'current_id' => $id,
479
-
480
  ), admin_url( 'admin.php' )
481
  );
482
 
@@ -725,6 +724,8 @@ function after_submit() {
725
  $mail_verification_post_id = (int) $this->model->get_mail_verification_post_id();
726
 
727
  $privacy_arr = array(
 
 
728
  'save_ip' => WDW_FM_Library(self::PLUGIN)->get('save_ip', 1),
729
  'save_user_id' => WDW_FM_Library(self::PLUGIN)->get('save_user_id', 1),
730
  );
@@ -799,7 +800,7 @@ function after_submit() {
799
  'theme' => $theme,
800
  ), array( 'id' => $id )); //save theme in backup
801
  $this->model->create_js($id);
802
- if (WDFMInstance(self::PLUGIN)->is_free != 2) {
803
  $save_addon = do_action('fm_save_addon_init', $id);
804
  }
805
  $message_id = 8;
@@ -1200,8 +1201,8 @@ function after_submit() {
1200
  'display_on' => 'home,post,page',
1201
  'posts_include' => '',
1202
  'pages_include' => '',
1203
- 'display_on_categories' => '',
1204
- 'current_categories' => '',
1205
  'show_for_admin' => 0,
1206
  ));
1207
  $this->model->insert_data_to_db('formmaker_views', array(
475
  $params[ 'back_url' ] = add_query_arg( array(
476
  'page' => 'manage' . WDFMInstance(self::PLUGIN)->menu_postfix,
477
  'task' => 'edit',
478
+ 'current_id' => $id
 
479
  ), admin_url( 'admin.php' )
480
  );
481
 
724
  $mail_verification_post_id = (int) $this->model->get_mail_verification_post_id();
725
 
726
  $privacy_arr = array(
727
+ 'gdpr_checkbox' => WDW_FM_Library(self::PLUGIN)->get('gdpr_checkbox', 0),
728
+ 'gdpr_checkbox_text' => WDW_FM_Library(self::PLUGIN)->get('gdpr_checkbox_text', __('I consent collecting this data and processing it according to {{privacy_policy}} of this website.', WDFMInstance(self::PLUGIN)->prefix)),
729
  'save_ip' => WDW_FM_Library(self::PLUGIN)->get('save_ip', 1),
730
  'save_user_id' => WDW_FM_Library(self::PLUGIN)->get('save_user_id', 1),
731
  );
800
  'theme' => $theme,
801
  ), array( 'id' => $id )); //save theme in backup
802
  $this->model->create_js($id);
803
+ if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
804
  $save_addon = do_action('fm_save_addon_init', $id);
805
  }
806
  $message_id = 8;
1201
  'display_on' => 'home,post,page',
1202
  'posts_include' => '',
1203
  'pages_include' => '',
1204
+ 'display_on_categories' => 'select_all_categories',
1205
+ 'current_categories' => 'select_all_categories',
1206
  'show_for_admin' => 0,
1207
  ));
1208
  $this->model->insert_data_to_db('formmaker_views', array(
admin/controllers/elementorWidget.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class FMCElementor extends \Elementor\Widget_Base {
4
+ /**
5
+ * PLUGIN = 2 points to Contact Form Maker
6
+ */
7
+ const PLUGIN = 2;
8
+
9
+ /**
10
+ * Get widget name.
11
+ *
12
+ * @return string Widget name.
13
+ */
14
+ public function get_name() {
15
+ return 'fm-elementor';
16
+ }
17
+
18
+ /**
19
+ * Get widget title.
20
+ *
21
+ * @return string Widget title.
22
+ */
23
+ public function get_title() {
24
+ return __('Form', WDFMInstance(self::PLUGIN)->prefix);
25
+ }
26
+
27
+ /**
28
+ * Get widget icon.
29
+ *
30
+ * @return string Widget icon.
31
+ */
32
+ public function get_icon() {
33
+ return 'fa fa-id-card';
34
+ }
35
+
36
+ /**
37
+ * Get widget categories.
38
+ *
39
+ * @return array Widget categories.
40
+ */
41
+ public function get_categories() {
42
+ return [ 'tenweb-widgets' ];
43
+ }
44
+
45
+ /**
46
+ * Register widget controls.
47
+ */
48
+ protected function _register_controls() {
49
+ $this->start_controls_section(
50
+ 'general',
51
+ [
52
+ 'label' => __('Form', WDFMInstance(self::PLUGIN)->prefix),
53
+ ]
54
+ );
55
+
56
+ $this->add_control(
57
+ 'form_id',
58
+ [
59
+ 'label_block' => TRUE,
60
+ 'show_label' => FALSE,
61
+ 'description' => __('Select the form to display.', WDFMInstance(self::PLUGIN)->prefix) . ' <a target="_balnk" href="' . add_query_arg(array( 'page' => 'manage_fm' ), admin_url('admin.php')) . '">' . __('Edit form', WDFMInstance(self::PLUGIN)->prefix) . '</a>',
62
+ 'type' => \Elementor\Controls_Manager::SELECT,
63
+ 'default' => 0,
64
+ 'options' => WDW_FM_Library(self::PLUGIN)->get_forms(),
65
+ ]
66
+ );
67
+
68
+ $this->end_controls_section();
69
+ }
70
+
71
+ /**
72
+ * Render widget output on the frontend.
73
+ */
74
+ protected function render() {
75
+ $settings = $this->get_settings_for_display();
76
+
77
+ echo WDFMInstance(self::PLUGIN)->fm_shortcode(array('id' => $settings['form_id']));
78
+ }
79
+ }
80
+
81
+ \Elementor\Plugin::instance()->widgets_manager->register_widget_type(new FMCElementor());
admin/models/Manage_fm.php CHANGED
@@ -50,11 +50,15 @@ class FMModelManage_fmc extends CFMAdminModel {
50
  if ( $id != 0 ) {
51
  $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
52
  if ( $row ) {
 
 
53
  $row->save_ip = 1;
54
  $row->save_user_id = 1;
55
  if ( isset($row->privacy) ) {
56
  if ( $row->privacy ) {
57
  $privacy = json_decode($row->privacy);
 
 
58
  $row->save_ip = isset($privacy->save_ip) ? $privacy->save_ip : 1;
59
  $row->save_user_id = isset($privacy->save_user_id) ? $privacy->save_user_id : 1;
60
  }
@@ -115,6 +119,8 @@ class FMModelManage_fmc extends CFMAdminModel {
115
  $row->header_image_url = '';
116
  $row->header_image_animation = '';
117
  $row->header_hide_image = '';
 
 
118
  $row->save_ip = 1;
119
  $row->save_user_id = 1;
120
  }
@@ -133,11 +139,15 @@ class FMModelManage_fmc extends CFMAdminModel {
133
  if ( $id != 0 ) {
134
  $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_backup WHERE backup_id="%d"', $id));
135
  if ( $row ) {
 
 
136
  $row->save_ip = 1;
137
  $row->save_user_id = 1;
138
  if ( isset($row->privacy) ) {
139
  if ( $row->privacy ) {
140
  $privacy = json_decode($row->privacy);
 
 
141
  $row->save_ip = isset($privacy->save_ip) ? $privacy->save_ip : 1;
142
  $row->save_user_id = isset($privacy->save_user_id) ? $privacy->save_user_id : 1;
143
  }
@@ -218,6 +228,8 @@ class FMModelManage_fmc extends CFMAdminModel {
218
  $row->mail_verify = 0;
219
  $row->mail_verify_expiretime = 0;
220
  $row->mail_verification_post_id = 0;
 
 
221
  $row->save_ip = 1;
222
  $row->save_user_id = 1;
223
  }
@@ -3515,8 +3527,8 @@ class FMModelManage_fmc extends CFMAdminModel {
3515
  $row->display_on = 'home,post,page';
3516
  $row->posts_include = '';
3517
  $row->pages_include = '';
3518
- $row->display_on_categories = '';
3519
- $row->current_categories = '';
3520
  $row->show_for_admin = 0;
3521
  }
3522
 
50
  if ( $id != 0 ) {
51
  $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
52
  if ( $row ) {
53
+ $row->gdpr_checkbox = 0;
54
+ $row->gdpr_checkbox_text = __('I consent collecting this data and processing it according to {{privacy_policy}} of this website.', WDFMInstance(self::PLUGIN)->prefix);
55
  $row->save_ip = 1;
56
  $row->save_user_id = 1;
57
  if ( isset($row->privacy) ) {
58
  if ( $row->privacy ) {
59
  $privacy = json_decode($row->privacy);
60
+ $row->gdpr_checkbox = isset($privacy->gdpr_checkbox) ? $privacy->gdpr_checkbox : 0;
61
+ $row->gdpr_checkbox_text = isset($privacy->gdpr_checkbox_text) ? $privacy->gdpr_checkbox_text : __('I consent collecting this data and processing it according to {{privacy_policy}} of this website.', WDFMInstance(self::PLUGIN)->prefix);
62
  $row->save_ip = isset($privacy->save_ip) ? $privacy->save_ip : 1;
63
  $row->save_user_id = isset($privacy->save_user_id) ? $privacy->save_user_id : 1;
64
  }
119
  $row->header_image_url = '';
120
  $row->header_image_animation = '';
121
  $row->header_hide_image = '';
122
+ $row->gdpr_checkbox = 0;
123
+ $row->gdpr_checkbox_text = __('I consent collecting this data and processing it according to {{privacy_policy}} of this website.', WDFMInstance(self::PLUGIN)->prefix);
124
  $row->save_ip = 1;
125
  $row->save_user_id = 1;
126
  }
139
  if ( $id != 0 ) {
140
  $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_backup WHERE backup_id="%d"', $id));
141
  if ( $row ) {
142
+ $row->gdpr_checkbox = 0;
143
+ $row->gdpr_checkbox_text = __('I consent collecting this data and processing it according to {{privacy_policy}} of this website.', WDFMInstance(self::PLUGIN)->prefix);
144
  $row->save_ip = 1;
145
  $row->save_user_id = 1;
146
  if ( isset($row->privacy) ) {
147
  if ( $row->privacy ) {
148
  $privacy = json_decode($row->privacy);
149
+ $row->gdpr_checkbox = isset($privacy->gdpr_checkbox) ? $privacy->gdpr_checkbox : 0;
150
+ $row->gdpr_checkbox_text = isset($privacy->gdpr_checkbox_text) ? $privacy->gdpr_checkbox_text : __('I consent collecting this data and processing it according to {{privacy_policy}} of this website.', WDFMInstance(self::PLUGIN)->prefix);
151
  $row->save_ip = isset($privacy->save_ip) ? $privacy->save_ip : 1;
152
  $row->save_user_id = isset($privacy->save_user_id) ? $privacy->save_user_id : 1;
153
  }
228
  $row->mail_verify = 0;
229
  $row->mail_verify_expiretime = 0;
230
  $row->mail_verification_post_id = 0;
231
+ $row->gdpr_checkbox = 0;
232
+ $row->gdpr_checkbox_text = __('I consent collecting this data and processing it according to {{privacy_policy}} of this website.', WDFMInstance(self::PLUGIN)->prefix);
233
  $row->save_ip = 1;
234
  $row->save_user_id = 1;
235
  }
3527
  $row->display_on = 'home,post,page';
3528
  $row->posts_include = '';
3529
  $row->pages_include = '';
3530
+ $row->display_on_categories = 'select_all_categories';
3531
+ $row->current_categories = 'select_all_categories';
3532
  $row->show_for_admin = 0;
3533
  }
3534
 
admin/views/Manage_fm.php CHANGED
@@ -691,10 +691,12 @@ class FMViewManage_fmc extends FMAdminView_fmc {
691
  public function form_options( $params = array() ) {
692
  wp_enqueue_style('thickbox');
693
  wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-codemirror');
694
- wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-layout');
695
 
696
  wp_enqueue_script('thickbox');
697
  wp_enqueue_script('jquery-ui-widget');
 
 
698
  wp_enqueue_media();
699
  wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-form-options');
700
  wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-codemirror');
@@ -966,9 +968,9 @@ class FMViewManage_fmc extends FMAdminView_fmc {
966
  <div class="wd-box-content">
967
  <div class="wd-group">
968
  <label class="wd-label"><?php _e('Send E-mail', WDFMInstance(self::PLUGIN)->prefix); ?></label>
969
- <input type="radio" name="sendemail" <?php echo $row->sendemail == 1 ? 'checked="checked"' : '' ?> id="fm_sendemail-1" class="wd-radio" value="1" onchange="fm_toggle_email_options(true)" />
970
  <label class="wd-label-radio" for="fm_sendemail-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
971
- <input type="radio" name="sendemail" <?php echo $row->sendemail == 0 ? 'checked="checked"' : '' ?> id="fm_sendemail-0" class="wd-radio" value="0" onchange="fm_toggle_email_options(false)" />
972
  <label class="wd-label-radio" for="fm_sendemail-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
973
  <p class="description"><?php _e('Enable this setting to send submitted information to administrators and/or the submitter.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
974
  <p class="description fm_email_options"><?php _e('In case you cannot find the submission email in your Inbox, make sure to check the Spam folder as well.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
@@ -991,6 +993,45 @@ class FMViewManage_fmc extends FMAdminView_fmc {
991
  <span class="dashicons dashicons-list-view" data-id="mail"></span>
992
  <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>
993
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
994
  <div class="wd-group wd-has-placeholder">
995
  <label class="wd-label" for="mail_subject"><?php _e('Subject', WDFMInstance(self::PLUGIN)->prefix); ?></label>
996
  <input type="text" id="mail_subject" name="mail_subject" value="<?php echo !empty($row->mail_subject) ? $row->mail_subject : '{formtitle}'; ?>" />
@@ -1028,42 +1069,8 @@ class FMViewManage_fmc extends FMAdminView_fmc {
1028
  <span><?php _e('Advanced', WDFMInstance(self::PLUGIN)->prefix); ?></span>
1029
  </h2>
1030
  <div class="inside">
1031
- <div class="wd-group">
1032
- <label class="wd-label"><?php _e('Email From', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1033
- <?php
1034
- $is_other = TRUE;
1035
- for ( $i = 0; $i < $fields_count - 1; $i++ ) {
1036
- ?>
1037
- <input class="wd-radio" type="radio" name="from_mail" id="from_mail<?php echo $i; ?>" value="<?php echo(!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i])) : $fields[$i]); ?>" <?php echo((!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i])) : $fields[$i]) == $row->from_mail ? 'checked="checked"' : ''); ?> onclick="wdhide('mail_from_other_wrap'); fm_clear_input_value('mail_from_other');" />
1038
- <label class="wd-label-radio" for="from_mail<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
1039
- <?php
1040
- if ( !is_numeric($fields[$i]) ) {
1041
- if ( substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i])) == $row->from_mail ) {
1042
- $is_other = FALSE;
1043
- }
1044
- }
1045
- else {
1046
- if ( $fields[$i] == $row->from_mail ) {
1047
- $is_other = FALSE;
1048
- }
1049
- }
1050
- }
1051
- ?>
1052
- <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')" />
1053
- <label style="<?php echo ($fields_count == 1) ? 'display:none;' : ''; ?>" class="wd-label-radio" for="other"><?php _e('Other', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1054
- <p style="display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="mail_from_other_wrap">
1055
- <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 : ''; ?>" />
1056
- </p>
1057
- <p class="description"><?php _e('Specify the email address from which the administrator will receive the email.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1058
- </div>
1059
- <div class="wd-group wd-has-placeholder">
1060
- <label class="wd-label" for="from_name"><?php _e('From Name', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1061
- <input type="text" name="from_name" value="<?php echo $row->from_name; ?>" id="from_name" />
1062
- <span class="dashicons dashicons-list-view" data-id="from_name"></span>
1063
- <p class="description"><?php _e('Set the name or search for a form field which is shown as the sender’s name in submission or confirmation emails.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1064
- </div>
1065
- <div class="wd-group">
1066
- <label class="wd-label" for="from_name"><?php _e('Reply to (if different from "Email From")', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1067
  <?php
1068
  $is_other = TRUE;
1069
  for ( $i = 0; $i < $fields_count - 1; $i++ ) {
@@ -1156,6 +1163,22 @@ class FMViewManage_fmc extends FMAdminView_fmc {
1156
  ?>
1157
  <p class="description"><?php _e('Use this setting to select the email field of your form, to which the submissions will be sent.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1158
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1159
  <div class="wd-group wd-has-placeholder">
1160
  <label class="wd-label" for="mail_subject_user"><?php _e('Subject', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1161
  <input type="text" name="mail_subject_user" value="<?php echo !empty($row->mail_subject_user) ? $row->mail_subject_user : '{formtitle}' ?>" id="mail_subject_user" class="mail_subject_user" />
@@ -1193,17 +1216,6 @@ class FMViewManage_fmc extends FMAdminView_fmc {
1193
  <span><?php _e('Advanced', WDFMInstance(self::PLUGIN)->prefix); ?></span>
1194
  </h2>
1195
  <div class="inside">
1196
- <div class="wd-group">
1197
- <label class="wd-label" for="mail_from_user"><?php _e('Email From', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1198
- <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; ?>" />
1199
- <p class="description"><?php _e('Specify the email address from which the submitter will receive the email.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1200
- </div>
1201
- <div class="wd-group wd-has-placeholder">
1202
- <label class="wd-label" for="mail_from_name_user"><?php _e('From Name', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1203
- <input type="text" name="mail_from_name_user" value="<?php echo $row->mail_from_name_user; ?>" id="mail_from_name_user" />
1204
- <span class="dashicons dashicons-list-view" data-id="mail_from_name_user"></span>
1205
- <p class="description"><?php _e('Set the name or search for a form field which is shown as the sender’s name in submission or confirmation emails.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1206
- </div>
1207
  <div class="wd-group">
1208
  <label class="wd-label" for="reply_to_user"><?php _e('Reply to (if different from "Email From")', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1209
  <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" />
@@ -1847,6 +1859,19 @@ class FMViewManage_fmc extends FMAdminView_fmc {
1847
  <div class="wd-table-col-70">
1848
  <div class="wd-box-section">
1849
  <div class="wd-box-content">
 
 
 
 
 
 
 
 
 
 
 
 
 
1850
  <div class="wd-group">
1851
  <label class="wd-label"><?php _e('Save User IP Address to Database', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1852
  <input type="radio" name="save_ip" <?php echo $row->save_ip == 1 ? 'checked="checked"' : '' ?> id="fm_go-save_ip-1" class="wd-radio" value="1">
@@ -2331,7 +2356,7 @@ class FMViewManage_fmc extends FMAdminView_fmc {
2331
  $categories = $params['categories'];
2332
  $selected_categories = $params['selected_categories'];
2333
  $current_categories_array = $params['current_categories_array'];
2334
- $auto_check = ( in_array('select_all_categories', $selected_categories) && count($categories) == count($selected_categories) - 1 ) ? 'checked="checked"' : '';
2335
  $m = 0;
2336
  echo '<li>
2337
  <br/>
@@ -2340,7 +2365,7 @@ class FMViewManage_fmc extends FMAdminView_fmc {
2340
  </li>';
2341
  foreach ( $categories as $cat_key => $category ) {
2342
  $m++;
2343
- $checked = ( in_array($cat_key, $selected_categories) ) ? 'checked="checked"' : '';
2344
  echo '<li>
2345
  <input id="cat'.$m.'" type="checkbox" name="display_on_categories[]" value="'.$cat_key.'" '.$checked.'/>
2346
  <label for="cat'.$m.'">'.$category.'</label>
691
  public function form_options( $params = array() ) {
692
  wp_enqueue_style('thickbox');
693
  wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-codemirror');
694
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-layout');
695
 
696
  wp_enqueue_script('thickbox');
697
  wp_enqueue_script('jquery-ui-widget');
698
+ wp_enqueue_style('jquery-ui-tooltip');
699
+ wp_enqueue_script('jquery-ui-tooltip');
700
  wp_enqueue_media();
701
  wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-form-options');
702
  wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-codemirror');
968
  <div class="wd-box-content">
969
  <div class="wd-group">
970
  <label class="wd-label"><?php _e('Send E-mail', WDFMInstance(self::PLUGIN)->prefix); ?></label>
971
+ <input type="radio" name="sendemail" <?php echo $row->sendemail == 1 ? 'checked="checked"' : '' ?> id="fm_sendemail-1" class="wd-radio" value="1" onchange="fm_toggle_options('.fm_email_options', true)" />
972
  <label class="wd-label-radio" for="fm_sendemail-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
973
+ <input type="radio" name="sendemail" <?php echo $row->sendemail == 0 ? 'checked="checked"' : '' ?> id="fm_sendemail-0" class="wd-radio" value="0" onchange="fm_toggle_options('.fm_email_options', false)" />
974
  <label class="wd-label-radio" for="fm_sendemail-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
975
  <p class="description"><?php _e('Enable this setting to send submitted information to administrators and/or the submitter.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
976
  <p class="description fm_email_options"><?php _e('In case you cannot find the submission email in your Inbox, make sure to check the Spam folder as well.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
993
  <span class="dashicons dashicons-list-view" data-id="mail"></span>
994
  <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>
995
  </div>
996
+ <div class="wd-group">
997
+ <label class="wd-label"><?php _e('Email From', WDFMInstance(self::PLUGIN)->prefix); ?></label>
998
+ <?php
999
+ $is_other = TRUE;
1000
+ for ( $i = 0; $i < $fields_count - 1; $i++ ) {
1001
+ ?>
1002
+ <input class="wd-radio" type="radio" name="from_mail" id="from_mail<?php echo $i; ?>" value="<?php echo(!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i])) : $fields[$i]); ?>" <?php echo((!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i])) : $fields[$i]) == $row->from_mail ? 'checked="checked"' : ''); ?> onclick="wdhide('mail_from_other_wrap'); fm_clear_input_value('mail_from_other');" />
1003
+ <label class="wd-label-radio" for="from_mail<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
1004
+ <?php
1005
+ if ( !is_numeric($fields[$i]) ) {
1006
+ if ( substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i])) == $row->from_mail ) {
1007
+ $is_other = FALSE;
1008
+ }
1009
+ }
1010
+ else {
1011
+ if ( $fields[$i] == $row->from_mail ) {
1012
+ $is_other = FALSE;
1013
+ }
1014
+ }
1015
+ }
1016
+ ?>
1017
+ <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')" />
1018
+ <label style="<?php echo ($fields_count == 1) ? 'display:none;' : ''; ?>" class="wd-label-radio" for="other"><?php _e('Other', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1019
+ <p style="display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="mail_from_other_wrap">
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" name="mail_from_other" id="mail_from_other" value="<?php echo ($is_other) ? $row->from_mail : ''; ?>" />
1021
+ </p>
1022
+ <p class="description"><?php _e('Specify the email address from which the administrator will receive the email.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1023
+ <p class="description"><?php _e('We recommend you to use an email address belonging to your website domain.', WDFMInstance(self::PLUGIN)->prefix); ?> <span class="dashicons dashicons-editor-help wd-info" data-id="fm-email-from-info"></span></p>
1024
+ <div id="fm-email-from-info" class="fm-hide">
1025
+ <p><?php _e('If sender email address is not hosted on the same domain as your website, some hosting providers may not send the emails.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1026
+ <p><?php _e('In addition, relaying mail servers may consider the emails as phishing.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1027
+ </div>
1028
+ </div>
1029
+ <div class="wd-group wd-has-placeholder">
1030
+ <label class="wd-label" for="from_name"><?php _e('From Name', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1031
+ <input type="text" name="from_name" value="<?php echo $row->from_name; ?>" id="from_name" />
1032
+ <span class="dashicons dashicons-list-view" data-id="from_name"></span>
1033
+ <p class="description"><?php _e('Set the name or search for a form field which is shown as the sender’s name in submission or confirmation emails.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1034
+ </div>
1035
  <div class="wd-group wd-has-placeholder">
1036
  <label class="wd-label" for="mail_subject"><?php _e('Subject', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1037
  <input type="text" id="mail_subject" name="mail_subject" value="<?php echo !empty($row->mail_subject) ? $row->mail_subject : '{formtitle}'; ?>" />
1069
  <span><?php _e('Advanced', WDFMInstance(self::PLUGIN)->prefix); ?></span>
1070
  </h2>
1071
  <div class="inside">
1072
+ <div class="wd-group">
1073
+ <label class="wd-label"><?php _e('Reply to (if different from "Email From")', WDFMInstance(self::PLUGIN)->prefix); ?></label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1074
  <?php
1075
  $is_other = TRUE;
1076
  for ( $i = 0; $i < $fields_count - 1; $i++ ) {
1163
  ?>
1164
  <p class="description"><?php _e('Use this setting to select the email field of your form, to which the submissions will be sent.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1165
  </div>
1166
+ <div class="wd-group">
1167
+ <label class="wd-label" for="mail_from_user"><?php _e('Email From', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1168
+ <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; ?>" />
1169
+ <p class="description"><?php _e('Specify the email address from which the submitter will receive the email.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1170
+ <p class="description"><?php _e('We recommend you to use an email address belonging to your website domain.', WDFMInstance(self::PLUGIN)->prefix); ?> <span class="dashicons dashicons-editor-help wd-info" data-id="fm-user-email-from-info"></span></p>
1171
+ <div id="fm-user-email-from-info" class="fm-hide">
1172
+ <p><?php _e('If sender email address is not hosted on the same domain as your website, some hosting providers may not send the emails.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1173
+ <p><?php _e('In addition, relaying mail servers may consider the emails as phishing.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1174
+ </div>
1175
+ </div>
1176
+ <div class="wd-group wd-has-placeholder">
1177
+ <label class="wd-label" for="mail_from_name_user"><?php _e('From Name', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1178
+ <input type="text" name="mail_from_name_user" value="<?php echo $row->mail_from_name_user; ?>" id="mail_from_name_user" />
1179
+ <span class="dashicons dashicons-list-view" data-id="mail_from_name_user"></span>
1180
+ <p class="description"><?php _e('Set the name or search for a form field which is shown as the sender’s name in submission or confirmation emails.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1181
+ </div>
1182
  <div class="wd-group wd-has-placeholder">
1183
  <label class="wd-label" for="mail_subject_user"><?php _e('Subject', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1184
  <input type="text" name="mail_subject_user" value="<?php echo !empty($row->mail_subject_user) ? $row->mail_subject_user : '{formtitle}' ?>" id="mail_subject_user" class="mail_subject_user" />
1216
  <span><?php _e('Advanced', WDFMInstance(self::PLUGIN)->prefix); ?></span>
1217
  </h2>
1218
  <div class="inside">
 
 
 
 
 
 
 
 
 
 
 
1219
  <div class="wd-group">
1220
  <label class="wd-label" for="reply_to_user"><?php _e('Reply to (if different from "Email From")', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1221
  <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" />
1859
  <div class="wd-table-col-70">
1860
  <div class="wd-box-section">
1861
  <div class="wd-box-content">
1862
+ <div class="wd-group">
1863
+ <label class="wd-label"><?php _e('Enable GDPR compliance checkbox.', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1864
+ <input type="radio" name="gdpr_checkbox" <?php echo $row->gdpr_checkbox == 1 ? 'checked="checked"' : '' ?> id="fm_go-gdpr_checkbox-1" class="wd-radio" value="1" onchange="fm_toggle_options('#div_gdpr_checkbox_text', true)">
1865
+ <label class="wd-label-radio" for="fm_go-gdpr_checkbox-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1866
+ <input type="radio" name="gdpr_checkbox" <?php echo $row->gdpr_checkbox == 0 ? 'checked="checked"' : '' ?> id="fm_go-gdpr_checkbox-0" class="wd-radio" value="0" onchange="fm_toggle_options('#div_gdpr_checkbox_text', false)">
1867
+ <label class="wd-label-radio" for="fm_go-gdpr_checkbox-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1868
+ <p class="description"><?php _e('Use this setting to enable GDPR compliance checkbox on form.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1869
+ </div>
1870
+ <div id="div_gdpr_checkbox_text" class="wd-group">
1871
+ <label class="wd-label" for="fm_go-gdpr_checkbox_text"><?php _e('GDPR compliance text.', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1872
+ <input type="text" id="fm_go-gdpr_checkbox_text" name="gdpr_checkbox_text" value="<?php echo $row->gdpr_checkbox_text; ?>">
1873
+ <p class="description"><?php _e('This text will be used for GDPR compliance checkbox. Place {{privacy_policy}} placeholder to place "Privacy Policy page" link.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1874
+ </div>
1875
  <div class="wd-group">
1876
  <label class="wd-label"><?php _e('Save User IP Address to Database', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1877
  <input type="radio" name="save_ip" <?php echo $row->save_ip == 1 ? 'checked="checked"' : '' ?> id="fm_go-save_ip-1" class="wd-radio" value="1">
2356
  $categories = $params['categories'];
2357
  $selected_categories = $params['selected_categories'];
2358
  $current_categories_array = $params['current_categories_array'];
2359
+ $auto_check = ( in_array('select_all_categories', $selected_categories) ) ? 'checked="checked"' : '';
2360
  $m = 0;
2361
  echo '<li>
2362
  <br/>
2365
  </li>';
2366
  foreach ( $categories as $cat_key => $category ) {
2367
  $m++;
2368
+ $checked = ( $auto_check || in_array($cat_key, $selected_categories) ) ? 'checked="checked"' : '';
2369
  echo '<li>
2370
  <input id="cat'.$m.'" type="checkbox" name="display_on_categories[]" value="'.$cat_key.'" '.$checked.'/>
2371
  <label for="cat'.$m.'">'.$category.'</label>
admin/views/Uninstall_fm.php CHANGED
@@ -23,38 +23,37 @@ class FMViewUninstall_fmc extends FMAdminView_fmc {
23
  $prefix = $wpdb->prefix;
24
  $addons = $params['addons'];
25
  ?>
26
- <form method="post" action="admin.php?page=uninstall<?php echo WDFMInstance(self::PLUGIN)->menu_postfix; ?>" style="width:95%;">
27
  <?php wp_nonce_field(WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce); ?>
28
  <div class="wrap">
29
  <div class="uninstall-banner">
30
  <div class="uninstall_icon">
31
  </div>
32
- <div class="fm-logo-title">Uninstall <?php echo WDFMInstance(self::PLUGIN)->nicename; ?></div>
33
  </div>
34
  <br />
35
  <div class="goodbye-text">
36
- Before uninstalling the plugin, please Contact our
37
- <a href="https://web-dorado.com/support/contact-us.html" target='_blank'>support team</a>. We'll do our best to help you out with your issue. We value each and every user and value what’s right for our users in everything we do.<br>
38
- However, if anyway you have made a decision to uninstall the plugin, please take a minute to
39
- <a href="https://web-dorado.com/support/contact-us.html" target='_blank'>Contact us</a> and tell what you didn't like for our plugins further improvement and development. Thank you !!!
40
- </div>
41
  <div class="goodbye-text" style="color: red;">
42
- Note, that uninstalling <?php echo WDFMInstance(self::PLUGIN)->nicename; ?> will remove all forms, submissions and other data on the plugin.<br />Please make sure you don't have any important information before you proceed.
 
 
43
  </div>
44
- <p>
45
- Deactivating <?php echo WDFMInstance(self::PLUGIN)->nicename; ?> plugin does not remove any data that may have been created, such as the Forms and the Submissions. To completely remove this plugin, you can uninstall it here.
46
- </p>
47
  <p style="color: red;">
48
- <strong>WARNING:</strong>
49
- Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first.
50
  </p>
51
  <p style="color: red">
52
- <strong>The following WordPress Options/Tables will be DELETED:</strong>
53
  </p>
54
  <table class="widefat">
55
  <thead>
56
  <tr>
57
- <th>Database Tables</th>
58
  </tr>
59
  </thead>
60
  <tr>
@@ -95,7 +94,7 @@ class FMViewUninstall_fmc extends FMAdminView_fmc {
95
  <input type="checkbox" name="Form Maker" id="check_yes" value="yes" />&nbsp;<label for="check_yes">Yes</label>
96
  </p>
97
  <p style="text-align: center;">
98
- <input type="submit" value="UNINSTALL" class="button-primary" onclick="if (check_yes.checked) { if (confirm('You are About to Uninstall <?php echo WDFMInstance(self::PLUGIN)->nicename; ?> from WordPress.\nThis Action Is Not Reversible.')) { fm_set_input_value('task', 'uninstall'); } else { return false; } } else { return false; }" />
99
  </p>
100
  </div>
101
  <input id="task" name="task" type="hidden" value="" />
23
  $prefix = $wpdb->prefix;
24
  $addons = $params['addons'];
25
  ?>
26
+ <form method="post" action="admin.php?page=uninstall<?php echo WDFMInstance(self::PLUGIN)->menu_postfix; ?>" style="width:95%;" class="fm-uninstall-form">
27
  <?php wp_nonce_field(WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce); ?>
28
  <div class="wrap">
29
  <div class="uninstall-banner">
30
  <div class="uninstall_icon">
31
  </div>
32
+ <div class="fm-logo-title"><?php _e('Uninstall', WDFMInstance(self::PLUGIN)->prefix); ?> <?php echo WDFMInstance(self::PLUGIN)->nicename; ?></div>
33
  </div>
34
  <br />
35
  <div class="goodbye-text">
36
+ <?php echo sprintf( __('Before uninstalling %s, please contact %s. We\'ll do our best to assist you with any issue. We value every user and what\'s right for our users in everything we do.', WDFMInstance(self::PLUGIN)->prefix), WDFMInstance(self::PLUGIN)->nicename, '<a href="https://web-dorado.com/support/contact-us.html" target="_blank">' . __('Web-Dorado Customer Care', WDFMInstance(self::PLUGIN)->prefix) . '</a>'); ?>
37
+ <br>
38
+ <?php echo sprintf( __('However, if you have made a decision to uninstall %s in any case, please take a minute to contact %s and let us know what you\'d like to see improved in the plugin. Thank you!', WDFMInstance(self::PLUGIN)->prefix), WDFMInstance(self::PLUGIN)->nicename, '<a href="https://web-dorado.com/support/contact-us.html" target="_blank">' . __('our team', WDFMInstance(self::PLUGIN)->prefix) . '</a>'); ?>
39
+ </div>
 
40
  <div class="goodbye-text" style="color: red;">
41
+ <?php echo sprintf( __('Note, that uninstalling %s will remove all forms, submissions and other data on the plugin.', WDFMInstance(self::PLUGIN)->prefix), WDFMInstance(self::PLUGIN)->nicename); ?>
42
+ <br>
43
+ <?php _e('Please make sure you don\'t have any important information before you proceed.', WDFMInstance(self::PLUGIN)->prefix); ?>
44
  </div>
45
+ <p><?php echo sprintf( __('Deactivating %s plugin does not remove any data that may have been created, such as the Forms and the Submissions. To completely remove this plugin, you can uninstall it here.', WDFMInstance(self::PLUGIN)->prefix), WDFMInstance(self::PLUGIN)->nicename); ?></p>
 
 
46
  <p style="color: red;">
47
+ <strong><?php _e('WARNING:', WDFMInstance(self::PLUGIN)->prefix); ?></strong>
48
+ <?php _e('Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first.', WDFMInstance(self::PLUGIN)->prefix); ?>
49
  </p>
50
  <p style="color: red">
51
+ <strong><?php _e('The following WordPress Options/Tables will be DELETED:', WDFMInstance(self::PLUGIN)->prefix); ?></strong>
52
  </p>
53
  <table class="widefat">
54
  <thead>
55
  <tr>
56
+ <th><?php _e('Database Tables', WDFMInstance(self::PLUGIN)->prefix); ?></th>
57
  </tr>
58
  </thead>
59
  <tr>
94
  <input type="checkbox" name="Form Maker" id="check_yes" value="yes" />&nbsp;<label for="check_yes">Yes</label>
95
  </p>
96
  <p style="text-align: center;">
97
+ <input type="submit" value="UNINSTALL" class="button-primary fm-uninstall-btn" onclick="if (check_yes.checked) { if (confirm('Are you sure you wish to uninstall <?php echo WDFMInstance(self::PLUGIN)->nicename; ?> from your website?\nAll forms, submissions and other data in the plugin will be removed.')) { fm_set_input_value('task', 'uninstall'); } else { return false; } } else { return false; }" />
98
  </p>
99
  </div>
100
  <input id="task" name="task" type="hidden" value="" />
contact-form-maker.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Contact Form Maker
4
  * Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
5
  * Description: WordPress Contact Form Maker is a simple contact form builder, which allows the user with almost no knowledge of programming to create and edit different type of contact forms.
6
- * Version: 1.12.35
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 WDCFM {
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.35';
99
- $this->db_version = '2.12.35';
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;
@@ -217,6 +217,32 @@ final class WDCFM {
217
  add_filter( 'wp_privacy_personal_data_exporters', array($this, 'register_privacy_personal_data_exporter') );
218
  // Personal data erase.
219
  add_filter( 'wp_privacy_personal_data_erasers', array($this, 'register_privacy_personal_data_eraser') );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
  }
221
 
222
  function add_privacy_policy_content() {
3
  * Plugin Name: Contact Form Maker
4
  * Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
5
  * Description: WordPress Contact Form Maker is a simple contact form builder, which allows the user with almost no knowledge of programming to create and edit different type of contact forms.
6
+ * Version: 1.12.36
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.36';
99
+ $this->db_version = '2.12.36';
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;
217
  add_filter( 'wp_privacy_personal_data_exporters', array($this, 'register_privacy_personal_data_exporter') );
218
  // Personal data erase.
219
  add_filter( 'wp_privacy_personal_data_erasers', array($this, 'register_privacy_personal_data_eraser') );
220
+
221
+ // Register widget for Elementor builder.
222
+ add_action('elementor/widgets/widgets_registered', array($this, 'register_elementor_widget'));
223
+ // Register 10Web category for Elementor widget if 10Web builder doesn't installed.
224
+ add_action('elementor/elements/categories_registered', array($this, 'register_widget_category'), 1, 1);
225
+ }
226
+
227
+ /**
228
+ * Register widget for Elementor builder.
229
+ */
230
+ public function register_elementor_widget() {
231
+ if ( defined('ELEMENTOR_PATH') && class_exists('Elementor\Widget_Base') ) {
232
+ require_once ($this->plugin_dir . '/admin/controllers/elementorWidget.php');
233
+ }
234
+ }
235
+
236
+ /**
237
+ * Register 10Web category for Elementor widget if 10Web builder doesn't installed.
238
+ *
239
+ * @param $elements_manager
240
+ */
241
+ public function register_widget_category( $elements_manager ) {
242
+ $elements_manager->add_category('tenweb-widgets', [
243
+ 'title' => __('10WEB', 'tenweb-builder'),
244
+ 'icon' => 'fa fa-plug',
245
+ ]);
246
  }
247
 
248
  function add_privacy_policy_content() {
css/form_maker_frontend.css CHANGED
@@ -1034,4 +1034,7 @@ div[type="type_slider"] .label {
1034
  .fm-form .form-group {
1035
  margin: 0;
1036
  padding: 0;
 
 
 
1037
  }
1034
  .fm-form .form-group {
1035
  margin: 0;
1036
  padding: 0;
1037
+ }
1038
+ .fm-form-container .fm-form .fm-gdpr-checkbox {
1039
+ display: initial !important;
1040
  }
css/form_maker_tables.css CHANGED
@@ -4272,4 +4272,69 @@ li.pp_selected > span {
4272
 
4273
  .no-wrap {
4274
  white-space: nowrap;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4275
  }
4272
 
4273
  .no-wrap {
4274
  white-space: nowrap;
4275
+ }
4276
+
4277
+ .ui-tooltip {
4278
+ max-width: 330px;
4279
+ position: absolute;
4280
+ white-space: pre-line;
4281
+ padding: 0 10px !important;
4282
+ line-height: 0.5 !important;
4283
+ z-index: 9999;
4284
+ }
4285
+
4286
+ .ui-tooltip .ui-tooltip-content {
4287
+ font-weight: normal;
4288
+ }
4289
+
4290
+ .ui-tooltip, .tooltip-arrow:after {
4291
+ background: #666;
4292
+ }
4293
+
4294
+ .ui-tooltip {
4295
+ color: #fff;
4296
+ border-radius: 10px;
4297
+ font: bold 14px "Helvetica Neue", Sans-Serif;
4298
+ box-shadow: 0 0 7px #666;
4299
+ }
4300
+
4301
+ .ui-tooltip p {
4302
+ margin: 0;
4303
+ }
4304
+
4305
+ .tooltip-arrow {
4306
+ width: 70px;
4307
+ height: 16px;
4308
+ overflow: hidden;
4309
+ position: absolute;
4310
+ left: 50%;
4311
+ margin-left: -35px;
4312
+ bottom: -16px;
4313
+ }
4314
+
4315
+ .tooltip-arrow.top {
4316
+ top: -16px;
4317
+ bottom: auto;
4318
+ }
4319
+
4320
+ .tooltip-arrow.left {
4321
+ left: 20%;
4322
+ }
4323
+
4324
+ .tooltip-arrow:after {
4325
+ content: "";
4326
+ position: absolute;
4327
+ left: 20px;
4328
+ top: -20px;
4329
+ width: 25px;
4330
+ height: 25px;
4331
+ box-shadow: 6px 5px 9px -9px #666;
4332
+ -webkit-transform: rotate(45deg);
4333
+ -ms-transform: rotate(45deg);
4334
+ transform: rotate(45deg);
4335
+ }
4336
+
4337
+ .tooltip-arrow.top:after {
4338
+ bottom: -20px;
4339
+ top: auto;
4340
  }
framework/WDW_FM_Library.php CHANGED
@@ -927,8 +927,8 @@ class WDW_FMC_Library {
927
  $row->display_on = 'home,post,page';
928
  $row->posts_include = '';
929
  $row->pages_include = '';
930
- $row->display_on_categories = '';
931
- $row->current_categories = '';
932
  $row->show_for_admin = 0;
933
  }
934
 
@@ -1686,6 +1686,7 @@ class WDW_FMC_Library {
1686
  else {
1687
  jQuery("#form' . $form_id . ' div[wdid=' . $field_label[$k] . ']").' . $display_none . ';
1688
  }
 
1689
  });';
1690
  }
1691
  if ( $change ) {
@@ -1697,6 +1698,7 @@ class WDW_FMC_Library {
1697
  else {
1698
  jQuery("#form' . $form_id . ' div[wdid=' . $field_label[$k] . ']").' . $display_none . ';
1699
  }
 
1700
  });';
1701
  }
1702
  if ( $blur ) {
@@ -1705,7 +1707,9 @@ class WDW_FMC_Library {
1705
  if(' . $if . ')
1706
  jQuery("#form' . $form_id . ' div[wdid=' . $field_label[$k] . ']").' . $display . ';
1707
  else
1708
- jQuery("#form' . $form_id . ' div[wdid=' . $field_label[$k] . ']").' . $display_none . '; });';
 
 
1709
  }
1710
  if ( $click ) {
1711
  $condition_js .= '
@@ -1716,6 +1720,7 @@ class WDW_FMC_Library {
1716
  else {
1717
  jQuery("#form' . $form_id . ' div[wdid=' . $field_label[$k] . ']").' . $display_none . ';
1718
  }
 
1719
  });';
1720
  }
1721
  }
@@ -5241,4 +5246,55 @@ class WDW_FMC_Library {
5241
 
5242
  return FALSE;
5243
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5244
  }
927
  $row->display_on = 'home,post,page';
928
  $row->posts_include = '';
929
  $row->pages_include = '';
930
+ $row->display_on_categories = 'select_all_categories';
931
+ $row->current_categories = 'select_all_categories';
932
  $row->show_for_admin = 0;
933
  }
934
 
1686
  else {
1687
  jQuery("#form' . $form_id . ' div[wdid=' . $field_label[$k] . ']").' . $display_none . ';
1688
  }
1689
+ set_total_value(' . $form_id . ');
1690
  });';
1691
  }
1692
  if ( $change ) {
1698
  else {
1699
  jQuery("#form' . $form_id . ' div[wdid=' . $field_label[$k] . ']").' . $display_none . ';
1700
  }
1701
+ set_total_value(' . $form_id . ');
1702
  });';
1703
  }
1704
  if ( $blur ) {
1707
  if(' . $if . ')
1708
  jQuery("#form' . $form_id . ' div[wdid=' . $field_label[$k] . ']").' . $display . ';
1709
  else
1710
+ jQuery("#form' . $form_id . ' div[wdid=' . $field_label[$k] . ']").' . $display_none . ';
1711
+ set_total_value(' . $form_id . ');
1712
+ });';
1713
  }
1714
  if ( $click ) {
1715
  $condition_js .= '
1720
  else {
1721
  jQuery("#form' . $form_id . ' div[wdid=' . $field_label[$k] . ']").' . $display_none . ';
1722
  }
1723
+ set_total_value(' . $form_id . ');
1724
  });';
1725
  }
1726
  }
5246
 
5247
  return FALSE;
5248
  }
5249
+
5250
+ // TODO. This function should be replaced with WP functionality in another version. At the moment it is not.
5251
+ /**
5252
+ * Get privacy_policy_url
5253
+ *
5254
+ * @return string $url
5255
+ */
5256
+ public static function get_privacy_policy_url() {
5257
+ $permalink = '';
5258
+ $post_id = get_option( 'wp_page_for_privacy_policy' );
5259
+ if ( $post_id ) {
5260
+ $post = get_post( $post_id, OBJECT );
5261
+ if ( $post->post_status == 'publish' ) {
5262
+ $permalink = get_permalink( $post_id );
5263
+ }
5264
+ }
5265
+ return $permalink;
5266
+ }
5267
+
5268
+ public static function unique_number() {
5269
+ $use_random_number = ( WDW_FM_Library(self::PLUGIN)->elementor_is_active() ) ? TRUE : FALSE;
5270
+ if ($use_random_number) {
5271
+ return mt_rand();
5272
+ }
5273
+ else {
5274
+ global $fm;
5275
+ $unique = $fm;
5276
+ $fm++;
5277
+ return $unique;
5278
+ }
5279
+ }
5280
+
5281
+ /**
5282
+ * Get forms.
5283
+ *
5284
+ * @return array
5285
+ */
5286
+ public static function get_forms() {
5287
+ global $wpdb;
5288
+ $query = "SELECT `id`, `title` FROM `" . $wpdb->prefix . "formmaker`" . (!WDFMInstance(self::PLUGIN)->is_free ? '' : ' WHERE id' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ') ORDER BY `title`');
5289
+
5290
+ $rows = $wpdb->get_results($query);
5291
+
5292
+ $forms = array();
5293
+ $forms[0] = __('Select a form', WDFMInstance(self::PLUGIN)->prefix);
5294
+ foreach ( $rows as $row ) {
5295
+ $forms[$row->id] = $row->title;
5296
+ }
5297
+
5298
+ return $forms;
5299
+ }
5300
  }
frontend/controllers/form_maker.php CHANGED
@@ -157,7 +157,7 @@ class FMControllerForm_maker_fmc {
157
  }
158
  }
159
  foreach ( $post_cats as $single_cat ) {
160
- if ( in_array($single_cat, $categories_display) ) {
161
  $display_on_this = TRUE;
162
  }
163
  }
157
  }
158
  }
159
  foreach ( $post_cats as $single_cat ) {
160
+ if ( in_array('select_all_categories', $categories_display) || in_array($single_cat, $categories_display) ) {
161
  $display_on_this = TRUE;
162
  }
163
  }
frontend/models/form_maker.php CHANGED
@@ -1340,11 +1340,15 @@ class FMModelForm_maker_fmc {
1340
  $current_page_url = WDW_FM_Library(self::PLUGIN)->get_current_page_url();
1341
  $form = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id= %d", $id ) );
1342
 
 
 
1343
  $form->save_ip = 1;
1344
  $form->save_user_id = 1;
1345
  if ( $form && isset($form->privacy) ) {
1346
  if ( $form->privacy ) {
1347
  $privacy = json_decode($form->privacy);
 
 
1348
  $form->save_ip = isset($privacy->save_ip) ? $privacy->save_ip : 1;
1349
  $form->save_user_id = isset($privacy->save_user_id) ? $privacy->save_user_id : 1;
1350
  }
@@ -1601,6 +1605,9 @@ class FMModelForm_maker_fmc {
1601
  // for dropbox & google drive integration addons
1602
  $check_both = 0;
1603
  if ( $form->save_uploads == 0 ) {
 
 
 
1604
  if ( defined( 'WD_FM_DBOX_INT' ) && is_plugin_active( constant( 'WD_FM_DBOX_INT' ) ) ) {
1605
  $enable = $wpdb->get_var( "SELECT enable FROM " . $wpdb->prefix . "formmaker_dbox_int WHERE form_id=" . $form->id );
1606
  if ( $enable == 1 ) {
@@ -1612,10 +1619,10 @@ class FMModelForm_maker_fmc {
1612
  } else {
1613
  $dbox_folder_name = preg_replace( '/[^A-Z|a-z|0-9|\-|\\|\/]/', '', $form->title );
1614
  $dlink_dbox = '<a href="' . add_query_arg( array(
1615
- 'action' => 'WD_FM_DBOX_INT',
1616
  'addon_task' => 'upload_dbox_file',
1617
  'form_id' => $form->id,
1618
- ), admin_url( 'admin-ajax.php' ) ) . '&dbox_file_name=' . $fileName . '&dbox_folder_name=/' . $dbox_folder_name . '" >' . $fileName . '</a>';
1619
  $value .= $dlink_dbox;
1620
  }
1621
  $files[ 'tmp_name' ][ $file_key ] = $fileTemp;
1340
  $current_page_url = WDW_FM_Library(self::PLUGIN)->get_current_page_url();
1341
  $form = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id= %d", $id ) );
1342
 
1343
+ $form->gdpr_checkbox = 0;
1344
+ $form->gdpr_checkbox_text = __('I consent collecting this data and processing it according to {{privacy_policy}} of this website.', WDFMInstance(self::PLUGIN)->prefix);
1345
  $form->save_ip = 1;
1346
  $form->save_user_id = 1;
1347
  if ( $form && isset($form->privacy) ) {
1348
  if ( $form->privacy ) {
1349
  $privacy = json_decode($form->privacy);
1350
+ $form->gdpr_checkbox = isset($privacy->gdpr_checkbox) ? $privacy->gdpr_checkbox : 0;
1351
+ $form->gdpr_checkbox_text = isset($privacy->gdpr_checkbox_text) ? $privacy->gdpr_checkbox_text : __('I consent collecting this data and processing it according to {{privacy_policy}} of this website.', WDFMInstance(self::PLUGIN)->prefix);
1352
  $form->save_ip = isset($privacy->save_ip) ? $privacy->save_ip : 1;
1353
  $form->save_user_id = isset($privacy->save_user_id) ? $privacy->save_user_id : 1;
1354
  }
1605
  // for dropbox & google drive integration addons
1606
  $check_both = 0;
1607
  if ( $form->save_uploads == 0 ) {
1608
+ if( !function_exists('is_plugin_active') ) {
1609
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1610
+ }
1611
  if ( defined( 'WD_FM_DBOX_INT' ) && is_plugin_active( constant( 'WD_FM_DBOX_INT' ) ) ) {
1612
  $enable = $wpdb->get_var( "SELECT enable FROM " . $wpdb->prefix . "formmaker_dbox_int WHERE form_id=" . $form->id );
1613
  if ( $enable == 1 ) {
1619
  } else {
1620
  $dbox_folder_name = preg_replace( '/[^A-Z|a-z|0-9|\-|\\|\/]/', '', $form->title );
1621
  $dlink_dbox = '<a href="' . add_query_arg( array(
1622
+ 'action' => 'WD_FM_DBOX_INT_init',
1623
  'addon_task' => 'upload_dbox_file',
1624
  'form_id' => $form->id,
1625
+ ), admin_url( 'admin-ajax.php' ) ) . '&dbox_file_name=' . $fileName . '&dbox_folder_name=/' . $dbox_folder_name . '" target="_blank">' . $fileName . '</a>';
1626
  $value .= $dlink_dbox;
1627
  }
1628
  $files[ 'tmp_name' ][ $file_key ] = $fileTemp;
frontend/views/form_maker.php CHANGED
@@ -210,6 +210,10 @@ class FMViewForm_maker_fmc {
210
  $form = $row->form_front;
211
  }
212
 
 
 
 
 
213
  // Remove unnecessary classes.
214
  $form = str_replace(array('ui-sortable-handle', 'ui-sortable-disabled', 'ui-sortable'), '', $form);
215
  foreach ( $id1s as $id1s_key => $id1 ) {
@@ -1519,19 +1523,33 @@ class FMViewForm_maker_fmc {
1519
 
1520
  $submit_onclick = 'onclick="fm_submit_form(\'' . $form_id . '\');"';
1521
  $reset_onclick = 'onclick="fm_reset_form(' . $form_id . ');"';
1522
- $disabled_button = '';
 
1523
 
1524
  if ( WDW_FM_Library(self::PLUGIN)->elementor_is_active() ) {
1525
  $submit_onclick = '';
1526
  $reset_onclick = '';
1527
- $disabled_button = 'disabled="disabled"';
 
 
 
 
 
 
 
 
 
 
 
 
 
1528
  }
1529
 
1530
- $html = '<button ' . $disabled_button . ' type="button" class="button-submit" ' . $submit_onclick . ' ' . $param['attributes'] . '>' . $param['w_submit_title'] . '</button>';
1531
- $html .= '<button ' . $disabled_button . ' type="button" class="button-reset ' . $param['w_act'] . '" ' . $reset_onclick . ' ' . $param['attributes'] . '>' . $param['w_reset_title'] . '</button>';
1532
 
1533
  // Generate field.
1534
- $rep = $this->wdform_field($type, $param, $row, $html, FALSE);
1535
 
1536
  break;
1537
  }
210
  $form = $row->form_front;
211
  }
212
 
213
+ $privacy = json_decode($row->privacy);
214
+ $row->gdpr_checkbox = isset($privacy->gdpr_checkbox) ? $privacy->gdpr_checkbox : 0;
215
+ $row->gdpr_checkbox_text = isset($privacy->gdpr_checkbox_text) ? $privacy->gdpr_checkbox_text : __('I consent collecting this data and processing it according to {{privacy_policy}} of this website.', WDFMInstance(self::PLUGIN)->prefix);
216
+
217
  // Remove unnecessary classes.
218
  $form = str_replace(array('ui-sortable-handle', 'ui-sortable-disabled', 'ui-sortable'), '', $form);
219
  foreach ( $id1s as $id1s_key => $id1 ) {
1523
 
1524
  $submit_onclick = 'onclick="fm_submit_form(\'' . $form_id . '\');"';
1525
  $reset_onclick = 'onclick="fm_reset_form(' . $form_id . ');"';
1526
+ $disabled_submit = '';
1527
+ $disabled_reset = '';
1528
 
1529
  if ( WDW_FM_Library(self::PLUGIN)->elementor_is_active() ) {
1530
  $submit_onclick = '';
1531
  $reset_onclick = '';
1532
+ $disabled_submit = 'disabled="disabled"';
1533
+ $disabled_reset = 'disabled="disabled"';
1534
+ }
1535
+
1536
+ $rep = '';
1537
+ if ($row->gdpr_checkbox && $row->gdpr_checkbox_text) {
1538
+ $privacy_policy_link = ' <a href="' . WDW_FM_Library(self::PLUGIN)->get_privacy_policy_url() . '" target="_blank">' . __('Privacy Policy', BWG()->prefix) . '</a>';
1539
+ $row->gdpr_checkbox_text = str_replace('{{privacy_policy}}', $privacy_policy_link, $row->gdpr_checkbox_text);
1540
+ $gdpr_checkbox_html = '<label for="fm_privacy_policy' . $form_id . '" class="wdform-label">
1541
+ <input id="fm_privacy_policy' . $form_id . '" name="fm_privacy_policy' . $form_id . '" class="wd-flex-row fm-gdpr-checkbox" onclick="' . ($disabled_submit ? '' : 'fm_privacy_policy_check(this)') . '" type="checkbox" value="1">'
1542
+ . $row->gdpr_checkbox_text .
1543
+ '</label>';
1544
+ $rep = $this->wdform_field('type_gdpr_compliance_checkbox', $param, $row, $gdpr_checkbox_html, FALSE);
1545
+ $disabled_submit = 'disabled="disabled"';
1546
  }
1547
 
1548
+ $html = '<button ' . $disabled_submit . ' type="button" class="button-submit" ' . $submit_onclick . ' ' . $param['attributes'] . '>' . $param['w_submit_title'] . '</button>';
1549
+ $html .= '<button ' . $disabled_reset . ' type="button" class="button-reset ' . $param['w_act'] . '" ' . $reset_onclick . ' ' . $param['attributes'] . '>' . $param['w_reset_title'] . '</button>';
1550
 
1551
  // Generate field.
1552
+ $rep .= $this->wdform_field($type, $param, $row, $html, FALSE);
1553
 
1554
  break;
1555
  }
js/add_field.js CHANGED
@@ -2200,6 +2200,9 @@ function popup_ready() {
2200
  function close_window() {
2201
  if (need_enable) {
2202
  popup_ready();
 
 
 
2203
  }
2204
  need_enable = true;
2205
  document.getElementById('edit_table').innerHTML = "";
2200
  function close_window() {
2201
  if (need_enable) {
2202
  popup_ready();
2203
+ /* In Firfox and Safari click action is working during the drag and drop also */
2204
+ jQuery(".add-new-button").attr("onclick","popup_ready(); Enable(); return false;");
2205
+
2206
  }
2207
  need_enable = true;
2208
  document.getElementById('edit_table').innerHTML = "";
js/form_maker_admin.js CHANGED
@@ -28,6 +28,56 @@ jQuery(document).ready(function () {
28
  fm_placeholders_popup(jQuery(this).data("id"));
29
  });
30
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  });
32
 
33
  function wd_insert_placeholder(id, placeholder) {
@@ -1040,4 +1090,10 @@ function getAllUrlParams(url) {
1040
  }
1041
  }
1042
  return obj;
 
 
 
 
 
 
1043
  }
28
  fm_placeholders_popup(jQuery(this).data("id"));
29
  });
30
  });
31
+
32
+ fm_disabled_uninstall_btn();
33
+ jQuery('.fm-uninstall-form #check_yes').on("click", function () {
34
+ fm_disabled_uninstall_btn();
35
+ });
36
+
37
+ /* Add tooltip to elements with "wd-info" class. */
38
+ if ( typeof jQuery(document).tooltip != "undefined" ) {
39
+ jQuery(document).tooltip({
40
+ show: null,
41
+ items: ".wd-info",
42
+ content: function () {
43
+ var element = jQuery(this);
44
+ if (element.is(".wd-info")) {
45
+ var html = jQuery('#' + jQuery(this).data("id")).html();
46
+ return html;
47
+ }
48
+ },
49
+ open: function (event, ui) {
50
+ if (typeof(event.originalEvent) === 'undefined') {
51
+ return false;
52
+ }
53
+ var $id = jQuery(ui.tooltip).attr('id');
54
+ /* close any lingering tooltips. */
55
+ jQuery('div.ui-tooltip').not('#' + $id).remove();
56
+ },
57
+ close: function (event, ui) {
58
+ ui.tooltip.hover(function () {
59
+ jQuery(this).stop(true).fadeTo(400, 1);
60
+ },
61
+ function () {
62
+ jQuery(this).fadeOut('400', function () {
63
+ jQuery(this).remove();
64
+ });
65
+ });
66
+ },
67
+ position: {
68
+ my: "center top+30",
69
+ at: "center top",
70
+ using: function (position, feedback) {
71
+ jQuery(this).css(position);
72
+ jQuery("<div>")
73
+ .addClass("tooltip-arrow")
74
+ .addClass(feedback.vertical)
75
+ .addClass(feedback.horizontal)
76
+ .appendTo(this);
77
+ }
78
+ }
79
+ });
80
+ }
81
  });
82
 
83
  function wd_insert_placeholder(id, placeholder) {
1090
  }
1091
  }
1092
  return obj;
1093
+ }
1094
+ function fm_disabled_uninstall_btn() {
1095
+ jQuery('.fm-uninstall-form .fm-uninstall-btn').prop('disabled', true);
1096
+ if( jQuery(".fm-uninstall-form #check_yes").is(':checked')) {
1097
+ jQuery('.fm-uninstall-form .fm-uninstall-btn').prop('disabled', false);
1098
+ }
1099
  }
js/form_maker_form_options.js CHANGED
@@ -22,7 +22,8 @@
22
  jQuery(document).on('change','input[name="all_stats_fields"]',function() {
23
  jQuery('.stats_filed_label').prop("checked" , this.checked);
24
  });
25
- fm_toggle_email_options(jQuery('input[name=sendemail]:checked').val() == '1' ? true : false);
 
26
 
27
  // Bind filter action on entering search key and when the user cancel the input.
28
  jQuery(".placeholders-filter").on("keyup input", function() { filter_placeholders(this); });
@@ -323,11 +324,11 @@ function codemirror_for_javascript() {
323
  }
324
  }
325
 
326
- function fm_toggle_email_options(show) {
327
  if (show) {
328
- jQuery('.fm_email_options').show();
329
  }
330
  else {
331
- jQuery('.fm_email_options').hide();
332
  }
333
  }
22
  jQuery(document).on('change','input[name="all_stats_fields"]',function() {
23
  jQuery('.stats_filed_label').prop("checked" , this.checked);
24
  });
25
+ fm_toggle_options('.fm_email_options', jQuery('input[name=sendemail]:checked').val() == '1' ? true : false);
26
+ fm_toggle_options('#div_gdpr_checkbox_text', jQuery('input[name=gdpr_checkbox]:checked').val() == '1' ? true : false);
27
 
28
  // Bind filter action on entering search key and when the user cancel the input.
29
  jQuery(".placeholders-filter").on("keyup input", function() { filter_placeholders(this); });
324
  }
325
  }
326
 
327
+ function fm_toggle_options(selector, show) {
328
  if (show) {
329
+ jQuery(selector).show();
330
  }
331
  else {
332
+ jQuery(selector).hide();
333
  }
334
  }
js/form_maker_manage.js CHANGED
@@ -55,6 +55,8 @@ function sortable_columns() {
55
 
56
  popup_ready();
57
  Enable();
 
 
58
  return false;
59
  }
60
  remove_empty_columns();
55
 
56
  popup_ready();
57
  Enable();
58
+ /* In Firfox and Safari click action is working during the drag and drop also */
59
+ jQuery(".add-new-button").removeAttr("onclick");
60
  return false;
61
  }
62
  remove_empty_columns();
js/main_div_front_end.js CHANGED
@@ -37,69 +37,84 @@ function set_total_value(form_id) {
37
  div_paypal_tax.html('');
38
  n = parseInt(jQuery('#counter'+form_id).val());
39
  jQuery("#form" +form_id+ " div[type='type_paypal_checkbox'], #form" +form_id+ " div[type='type_paypal_radio']").each(function() {
40
- id = jQuery(this).parent().attr('wdid');
41
- paypal_checkbox_qty = ( jQuery('#wdform_'+id+"_element_quantity"+form_id).val() ) ? jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : 0;
42
- jQuery(this).find('input:checked').each(
43
- function() {
44
- label= jQuery("label[for='"+jQuery(this).attr('id')+"']").html();
45
- span_value = FormCurrency + jQuery(this).val()+(jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? ' x ' + paypal_checkbox_qty : '');
46
- total =total + jQuery(this).val() * parseInt((jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? paypal_checkbox_qty : 1));
47
- div_paypal_products.html(div_paypal_products.html()+"<div>"+label+ ' - '+ span_value+"</div>");
48
- }
49
- );
 
 
 
50
  });
51
  jQuery("#form" +form_id+ " div[type='type_paypal_shipping']").each(function() {
52
- id = jQuery(this).parent().attr('wdid');
53
- paypal_shipping_qty = ( jQuery('#wdform_'+id+"_element_quantity"+form_id).val() ) ? jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : 0;
54
- jQuery(this).find('input:checked').each(
55
- function() {
56
- label= jQuery("label[for='"+jQuery(this).attr('id')+"']").html();
57
- span_value = FormCurrency + jQuery(this).val()+(jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? ' x '+ paypal_shipping_qty : '');
58
- total_shipping =total_shipping + jQuery(this).val() * parseInt((jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? paypal_shipping_qty : 1));
59
- div_paypal_products.html(div_paypal_products.html()+"<div>"+label+ ' - '+ span_value+"</div>");
60
- }
61
- );
 
 
 
62
  });
63
  jQuery("#form" +form_id+ " div[type='type_paypal_select']").each(function() {
64
- id = jQuery(this).parent().attr('wdid');
65
- paypal_select_qty = ( jQuery('#wdform_'+id+"_element_quantity"+form_id).val() ) ? jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : 0;
66
- if(jQuery(this).find('select').val()!='') {
67
- label = jQuery(this).find('select option:selected').html();
68
- span_value = FormCurrency + jQuery(this).find('select').val()+(jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? ' x ' + paypal_select_qty : '');
69
- total =total + jQuery(this).find('select').val() * parseInt((jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? paypal_select_qty : 1));
70
- div_paypal_products.html(div_paypal_products.html()+"<div>"+label+ ' - '+ span_value+"</div>");
 
 
 
71
  }
72
  });
73
  jQuery("#form" +form_id+ " div[type='type_paypal_price']").each(function() {
74
- id = jQuery(this).parent().attr('wdid');
75
- label = jQuery(this).find('.wdform-label').html();
76
- cents = '00';
77
- dollars = '0';
78
- if (jQuery('#wdform_' + id + "_element_dollars" + form_id).val() != '') {
79
- dollars = jQuery('#wdform_' + id + "_element_dollars" + form_id).val();
80
- }
81
- if (jQuery('#wdform_' + id + "_element_cents" + form_id).val() != '') {
82
- if (jQuery('#wdform_' + id + "_element_cents" + form_id).val().length == 1) {
83
- cents = '0' + jQuery('#wdform_' + id + "_element_cents" + form_id).val();
84
  }
85
- else {
86
- cents = jQuery('#wdform_' + id + "_element_cents" + form_id).val();
 
 
 
 
 
 
 
 
87
  }
88
- span_value = FormCurrency + dollars + '.' + cents;
89
- total = total + parseFloat(dollars + '.' + cents);
90
- div_paypal_products.html(div_paypal_products.html() + "<div>" + label + ' - ' + span_value + "</div>");
91
  }
92
  });
93
  jQuery("#form" +form_id+ " div[type='type_paypal_price_new']").each(function() {
94
- id = jQuery(this).parent().attr('wdid');
95
- label = jQuery(this).find('.wdform-label').html();
96
- dollars = '0';
97
- if (jQuery('#wdform_' + id + "_element" + form_id).val() != '') {
98
- dollars = jQuery('#wdform_' + id + "_element" + form_id).val();
99
- }
100
- span_value = FormCurrency + dollars;
101
- total = total + parseFloat(dollars);
102
- div_paypal_products.html(div_paypal_products.html() + "<div>" + label + ' - ' + span_value + "</div>");
 
 
 
103
  });
104
  var FormPaypalTax = eval("FormPaypalTax_" + form_id);
105
  if(FormPaypalTax != 0) {
@@ -1692,7 +1707,7 @@ function fm_submit_form(form_id) {
1692
 
1693
  if (window['checkStripe' + form_id] == 1) {
1694
  var jq_mainForm = jQuery("form[id='form"+form_id+"']");
1695
- if (jq_mainForm.find(".wdfm_stripe_elem").first().parent().parents(".wdform_row").css('display') != 'none') {
1696
  wdfm_call_stripe(true);
1697
  }
1698
  else {
@@ -1723,6 +1738,11 @@ function fm_reset_form(form_id) {
1723
  if ( typeof window["before_reset" + form_id] == 'function' ) {
1724
  window["before_reset" + form_id]();
1725
  }
 
 
 
 
 
1726
  jQuery.each(window['labels_and_ids'+form_id], function (index, elem) {
1727
  switch(elem) {
1728
  case "type_text":
@@ -2061,7 +2081,7 @@ function fm_check(id, form_id, all_pages) {
2061
  if (window['checkStripe' + form_id] == 1) {
2062
  var jq_mainForm = jQuery("form[id='form" + form_id + "']");
2063
  if ('none' != jq_mainForm.find(".wdfm_stripe_elem").first().closest('.wdform-page-and-images').css('display')) {
2064
- if (jq_mainForm.find(".wdfm_stripe_elem").first().parent().parents(".wdform_row").css('display') != 'none') {
2065
  if (wdfm_call_stripe(false) == false) {
2066
  return false;
2067
  }
@@ -2146,4 +2166,15 @@ function wd_change_state_input(id, form_id) {
2146
  state_input_parent.insertBefore(state, state_input_parent.firstChild);
2147
  }
2148
  }
 
 
 
 
 
 
 
 
 
 
 
2149
  }
37
  div_paypal_tax.html('');
38
  n = parseInt(jQuery('#counter'+form_id).val());
39
  jQuery("#form" +form_id+ " div[type='type_paypal_checkbox'], #form" +form_id+ " div[type='type_paypal_radio']").each(function() {
40
+ var parent_div = jQuery(this).parent();
41
+ if ('none' != parent_div.css('display')) {
42
+ var id = parent_div.attr('wdid');
43
+ paypal_checkbox_qty = (jQuery('#wdform_' + id + "_element_quantity" + form_id).val()) ? jQuery('#wdform_' + id + "_element_quantity" + form_id).val() : 0;
44
+ jQuery(this).find('input:checked').each(
45
+ function () {
46
+ label = jQuery("label[for='" + jQuery(this).attr('id') + "']").html();
47
+ span_value = FormCurrency + jQuery(this).val() + (jQuery('#wdform_' + id + "_element_quantity" + form_id).length != 0 ? ' x ' + paypal_checkbox_qty : '');
48
+ total = total + jQuery(this).val() * parseInt((jQuery('#wdform_' + id + "_element_quantity" + form_id).length != 0 ? paypal_checkbox_qty : 1));
49
+ div_paypal_products.html(div_paypal_products.html() + "<div>" + label + ' - ' + span_value + "</div>");
50
+ }
51
+ );
52
+ }
53
  });
54
  jQuery("#form" +form_id+ " div[type='type_paypal_shipping']").each(function() {
55
+ var parent_div = jQuery(this).parent();
56
+ if ('none' != parent_div.css('display')) {
57
+ var id = parent_div.attr('wdid');
58
+ paypal_shipping_qty = (jQuery('#wdform_' + id + "_element_quantity" + form_id).val()) ? jQuery('#wdform_' + id + "_element_quantity" + form_id).val() : 0;
59
+ jQuery(this).find('input:checked').each(
60
+ function () {
61
+ label = jQuery("label[for='" + jQuery(this).attr('id') + "']").html();
62
+ span_value = FormCurrency + jQuery(this).val() + (jQuery('#wdform_' + id + "_element_quantity" + form_id).length != 0 ? ' x ' + paypal_shipping_qty : '');
63
+ total_shipping = total_shipping + jQuery(this).val() * parseInt((jQuery('#wdform_' + id + "_element_quantity" + form_id).length != 0 ? paypal_shipping_qty : 1));
64
+ div_paypal_products.html(div_paypal_products.html() + "<div>" + label + ' - ' + span_value + "</div>");
65
+ }
66
+ );
67
+ }
68
  });
69
  jQuery("#form" +form_id+ " div[type='type_paypal_select']").each(function() {
70
+ var parent_div = jQuery(this).parent();
71
+ if ('none' != parent_div.css('display')) {
72
+ var id = parent_div.attr('wdid');
73
+ paypal_select_qty = (jQuery('#wdform_' + id + "_element_quantity" + form_id).val()) ? jQuery('#wdform_' + id + "_element_quantity" + form_id).val() : 0;
74
+ if (jQuery(this).find('select').val() != '') {
75
+ label = jQuery(this).find('select option:selected').html();
76
+ span_value = FormCurrency + jQuery(this).find('select').val() + (jQuery('#wdform_' + id + "_element_quantity" + form_id).length != 0 ? ' x ' + paypal_select_qty : '');
77
+ total = total + jQuery(this).find('select').val() * parseInt((jQuery('#wdform_' + id + "_element_quantity" + form_id).length != 0 ? paypal_select_qty : 1));
78
+ div_paypal_products.html(div_paypal_products.html() + "<div>" + label + ' - ' + span_value + "</div>");
79
+ }
80
  }
81
  });
82
  jQuery("#form" +form_id+ " div[type='type_paypal_price']").each(function() {
83
+ var parent_div = jQuery(this).parent();
84
+ if ('none' != parent_div.css('display')) {
85
+ var id = parent_div.attr('wdid');
86
+ label = jQuery(this).find('.wdform-label').html();
87
+ cents = '00';
88
+ dollars = '0';
89
+ if (jQuery('#wdform_' + id + "_element_dollars" + form_id).val() != '') {
90
+ dollars = jQuery('#wdform_' + id + "_element_dollars" + form_id).val();
 
 
91
  }
92
+ if (jQuery('#wdform_' + id + "_element_cents" + form_id).val() != '') {
93
+ if (jQuery('#wdform_' + id + "_element_cents" + form_id).val().length == 1) {
94
+ cents = '0' + jQuery('#wdform_' + id + "_element_cents" + form_id).val();
95
+ }
96
+ else {
97
+ cents = jQuery('#wdform_' + id + "_element_cents" + form_id).val();
98
+ }
99
+ span_value = FormCurrency + dollars + '.' + cents;
100
+ total = total + parseFloat(dollars + '.' + cents);
101
+ div_paypal_products.html(div_paypal_products.html() + "<div>" + label + ' - ' + span_value + "</div>");
102
  }
 
 
 
103
  }
104
  });
105
  jQuery("#form" +form_id+ " div[type='type_paypal_price_new']").each(function() {
106
+ var parent_div = jQuery(this).parent();
107
+ if ('none' != parent_div.css('display')) {
108
+ var id = parent_div.attr('wdid');
109
+ label = jQuery(this).find('.wdform-label').html();
110
+ dollars = '0';
111
+ if (jQuery('#wdform_' + id + "_element" + form_id).val() != '') {
112
+ dollars = jQuery('#wdform_' + id + "_element" + form_id).val();
113
+ }
114
+ span_value = FormCurrency + dollars;
115
+ total = total + parseFloat(dollars);
116
+ div_paypal_products.html(div_paypal_products.html() + "<div>" + label + ' - ' + span_value + "</div>");
117
+ }
118
  });
119
  var FormPaypalTax = eval("FormPaypalTax_" + form_id);
120
  if(FormPaypalTax != 0) {
1707
 
1708
  if (window['checkStripe' + form_id] == 1) {
1709
  var jq_mainForm = jQuery("form[id='form"+form_id+"']");
1710
+ if (jq_mainForm.find(".wdfm_stripe_elem").first().parents(".wdform_row").parents(".wdform_row").css('display') != 'none') {
1711
  wdfm_call_stripe(true);
1712
  }
1713
  else {
1738
  if ( typeof window["before_reset" + form_id] == 'function' ) {
1739
  window["before_reset" + form_id]();
1740
  }
1741
+ var privacy_policy_check = jQuery("#fm_privacy_policy" + form_id);
1742
+ if (privacy_policy_check) {
1743
+ privacy_policy_check.prop('checked', false);
1744
+ fm_privacy_policy_check(privacy_policy_check);
1745
+ }
1746
  jQuery.each(window['labels_and_ids'+form_id], function (index, elem) {
1747
  switch(elem) {
1748
  case "type_text":
2081
  if (window['checkStripe' + form_id] == 1) {
2082
  var jq_mainForm = jQuery("form[id='form" + form_id + "']");
2083
  if ('none' != jq_mainForm.find(".wdfm_stripe_elem").first().closest('.wdform-page-and-images').css('display')) {
2084
+ if (jq_mainForm.find(".wdfm_stripe_elem").first().parents(".wdform_row").parents(".wdform_row").css('display') != 'none') {
2085
  if (wdfm_call_stripe(false) == false) {
2086
  return false;
2087
  }
2166
  state_input_parent.insertBefore(state, state_input_parent.firstChild);
2167
  }
2168
  }
2169
+ }
2170
+
2171
+ function fm_privacy_policy_check(that) {
2172
+ var element = jQuery(that);
2173
+ var button = element.parents('.wdform_row').find('.button-submit');
2174
+ if (element.is(':checked')) {
2175
+ button.removeAttr('disabled');
2176
+ }
2177
+ else {
2178
+ button.attr('disabled', 'disabled');
2179
+ }
2180
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: webdorado,10web
3
  Tags: contact, contact form, email, forms, contact forms, custom form, feedback, form builder, form manager, form maker, forms builder, form builder wordpress
4
  Requires at least: 4.6
5
  Tested up to: 4.9
6
- Stable tag: 1.12.35
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -79,10 +79,17 @@ After downloading the ZIP file,
79
 
80
  == Changelog ==
81
 
82
- = 2.12.35 =
83
- * Fixed: Field validation on multi page form.
 
 
 
 
84
 
85
- = 2.12.34 =
 
 
 
86
  * Added: Additional security check to block form submissions from bots.
87
  * Fixed: Form Submissions page responsiveness issue on mobile devices.
88
  * Improved: Submissions CSV/XML export for bigger forms.
3
  Tags: contact, contact form, email, forms, contact forms, custom form, feedback, form builder, form manager, form maker, forms builder, form builder wordpress
4
  Requires at least: 4.6
5
  Tested up to: 4.9
6
+ Stable tag: 1.12.36
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
79
 
80
  == Changelog ==
81
 
82
+ = 1.12.36 =
83
+ * Improved: Uninstall interface and texts.
84
+ * Fixed: "New Field" button drag and drop issue in Firefox and Safari.
85
+ * Fixed: Do not show hidden amounts in total.
86
+ * Added: GDPR compliance required checkbox on front end.
87
+ * Added: Warn user if the email address does not belong to the site domain.
88
 
89
+ = 1.12.35 =
90
+ * Fixed: Field validation issues on multi-page forms.
91
+
92
+ = 1.12.34 =
93
  * Added: Additional security check to block form submissions from bots.
94
  * Fixed: Form Submissions page responsiveness issue on mobile devices.
95
  * Improved: Submissions CSV/XML export for bigger forms.