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

Version Description

  • Improved: Editing empty mini labels.
  • Fixed: Submissions CSV export.
Download this release

Release Info

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

Code changes from version 1.12.18 to 1.12.20

admin/controllers/Generete_csv.php CHANGED
@@ -24,20 +24,56 @@ class FMControllerGenerete_csv_fmc {
24
  $params = WDW_FMC_Library::get_submissions_to_export();
25
  $data = $params[0];
26
  $title = $params[1];
27
- $is_paypal_info = $params[2];
28
- $all_keys = array();
29
- foreach ( $data as $row ) {
30
- $all_keys = array_merge($all_keys, $row);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  }
32
- $keys_array = array_keys($all_keys);
33
  foreach ( $data as $key => $row ) {
34
- foreach ( $keys_array as $key1 => $value ) {
35
- if ( !array_key_exists($value, $row) ) {
36
- array_splice($row, $key1, 0, '');
 
 
 
 
37
  }
38
  }
39
- $data[$key] = $row;
 
 
 
 
 
 
 
 
40
  }
 
41
  $upload_dir = wp_upload_dir();
42
  $file_path = $upload_dir['basedir'] . '/form-maker';
43
  if ( !is_dir($file_path) ) {
@@ -48,25 +84,26 @@ class FMControllerGenerete_csv_fmc {
48
  unlink($tempfile);
49
  }
50
  $output = fopen($tempfile, "a");
 
51
  if ( $limitstart == 0 ) {
52
- fputcsv($output, str_replace('PAYPAL_', '', $keys_array), $csv_delimiter);
53
  }
54
  foreach ( $data as $record ) {
55
  fputcsv($output, $record, $csv_delimiter);
56
  }
 
57
  fclose($output);
 
58
  if ( $send_header == 1 ) {
59
  $txtfile = fopen($tempfile, "r");
60
  $txtfilecontent = fread($txtfile, filesize($tempfile));
61
  fclose($txtfile);
62
  $filename = $title . "_" . date('Ymd') . ".csv";
63
  header('Content-Encoding: UTF-8');
64
- header('content-type: application/csv; charset=UTF-8');
65
- // header('Content-Encoding: Windows-1252');
66
- // header('Content-type: text/csv; charset=Windows-1252');
67
  header("Content-Disposition: attachment; filename=\"$filename\"");
68
- // Set UTF-8 BOM.
69
- echo "\xEF\xBB\xBF";
70
  echo $txtfilecontent;
71
  unlink($tempfile);
72
  }
24
  $params = WDW_FMC_Library::get_submissions_to_export();
25
  $data = $params[0];
26
  $title = $params[1];
27
+
28
+ $labels_parameters = WDW_FMC_Library::get_labels_parameters( $form_id );
29
+
30
+ $sorted_label_names_original = $labels_parameters[4];
31
+ $sorted_label_names_original = array_merge(array(
32
+ 'ID',
33
+ "Submit date",
34
+ "Submitter's IP",
35
+ "Submitter's Username",
36
+ "Submitter's Email Address",
37
+ ), $sorted_label_names_original);
38
+
39
+ if (($key = array_search('stripe', $sorted_label_names_original)) !== false) {
40
+ unset($sorted_label_names_original[$key]);
41
+ }
42
+
43
+ $sorted_label_names = array();
44
+ function unique_label($sorted_label_names, $label) {
45
+ if ( in_array($label, $sorted_label_names) ) {
46
+ return unique_label($sorted_label_names, $label . '(1)');
47
+ }
48
+ else {
49
+ return $label;
50
+ }
51
+ }
52
+ foreach ( $sorted_label_names_original as $key => $label ) {
53
+ $sorted_label_names[] = unique_label($sorted_label_names, $label);
54
  }
55
+
56
  foreach ( $data as $key => $row ) {
57
+ $sorted_data = array();
58
+ foreach ( $sorted_label_names as $label ) {
59
+ if ( !array_key_exists($label, $row) ) {
60
+ $sorted_data[$label] = '';
61
+ }
62
+ else {
63
+ $sorted_data[$label] = $row[$label];
64
  }
65
  }
66
+
67
+ $data[$key] = $sorted_data;
68
+ }
69
+
70
+
71
+ foreach ( $sorted_label_names as $label ) {
72
+ if ( !array_key_exists($label, $row) ) {
73
+ $row[$label] = '';
74
+ }
75
  }
76
+
77
  $upload_dir = wp_upload_dir();
78
  $file_path = $upload_dir['basedir'] . '/form-maker';
79
  if ( !is_dir($file_path) ) {
84
  unlink($tempfile);
85
  }
86
  $output = fopen($tempfile, "a");
87
+
88
  if ( $limitstart == 0 ) {
89
+ fputcsv($output, $sorted_label_names_original, $csv_delimiter);
90
  }
91
  foreach ( $data as $record ) {
92
  fputcsv($output, $record, $csv_delimiter);
93
  }
94
+
95
  fclose($output);
96
+
97
  if ( $send_header == 1 ) {
98
  $txtfile = fopen($tempfile, "r");
99
  $txtfilecontent = fread($txtfile, filesize($tempfile));
100
  fclose($txtfile);
101
  $filename = $title . "_" . date('Ymd') . ".csv";
102
  header('Content-Encoding: UTF-8');
103
+ header('content-type: application/csv; charset=UTF-8');
 
 
104
  header("Content-Disposition: attachment; filename=\"$filename\"");
105
+ // Set UTF-8 BOM
106
+ echo "\xEF\xBB\xBF";
107
  echo $txtfilecontent;
108
  unlink($tempfile);
109
  }
admin/models/Checkpaypal.php CHANGED
@@ -66,17 +66,12 @@ class FMModelCheckpaypal {
66
  $action = "https://www.sandbox.paypal.com/cgi-bin/webscr";
67
  }
68
  $post_fields = $params['post_fields'];
69
- $curlConfig = array(
70
- CURLOPT_URL => $action,
71
- CURLOPT_POST => TRUE,
72
- CURLOPT_RETURNTRANSFER => TRUE,
73
- CURLOPT_SSL_VERIFYPEER => FALSE,
74
- CURLOPT_POSTFIELDS => $post_fields,
75
- );
76
- $curl = curl_init();
77
- curl_setopt_array($curl, $curlConfig);
78
- $response = curl_exec($curl);
79
- curl_close($curl);
80
 
81
  return $response;
82
  }
66
  $action = "https://www.sandbox.paypal.com/cgi-bin/webscr";
67
  }
68
  $post_fields = $params['post_fields'];
69
+ $response = wp_remote_post( $action, array('body' => $post_fields) );
70
+ if ( is_wp_error( $response ) ) {
71
+ $response = "";
72
+ } else {
73
+ $response = $response['body'];
74
+ }
 
 
 
 
 
75
 
76
  return $response;
77
  }
admin/views/Manage_fm.php CHANGED
@@ -985,7 +985,7 @@ $stats_labels = $params['stats_labels'];
985
  }
986
  ?>
987
  </div>
988
- <p class="description"><?php _e('Specify all email addresses, to which submitted form information will be sent. If this field is left blank, the submission email will be sent to the address provided in WordPress General Settings.', WDCFM()->prefix); ?></p>
989
  </div>
990
  <div class="wd-group">
991
  <label class="wd-label" for="mail_subject"><?php _e('Subject', WDCFM()->prefix); ?></label>
985
  }
986
  ?>
987
  </div>
988
+ <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.', WDCFM()->prefix); ?></p>
989
  </div>
990
  <div class="wd-group">
991
  <label class="wd-label" for="mail_subject"><?php _e('Subject', WDCFM()->prefix); ?></label>
admin/views/Submissions_fm.php CHANGED
@@ -1334,9 +1334,9 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
1334
  public function gen_shorter_text( $text, $chars_limit ) {
1335
  $data = array();
1336
  // Check if length is larger than the character limit.
1337
- if ( strlen($text) > $chars_limit ) {
1338
  // If so, cut the string at the character limit.
1339
- $new_text = substr($text, 0, $chars_limit);
1340
  // Trim off white space.
1341
  $new_text = trim($new_text);
1342
  // Add at end of text ...
1334
  public function gen_shorter_text( $text, $chars_limit ) {
1335
  $data = array();
1336
  // Check if length is larger than the character limit.
1337
+ if ( strlen($text) > $chars_limit && $text == strip_tags($text) ) {
1338
  // If so, cut the string at the character limit.
1339
+ $new_text = mb_substr( $text, 0, $chars_limit,"utf-8" );
1340
  // Trim off white space.
1341
  $new_text = trim($new_text);
1342
  // Add at end of text ...
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.18
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
@@ -24,6 +24,10 @@ final class WDCFM {
24
  * Plugin directory url.
25
  */
26
  public $plugin_url = '';
 
 
 
 
27
  /**
28
  * Plugin main file.
29
  */
@@ -88,13 +92,14 @@ final class WDCFM {
88
  private function define_constants() {
89
  $this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
90
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
 
91
  $this->main_file = plugin_basename(__FILE__);
92
- $this->plugin_version = '1.12.18';
93
- $this->db_version = '2.12.18';
94
  $this->menu_slug = 'manage_fmc';
95
  $this->prefix = 'form_maker_fmc';
96
- $this->css_prefix = 'fmc_';
97
- $this->js_prefix = 'fmc_';
98
  $this->nicename = __('Contact Form', $this->prefix);
99
  $this->menu_postfix = '_fmc';
100
  $this->plugin_postfix = '_fmc';
@@ -246,7 +251,43 @@ final class WDCFM {
246
  add_submenu_page($parent_slug, __('Pro Version', $this->prefix), __('Pro Version', $this->prefix), 'manage_options', 'licensing' . $this->menu_postfix, array($this, 'form_maker'));
247
  }
248
  add_submenu_page(null, __('Uninstall', $this->prefix), __('Uninstall', $this->prefix), 'manage_options', 'uninstall' . $this->menu_postfix, array($this, 'form_maker'));
249
- add_submenu_page($parent_slug, __('Add-ons', $this->prefix), __('Add-ons', $this->prefix), 'manage_options', 'extensions' . $this->menu_postfix, array($this , 'fm_extensions'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
  }
251
 
252
  /**
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.20
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
24
  * Plugin directory url.
25
  */
26
  public $plugin_url = '';
27
+ /**
28
+ * Plugin front urls.
29
+ */
30
+ public $front_urls = array();
31
  /**
32
  * Plugin main file.
33
  */
92
  private function define_constants() {
93
  $this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
94
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
95
+ $this->front_urls = $this->get_front_urls();
96
  $this->main_file = plugin_basename(__FILE__);
97
+ $this->plugin_version = '1.12.20';
98
+ $this->db_version = '2.12.20';
99
  $this->menu_slug = 'manage_fmc';
100
  $this->prefix = 'form_maker_fmc';
101
+ $this->css_prefix = 'fm_';
102
+ $this->js_prefix = 'fm_';
103
  $this->nicename = __('Contact Form', $this->prefix);
104
  $this->menu_postfix = '_fmc';
105
  $this->plugin_postfix = '_fmc';
251
  add_submenu_page($parent_slug, __('Pro Version', $this->prefix), __('Pro Version', $this->prefix), 'manage_options', 'licensing' . $this->menu_postfix, array($this, 'form_maker'));
252
  }
253
  add_submenu_page(null, __('Uninstall', $this->prefix), __('Uninstall', $this->prefix), 'manage_options', 'uninstall' . $this->menu_postfix, array($this, 'form_maker'));
254
+ add_submenu_page($parent_slug, __('Add-ons', $this->prefix), __('Add-ons', $this->prefix), 'manage_options', 'extensions' . $this->menu_postfix, array($this , 'fm_extensions'));
255
+ }
256
+
257
+ /**
258
+ * Set front plugin url.
259
+ *
260
+ * return string $plugin_url
261
+ */
262
+ private function set_front_plugin_url() {
263
+ $plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
264
+
265
+ return $plugin_url;
266
+ }
267
+
268
+ /**
269
+ * Set front upload url.
270
+ *
271
+ * return string $upload_url
272
+ */
273
+ private function set_front_upload_url() {
274
+ $wp_upload_dir = wp_upload_dir();
275
+ $upload_url = str_replace(get_option('siteurl'), get_option('home'), $wp_upload_dir['baseurl']);
276
+
277
+ return $upload_url;
278
+ }
279
+
280
+ /**
281
+ * Get front urls.
282
+ *
283
+ * return array $urls
284
+ */
285
+ public function get_front_urls() {
286
+ $urls = array();
287
+ $urls['plugin_url'] = $this->set_front_plugin_url();
288
+ $urls['upload_url'] = $this->set_front_upload_url();
289
+
290
+ return $urls;
291
  }
292
 
293
  /**
css/style.css CHANGED
@@ -1018,6 +1018,44 @@ li.pp_selected > span {
1018
  font-size: 12px;
1019
  }
1020
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1021
  .show_hide,
1022
  .all_any {
1023
  width: 80px;
1018
  font-size: 12px;
1019
  }
1020
 
1021
+ #show_table .mini_label:empty {
1022
+ font-size: 12px;
1023
+ padding: 6px 0;
1024
+ background-color: rgb(241, 241, 241);
1025
+ display: block;
1026
+ margin-right: 10px;
1027
+ margin-top: 2px;
1028
+ }
1029
+
1030
+ #show_table .wdform_address .mini_label:empty,
1031
+ #show_table .wdform_date_fields .mini_label:empty,
1032
+ #show_table .mini_label_phone_number:empty,
1033
+ #show_table .mini_label_from:empty{
1034
+ margin-right: 0px;
1035
+ }
1036
+
1037
+ #show_table .mini_label_area_code:empty {
1038
+ margin-right: 15px;
1039
+ }
1040
+ .mini_label_to:empty{
1041
+ margin-left: 3px;
1042
+ margin-right: 0px;
1043
+ }
1044
+ @media screen and (max-width: 480px){
1045
+ #show_table input[type=text] {
1046
+ padding: 3px 10px;
1047
+ }
1048
+
1049
+ #show_table select {
1050
+ padding: 3px 10px;
1051
+ font-size: 13px;
1052
+ height: 26px;
1053
+ }
1054
+ }
1055
+
1056
+ #show_table .wdform_address span {
1057
+ height: 52px;
1058
+ }
1059
  .show_hide,
1060
  .all_any {
1061
  width: 80px;
framework/WDW_FM_Library.php CHANGED
@@ -1,6 +1,334 @@
1
  <?php
2
 
3
  class WDW_FMC_Library {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
  public static $fm_js_content;
6
  /**
@@ -3715,9 +4043,9 @@ class WDW_FMC_Library {
3715
  $user_id = get_userdata($tt->user_id_wd);
3716
  $username = $user_id ? $user_id->display_name : "";
3717
  $useremail = $user_id ? $user_id->user_email : "";
3718
- $data_temp['Submission ID'] = $i;
3719
  $data_temp['Submit date'] = $date;
3720
- $data_temp['Ip'] = $ip;
3721
  $data_temp['Submitter\'s Username'] = $username;
3722
  $data_temp['Submitter\'s Email Address'] = $useremail;
3723
  $element_labels = explode(',', $tt->element_label);
@@ -4286,21 +4614,30 @@ class WDW_FMC_Library {
4286
  return FALSE;
4287
  }
4288
 
4289
- mb_internal_encoding('UTF-8');
 
 
4290
 
4291
  $subject = html_entity_decode($subject, ENT_QUOTES);
4292
  $subject = stripslashes($subject);
4293
- $subject = mb_encode_mimeheader($subject, 'UTF-8', 'Q');
 
 
4294
 
4295
  $message = stripslashes($message);
 
4296
 
4297
  $headers = array();
4298
 
 
 
4299
  if ( isset($header_arr['from_name']) && $header_arr['from_name'] ) {
4300
  $from_name = $header_arr['from_name'];
4301
  $from_name = html_entity_decode($from_name, ENT_QUOTES);
4302
  $from_name = stripslashes($from_name);
4303
- $from_name = mb_encode_mimeheader($from_name, 'UTF-8', 'Q');
 
 
4304
  // $from_str .= "'" . $from_name . "' ";
4305
  self::$email_from_name = $from_name;
4306
  add_filter('wp_mail_from_name', array('WDW_FMC_Library', 'mail_from_name'));
@@ -4376,6 +4713,333 @@ class WDW_FMC_Library {
4376
  public static function mail_from_name() {
4377
  return self::$email_from_name;
4378
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4379
  }
4380
 
4381
  /*
1
  <?php
2
 
3
  class WDW_FMC_Library {
4
+ public static $qpKeys = array(
5
+ "\x00",
6
+ "\x01",
7
+ "\x02",
8
+ "\x03",
9
+ "\x04",
10
+ "\x05",
11
+ "\x06",
12
+ "\x07",
13
+ "\x08",
14
+ "\x09",
15
+ "\x0A",
16
+ "\x0B",
17
+ "\x0C",
18
+ "\x0D",
19
+ "\x0E",
20
+ "\x0F",
21
+ "\x10",
22
+ "\x11",
23
+ "\x12",
24
+ "\x13",
25
+ "\x14",
26
+ "\x15",
27
+ "\x16",
28
+ "\x17",
29
+ "\x18",
30
+ "\x19",
31
+ "\x1A",
32
+ "\x1B",
33
+ "\x1C",
34
+ "\x1D",
35
+ "\x1E",
36
+ "\x1F",
37
+ "\x7F",
38
+ "\x80",
39
+ "\x81",
40
+ "\x82",
41
+ "\x83",
42
+ "\x84",
43
+ "\x85",
44
+ "\x86",
45
+ "\x87",
46
+ "\x88",
47
+ "\x89",
48
+ "\x8A",
49
+ "\x8B",
50
+ "\x8C",
51
+ "\x8D",
52
+ "\x8E",
53
+ "\x8F",
54
+ "\x90",
55
+ "\x91",
56
+ "\x92",
57
+ "\x93",
58
+ "\x94",
59
+ "\x95",
60
+ "\x96",
61
+ "\x97",
62
+ "\x98",
63
+ "\x99",
64
+ "\x9A",
65
+ "\x9B",
66
+ "\x9C",
67
+ "\x9D",
68
+ "\x9E",
69
+ "\x9F",
70
+ "\xA0",
71
+ "\xA1",
72
+ "\xA2",
73
+ "\xA3",
74
+ "\xA4",
75
+ "\xA5",
76
+ "\xA6",
77
+ "\xA7",
78
+ "\xA8",
79
+ "\xA9",
80
+ "\xAA",
81
+ "\xAB",
82
+ "\xAC",
83
+ "\xAD",
84
+ "\xAE",
85
+ "\xAF",
86
+ "\xB0",
87
+ "\xB1",
88
+ "\xB2",
89
+ "\xB3",
90
+ "\xB4",
91
+ "\xB5",
92
+ "\xB6",
93
+ "\xB7",
94
+ "\xB8",
95
+ "\xB9",
96
+ "\xBA",
97
+ "\xBB",
98
+ "\xBC",
99
+ "\xBD",
100
+ "\xBE",
101
+ "\xBF",
102
+ "\xC0",
103
+ "\xC1",
104
+ "\xC2",
105
+ "\xC3",
106
+ "\xC4",
107
+ "\xC5",
108
+ "\xC6",
109
+ "\xC7",
110
+ "\xC8",
111
+ "\xC9",
112
+ "\xCA",
113
+ "\xCB",
114
+ "\xCC",
115
+ "\xCD",
116
+ "\xCE",
117
+ "\xCF",
118
+ "\xD0",
119
+ "\xD1",
120
+ "\xD2",
121
+ "\xD3",
122
+ "\xD4",
123
+ "\xD5",
124
+ "\xD6",
125
+ "\xD7",
126
+ "\xD8",
127
+ "\xD9",
128
+ "\xDA",
129
+ "\xDB",
130
+ "\xDC",
131
+ "\xDD",
132
+ "\xDE",
133
+ "\xDF",
134
+ "\xE0",
135
+ "\xE1",
136
+ "\xE2",
137
+ "\xE3",
138
+ "\xE4",
139
+ "\xE5",
140
+ "\xE6",
141
+ "\xE7",
142
+ "\xE8",
143
+ "\xE9",
144
+ "\xEA",
145
+ "\xEB",
146
+ "\xEC",
147
+ "\xED",
148
+ "\xEE",
149
+ "\xEF",
150
+ "\xF0",
151
+ "\xF1",
152
+ "\xF2",
153
+ "\xF3",
154
+ "\xF4",
155
+ "\xF5",
156
+ "\xF6",
157
+ "\xF7",
158
+ "\xF8",
159
+ "\xF9",
160
+ "\xFA",
161
+ "\xFB",
162
+ "\xFC",
163
+ "\xFD",
164
+ "\xFE",
165
+ "\xFF"
166
+ );
167
+ public static $qpReplaceValues = array(
168
+ "=00",
169
+ "=01",
170
+ "=02",
171
+ "=03",
172
+ "=04",
173
+ "=05",
174
+ "=06",
175
+ "=07",
176
+ "=08",
177
+ "=09",
178
+ "=0A",
179
+ "=0B",
180
+ "=0C",
181
+ "=0D",
182
+ "=0E",
183
+ "=0F",
184
+ "=10",
185
+ "=11",
186
+ "=12",
187
+ "=13",
188
+ "=14",
189
+ "=15",
190
+ "=16",
191
+ "=17",
192
+ "=18",
193
+ "=19",
194
+ "=1A",
195
+ "=1B",
196
+ "=1C",
197
+ "=1D",
198
+ "=1E",
199
+ "=1F",
200
+ "=7F",
201
+ "=80",
202
+ "=81",
203
+ "=82",
204
+ "=83",
205
+ "=84",
206
+ "=85",
207
+ "=86",
208
+ "=87",
209
+ "=88",
210
+ "=89",
211
+ "=8A",
212
+ "=8B",
213
+ "=8C",
214
+ "=8D",
215
+ "=8E",
216
+ "=8F",
217
+ "=90",
218
+ "=91",
219
+ "=92",
220
+ "=93",
221
+ "=94",
222
+ "=95",
223
+ "=96",
224
+ "=97",
225
+ "=98",
226
+ "=99",
227
+ "=9A",
228
+ "=9B",
229
+ "=9C",
230
+ "=9D",
231
+ "=9E",
232
+ "=9F",
233
+ "=A0",
234
+ "=A1",
235
+ "=A2",
236
+ "=A3",
237
+ "=A4",
238
+ "=A5",
239
+ "=A6",
240
+ "=A7",
241
+ "=A8",
242
+ "=A9",
243
+ "=AA",
244
+ "=AB",
245
+ "=AC",
246
+ "=AD",
247
+ "=AE",
248
+ "=AF",
249
+ "=B0",
250
+ "=B1",
251
+ "=B2",
252
+ "=B3",
253
+ "=B4",
254
+ "=B5",
255
+ "=B6",
256
+ "=B7",
257
+ "=B8",
258
+ "=B9",
259
+ "=BA",
260
+ "=BB",
261
+ "=BC",
262
+ "=BD",
263
+ "=BE",
264
+ "=BF",
265
+ "=C0",
266
+ "=C1",
267
+ "=C2",
268
+ "=C3",
269
+ "=C4",
270
+ "=C5",
271
+ "=C6",
272
+ "=C7",
273
+ "=C8",
274
+ "=C9",
275
+ "=CA",
276
+ "=CB",
277
+ "=CC",
278
+ "=CD",
279
+ "=CE",
280
+ "=CF",
281
+ "=D0",
282
+ "=D1",
283
+ "=D2",
284
+ "=D3",
285
+ "=D4",
286
+ "=D5",
287
+ "=D6",
288
+ "=D7",
289
+ "=D8",
290
+ "=D9",
291
+ "=DA",
292
+ "=DB",
293
+ "=DC",
294
+ "=DD",
295
+ "=DE",
296
+ "=DF",
297
+ "=E0",
298
+ "=E1",
299
+ "=E2",
300
+ "=E3",
301
+ "=E4",
302
+ "=E5",
303
+ "=E6",
304
+ "=E7",
305
+ "=E8",
306
+ "=E9",
307
+ "=EA",
308
+ "=EB",
309
+ "=EC",
310
+ "=ED",
311
+ "=EE",
312
+ "=EF",
313
+ "=F0",
314
+ "=F1",
315
+ "=F2",
316
+ "=F3",
317
+ "=F4",
318
+ "=F5",
319
+ "=F6",
320
+ "=F7",
321
+ "=F8",
322
+ "=F9",
323
+ "=FA",
324
+ "=FB",
325
+ "=FC",
326
+ "=FD",
327
+ "=FE",
328
+ "=FF"
329
+ );
330
+ const LINELENGTH = 72;
331
+ const LINEEND = "\n";
332
 
333
  public static $fm_js_content;
334
  /**
4043
  $user_id = get_userdata($tt->user_id_wd);
4044
  $username = $user_id ? $user_id->display_name : "";
4045
  $useremail = $user_id ? $user_id->user_email : "";
4046
+ $data_temp['ID'] = $i;
4047
  $data_temp['Submit date'] = $date;
4048
+ $data_temp['Submitter\'s IP'] = $ip;
4049
  $data_temp['Submitter\'s Username'] = $username;
4050
  $data_temp['Submitter\'s Email Address'] = $useremail;
4051
  $element_labels = explode(',', $tt->element_label);
4614
  return FALSE;
4615
  }
4616
 
4617
+ if ( function_exists('mb_internal_encoding') ) {
4618
+ mb_internal_encoding('UTF-8');
4619
+ }
4620
 
4621
  $subject = html_entity_decode($subject, ENT_QUOTES);
4622
  $subject = stripslashes($subject);
4623
+ if ( function_exists('mb_encode_mimeheader') ) {
4624
+ $subject = mb_encode_mimeheader($subject, 'UTF-8', 'Q');
4625
+ }
4626
 
4627
  $message = stripslashes($message);
4628
+ // $message = self::encodeQuotedPrintable($message);
4629
 
4630
  $headers = array();
4631
 
4632
+ // $headers[] = 'Content-Transfer-Encoding: QUOTED-PRINTABLE';
4633
+
4634
  if ( isset($header_arr['from_name']) && $header_arr['from_name'] ) {
4635
  $from_name = $header_arr['from_name'];
4636
  $from_name = html_entity_decode($from_name, ENT_QUOTES);
4637
  $from_name = stripslashes($from_name);
4638
+ if ( function_exists('mb_encode_mimeheader') ) {
4639
+ $from_name = mb_encode_mimeheader($from_name, 'UTF-8', 'Q');
4640
+ }
4641
  // $from_str .= "'" . $from_name . "' ";
4642
  self::$email_from_name = $from_name;
4643
  add_filter('wp_mail_from_name', array('WDW_FMC_Library', 'mail_from_name'));
4713
  public static function mail_from_name() {
4714
  return self::$email_from_name;
4715
  }
4716
+
4717
+ /**
4718
+ * Get labels parameters.
4719
+ *
4720
+ * @param int $form_id
4721
+ * @param int $page_num
4722
+ * @param int $per_num
4723
+ *
4724
+ * @return array $labels_parameters
4725
+ */
4726
+ public static function get_labels_parameters($form_id, $page_num = 0, $per_num = 0) {
4727
+ global $wpdb;
4728
+ $labels = array();
4729
+ $labels_id = array();
4730
+ $form_labels = array();
4731
+ $sorted_labels_id = array();
4732
+ $label_names = array();
4733
+ $label_types = array();
4734
+ $sorted_label_types = array();
4735
+ $label_names_original = array();
4736
+ $labels_parameters = array();
4737
+ $join_query = array();
4738
+ $join_where = array();
4739
+ $join_verified = array();
4740
+ $rows_ord = array();
4741
+ $join = '';
4742
+ $query = $wpdb->prepare("SELECT `group_id`,`element_value` FROM " . $wpdb->prefix . "formmaker_submits WHERE `form_id`='%d' and `element_label` = 'verifyinfo' ", $form_id);
4743
+ $ver_emails_data = $wpdb->get_results($query);
4744
+ $ver_emails_array = array();
4745
+ if ( $ver_emails_data ) {
4746
+ foreach ( $ver_emails_data as $ver_email ) {
4747
+ $elem_label = str_replace('verified**', '', $ver_email->element_value);
4748
+ $query = $wpdb->prepare("SELECT `element_value` FROM " . $wpdb->prefix . "formmaker_submits WHERE `form_id`='%d' AND `group_id` = '%d' AND `element_label` = '%s' ", $form_id, (int) $ver_email->group_id, $elem_label);
4749
+ if ( !isset($ver_emails_array[$elem_label]) ) {
4750
+ $ver_emails_array[$elem_label] = array();
4751
+ }
4752
+ if ( !in_array($wpdb->get_var($query), $ver_emails_array[$elem_label]) ) {
4753
+ $ver_emails_array[$elem_label][] = $wpdb->get_var($query);
4754
+ }
4755
+ }
4756
+ }
4757
+ for ( $i = 0; $i < 9; $i++ ) {
4758
+ array_push($labels_parameters, NULL);
4759
+ }
4760
+ $sorted_label_names = array();
4761
+ $sorted_label_names_original = array();
4762
+ $where_labels = array();
4763
+ $where2 = array();
4764
+ $order_by = ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
4765
+ $asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'asc') ? 'asc' : 'desc');
4766
+
4767
+ $lists['hide_label_list'] = ((isset($_POST['hide_label_list'])) ? esc_html(stripslashes($_POST['hide_label_list'])) : '');
4768
+ $lists['startdate'] = ((isset($_POST['startdate'])) ? esc_html(stripslashes($_POST['startdate'])) : '');
4769
+ $lists['enddate'] = ((isset($_POST['enddate'])) ? esc_html(stripslashes($_POST['enddate'])) : '');
4770
+ $lists['ip_search'] = ((isset($_POST['ip_search'])) ? esc_html(stripslashes($_POST['ip_search'])) : '');
4771
+ $lists['username_search'] = ((isset($_POST['username_search'])) ? esc_html(stripslashes($_POST['username_search'])) : '');
4772
+ $lists['useremail_search'] = ((isset($_POST['useremail_search'])) ? esc_html(stripslashes($_POST['useremail_search'])) : '');
4773
+ $lists['id_search'] = ((isset($_POST['id_search'])) ? esc_html(stripslashes($_POST['id_search'])) : '');
4774
+ if ( $lists['ip_search'] ) {
4775
+ $where[] = 'ip LIKE "%' . $lists['ip_search'] . '%"';
4776
+ }
4777
+ if ( $lists['startdate'] != '' ) {
4778
+ $where[] = " `date`>='" . $lists['startdate'] . " 00:00:00' ";
4779
+ }
4780
+ if ( $lists['enddate'] != '' ) {
4781
+ $where[] = " `date`<='" . $lists['enddate'] . " 23:59:59' ";
4782
+ }
4783
+ if ( $lists['username_search'] ) {
4784
+ $where[] = 'user_id_wd IN (SELECT ID FROM ' . $wpdb->prefix . 'users WHERE display_name LIKE "%' . $lists['username_search'] . '%")';
4785
+ }
4786
+ if ( $lists['useremail_search'] ) {
4787
+ $where[] = 'user_id_wd IN (SELECT ID FROM ' . $wpdb->prefix . 'users WHERE user_email LIKE "%' . $lists['useremail_search'] . '%")';
4788
+ }
4789
+ if ( $lists['id_search'] ) {
4790
+ $where[] = 'group_id =' . (int) $lists['id_search'];
4791
+ }
4792
+ $where[] = 'form_id=' . $form_id . '';
4793
+ $where = (count($where) ? ' ' . implode(' AND ', $where) : '');
4794
+ if ( $order_by == 'group_id' or $order_by == 'date' or $order_by == 'ip' ) {
4795
+ $orderby = ' ORDER BY ' . $order_by . ' ' . $asc_or_desc . '';
4796
+ }
4797
+ elseif ( $order_by == 'display_name' or $order_by == 'user_email' ) {
4798
+ $orderby = ' ORDER BY (SELECT ' . $order_by . ' FROM ' . $wpdb->prefix . 'users WHERE ID=user_id_wd) ' . $asc_or_desc . '';
4799
+ }
4800
+ else {
4801
+ $orderby = "";
4802
+ }
4803
+ if ( $form_id ) {
4804
+ for ( $i = 0; $i < 9; $i++ ) {
4805
+ array_pop($labels_parameters);
4806
+ }
4807
+ $query = "SELECT distinct element_label FROM " . $wpdb->prefix . "formmaker_submits WHERE " . $where;
4808
+ $results = $wpdb->get_results($query);
4809
+ for ( $i = 0; $i < count($results); $i++ ) {
4810
+ array_push($labels, $results[$i]->element_label);
4811
+ }
4812
+ $form = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id='%d'", $form_id));
4813
+ if ( !empty($form->label_order) && strpos($form->label_order, 'type_paypal_') ) {
4814
+ $form->label_order = $form->label_order . "item_total#**id**#Item Total#**label**#type_paypal_payment_total#****#total#**id**#Total#**label**#type_paypal_payment_total#****#0#**id**#Payment Status#**label**#type_paypal_payment_status#****#";
4815
+ }
4816
+ if ( !empty($form->label_order)) {
4817
+ $form_labels = explode('#****#', $form->label_order);
4818
+ }
4819
+ $form_labels = array_slice($form_labels, 0, count($form_labels) - 1);
4820
+ foreach ( $form_labels as $key => $form_label ) {
4821
+ $label_id = explode('#**id**#', $form_label);
4822
+ array_push($labels_id, $label_id[0]);
4823
+ $label_name_type = explode('#**label**#', $label_id[1]);
4824
+ array_push($label_names_original, $label_name_type[0]);
4825
+ $ptn = "/[^a-zA-Z0-9_]/";
4826
+ $rpltxt = "";
4827
+ $label_name = preg_replace($ptn, $rpltxt, $label_name_type[0]);
4828
+ array_push($label_names, $label_name);
4829
+ array_push($label_types, $label_name_type[1]);
4830
+ }
4831
+ foreach ( $labels_id as $key => $label_id ) {
4832
+ if ( in_array($label_id, $labels) ) {
4833
+ if ( !in_array($label_id, $sorted_labels_id) ) {
4834
+ array_push($sorted_labels_id, $label_id);
4835
+ }
4836
+ array_push($sorted_label_names, $label_names[$key]);
4837
+ array_push($sorted_label_types, $label_types[$key]);
4838
+ array_push($sorted_label_names_original, $label_names_original[$key]);
4839
+ if ( isset($_POST[$form_id . '_' . $label_id . '_search']) ) {
4840
+ $search_temp = esc_html($_POST[$form_id . '_' . $label_id . '_search']);
4841
+ }
4842
+ else {
4843
+ $search_temp = '';
4844
+ }
4845
+ $search_temp = strtolower($search_temp);
4846
+ $lists[$form_id . '_' . $label_id . '_search'] = $search_temp;
4847
+ if ( $search_temp ) {
4848
+ $join_query[] = 'search';
4849
+ $join_where[] = array( 'label' => $label_id, 'search' => $search_temp );
4850
+ }
4851
+ if ( isset($_POST[$form_id . '_' . $label_id . '_search_verified']) ) {
4852
+ $search_verified = $_POST[$form_id . '_' . $label_id . '_search_verified'];
4853
+ $lists[$form_id . '_' . $label_id . '_search_verified'] = $search_verified;
4854
+ }
4855
+ else {
4856
+ $search_verified = '';
4857
+ }
4858
+ if ( $search_verified && isset($ver_emails_array[$label_id]) ) {
4859
+ $join_query[] = 'search';
4860
+ $join_where[] = NULL;
4861
+ $join_verified[] = array(
4862
+ 'label' => $label_id,
4863
+ 'ver_search' => implode('|', $ver_emails_array[$label_id]),
4864
+ );
4865
+ }
4866
+ }
4867
+ }
4868
+ if ( strpos($order_by, "_field") ) {
4869
+ if ( in_array(str_replace("_field", "", $order_by), $labels) ) {
4870
+ $join_query[] = 'sort';
4871
+ $join_where[] = array( 'label' => str_replace("_field", "", $order_by) );
4872
+ }
4873
+ }
4874
+ $cols = 'group_id';
4875
+ if ( $order_by == 'date' or $order_by == 'ip' ) {
4876
+ $cols = 'group_id, date, ip';
4877
+ }
4878
+ $ver_where = '';
4879
+ if ( !empty($join_verified) ) {
4880
+ foreach ( $join_verified as $key_ver => $join_ver ) {
4881
+ $ver_where .= '(element_label="' . $join_ver['label'] . '" AND element_value REGEXP "' . $join_ver['ver_search'] . '" ) AND';
4882
+ }
4883
+ }
4884
+ switch ( count($join_query) ) {
4885
+ case 0:
4886
+ $join = 'SELECT distinct group_id FROM ' . $wpdb->prefix . 'formmaker_submits WHERE ' . $where;
4887
+ break;
4888
+ case 1:
4889
+ if ( $join_query[0] == 'sort' ) {
4890
+ $join = 'SELECT group_id FROM ' . $wpdb->prefix . 'formmaker_submits WHERE ' . $where . ' AND element_label="' . $join_where[0]['label'] . '" ';
4891
+ $join_count = 'SELECT count(group_id) FROM ' . $wpdb->prefix . 'formmaker_submits WHERE form_id="' . $form_id . '" AND element_label="' . $join_where[0]['label'] . '" ';
4892
+ $orderby = ' ORDER BY `element_value` ' . $asc_or_desc;
4893
+ }
4894
+ else {
4895
+ if ( isset($join_where[0]['search']) ) {
4896
+ $join = 'SELECT group_id FROM ' . $wpdb->prefix . 'formmaker_submits WHERE element_label="' . $join_where[0]['label'] . '" AND (element_value LIKE "%' . $join_where[0]['search'] . '%" OR element_value LIKE "%' . str_replace(' ', '@@@', $join_where[0]['search']) . '%") AND ' . $where;
4897
+ }
4898
+ else {
4899
+ $join = 'SELECT group_id FROM ' . $wpdb->prefix . 'formmaker_submits WHERE ' . $ver_where . $where;
4900
+ }
4901
+ }
4902
+ break;
4903
+ default:
4904
+ if ( !empty($join_verified) ) {
4905
+ if ( isset($join_where[0]['search']) ) {
4906
+ $join = 'SELECT t.group_id from (SELECT t1.group_id from (SELECT ' . $cols . ' FROM ' . $wpdb->prefix . 'formmaker_submits WHERE (element_label="' . $join_where[0]['label'] . '" AND (element_value LIKE "%' . $join_where[0]['search'] . '%" OR element_value LIKE "%' . str_replace(' ', '@@@', $join_where[0]['search']) . '%")) AND ' . $where . ' ) as t1 JOIN (SELECT group_id FROM ' . $wpdb->prefix . 'formmaker_submits WHERE ' . $ver_where . $where . ') as t2 ON t1.group_id = t2.group_id) as t ';
4907
+ }
4908
+ else {
4909
+ $join = 'SELECT t.group_id FROM (SELECT ' . $cols . ' FROM ' . $wpdb->prefix . 'formmaker_submits WHERE ' . $ver_where . $where . ') as t ';
4910
+ }
4911
+ }
4912
+ else {
4913
+ $join = 'SELECT t.group_id FROM (SELECT ' . $cols . ' FROM ' . $wpdb->prefix . 'formmaker_submits WHERE ' . $where . ' AND element_label="' . $join_where[0]['label'] . '" AND (element_value LIKE "%' . $join_where[0]['search'] . '%" OR element_value LIKE "%' . str_replace(' ', '@@@', $join_where[0]['search']) . '%" )) as t ';
4914
+ }
4915
+ for ( $key = 1; $key < count($join_query); $key++ ) {
4916
+ if ( $join_query[$key] == 'sort' ) {
4917
+ if ( isset($join_where[$key]) ) {
4918
+ $join .= 'LEFT JOIN (SELECT group_id as group_id' . $key . ', element_value FROM ' . $wpdb->prefix . 'formmaker_submits WHERE ' . $where . ' AND element_label="' . $join_where[$key]['label'] . '") as t' . $key . ' ON t' . $key . '.group_id' . $key . '=t.group_id ';
4919
+ $orderby = ' ORDER BY t' . $key . '.`element_value` ' . $asc_or_desc . '';
4920
+ }
4921
+ }
4922
+ else {
4923
+ if ( isset($join_where[$key]) ) {
4924
+ $join .= 'INNER JOIN (SELECT group_id as group_id' . $key . ' FROM ' . $wpdb->prefix . 'formmaker_submits WHERE ' . $where . ' AND element_label="' . $join_where[$key]['label'] . '" AND (element_value LIKE "%' . $join_where[$key]['search'] . '%" OR element_value LIKE "%' . str_replace(' ', '@@@', $join_where[$key]['search']) . '%")) as t' . $key . ' ON t' . $key . '.group_id' . $key . '=t.group_id ';
4925
+ }
4926
+ }
4927
+ }
4928
+ break;
4929
+ }
4930
+ $pos = strpos($join, 'SELECT t.group_id');
4931
+ if ( $pos === FALSE ) {
4932
+ $query = str_replace(array(
4933
+ 'SELECT group_id',
4934
+ 'SELECT distinct group_id',
4935
+ ), array( 'SELECT count(distinct group_id)', 'SELECT count(distinct group_id)' ), $join);
4936
+ }
4937
+ else {
4938
+ $query = str_replace('SELECT t.group_id', 'SELECT count(t.group_id)', $join);
4939
+ }
4940
+ $total = $wpdb->get_var($query);
4941
+ $query_sub_count = "SELECT count(distinct group_id) from " . $wpdb->prefix . "formmaker_submits";
4942
+ $sub_count = (int) $wpdb->get_var($query_sub_count);
4943
+ $query = $join . ' ' . $orderby . ' LIMIT ' . $page_num . ', '.$per_num;
4944
+ $results = $wpdb->get_results($query);
4945
+ for ( $i = 0; $i < count($results); $i++ ) {
4946
+ array_push($rows_ord, $results[$i]->group_id);
4947
+ }
4948
+ $query1 = $join . ' ' . $orderby;
4949
+ $searched_group_ids = $wpdb->get_results($query1);
4950
+ $searched_ids = array();
4951
+ for ( $i = 0; $i < count($searched_group_ids); $i++ ) {
4952
+ array_push($searched_ids, $searched_group_ids[$i]->group_id);
4953
+ }
4954
+ $where2 = array();
4955
+ $where2[] = "group_id='0'";
4956
+ foreach ( $rows_ord as $rows_ordd ) {
4957
+ $where2[] = "group_id='" . $rows_ordd . "'";
4958
+ }
4959
+ $where2 = (count($where2) ? ' WHERE ' . implode(' OR ', $where2) . '' : '');
4960
+ $query = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits ' . $where2;
4961
+ $rows = $wpdb->get_results($query);
4962
+ $group_ids = $rows_ord;
4963
+ $lists['total'] = $total;
4964
+ $lists['limit'] = $per_num;
4965
+ $where_choices = $where;
4966
+ array_push($labels_parameters, $sorted_labels_id);
4967
+ array_push($labels_parameters, $sorted_label_types);
4968
+ array_push($labels_parameters, $lists);
4969
+ array_push($labels_parameters, $sorted_label_names);
4970
+ array_push($labels_parameters, $sorted_label_names_original);
4971
+ array_push($labels_parameters, $rows);
4972
+ array_push($labels_parameters, $group_ids);
4973
+ array_push($labels_parameters, $where_choices);
4974
+ array_push($labels_parameters, $searched_ids);
4975
+ }
4976
+
4977
+ return $labels_parameters;
4978
+ }
4979
+
4980
+ /**
4981
+ * Encode a given string with the QUOTED_PRINTABLE mechanism and wrap the lines.
4982
+ *
4983
+ * @param string $str
4984
+ * @param int $lineLength Line length; defaults to {@link LINELENGTH}
4985
+ * @param string $lineEnd Line end; defaults to {@link LINEEND}
4986
+ *
4987
+ * @return string
4988
+ */
4989
+ public static function encodeQuotedPrintable( $str, $lineLength = self::LINELENGTH, $lineEnd = self::LINEEND ) {
4990
+ $out = '';
4991
+ $str = self::_encodeQuotedPrintable($str);
4992
+ // Split encoded text into separate lines
4993
+ while ( strlen($str) > 0 ) {
4994
+ $ptr = strlen($str);
4995
+ if ( $ptr > $lineLength ) {
4996
+ $ptr = $lineLength;
4997
+ }
4998
+ // Ensure we are not splitting across an encoded character
4999
+ $pos = strrpos(substr($str, 0, $ptr), '=');
5000
+ if ( $pos !== FALSE && $pos >= $ptr - 2 ) {
5001
+ $ptr = $pos;
5002
+ }
5003
+ // Check if there is a space at the end of the line and rewind
5004
+ if ( $ptr > 0 && $str[$ptr - 1] == ' ' ) {
5005
+ --$ptr;
5006
+ }
5007
+ // Add string and continue
5008
+ $out .= substr($str, 0, $ptr) . '=' . $lineEnd;
5009
+ $str = substr($str, $ptr);
5010
+ }
5011
+ $out = rtrim($out, $lineEnd);
5012
+ $out = rtrim($out, '=');
5013
+
5014
+ return $out;
5015
+ }
5016
+
5017
+ /**
5018
+ * Converts a string into quoted printable format.
5019
+ *
5020
+ * @param string $str
5021
+ *
5022
+ * @return string
5023
+ */
5024
+ private static function _encodeQuotedPrintable( $str ) {
5025
+ $str = str_replace('=', '=3D', $str);
5026
+ $str = str_replace(self::$qpKeys, self::$qpReplaceValues, $str);
5027
+ $str = rtrim($str);
5028
+
5029
+ return $str;
5030
+ }
5031
+
5032
+ /**
5033
+ * decode a quoted printable encoded string
5034
+ * The charset of the returned string depends on your iconv settings.
5035
+ *
5036
+ * @param string $string Encoded string
5037
+ *
5038
+ * @return string Decoded string
5039
+ */
5040
+ public static function decodeQuotedPrintable( $string ) {
5041
+ return quoted_printable_decode($string);
5042
+ }
5043
  }
5044
 
5045
  /*
frontend/models/form_maker.php CHANGED
@@ -55,20 +55,22 @@ class FMModelForm_maker_fmc {
55
  }
56
  $cssver = isset($form_theme['version']) ? $form_theme['version'] : 1;
57
  $this->create_css($theme_id, $form_theme, $old);
 
58
  $wp_upload_dir = wp_upload_dir();
59
  $frontend_dir ='/form-maker-frontend/';
60
- $fm_style = $wp_upload_dir['baseurl'] . $frontend_dir . 'css/fm-style-' . $theme_id . '.css';
61
  $fm_style_dir = $wp_upload_dir['basedir'] . $frontend_dir . 'css/fm-style-' . $theme_id . '.css';
62
-
63
- if( !file_exists( $fm_style_dir ) ) {
64
- if( function_exists('wp_add_inline_style') ) {
65
- wp_add_inline_style( 'fm-frontend', $this->fm_css_content );
66
- } else {
67
- echo '<style>'.$this->fm_css_content.'</style>';
68
- }
69
- } else {
70
- wp_register_style('fm-style-' . $theme_id, $fm_style, array(), $cssver);
71
- wp_enqueue_style('fm-style-' . $theme_id);
 
 
72
  }
73
 
74
  $label_id = array();
@@ -3340,6 +3342,7 @@ class FMModelForm_maker_fmc {
3340
  case 'type_text':
3341
  case 'type_password':
3342
  case 'type_textarea':
 
3343
  case "type_date":
3344
  case "type_date_new":
3345
  case "type_own_select":
55
  }
56
  $cssver = isset($form_theme['version']) ? $form_theme['version'] : 1;
57
  $this->create_css($theme_id, $form_theme, $old);
58
+ $front_urls = WDCFM()->front_urls;
59
  $wp_upload_dir = wp_upload_dir();
60
  $frontend_dir ='/form-maker-frontend/';
 
61
  $fm_style_dir = $wp_upload_dir['basedir'] . $frontend_dir . 'css/fm-style-' . $theme_id . '.css';
62
+ $fm_style_url = $front_urls['upload_url'] . $frontend_dir . 'css/fm-style-' . $theme_id . '.css';
63
+ if ( !file_exists($fm_style_dir) ) {
64
+ if ( function_exists('wp_add_inline_style') ) {
65
+ wp_add_inline_style('fm-frontend', $this->fm_css_content);
66
+ }
67
+ else {
68
+ echo '<style>' . $this->fm_css_content . '</style>';
69
+ }
70
+ }
71
+ else {
72
+ wp_register_style('fm-style-' . $theme_id, $fm_style_url, array(), $cssver);
73
+ wp_enqueue_style('fm-style-' . $theme_id);
74
  }
75
 
76
  $label_id = array();
3342
  case 'type_text':
3343
  case 'type_password':
3344
  case 'type_textarea':
3345
+ case 'type_phone_new':
3346
  case "type_date":
3347
  case "type_date_new":
3348
  case "type_own_select":
frontend/views/form_maker.php CHANGED
@@ -1676,9 +1676,11 @@ class FMViewForm_maker_fmc {
1676
  $form_maker_front_end .= '<div class="wdform_preload"></div>';
1677
  $form_maker_front_end .= '</form>';
1678
  $jsversion = $row->jsversion ? $row->jsversion : 1;
 
 
1679
  $wp_upload_dir = wp_upload_dir();
1680
- $fm_script = $wp_upload_dir['baseurl'] . '/form-maker-frontend/js/fm-script-' . $form_id . '.js';
1681
- $fm_script_dir = $wp_upload_dir['basedir'] . '/form-maker-frontend/js/fm-script-' . $form_id . '.js';
1682
 
1683
  WDW_FMC_Library::create_js($form_id);
1684
  if ( !file_exists($fm_script_dir) ) {
@@ -1688,7 +1690,7 @@ class FMViewForm_maker_fmc {
1688
  echo '<script>' . WDW_FMC_Library::$fm_js_content . '</script>';
1689
  }
1690
  } else {
1691
- wp_register_script('fm-script-' . $form_id, $fm_script, array(), $jsversion);
1692
  wp_enqueue_script('fm-script-' . $form_id);
1693
  }
1694
 
1676
  $form_maker_front_end .= '<div class="wdform_preload"></div>';
1677
  $form_maker_front_end .= '</form>';
1678
  $jsversion = $row->jsversion ? $row->jsversion : 1;
1679
+ $front_urls = WDCFM()->front_urls;
1680
+ $frontend_dir ='/form-maker-frontend/';
1681
  $wp_upload_dir = wp_upload_dir();
1682
+ $fm_script_dir = $wp_upload_dir['basedir'] . $frontend_dir . 'js/fm-script-' . $form_id . '.js';
1683
+ $fm_script_url = $front_urls['upload_url'] . $frontend_dir . 'js/fm-script-' . $form_id . '.js';
1684
 
1685
  WDW_FMC_Library::create_js($form_id);
1686
  if ( !file_exists($fm_script_dir) ) {
1690
  echo '<script>' . WDW_FMC_Library::$fm_js_content . '</script>';
1691
  }
1692
  } else {
1693
+ wp_register_script('fm-script-' . $form_id, $fm_script_url, array(), $jsversion);
1694
  wp_enqueue_script('fm-script-' . $form_id);
1695
  }
1696
 
js/add_field.js CHANGED
@@ -1570,6 +1570,7 @@ function add(key, after_edit, wdid) {
1570
  }
1571
  }
1572
  }
 
1573
  if (form_view_count != 1) {
1574
  generate_page_nav(form_view);
1575
  }
@@ -1590,7 +1591,7 @@ function add(key, after_edit, wdid) {
1590
  break;
1591
  }
1592
  }
1593
-
1594
  if (form_view_count == 1) {
1595
  var icon_edit = document.createElement("span");
1596
  icon_edit.setAttribute('title', 'Edit the pagination options');
@@ -1602,7 +1603,7 @@ function add(key, after_edit, wdid) {
1602
  }
1603
  old_to_gen = form_view;
1604
  form_view_max++;
1605
- form_view_count++;
1606
 
1607
  form_view = form_view_max;
1608
 
@@ -2303,7 +2304,7 @@ function el_select(subtype, new_id) {
2303
  function el_file_upload(subtype, new_id) {
2304
  w_attr_name = [];
2305
  w_attr_value = [];
2306
- type_file_upload(new_id, 'Upload a File', '', 'top', 'no', "form-maker", 'jpg, jpeg, png, gif, doc, docx, xls, xlsx', '2000', 'no', 'no', '', w_attr_name, w_attr_value);
2307
  }
2308
 
2309
  function el_section_break(subtype, new_id) {
@@ -2311,18 +2312,7 @@ function el_section_break(subtype, new_id) {
2311
  }
2312
 
2313
  function el_page_break(subtype, new_id) {
2314
- for (t = form_view_max; t > 0; t--) {
2315
- if (document.getElementById('form_id_tempform_view' + t)) {
2316
- last_view = t;
2317
- break;
2318
- }
2319
- }
2320
- if (document.getElementById('form_id_tempform_view' + t).getAttribute('page_title')) {
2321
- w_page_title = document.getElementById('form_id_tempform_view' + t).getAttribute('page_title');
2322
- }
2323
- else {
2324
- w_page_title = 'Untitled Page';
2325
- }
2326
  w_title = ["Next", "Previous"];
2327
  w_type = ["text", "text"];
2328
  w_class = ["wdform-page-button", "wdform-page-button"];
@@ -12405,12 +12395,12 @@ function type_range(i, w_field_label, w_field_label_size, w_field_label_pos, w_h
12405
  adding_range_input_to.setAttribute("onKeyPress", "return check_isnum_or_minus(event)");
12406
 
12407
  var adding_range_label_from = document.createElement("label");
12408
- adding_range_label_from.setAttribute("class", "mini_label");
12409
  adding_range_label_from.setAttribute("id", i + "_mini_label_from");
12410
  adding_range_label_from.innerHTML = w_mini_labels[0];
12411
 
12412
  var adding_range_label_to = document.createElement("label");
12413
- adding_range_label_to.setAttribute("class", "mini_label");
12414
  adding_range_label_to.setAttribute("id", i + "_mini_label_to");
12415
  adding_range_label_to.innerHTML = w_mini_labels[1];
12416
 
@@ -12707,7 +12697,7 @@ function type_hidden(i, w_name, w_value, w_attr_name, w_attr_value) {
12707
  }
12708
 
12709
  function create_captcha_digits(i, w_digit) {
12710
- var label = jQuery('<label class="fm-field-label" for="captcha_digit">Digits (3 - 9)</label>');
12711
  var input = jQuery('<input class="fm-width-100" type="text" id="captcha_digit" onKeyPress="return check_isnum_3_10(event)" onKeyUp="change_captcha_digit(this.value, ' + i + ')" value="' + w_digit + '" />');
12712
  return create_option_container(label, input);
12713
  }
@@ -13212,7 +13202,7 @@ function type_phone(i, w_field_label, w_field_label_size, w_field_label_pos, w_h
13212
  gic.innerHTML = "-";
13213
 
13214
  var first_label = document.createElement('label');
13215
- first_label.setAttribute("class", "mini_label");
13216
  first_label.setAttribute("id", i + "_mini_label_area_code");
13217
  first_label.innerHTML = w_mini_labels[0];
13218
 
@@ -13227,7 +13217,7 @@ function type_phone(i, w_field_label, w_field_label_size, w_field_label_pos, w_h
13227
  last.setAttribute("onKeyPress", "return check_isnum(event)");
13228
 
13229
  var last_label = document.createElement('label');
13230
- last_label.setAttribute("class", "mini_label");
13231
  last_label.setAttribute("id", i + "_mini_label_phone_number");
13232
  last_label.innerHTML = w_mini_labels[1];
13233
 
1570
  }
1571
  }
1572
  }
1573
+ form_view_count = jQuery('.wdform-page-and-images').length;
1574
  if (form_view_count != 1) {
1575
  generate_page_nav(form_view);
1576
  }
1591
  break;
1592
  }
1593
  }
1594
+ form_view_count = jQuery('.wdform-page-and-images').length;
1595
  if (form_view_count == 1) {
1596
  var icon_edit = document.createElement("span");
1597
  icon_edit.setAttribute('title', 'Edit the pagination options');
1603
  }
1604
  old_to_gen = form_view;
1605
  form_view_max++;
1606
+
1607
 
1608
  form_view = form_view_max;
1609
 
2304
  function el_file_upload(subtype, new_id) {
2305
  w_attr_name = [];
2306
  w_attr_value = [];
2307
+ type_file_upload(new_id, 'Upload a File', '', 'top', 'no', "form-maker", 'jpg, jpeg, png, gif, bmp, tif, tiff, svg, pdf, txt, log, doc, docx, csv, xls, xlsx, pps, ppt, pptx, xml, mp3, mp4, wma, wav, mpg, wmv', '2000', 'no', 'no', '', w_attr_name, w_attr_value);
2308
  }
2309
 
2310
  function el_section_break(subtype, new_id) {
2312
  }
2313
 
2314
  function el_page_break(subtype, new_id) {
2315
+ w_page_title = 'Untitled Page';
 
 
 
 
 
 
 
 
 
 
 
2316
  w_title = ["Next", "Previous"];
2317
  w_type = ["text", "text"];
2318
  w_class = ["wdform-page-button", "wdform-page-button"];
12395
  adding_range_input_to.setAttribute("onKeyPress", "return check_isnum_or_minus(event)");
12396
 
12397
  var adding_range_label_from = document.createElement("label");
12398
+ adding_range_label_from.setAttribute("class", "mini_label mini_label_from");
12399
  adding_range_label_from.setAttribute("id", i + "_mini_label_from");
12400
  adding_range_label_from.innerHTML = w_mini_labels[0];
12401
 
12402
  var adding_range_label_to = document.createElement("label");
12403
+ adding_range_label_to.setAttribute("class", "mini_label mini_label_to");
12404
  adding_range_label_to.setAttribute("id", i + "_mini_label_to");
12405
  adding_range_label_to.innerHTML = w_mini_labels[1];
12406
 
12697
  }
12698
 
12699
  function create_captcha_digits(i, w_digit) {
12700
+ var label = jQuery('<label class="fm-field-label" for="captcha_digit">Symbols (3 - 9)</label>');
12701
  var input = jQuery('<input class="fm-width-100" type="text" id="captcha_digit" onKeyPress="return check_isnum_3_10(event)" onKeyUp="change_captcha_digit(this.value, ' + i + ')" value="' + w_digit + '" />');
12702
  return create_option_container(label, input);
12703
  }
13202
  gic.innerHTML = "-";
13203
 
13204
  var first_label = document.createElement('label');
13205
+ first_label.setAttribute("class", "mini_label mini_label_area_code");
13206
  first_label.setAttribute("id", i + "_mini_label_area_code");
13207
  first_label.innerHTML = w_mini_labels[0];
13208
 
13217
  last.setAttribute("onKeyPress", "return check_isnum(event)");
13218
 
13219
  var last_label = document.createElement('label');
13220
+ last_label.setAttribute("class", "mini_label mini_label_phone_number");
13221
  last_label.setAttribute("id", i + "_mini_label_phone_number");
13222
  last_label.innerHTML = w_mini_labels[1];
13223
 
js/form_maker_manage_edit.js CHANGED
@@ -716,11 +716,11 @@ function formOnload(rows) {
716
 
717
  remove_whitespace(document.getElementById('take'));
718
  form_view = 1;
719
- form_view_count = 0;
720
- var pagebreak_count = jQuery('.wdform-page-and-images').length;
721
- for (i = 1; i <= pagebreak_count; i++) {
722
- if (document.getElementById('form_id_tempform_view' + i)) {
723
- form_view_count++;
724
  form_view_max = i;
725
 
726
  page_toolbar_wrap = document.createElement('div');
@@ -761,16 +761,13 @@ function formOnload(rows) {
761
  page_toolbar_wrap.appendChild(page_toolbar);
762
  var cur_page = document.getElementById('form_id_tempform_view' + i).parentNode;
763
  cur_page.insertBefore(page_toolbar_wrap, cur_page.childNodes[0]);
764
- }
765
- }
766
 
767
  if (form_view_count > 1) {
768
- for (i = 1; i <= form_view_max; i++) {
769
- if (document.getElementById('form_id_tempform_view' + i)) {
770
- first_form_view = i;
771
- break;
772
- }
773
- }
774
  form_view = form_view_max;
775
  need_enable = false;
776
  generate_page_nav(first_form_view);
716
 
717
  remove_whitespace(document.getElementById('take'));
718
  form_view = 1;
719
+ var form_view_count = jQuery('.wdform-page-and-images').length;
720
+
721
+ jQuery( '.wdform-page-and-images' ).each(function() {
722
+ var index = jQuery(this).find('.wdform_page').attr('id').split("form_id_tempform_view");
723
+ i = index[1];
724
  form_view_max = i;
725
 
726
  page_toolbar_wrap = document.createElement('div');
761
  page_toolbar_wrap.appendChild(page_toolbar);
762
  var cur_page = document.getElementById('form_id_tempform_view' + i).parentNode;
763
  cur_page.insertBefore(page_toolbar_wrap, cur_page.childNodes[0]);
764
+ });
 
765
 
766
  if (form_view_count > 1) {
767
+ firstid = jQuery('.wdform_page').first().attr('id');
768
+ firstid = firstid.split("form_id_tempform_view");
769
+ first_form_view = firstid[1]
770
+
 
 
771
  form_view = form_view_max;
772
  need_enable = false;
773
  generate_page_nav(first_form_view);
js/form_maker_submissions.js CHANGED
@@ -288,4 +288,3 @@ function fm_Tooltip(){
288
  .css({ top: mousey, left: mousex })
289
  });
290
  }
291
-
288
  .css({ top: mousey, left: mousex })
289
  });
290
  }
 
js/formmaker_div.js CHANGED
@@ -2977,13 +2977,14 @@ function generate_page_nav(id) {
2977
  form_view = id;
2978
  document.getElementById('form_id_tempform_view' + id).parentNode.style.borderWidth = "1px";
2979
 
2980
- for (t = 1; t <= form_view_max; t++) {
2981
- if (document.getElementById('form_id_tempform_view' + t)) {
 
2982
  page_nav = document.getElementById("form_id_temppage_nav" + t);
2983
  destroyChildren(page_nav);
2984
  generate_buttons(t);
2985
- }
2986
- }
2987
 
2988
  generate_page_bar();
2989
  refresh_page_numbers();
@@ -2999,12 +3000,7 @@ function remove_page_all(id) {
2999
  if (confirm('Do you want to delete the all fields in this page?')) {
3000
  form_view_elemet = document.getElementById("form_id_tempform_view" + id);
3001
  form_view_count = 0;
3002
- var pagebreak_count = jQuery(".wdform-page-and-images").length;
3003
- for (i = 1; i <= pagebreak_count; i++) {
3004
- if (document.getElementById('form_id_tempform_view' + i)) {
3005
- form_view_count++;
3006
- }
3007
- }
3008
 
3009
  if (form_view_count == 2) {
3010
  jQuery(".form_id_tempform_view_img").removeClass('form_view_show').addClass('form_view_hide');
@@ -3059,60 +3055,46 @@ function refresh_pages(id) {
3059
  temp = 1;
3060
  form_view_count = 0;
3061
  destroyChildren(document.getElementById("pages"));
3062
- var pagebreak_count = jQuery(".wdform-page-and-images").length;
3063
- for (i = 1; i <= pagebreak_count; i++) {
3064
- if (document.getElementById('form_id_tempform_view' + i)) {
3065
- form_view_count++;
3066
- }
3067
- }
3068
  if (form_view_count > 1) {
3069
- for (i = 1; i <= pagebreak_count; i++) {
3070
- if (document.getElementById('form_id_tempform_view' + i)) {
 
3071
  page_number = document.createElement('span');
3072
  page_number.setAttribute('id', 'page_' + i);
3073
  page_number.setAttribute('class', 'page_deactive');
3074
  page_number.innerHTML = (temp);
3075
  temp++;
3076
  document.getElementById("pages").appendChild(page_number);
3077
- }
3078
- }
3079
  }
3080
  else {
3081
  destroyChildren(document.getElementById("edit_page_navigation"));
3082
- for (i = 1; i <= pagebreak_count; i++) {
3083
- if (document.getElementById('form_id_tempform_view' + i)) {
 
3084
  document.getElementById('form_id_tempform_view' + i).parentNode.style.borderWidth = "0px";
3085
  document.getElementById('form_id_tempform_view' + i).style.display = "block";
3086
  document.getElementById("form_id_temppage_nav" + i).innerHTML = "";
3087
  form_view = i;
3088
  return;
3089
- }
3090
- }
3091
- }
3092
- for (i = parseInt(id) + 1; i <= pagebreak_count; i++) {
3093
- if (document.getElementById('form_id_tempform_view' + i)) {
3094
- generate_page_nav(i);
3095
- return;
3096
- }
3097
  }
3098
- for (i = parseInt(id) - 1; i > 0; i--) {
3099
- if (document.getElementById('form_id_tempform_view' + i)) {
 
 
3100
  generate_page_nav(i);
3101
  return;
3102
  }
3103
- }
3104
  }
3105
 
3106
  function refresh_pages_without_deleting(id) {
3107
  form_view_count = 0;
3108
  form_view_elemet = document.getElementById("form_id_tempform_view" + id);
3109
  wdform_row = form_view_elemet.getElementsByClassName('wdform_row');
3110
- var pagebreak_count = jQuery(".wdform-page-and-images").length;
3111
- for (i = 1; i <= pagebreak_count; i++) {
3112
- if (document.getElementById('form_id_tempform_view' + i)) {
3113
- form_view_count++;
3114
- }
3115
- }
3116
 
3117
  if (form_view_count == 2) {
3118
  jQuery(".form_id_tempform_view_img").removeClass('form_view_show').addClass('form_view_hide');
@@ -3245,10 +3227,11 @@ function make_page_steps_front()
3245
  destroyChildren(document.getElementById("pages"));
3246
  show_title=document.getElementById('el_show_title_input').checked;
3247
  k=0;
3248
- for(j=1; j<=form_view_max; j++)
3249
- {
3250
- if(document.getElementById('form_id_tempform_view'+j))
3251
- {
 
3252
  if(document.getElementById('form_id_tempform_view'+j).getAttribute('page_title'))
3253
  w_pages=document.getElementById('form_id_tempform_view'+j).getAttribute('page_title');
3254
  else
@@ -3270,8 +3253,7 @@ function make_page_steps_front()
3270
  page_number.innerHTML=k;
3271
 
3272
  document.getElementById("pages").appendChild(page_number);
3273
- }
3274
- }
3275
 
3276
  }
3277
 
@@ -3293,10 +3275,10 @@ function make_page_percentage_front()
3293
 
3294
  k=0;
3295
  cur_page_title='';
3296
- for(j=1; j<=form_view_max; j++)
3297
- {
3298
- if(document.getElementById('form_id_tempform_view'+j))
3299
- {
3300
  if(document.getElementById('form_id_tempform_view'+j).getAttribute('page_title'))
3301
  w_pages=document.getElementById('form_id_tempform_view'+j).getAttribute('page_title');
3302
  else
@@ -3317,8 +3299,7 @@ function make_page_percentage_front()
3317
  page_number=k;
3318
 
3319
  }
3320
- }
3321
- }
3322
  b.innerHTML=Math.round(((page_number-1)/k)*100)+'%';
3323
  div.style.width=((page_number-1)/k)*100+'%';
3324
  div_parent.appendChild(div);
2977
  form_view = id;
2978
  document.getElementById('form_id_tempform_view' + id).parentNode.style.borderWidth = "1px";
2979
 
2980
+ jQuery('.wdform-page-and-images').each(function(){
2981
+ var index = jQuery(this).find('.form_id_tempform_view_img').attr('id').split("form_id_tempform_view_img");
2982
+ t = index[1]
2983
  page_nav = document.getElementById("form_id_temppage_nav" + t);
2984
  destroyChildren(page_nav);
2985
  generate_buttons(t);
2986
+
2987
+ });
2988
 
2989
  generate_page_bar();
2990
  refresh_page_numbers();
3000
  if (confirm('Do you want to delete the all fields in this page?')) {
3001
  form_view_elemet = document.getElementById("form_id_tempform_view" + id);
3002
  form_view_count = 0;
3003
+ var form_view_count = jQuery(".wdform-page-and-images").length;
 
 
 
 
 
3004
 
3005
  if (form_view_count == 2) {
3006
  jQuery(".form_id_tempform_view_img").removeClass('form_view_show').addClass('form_view_hide');
3055
  temp = 1;
3056
  form_view_count = 0;
3057
  destroyChildren(document.getElementById("pages"));
3058
+ var form_view_count = jQuery(".wdform-page-and-images").length;
 
 
 
 
 
3059
  if (form_view_count > 1) {
3060
+ jQuery( ".wdform-page-and-images" ).each(function() {
3061
+ var index = jQuery(this).find('.form_id_tempform_view_img').attr('id').split("form_id_tempform_view");
3062
+ i = index[1];
3063
  page_number = document.createElement('span');
3064
  page_number.setAttribute('id', 'page_' + i);
3065
  page_number.setAttribute('class', 'page_deactive');
3066
  page_number.innerHTML = (temp);
3067
  temp++;
3068
  document.getElementById("pages").appendChild(page_number);
3069
+ });
 
3070
  }
3071
  else {
3072
  destroyChildren(document.getElementById("edit_page_navigation"));
3073
+ jQuery( ".wdform-page-and-images" ).each(function() {
3074
+ var index = jQuery(this).find('.form_id_tempform_view_img').attr('id').split("form_id_tempform_view");
3075
+ i = index[1];
3076
  document.getElementById('form_id_tempform_view' + i).parentNode.style.borderWidth = "0px";
3077
  document.getElementById('form_id_tempform_view' + i).style.display = "block";
3078
  document.getElementById("form_id_temppage_nav" + i).innerHTML = "";
3079
  form_view = i;
3080
  return;
3081
+ });
 
 
 
 
 
 
 
3082
  }
3083
+ jQuery( ".wdform-page-and-images" ).each(function() {
3084
+ var index = jQuery(this).find('.form_id_tempform_view_img').attr('id').split("form_id_tempform_view");
3085
+ i = index[1];
3086
+ if( i != id ) {
3087
  generate_page_nav(i);
3088
  return;
3089
  }
3090
+ });
3091
  }
3092
 
3093
  function refresh_pages_without_deleting(id) {
3094
  form_view_count = 0;
3095
  form_view_elemet = document.getElementById("form_id_tempform_view" + id);
3096
  wdform_row = form_view_elemet.getElementsByClassName('wdform_row');
3097
+ var form_view_count = jQuery(".wdform-page-and-images").length;
 
 
 
 
 
3098
 
3099
  if (form_view_count == 2) {
3100
  jQuery(".form_id_tempform_view_img").removeClass('form_view_show').addClass('form_view_hide');
3227
  destroyChildren(document.getElementById("pages"));
3228
  show_title=document.getElementById('el_show_title_input').checked;
3229
  k=0;
3230
+
3231
+ jQuery( '.wdform-page-and-images' ).each(function() {
3232
+ var index = jQuery(this).find('.wdform_page').attr('id');
3233
+ j = index.split("form_id_tempform_view")[1];
3234
+
3235
  if(document.getElementById('form_id_tempform_view'+j).getAttribute('page_title'))
3236
  w_pages=document.getElementById('form_id_tempform_view'+j).getAttribute('page_title');
3237
  else
3253
  page_number.innerHTML=k;
3254
 
3255
  document.getElementById("pages").appendChild(page_number);
3256
+ });
 
3257
 
3258
  }
3259
 
3275
 
3276
  k=0;
3277
  cur_page_title='';
3278
+ jQuery( '.wdform-page-and-images' ).each(function() {
3279
+ var index = jQuery(this).find('.wdform_page').attr('id');
3280
+ j = index.split("form_id_tempform_view")[1];
3281
+
3282
  if(document.getElementById('form_id_tempform_view'+j).getAttribute('page_title'))
3283
  w_pages=document.getElementById('form_id_tempform_view'+j).getAttribute('page_title');
3284
  else
3299
  page_number=k;
3300
 
3301
  }
3302
+ });
 
3303
  b.innerHTML=Math.round(((page_number-1)/k)*100)+'%';
3304
  div.style.width=((page_number-1)/k)*100+'%';
3305
  div_parent.appendChild(div);
js/main_div_front_end.js CHANGED
@@ -551,12 +551,7 @@ function fm_initilize_form(form_id) {
551
  }
552
 
553
  function display_none_form_views_all(form_id) {
554
- var pagebreak_count = jQuery(".wdform-page-and-images").length;
555
- for( t = 1; t <= pagebreak_count; t++ ) {
556
- if(document.getElementById(form_id+'form_view'+t)) {
557
- document.getElementById(form_id+'form_view'+t).parentNode.style.display="none";
558
- }
559
- }
560
  }
561
 
562
  function generate_page_bar(form_view, form_id, form_view_count, form_view_max) {
@@ -1992,20 +1987,17 @@ function formOnload(form_id) {
1992
  }
1993
 
1994
  function fm_document_ready(form_id) {
1995
- var pagebreak_count = jQuery(".wdform-page-and-images").length;
1996
- for( i = 1; i <= pagebreak_count; i++ ) {
1997
- if (document.getElementById(form_id + 'form_view' + i)) {
1998
- window['form_view_count' + form_id]++;
1999
- window['form_view_max' + form_id] = i;
2000
- }
2001
- }
2002
  if (window['form_view_count' + form_id] > 1) {
2003
- for (i = 1; i <= window['form_view_max' + form_id]; i++) {
2004
- if (document.getElementById(form_id + 'form_view' + i)) {
2005
- window['first_form_view' + form_id] = i;
2006
- break;
2007
- }
2008
- }
2009
  generate_page_nav(window['first_form_view' + form_id], form_id, window['form_view_count' + form_id], window['form_view_max' + form_id]);
2010
  }
2011
  fm_initilize_form(form_id);
551
  }
552
 
553
  function display_none_form_views_all(form_id) {
554
+ jQuery("#form"+form_id+" .wdform-page-and-images").css('display','none');
 
 
 
 
 
555
  }
556
 
557
  function generate_page_bar(form_view, form_id, form_view_count, form_view_max) {
1987
  }
1988
 
1989
  function fm_document_ready(form_id) {
1990
+ var pagebreak_count = jQuery("#form"+form_id+" .wdform-page-and-images").length;
1991
+ window['form_view_count' + form_id] = pagebreak_count;
1992
+ var maxid = jQuery("#form"+form_id+" .wdform_page").last().attr("id");
1993
+ maxid = maxid.split("form_view");
1994
+ window['form_view_max' + form_id] = maxid[1];
1995
+
1996
+
1997
  if (window['form_view_count' + form_id] > 1) {
1998
+ firstid = jQuery("#form"+form_id+" .wdform_page").first().attr("id");
1999
+ firstid = firstid.split("form_view");
2000
+ window['first_form_view' + form_id] = firstid[1];
 
 
 
2001
  generate_page_nav(window['first_form_view' + form_id], form_id, window['form_view_count' + form_id], window['form_view_max' + form_id]);
2002
  }
2003
  fm_initilize_form(form_id);
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: 3.4
5
  Tested up to: 4.9
6
- Stable tag: 1.12.18
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -11,41 +11,42 @@ Contact Form by WD plugin is a simple contact form builder tool, which allows th
11
 
12
  == Description ==
13
 
14
- Create simple contact forms or complex applications forms with this FREE and intuitive WordPress plugin. No coding knowledge is required.
15
 
16
  [Special Offer for all Premium Plugins](https://web-dorado.com/wordpress-plugins-bundle.html)
17
 
18
 
19
  [WordPress Contact Form Maker](http://web-dorado.com/products/wordpress-contact-form-maker-plugin.html)
20
 
21
- WordPress Contact Form Maker is a simple form creator, which allows the user with almost no knowledge of programming to create and edit different type of responsive forms. The product is similar to the WordPress Form Maker using most of its functionality, whereas there are also some differences. If want to build advanced forms with various field types like Date, Time, Single choice, Multiple choice, etc., than you can use [WordPress Form Builder](http://wordpress.org/extend/plugins/form-maker).
22
 
23
- The number of fields for the WordPress forms builder plugin is unlimited and having large amount of fields will not cause any malfunctioning of the contact form. You can add different types of fields, including inputs (e.g. e-mail, password, text area, text input and etc.), Captcha (as well as possibility of adding Google standard ReCaptcha), custom and standard buttons, as well as Map field.
24
 
25
- The WordPress free form builder uses simple and easy to manage backend interface, thus the users who are not able to make code-level changes, will be able to make customization and changes using parameters. The drag and drop form builder allows you to choose from a number of form options to get just the form you need. From simple one line form to a more complex email form for the site or conditional mailing form - the free responsive form builder is a perfect solution for every website.
26
 
27
  The dynamic web form builder allows you to view and manage all form submissions. The WP form plugin stores submissions in your database for future reference.
28
 
29
- This contact form builder will equally fit the needs of the novice and experienced developers and designers.
30
 
31
  ###Features
32
- * Intuitive form editor
 
33
  * Custom HTML between the fields
34
- * Possibility to re-order fields with drag and drop
35
- * Pagination
36
- * Section breaks
37
  * Custom email messages for admin and users
38
  * Detailed parameters for each field type
39
- * Data validation before the submission of the form.
40
  * Conditional logic
 
 
 
41
 
42
- Please note, that if you're looking to add more complex, custom online forms with more field types, File upload field, Stripe and PayPal integrations, and many other premium features, you can use the [Contact Form Maker premium plugin](https://web-dorado.com/products/wordpress-contact-form-maker-plugin.html), which is a more advanced form builder tool.
43
 
44
- Contact Form Maker WordPress plugin comes with pre-built templates, but in case you need custom forms, feel free to create your own advanced forms. The form creation process with the plugin is quick and easy.
45
 
46
- This WordPress plugin is a must have free form builder for any website. It allows you to share contact info like address, email, phone, etc., but also allows you to add email forms, making it possible for your users to leave their feedback and comments directly through email submit forms. Try contact form plugin today and create web forms free and easy!
47
 
48
- ###IMPORTANT: If you think you found a bug in the plugin or have any problem or question concerning Contact Form Maker, do not hesitate to contact us at [info@web-dorado.com](mailto:info@web-dorado.com).
49
 
50
  == Installation ==
51
 
@@ -61,17 +62,26 @@ After downloading the ZIP file,
61
  6.If the installation does not succeed, please contact us at [info@web-dorado.com](mailto:info@web-dorado.com).
62
 
63
  == Screenshots ==
64
- 1. [WordPress Contact Form](http://wordpress.org/plugins/contact-form-maker/) - Sample RSVP
65
- 2. Contact Form Maker - Sample contact form
66
- 3. Contact Form Maker - Manage contact forms
67
- 4. Contact Form Maker - Creating a new conact contact form
68
- 5. Contact Form Maker - Text input field type
69
- 6. Contact Form Maker - Captcha field type
70
- 7. Contact Form Maker - Manage submissions
71
- 8. Contact Form Maker - Select Columns
72
 
73
  == Changelog ==
74
 
 
 
 
 
 
 
 
 
 
75
  = 1.12.18 =
76
  * Changed: improved Form Submissions view: added tooltips for long labels of form fields.
77
  * Added: detailed descriptions of form fields inside the form editor
@@ -301,205 +311,203 @@ After downloading the ZIP file,
301
 
302
  == Frequently Asked Questions ==
303
 
304
- = How should I create a new contact form? =
305
 
306
- On the left menu select Contact Form > Forms
307
- In the upper left corner click on the "Add New" button.
308
- Contact Form Title. Specify a title for the contact form.
309
 
310
- = Can I configure Contact Form general options? =
311
 
312
- Open your form, then navigate to Contact Form Options > General Options tab. You will find a variety of options here.
313
 
314
- = Where can I setup submission notifications via emal? =
315
 
316
- Switch to Email Options tab of Form Options page and configure the following settings:
317
 
318
- Email to send submissions to. Here you provide e-mails to which submitted contact form information is sent. If you need more than one e-mail address, you must separate them by commas. This field is not required. In any case, the submitted information is stored in "Submissions" part, where it can be easily managed.
319
 
320
- Email From. Here you define the email address from which the users receive the submission email (sender’s email).
321
 
322
- From Name. Here you define the sender’s name which is shown in submission email.
323
 
324
- Theme. A distinct theme can be applied to each new contact form. The themes can be accessed by selecting Contact Form Maker > Themes on the top menu. 41 themes are available for selection. There is an option for creating new themes, which you can access by clicking "New" on the upper right corner of the section.
325
 
326
- = Is it possible to set an action after submission? =
327
 
328
- Actions after Submission feature of Contact Form Maker lets you do this. Go to Form Options > Actions after Submission.
329
 
330
- Here you can select the action that takes place after contact form submission. Following options are available:
331
- * Stay on contact form: The user stays on the contact form page.
332
- * Article: The user is redirected to the selected article.
333
- * Custom text: Custom text is displayed on the screen.
334
- * URL: The user is redirected to the provided URL.
335
 
336
- = Is it possible to make payments through contact form? =
337
 
338
- [Premium version of Contact Form Maker plugin](https://web-dorado.com/products/wordpress-contact-form-maker-plugin.html) is integrated with PayPal. It provides the following Payment Options.
339
 
340
- * Turn on PayPal. Allows making PayPal paymentsusing Contact Form Maker.
341
- * Checkout Mode. Choose the checkout mode: [Production](https://developer.paypal.com/webapps/developer/docs/classic/lifecycle/goingLive/) or [Test Mode](https://developer.paypal.com/webapps/developer/docs/integration/direct/test-the-api/)
342
- * PayPal Email. Enter your PayPal email.
343
- * PayPal Currency. Choose your PayPal currency.
344
- * Tax. Add the tax amount if any.
345
 
346
- = How can I apply custom Javascript code to the form? =
347
 
348
- You can do that through JavaScript editor of
349
- Here you can define new JavaScript functions, which can be applied to the contact form. Three empty event functions are included:
350
- * before_load(): before the contact form is loaded
351
- * before_submit(): before the contact form is submitted
352
- * before_reset(): before the contact form is reset
353
 
354
- = Can I edit the text in submission email? =
355
 
356
- You can do this from Form Options > Email Options of your contact form.
357
 
358
- **For Administrator**
359
 
360
- Here you can add custom texts, images, and custom HTML to the e-mail message that is sent to the administrator, as well as choose which fields of the submitted contact form are included in the e-mail (set to ‘all’ by default).
361
 
362
- **For User**
363
 
364
- Here you can add custom texts, images, and custom HTML to the e-mail message that is sent to the users, as well as choose which fields of the submitted contact form are included in the e-mail (set to ‘all’ by default).
 
365
 
366
- = Can I insert text or HTML into a form? =
367
 
368
- Yes, you can do this using Custom HTML field, which is an HTML editor. You can insert your own HTML content to your WordPress contact form.
369
 
370
- = How can I add a single line text input? =
371
 
372
- You can place Text Input field on your form. At first choose the Field Type according to your preference. There are several options:
373
 
374
- Simple Text: This can be used for typing some text. It has several attributes:
375
 
376
- Field Id, Field Name, Field Label, Field Label Position, Field Size, Value If Empty, Class Name, Required, Allow only unique values, Additional Attributes.
 
 
 
 
 
 
 
 
 
 
 
377
 
378
- = Can I allow users to write hidden text? =
379
 
380
- You can use Password field. This field can be used for adding a password field to your contact form. It has several attributes:
381
 
382
- Field Id, Field Name, Field Label, Field Label Position, Field Size, Class Name, Required, Allow only unique values, Additional Attributes.
383
 
384
- = Is it possible to enter a paragraph text with the form? =
385
 
386
- Text Area field can be used for typing some text. The difference between Text Area and Simple Text is that Simple Text has only one row while Text Area can have several rows. It has several attributes:
387
 
388
- Field Id, Field Name, Field Label, Field Label Position, Field Size, Value If Empty, Class Name, Required, Allow only unique values, Additional Attributes.
389
 
390
- = Can I let users provide their names? =
391
 
392
- Name field can be used for typing a name. Default field labels can be edited clicking on the field label and typing in a custom label. It has several attributes:
393
 
394
- Field Id, Field Name, Field Label, Field Label Position, Value If Empty, Field Size, Name Format, Class Name, Required, Allow only unique values, Additional Attributes.
395
 
396
- = How can I ask the submitter to provide address? =
397
 
398
- Address field can be used for adding an address. Default field labels can be edited clicking on the label and typing in a custom label. It has several attributes:
399
 
400
- Field Id, Field Name, Field Label, Field Label Position, Overall Size, Class Name, Disable Fields, Required, Additional Attributes
401
 
402
- Alternatively, you can use Address (Mark on Map). This filed can be used for adding an address by directly marking it on the map. It has several attributes:
403
 
404
- Field Label, Field Label Position, Default Location, Map Size, Marker Info, Class Name, Additional Attributes.
405
 
406
- = Is there a field with email validation? =
407
 
408
- E-mail field can be used for typing the submitter’s e-mail. The submitted e-mail validation is checked. It has several attributes:
409
 
410
- Field Id, Field Name, Field Label, Field Label Position, Field Size, Value If Empty, Class Name, Send mail to submitter, Required, Allow only unique values, Additional Attributes.
411
 
412
- = Can the contact form have a phone number field? =
413
 
414
- Phone field can be used to provide a phone number. Default field labels can be edited clicking on the label and typing in a custom label. It has several attributes:
415
 
416
- Field Id, Field Name, Field Label, Field Label Position, Value If Empty, Field Size, Class Name, Required, Allow only unique values, Additional Attributes.
417
 
418
- = Is it possible to place a field hidden from users? =
419
 
420
- You can use Hidden Field of Contact Form Maker. This field can be used to store additional information that does not need to be displayed. It has several attributes:
421
 
422
- Field ld, Field Name, Field Value, Additional Attributes.
423
 
424
- = Is it possible to allow users upload files through forms? =
425
 
426
- To add a file upload field, you need to purchase the [Premium version of Contact Form Maker plugin](https://web-dorado.com/products/wordpress-contact-form-maker-plugin.html). This field can be used for uploading a file. The size of the uploaded file can be limited by setting the value of Maximum Size attribute in KB. The upload folder can be mentioned by setting the Destination attribute. Only files with extensions listed in Allowed file extensions attribute can be uploaded.
427
 
428
- The field has several attributes: Field Id, Field Name, Field Label, Field Label Position, Class Name, Required, Additional Attributes.
429
 
430
- = What should I do to avoid spam submissions? =
431
 
432
- Contact Form Maker plugin provides the following two spam protection features.
433
 
434
- **Captcha**
435
 
436
- This field can be used for the ensuring that the submission is generated by a person. Choose the Field Type according to your preference. There are several options:
437
 
438
- * Simple Captcha. The number of randomly generated symbols can be set by the value of Captcha size attribute. The field has several attributes: Field Id, Field Name, Field Label, Field Label Position, Class Name, Additional Attributes.
439
- * Recaptcha This is an alternative option for Captcha that uses Public and Private Keys. You will need to create reCaptcha keys with the help of a dedicated tool.The tool can be found on https://www.google.com/recaptcha/admin/create.
440
 
441
- = How can I separate the form into pages? =
442
 
443
- You need to place Page Break field on your form. This can be used to break the contact form into distinct pages. Use Page Title to provide a title for the given page.
444
 
445
- Furthermore, the following parameters of the "Next" and "Previous" navigation buttons can be customized:
446
- Type, Name, Class Name, Check the required fields , Additional Attributes.
447
 
448
- = Can the form have multiple sections? =
449
 
450
- Yes, you can do that by adding Section Break fields to your form. This option allows adding a section break to the contact form page.
451
 
452
- = Is it possible to display a map on the form? =
453
 
454
- Map field can be used for pointing out some position on the map. The position of the marker is fixed at the front end. Multiple locations can be selected by clicking the + button.
 
 
 
 
455
 
456
- The field has several attributes:
457
- Location, Map Size, Marker Info, Class Name, Additional Attributes.
458
 
459
- = What buttons can I use the form? =
460
 
461
- Contact Form Maker provides the following types of buttons.
462
 
463
- **Submit Button**
464
 
465
- Choose the Field Type according to your preference. There are several options:
466
 
467
- **Submit and Reset:** This field can be used for inserting a submit/reset button into the contact form. You can display reset button by checking the box called Display reset button. Type the name of the submit and reset buttons in Submit button label and Reset button label.
468
 
469
- The field also has several attributes: Class Name and Additional Attributes.
470
 
471
- **Custom**
472
 
473
- This field can be used for inserting custom buttons into the contact form. Type the name of each button in button name field. You can define click functions for each button. The field also has several attributes: Class Name and Additional Attributes.
474
 
475
- = How can I publish the created contact form? =
476
 
477
- To insert a contact form into a Page or a Post.
478
 
479
- Press the button named Insert Contact Form Maker in a post or a page you want to show the contact form.
480
- Select a contact form from the list.
481
 
482
- Save the page or the post.
483
 
484
- Alternatively, you can use Contact Form Maker without the button on the toolbar: Add the shortcode [wd_contact_form id="N"] (where N is the id of the contact form, for the contact form with id=2, the shortcode must be [wd_contact_form id="2"]) to the pages and posts, where you want the contact form to appear.
485
-
486
- = Where can I find the submissions of the contact form? =
487
-
488
- On the left menu select Contact Form Maker > Submissions
 
 
489
 
490
- In order to manage a contact form's submissions, select the contact form from the list.
491
 
492
- For each contact form certain types of statistical data are available:
493
- * Entries: The number of submitted contact forms.
494
- * Views: The number of times the contact form has been viewed.
495
- * Conversion Rate: The percentage of submitted contact forms to the overall number of views.
496
 
497
- There is a possibility to search the submissions database by all the relevant fields of the given contact form. Submissions can be sorted by any of the fields of the contact form by clicking the labels.
498
 
499
- You can delete any of submissions by selecting them and pressing the "Delete" button on the top of the page.
 
500
 
501
- It is also possible to edit the submissions by clicking "Edit" on the particular submission.
502
 
503
- You can add/remove any column of the submissions by "Add/Remove Columns" button.
504
 
505
- The submissions can be exported to the CSV and XML formats.
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: 3.4
5
  Tested up to: 4.9
6
+ Stable tag: 1.12.20
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
11
 
12
  == Description ==
13
 
14
+ Create simple contact forms or complex applications with this FREE and intuitive WordPress plugin. No coding knowledge is required.
15
 
16
  [Special Offer for all Premium Plugins](https://web-dorado.com/wordpress-plugins-bundle.html)
17
 
18
 
19
  [WordPress Contact Form Maker](http://web-dorado.com/products/wordpress-contact-form-maker-plugin.html)
20
 
21
+ WordPress Contact Form Maker is a simple form creator plugin, which allows the user with no knowledge of programming to create and edit different type of responsive website forms. The product is similar to the WordPress Form Maker using most of its functionality, whereas there are also some differences. If want to build advanced forms with various field types like Date, Time, Single choice, Multiple choice, etc., then you can use [WordPress Form Builder](http://wordpress.org/extend/plugins/form-maker).
22
 
23
+ The number of fields for the WordPress forms builder plugin is unlimited. You can add different types of fields, including inputs (e.g. e-mail, password, text area, text input and etc.), Captcha (as well as possibility of adding Google standard ReCaptcha), custom and standard buttons, as well as Map field.
24
 
25
+ This WordPress free form builder uses simple and easy to manage backend interface, thus the users who are not able to make code-level changes, will be able to make customization and changes using parameters. The drag and drop form builder allows you to choose from a number of options to get just the features you need. From simple one line form to a more complex email form for the site or conditional mailing form - the free responsive form builder is a perfect solution for every website.
26
 
27
  The dynamic web form builder allows you to view and manage all form submissions. The WP form plugin stores submissions in your database for future reference.
28
 
29
+ This plugin will equally fit the needs of the novice and experienced developers and designers.
30
 
31
  ###Features
32
+
33
+ * Intuitive tools
34
  * Custom HTML between the fields
 
 
 
35
  * Custom email messages for admin and users
36
  * Detailed parameters for each field type
37
+ * Data validation before submission
38
  * Conditional logic
39
+ * Drag and Drop feature to re-order fields
40
+ * Pagination
41
+ * Section breaks
42
 
43
+ Please note, that if you're looking to add more complex, custom online forms with more field types, File upload field, Stripe and PayPal integrations, and many other premium features, you can use [Contact Form Maker premium plugin](https://web-dorado.com/products/wordpress-contact-form-maker-plugin.html), which is a more advanced tool.
44
 
45
+ Contact Form Maker WordPress plugin comes with pre-built templates, but in case you need custom forms, feel free to create your own from scratch. The form creation process with the plugin is quick and easy.
46
 
47
+ This WordPress plugin is a must have free form builder for any website. It allows you to share contact info like address, email, phone, etc., but also allows you to add email fields, making it possible for your users to leave their feedback and comments directly through email submit forms. Try this WordPress plugin today and create web forms free and easy!
48
 
49
+ ###IMPORTANT: If you think you found a bug or have any problem or question concerning the plugin, do not hesitate to contact us at [info@web-dorado.com](mailto:info@web-dorado.com).
50
 
51
  == Installation ==
52
 
62
  6.If the installation does not succeed, please contact us at [info@web-dorado.com](mailto:info@web-dorado.com).
63
 
64
  == Screenshots ==
65
+ 1. Sample RSVP
66
+ 2. Sample contact form
67
+ 3. Manage contact forms
68
+ 4. Creating a new conact contact form
69
+ 5. Text input field type
70
+ 6. Captcha field type
71
+ 7. Manage submissions
72
+ 8. Select Columns
73
 
74
  == Changelog ==
75
 
76
+ = 1.12.20 =
77
+ * Improved: Editing empty mini labels.
78
+ * Fixed: Submissions CSV export.
79
+
80
+ = 1.12.19 =
81
+ * Fixed: Submissions table view for long texts.
82
+ * Fixed: Displaying phone field value in email notification.
83
+ * Fixed: Bug on deleting a Page break.
84
+
85
  = 1.12.18 =
86
  * Changed: improved Form Submissions view: added tooltips for long labels of form fields.
87
  * Added: detailed descriptions of form fields inside the form editor
311
 
312
  == Frequently Asked Questions ==
313
 
314
+ = What can I achieve with this form creator tool? =
315
 
316
+ **Contact Form Maker** is a modern and intuitive forms builder plugin developed for WordPress. It lets you create personalized, perfect-looking responsive application forms with its elegant drag and drop interface.
 
 
317
 
318
+ You can create web forms free of additional coding, with just a few clicks. The functionality of Contact Form Maker is excellent for any kind of online questionnaires. Use the intuitive form editor provided by the plugin to build advanced forms.
319
 
320
+ This contact form builder can be used for creating multiple types of website forms, including contact forms, email forms, evaluation form, application forms, quizzes/tests or survey forms, online order forms and etc. Contact Form Maker includes various types of fields which can be modified and/or edited.
321
 
322
+ Whether you are a WordPress beginner or a web guru, this contact form plugin is the perfect choice. The dynamic web form builder plugin comes with clean visual tools and options, and you do not need to have any web development skills to build a form.
323
 
324
+ = How can I create website forms with Contact Form Maker? =
325
 
326
+ Navigate to **Contact Form Maker > Forms** page to build your very first form. This contact form creator plugin provides a few sample forms, which you can quickly edit and publish.
327
 
328
+ Using **Contact Form Maker > Forms** page, you can manage existing forms, perform **Bulk Actions,** such as **Publish, Unpublish, Duplicate** or **Delete.** Select the necessary form, choose the bulk action, then press **Apply.** Also, you can search for your form by writing its title in the top **Search** input.
329
 
330
+ Press **Add New** button from **Forms** page, and you will be redirected to **Form Editor** page. Make sure to write a **Title** for this form, then choose the **Theme** which sets the appearance of your form. In case you wish to display the form with the same style as your website theme, select **Inherit From Website Theme** option from **Theme** select box.
331
 
332
+ To add a new field with this application form creator, drag **New Field** button to the area where you wish to place the field. The field editor toolbox of Contact Form Maker will be opened automatically. Click on the field set from which you are going to choose the form field, for instance, **User Info Fields.** Press **Name** button from this field set to add a Name input to your form. Then click **Add** and the field will be placed to the area of the form you selected initially.
333
 
334
+ It is also possible to search among the form builder fields when adding a new field to your form. Use **Filter** input at the top left corner of fields toolbox. For example, you can search "phone" and all Phone fields will be filtered.
335
 
336
+ = Can I add a custom header with text and image above my form? =
337
 
338
+ This dynamic form builder lets you have a nice header section on your forms, which can contain additional content, as well as images with animations. Click on **Form Header** bar of your form to open its toolbox and provide a **Title.** This is the form heading, which will appear above your form. In addition, you can write a **Description** to appear right below the Title of your form. This comes handy, in case you need to write an introduction for your form.
 
 
 
 
339
 
340
+ You can also have an image on your form header and set it to appear with an animation effect. Press **Add Image** button to upload and select a picture from **WordPress Media Library.** Then choose the animation effect using Image Animation option.
341
 
342
+ In case you don’t want the **Header Image** of your forms to appear on smartphones and tablets, mark **Hide Image on Mobile** option as checked.
343
 
344
+ Make sure to **Publish/Update** the form to save the change you made.
 
 
 
 
345
 
346
+ = Does Contact Form Maker support conditional logic and how can I use it? =
347
 
348
+ Yes, another fantastic feature of this custom form creator plugin is its **Conditional Fields.** This lets you **show** or **hide** fields of your form based on certain selections submitter makes.
 
 
 
 
349
 
350
+ The structure of conditional fields in this contact form generator is the following: You can specify and/or show/hide a field, when condition is true and provide conditions below, e.g. Show "How many visitors will you have" if "Will you have visitors" is "Yes".
351
 
352
+ Go to **Form Options** of your form, then click **Conditional Fields** tab to start the setup. Press **Add Condition** button to configure the first condition of your form.
353
 
354
+ **Show/Hide** select box of this form builder plugin represents the action which will be completed, if all or any of the condition statements are fulfilled. Use the second drop-down menu to select the advanced form builder field which will be shown or hidden.
355
 
356
+ Click the little **Plus (+)** icon to add the statement of your form condition.
357
 
358
+ For example, let’s assume there is a **Single Line Text** field on your form titled **Inquiry type.** And you wish to show **Message** field in case users write **Support Request** as the type of their inquiry. The condition you configure needs to have the following logic:
359
 
360
+ *Show [Message] if [all] of the following match:*
361
+ *[Inquiry type] is [Support request]*
362
 
363
+ Make sure to hit **Update** after setting up Conditional Fields on your Contact Form Maker.
364
 
365
+ = What styling options do the forms include? =
366
 
367
+ This secure form builder plugin comes with **14 customizable themes,** which you can use to design your forms. Each theme of Contact Form Maker provides a set of user-friendly options to change font size, alignment of the form, colors, modify paddings and more. You can edit the existing themes, or create your own by clicking **Add New** button.
368
 
369
+ To set a initial default theme for your forms, press on the star icon next to the theme you would like to use. You can always change the theme by editing your forms.
370
 
371
+ Options of Contact Form Maker Themes are divided into the following sections:
372
 
373
+ * Global Parameters
374
+ * Header
375
+ * Content
376
+ * Inputbox
377
+ * Choices (Multiple and Single)
378
+ * General Buttons
379
+ * Pagination
380
+ * Buttons
381
+ * Close (Minimize) Button
382
+ * Minimize Text
383
+ * Other
384
+ * Custom CSS
385
 
386
+ You can preview the design of each form theme under Preview block. In case you created forms with multiple pages, you can change its Pagination Type, setting it to Step, Percentage or None.
387
 
388
+ Custom CSS option in Themes of this advanced form builder lets you write additional CSS code and customize your forms further. All CSS rules apply to this editor. Make sure to press Save after modifying the form theme.
389
 
390
+ = Does Contact Form Maker use auto-respondent feature? =
391
 
392
+ You can use **Email Options** of Contact Form Maker to send a fully customizable letter to the submitter. The entries can be included within the email. Just select the form you want to edit, then navigate to **Form Options &gt; Email Options.**
393
 
394
+ This html5 form builder plugin lets you send submitted information to one or multiple email addresses. Furthermore, you can also send a confirmation email to the submitter and let them know you have received their application.
395
 
396
+ Enable Send E-mail from **Form Options &gt; Email Options** tab and start configuring mailing settings. Most options require the same configuration for Email to Administrator and Email to User on the forms. However, there are a few settings which are unique.
397
 
398
+ **Email to Administrator**
399
 
400
+ This section of Email Options allows you to set up notifications of form submissions for website owners.
401
 
402
+ **Email to User**
403
 
404
+ **Send to.** Use this setting to select the email field of your form, to which the submissions will be sent.
405
 
406
+ Important! In case you do not have an email input created from User Info Fields &gt; Email type on your form, the following error message will appear:
407
 
408
+ &quot;There is no email field&quot;.
409
 
410
+ **Email Verification.** Activate this option, in case you would like the users to verify their email addresses. If it&#39;s enabled, the user email will contain a verification link. Clicking on this link set the user email address as verified.
411
 
412
+ **Verification link expires in.** Use this option to specify a time period (hours), during which the user will be able to verify their email address.
413
 
414
+ **Edit Post.** Click this link to edit the content of Email Verification post. This is the page, where users will be redirected after they click on the verification link in user email.
415
 
416
+ = Can I create an online order form with this plugin? =
417
 
418
+ *Payment fields and options are available in the Premium version of the plugin.*
419
 
420
+ In order to have a functional payment form, first and foremost, you need to have **Payment Fields** added to it. This way, Contact Form Maker plugin will turn into an online order form creator quickly and easily. Build compact shopping forms, hotel reservation, online application or ticket sales forms with this feature.
421
 
422
+ Note: You need to set up **Form Options > Payment Options** of your form in order to receive payments on your account. Follow the steps described on this section to do that.
423
 
424
+ Configuring Payment Options, you can use Contact Form Maker as an order form generator and let users make payments through your form. Default payment gateway of Contact Form Maker is **PayPal.** Select **PayPal** as **Payment Method** from Form **Options &gt; Payment Options** tab and configure corresponding options.
425
 
426
+ Also, you can easily integrate the forms builder plugin with Stripe using its [Stripe Integration add-on](https://web-dorado.com/products/wordpress-form/add-ons/stripe.html).
427
 
428
+ **Payment Currency.** Choose the currency to be used for the payments made through your form. Note, that the selected currency symbol will only display on the front-end of the published form.
429
 
430
+ **Tax (%).** Specify the percentage of the tax for your payment form. It will be calculated from the total payment amount of your form, and will be added to the grand total.
431
 
432
+ **Checkout Mode.** Select the checkout mode for your form. Testmode will display PayPal Sandbox after submission, which allows you to run payment tests. When you are ready to receive payments, enable Production mode.
433
 
434
+ **Paypal email.** Provide the email address of a valid PayPal account. This account will be used as the recipient of payments through your form.
435
 
436
+ = Where can I check the submissions of my forms? =
437
 
438
+ **Submissions** page of this HTML form generator plugin lets you view the full record of submissions of each form. Choose your form from **Select a form** drop-down box to display its submitted information. Furthermore, you are able to view **Statistics** of **Single/Multiple Choice** and **Select Box** fields.
439
 
440
+ **Entries / Conversion Rate / Views.** These attributes of **Submissions** page will help you quickly view the statistics of the selected form.
441
 
442
+ **Export to CSV / Export to XML.** You are able to download all submissions of each form in **CSV** or **XML** format by clicking on these buttons.
443
 
444
+ **Show Filters.** Contact Form Maker lets you filter form submissions by values provided by user, e.g. submitter’s email address, name and more. Press **Show Filters** button on form submissions, write the values you wish to search with, then press **Search.** Click **Reset** button to clear the filters.
445
 
446
+ **Add/Remove Columns.** This button will help you customize the columns which display in submissions of the selected form. Click on the button and unmark the columns you wish to hide.
 
447
 
448
+ *Note: Adding/Removing columns does not delete columns from the submissions table of your forms. It just hides them until you activate them again.*
449
 
450
+ **Block IPs / Unblock IPs.** In case you are receiving spam submissions from certain IP addresses, you can block these addresses. Mark all spam submissions as checked, choose **Block IPs** option from **Bulk Actions** and press **Apply.** You are able to unblock these IP addresses anytime.
451
 
452
+ **Delete.** If you wish to remove some or all submissions of a form, mark them as checked and select **Delete** option from **Bulk Actions.** Clicking **Apply** will delete these entries permanently.
 
453
 
454
+ = Can user be redirected to another page after submitting the form? =
455
 
456
+ Contact Form Maker plugin allows you to configure different actions which occur after form submission. For instance, you can display a &quot;Thank you&quot; message after users submit the form, or redirect them to another page, or more.
457
 
458
+ Navigate to Form Options &gt; Actions After Submissions tab, and select one of the options below to set up the action that occurs after users submit your form.
459
 
460
+ * **Stay on Form.** This action will reload the form page and keep the submitter on the same page.
461
+ * **Post.** Select this option to redirect users to a specific post after they hit Submit. You will then be able to select the post from Post dropdown menu.
462
+ * **Page.** You can also redirect users to a selected page. Choose this option and specify the destination using Page dropdown menu.
463
+ * **Custom text.** Use this action in case you wish to display a &quot;Thank you&quot; message after users submit the form. The editor box accepts text, basic HTML, as well as values of form fields. Include them to the content by pressing on the top buttons indicating form fields.
464
+ * **URL.** Configure redirection from your forms to any page with this action after submission. Mark URL option, then provide the absolute path of the link to the input that appears.
465
 
466
+ = What verification methods does Contact Form Maker use? =
 
467
 
468
+ Contact Form Maker uses modern verification methods, such as ReCaptcha and invisible ReCaptcha. Please note that will need to obtain ReCaptcha keys to use these options. Otherwise you can use Simple Captcha and Arithmetical Captcha which use standard word verification and arithmetical expressions respectively.
469
 
470
+ = Can I use Contact Form Maker as a registration form creator? =
471
 
472
+ You can register users on your website with the help of Contact Form Maker [WordPress Registration add-on](https://web-dorado.com/products/wordpress-form/add-ons/registration.html). Install the add on and use it alongside the free version of Contact Form Maker plugin.
473
 
474
+ You are able to ask users to provide username, email address and password for their account. The registration of users is done upon completing the form created by this visual form builder plugin.
475
 
476
+ = Is it possible to publish a form as a widget? =
477
 
478
+ You can publish your form not only using **Display Options** of this web form builder plugin, but also as a widget. Go to **Appearance > Widgets** page to place your form on any widget area of your website theme.
479
 
480
+ Search for **Contact Form Maker widget** and drag it to the widget area where you wish to place your form. Specify a **Title** for the widget and choose the form you wish to publish. Press **Save** after making these changes.
481
 
482
+ = Can the form submissions be shown to site visitors? =
483
 
484
+ **Premium version** of Contact Form Maker plugin allows you to publish submissions on front-end of your website.
485
 
486
+ This form creator plugin lets you select user roles which will be able to view the published submissions. This can be done from **Form Options > General Options** section. Also, in the same section, you are able to choose fields to hide from front-end submissions.
487
 
488
+ Firstly, add/edit the page or post, where you wish to publish the submissions of form. Then press **Add Submission** button from the top of the post editor.
 
489
 
490
+ **Select a Form.** Use this drop-down to choose the form, submissions of which you would like to publish.
491
 
492
+ **Select Date Range.** You can display form submissions from a specific date range. Use this option to select **From** and **To** dates.
493
+
494
+ **Select fields.** Use this option to choose which columns to show on the form. Uncheck the options, which you need to hide on front-end submissions.
495
+
496
+ **Export to / Show.** These two settings are responsible for showing the rest of the attributes of front-end submissions. You can enable/disable **CSV/XML** export buttons, **Statistics, Views, Conversion Rate** and other additional information.
497
+
498
+ After configuring all necessary options, press **Insert.** Publish your page with form submissions, and you will be able to view them on front-end.
499
 
500
+ = Can I let users choose between PayPal or offline payments when submitting the form? =
501
 
502
+ **Premium version** of this handy forms plugin has the features and functions to achieve this. You need to use **Conditional Fields** and **Payment Fields** of the plugin. Here are the necessary steps.
 
 
 
503
 
504
+ Firstly, add one **Single Choice** field from **Basic Fields** of Contact Form Maker plugin. It should contain the following two options:
505
 
506
+ * Pay with PayPal
507
+ * Pay offline
508
 
509
+ Afterwards, add two sets of almost identical fields, one of them created with regular form fields, second - with **Payment fields.**
510
 
511
+ Then you can set conditions from **Form Options > Conditional Fields,** if the user chooses PayPal, payment fields will appear, otherwise, regular fields will.
512
 
513
+ The user will not be redirected to PayPal if they make their selections using regular form fields.