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

Version Description

  • Improved: Email functionality.
  • Fixed: Multiple choice and single choice with long labels.
  • Fixed: Submissions CSV export with UTF-8 encoding.
Download this release

Release Info

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

Code changes from version 1.12.13 to 1.12.16

admin/controllers/Checkpaypal.php CHANGED
@@ -161,15 +161,19 @@ class FMControllerCheckpaypal {
161
  }
162
  // Get form session by group id.
163
  $form_session = $this->model->get_form_session_by_group_id($group_id);
164
- // Send mail to payer
165
- if ( $form->mail && !empty($form_session) ) {
166
- $to = $form->mail;
167
- $subject = "Payment information";
168
- // Get template for payment information.
169
- $template_params = array( 'form_session' => $form_session, 'data' => $post );
170
- $message = $this->view->payment_information_template($template_params);
171
- add_filter('wp_mail_content_type', create_function('', 'return "text/html";'));
172
- wp_mail($to, $subject, $message);
 
 
 
 
173
  }
174
 
175
  return 0;
161
  }
162
  // Get form session by group id.
163
  $form_session = $this->model->get_form_session_by_group_id($group_id);
164
+ // Send mail to payer.
165
+ if ( !empty($form_session) ) {
166
+ $recipient = $form->mail ? $form->mail : '';
167
+ if ( $recipient ) {
168
+ $subject = __("Payment information", WDFM()->prefix);
169
+ // Get template for payment information.
170
+ $template_params = array( 'form_session' => $form_session, 'data' => $post );
171
+ $message = $this->view->payment_information_template($template_params);
172
+ $header_arr = array();
173
+ $header_arr['content_type'] = "text/html";
174
+ $header_arr['charset'] = 'charset=UTF-8';
175
+ WDW_FM_Library::mail($recipient, $subject, $message, $header_arr);
176
+ }
177
  }
178
 
179
  return 0;
admin/controllers/Generete_csv.php CHANGED
@@ -60,9 +60,13 @@ class FMControllerGenerete_csv {
60
  $txtfilecontent = fread($txtfile, filesize($tempfile));
61
  fclose($txtfile);
62
  $filename = $title . "_" . date('Ymd') . ".csv";
63
- header('Content-Encoding: Windows-1252');
64
- header('Content-type: text/csv; charset=Windows-1252');
 
 
65
  header("Content-Disposition: attachment; filename=\"$filename\"");
 
 
66
  echo $txtfilecontent;
67
  unlink($tempfile);
68
  }
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
  }
admin/controllers/Manage_fm.php CHANGED
@@ -377,10 +377,10 @@ class FMControllerManage_fm {
377
 
378
  $params = array();
379
  $params['id'] = $id;
380
- $params['row'] = $this->model->get_row_data_new($backup_id);
381
- if ( empty($params['row']) ) {
382
- WDW_FM_Library::fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display'), admin_url('admin.php') ) );
383
- }
384
 
385
  // Check stripe add-on is active.
386
  $stripe_addon = array( 'enable' => 0 );
@@ -646,6 +646,9 @@ function before_reset() {
646
  $reply_to = stripslashes(WDW_FM_Library::get('reply_to_other', ''));
647
  }
648
  $script_mail = WDW_FM_Library::get('script_mail', '%all%', FALSE);
 
 
 
649
  $mail_from_user = WDW_FM_Library::get('mail_from_user', '');
650
  $mail_from_name_user = WDW_FM_Library::get('mail_from_name_user', '');
651
  $reply_to_user = WDW_FM_Library::get('reply_to_user', '');
@@ -661,6 +664,9 @@ function before_reset() {
661
  $mail_attachment = WDW_FM_Library::get('mail_attachment', '');
662
  $mail_attachment_user = WDW_FM_Library::get('mail_attachment_user', '');
663
  $script_mail_user = WDW_FM_Library::get('script_mail_user', '%all%', FALSE);
 
 
 
664
  $submit_text = WDW_FM_Library::get('submit_text', '', FALSE);
665
  $url = WDW_FM_Library::get('url', '');
666
  $tax = WDW_FM_Library::get('tax', 0);
@@ -752,7 +758,7 @@ function before_reset() {
752
  'payment_currency' => $payment_currency,
753
  'paypal_email' => $paypal_email,
754
  'checkout_mode' => $checkout_mode,
755
- 'paypal_mode' => $paypal_mode,
756
  'javascript' => $javascript,
757
  'user_id_wd' => $user_id_wd,
758
  'send_to' => $send_to,
377
 
378
  $params = array();
379
  $params['id'] = $id;
380
+ $params['row'] = $this->model->get_row_data_new($backup_id);
381
+ if ( empty($params['row']) ) {
382
+ WDW_FM_Library::fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display'), admin_url('admin.php') ) );
383
+ }
384
 
385
  // Check stripe add-on is active.
386
  $stripe_addon = array( 'enable' => 0 );
646
  $reply_to = stripslashes(WDW_FM_Library::get('reply_to_other', ''));
647
  }
648
  $script_mail = WDW_FM_Library::get('script_mail', '%all%', FALSE);
649
+ if ( $script_mail == '' ) {
650
+ $script_mail = '%all%';
651
+ }
652
  $mail_from_user = WDW_FM_Library::get('mail_from_user', '');
653
  $mail_from_name_user = WDW_FM_Library::get('mail_from_name_user', '');
654
  $reply_to_user = WDW_FM_Library::get('reply_to_user', '');
664
  $mail_attachment = WDW_FM_Library::get('mail_attachment', '');
665
  $mail_attachment_user = WDW_FM_Library::get('mail_attachment_user', '');
666
  $script_mail_user = WDW_FM_Library::get('script_mail_user', '%all%', FALSE);
667
+ if ( $script_mail_user == '' ) {
668
+ $script_mail_user = '%all%';
669
+ }
670
  $submit_text = WDW_FM_Library::get('submit_text', '', FALSE);
671
  $url = WDW_FM_Library::get('url', '');
672
  $tax = WDW_FM_Library::get('tax', 0);
758
  'payment_currency' => $payment_currency,
759
  'paypal_email' => $paypal_email,
760
  'checkout_mode' => $checkout_mode,
761
+ 'paypal_mode' => $paypal_mode,
762
  'javascript' => $javascript,
763
  'user_id_wd' => $user_id_wd,
764
  'send_to' => $send_to,
admin/views/Manage_fm.php CHANGED
@@ -228,7 +228,12 @@ class FMViewManage_fm extends FMAdminView {
228
  wp_enqueue_script('jquery-ui-slider');
229
  wp_enqueue_script('jquery-ui-spinner');
230
  wp_enqueue_script('jquery-ui-datepicker');
231
- wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library::localize_ui_datepicker());
 
 
 
 
 
232
  wp_enqueue_media();
233
  wp_enqueue_script('google-maps');
234
  wp_enqueue_script('fm-gmap_form');
@@ -666,7 +671,12 @@ class FMViewManage_fm extends FMAdminView {
666
  wp_enqueue_script('jquery-ui-slider');
667
  wp_enqueue_script('jquery-ui-spinner');
668
  wp_enqueue_script('jquery-ui-datepicker');
669
- wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library::localize_ui_datepicker());
 
 
 
 
 
670
  wp_enqueue_media();
671
  wp_enqueue_script('google-maps');
672
  wp_enqueue_script('fm-form-options');
@@ -922,7 +932,6 @@ $stats_labels = $params['stats_labels'];
922
  </div>
923
  </div>
924
  </div>
925
-
926
  <div id="emailTab_fieldset" class="adminform fm_fieldset_deactive js">
927
  <div class="wd-table">
928
  <div class="wd-table-col wd-table-col-100">
@@ -934,13 +943,15 @@ $stats_labels = $params['stats_labels'];
934
  <label class="wd-label-radio" for="fm_sendemail-1"><?php _e('Yes', WDFM()->prefix); ?></label>
935
  <input type="radio" name="sendemail" <?php echo $row->sendemail == 0 ? 'checked="checked"' : '' ?> id="fm_sendemail-0" class="wd-radio" value="0" onchange="fm_toggle_email_options(false)" />
936
  <label class="wd-label-radio" for="fm_sendemail-0"><?php _e('No', WDFM()->prefix); ?></label>
 
 
937
  </div>
938
  </div>
939
  </div>
940
  </div>
941
  </div>
942
  <div class="fm-clear"></div>
943
- <div class="wd-table meta-box-sortables" id="fm_email_options">
944
  <div class="wd-table-col wd-table-col-50 wd-table-col-left">
945
  <div class="wd-box-section">
946
  <div class="wd-box-title">
@@ -966,6 +977,7 @@ $stats_labels = $params['stats_labels'];
966
  }
967
  ?>
968
  </div>
 
969
  </div>
970
  <div class="wd-group">
971
  <label class="wd-label" for="mail_subject"><?php _e('Subject', WDFM()->prefix); ?></label>
@@ -991,6 +1003,7 @@ $stats_labels = $params['stats_labels'];
991
  echo "<a onClick=\"insertAtCursor(" . $choise . ",'username'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Username</a>";
992
  echo '</div></div>';
993
  ?>
 
994
  </div>
995
  <div class="wd-group">
996
  <label class="wd-label" for="script_mail"><?php _e('Custom Text in Email For Administrator', WDFM()->prefix); ?></label>
@@ -1042,6 +1055,7 @@ $stats_labels = $params['stats_labels'];
1042
  <?php
1043
  }
1044
  ?>
 
1045
  </div>
1046
  <div class="postbox closed">
1047
  <button class="button-link handlediv" type="button" aria-expanded="true">
@@ -1078,6 +1092,7 @@ $stats_labels = $params['stats_labels'];
1078
  <p style="display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="mail_from_other_wrap">
1079
  <input type="text" name="mail_from_other" id="mail_from_other" value="<?php echo ($is_other) ? $row->from_mail : ''; ?>" />
1080
  </p>
 
1081
  </div>
1082
  <div class="wd-group">
1083
  <label class="wd-label" for="from_name"><?php _e('From Name', WDFM()->prefix); ?></label>
@@ -1106,6 +1121,7 @@ $stats_labels = $params['stats_labels'];
1106
  ?>
1107
  </div>
1108
  </div>
 
1109
  </div>
1110
  <div class="wd-group">
1111
  <label class="wd-label" for="from_name"><?php _e('Reply to (if different from "Email From")', WDFM()->prefix); ?></label>
@@ -1133,14 +1149,17 @@ $stats_labels = $params['stats_labels'];
1133
  <p style="display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="reply_to_other_wrap">
1134
  <input type="text" name="reply_to_other" value="<?php echo ($is_other && $row->reply_to) ? $row->reply_to : ''; ?>" id="reply_to_other" />
1135
  </p>
 
1136
  </div>
1137
  <div class="wd-group">
1138
  <label class="wd-label" for="mail_cc"><?php _e('CC', WDFM()->prefix); ?></label>
1139
  <input type="text" id="mail_cc" name="mail_cc" value="<?php echo $row->mail_cc ?>" />
 
1140
  </div>
1141
  <div class="wd-group">
1142
  <label class="wd-label" for="mail_bcc"><?php _e('BCC', WDFM()->prefix); ?></label>
1143
  <input type="text" id="mail_bcc" name="mail_bcc" value="<?php echo $row->mail_bcc ?>" />
 
1144
  </div>
1145
  <div class="wd-group">
1146
  <label class="wd-label"><?php _e('Mode', WDFM()->prefix); ?></label>
@@ -1148,6 +1167,7 @@ $stats_labels = $params['stats_labels'];
1148
  <label class="wd-label-radio" for="fm_mo_mail_mode-1"><?php _e('HTML', WDFM()->prefix); ?></label>
1149
  <input type="radio" name="mail_mode" <?php echo $row->mail_mode == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_mode-0" class="wd-radio" value="0">
1150
  <label class="wd-label-radio" for="fm_mo_mail_mode-0"><?php _e('Text', WDFM()->prefix); ?></label>
 
1151
  </div>
1152
  <div class="wd-group">
1153
  <label class="wd-label"><?php _e('Attach File', WDFM()->prefix); ?></label>
@@ -1155,6 +1175,7 @@ $stats_labels = $params['stats_labels'];
1155
  <label class="wd-label-radio" for="fm_mo_mail_attachment-1"><?php _e('Yes', WDFM()->prefix); ?></label>
1156
  <input type="radio" name="mail_attachment" <?php echo $row->mail_attachment == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_attachment-0" class="wd-radio" value="0">
1157
  <label class="wd-label-radio" for="fm_mo_mail_attachment-0"><?php _e('No', WDFM()->prefix); ?></label>
 
1158
  </div>
1159
  <div class="wd-group">
1160
  <label class="wd-label"><?php _e('Email empty fields', WDFM()->prefix); ?></label>
@@ -1162,6 +1183,7 @@ $stats_labels = $params['stats_labels'];
1162
  <label class="wd-label-radio" for="fm_mo_mail_emptyfields-1"><?php _e('Yes', WDFM()->prefix); ?></label>
1163
  <input type="radio" name="mail_emptyfields" <?php echo $row->mail_emptyfields == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_emptyfields-0" class="wd-radio" value="0">
1164
  <label class="wd-label-radio" for="fm_mo_mail_emptyfields-0"><?php _e('No', WDFM()->prefix); ?></label>
 
1165
  </div>
1166
  </div>
1167
  </div>
@@ -1193,6 +1215,7 @@ $stats_labels = $params['stats_labels'];
1193
  }
1194
  }
1195
  ?>
 
1196
  </div>
1197
  <div class="wd-group">
1198
  <label class="wd-label" for="mail_subject_user"><?php _e('Subject', WDFM()->prefix); ?></label>
@@ -1220,6 +1243,7 @@ $stats_labels = $params['stats_labels'];
1220
  ?>
1221
  </div>
1222
  </div>
 
1223
  </div>
1224
  <div class="wd-group">
1225
  <label class="wd-label" for="script_mail_user"><?php _e('Custom Text in Email For User', WDFM()->prefix); ?></label>
@@ -1272,6 +1296,7 @@ $stats_labels = $params['stats_labels'];
1272
  <?php
1273
  }
1274
  ?>
 
1275
  </div>
1276
  <div class="postbox closed">
1277
  <button class="button-link handlediv" type="button" aria-expanded="true">
@@ -1285,6 +1310,7 @@ $stats_labels = $params['stats_labels'];
1285
  <div class="wd-group">
1286
  <label class="wd-label" for="mail_from_user"><?php _e('Email From', WDFM()->prefix); ?></label>
1287
  <input type="text" id="mail_from_user" name="mail_from_user" value="<?php echo $row->mail_from_user; ?>" />
 
1288
  </div>
1289
  <div class="wd-group">
1290
  <label class="wd-label" for="mail_from_name_user"><?php _e('From Name', WDFM()->prefix); ?></label>
@@ -1312,18 +1338,22 @@ $stats_labels = $params['stats_labels'];
1312
  ?>
1313
  </div>
1314
  </div>
 
1315
  </div>
1316
  <div class="wd-group">
1317
  <label class="wd-label" for="reply_to_user"><?php _e('Reply to (if different from "Email From")', WDFM()->prefix); ?></label>
1318
  <input type="text" name="reply_to_user" value="<?php echo $row->reply_to_user; ?>" id="reply_to_user" />
 
1319
  </div>
1320
  <div class="wd-group">
1321
  <label class="wd-label" for="mail_cc_user"><?php _e('CC', WDFM()->prefix); ?></label>
1322
  <input type="text" name="mail_cc_user" value="<?php echo $row->mail_cc_user ?>" id="mail_cc_user" />
 
1323
  </div>
1324
  <div class="wd-group">
1325
  <label class="wd-label" for="mail_bcc_user"><?php _e('BCC', WDFM()->prefix); ?></label>
1326
  <input type="text" name="mail_bcc_user" value="<?php echo $row->mail_bcc_user ?>" id="mail_bcc_user" />
 
1327
  </div>
1328
  <div class="wd-group">
1329
  <label class="wd-label"><?php _e('Mode', WDFM()->prefix); ?></label>
@@ -1331,6 +1361,7 @@ $stats_labels = $params['stats_labels'];
1331
  <label class="wd-label-radio" for="fm_mo_mail_mode_user-1"><?php _e('HTML', WDFM()->prefix); ?></label>
1332
  <input type="radio" name="mail_mode_user" <?php echo $row->mail_mode_user == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_mode_user-0" class="wd-radio" value="0">
1333
  <label class="wd-label-radio" for="fm_mo_mail_mode_user-0"><?php _e('Text', WDFM()->prefix); ?></label>
 
1334
  </div>
1335
  <div class="wd-group">
1336
  <label class="wd-label"><?php _e('Attach File', WDFM()->prefix); ?></label>
@@ -1338,6 +1369,7 @@ $stats_labels = $params['stats_labels'];
1338
  <label class="wd-label-radio" for="fm_mo_mail_attachment_user-1"><?php _e('Yes', WDFM()->prefix); ?></label>
1339
  <input type="radio" name="mail_attachment_user" <?php echo $row->mail_attachment_user == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_attachment_user-0" class="wd-radio" value="0">
1340
  <label class="wd-label-radio" for="fm_mo_mail_attachment_user-0"><?php _e('No', WDFM()->prefix); ?></label>
 
1341
  </div>
1342
  <div class="wd-group">
1343
  <label class="wd-label"><?php _e('Email verification', WDFM()->prefix); ?></label>
@@ -1345,6 +1377,7 @@ $stats_labels = $params['stats_labels'];
1345
  <label class="wd-label-radio" for="fm_mo_mail_verify-1"><?php _e('Yes', WDFM()->prefix); ?></label>
1346
  <input type="radio" name="mail_verify" <?php echo $row->mail_verify == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_verify-0" onclick="wdhide('expire_link')" class="wd-radio" value="0">
1347
  <label class="wd-label-radio" for="fm_mo_mail_verify-0"><?php _e('No', WDFM()->prefix); ?></label>
 
1348
  </div>
1349
  <div class="wd-group" <?php echo($row->mail_verify == 0 ? 'style="display:none;"' : '') ?> id="expire_link">
1350
  <label class="wd-label" for="mail_verify_expiretime"><?php _e('Verification link expires in', WDFM()->prefix); ?></label>
@@ -1354,6 +1387,7 @@ $stats_labels = $params['stats_labels'];
1354
  'post' => $params["mail_ver_id"],
1355
  'action' => 'edit',
1356
  ), admin_url('post.php')); ?>"><?php _e('Edit post', WDFM()->prefix); ?></a>
 
1357
  </div>
1358
  </div>
1359
  </div>
@@ -1362,7 +1396,6 @@ $stats_labels = $params['stats_labels'];
1362
  </div>
1363
  </div>
1364
  </div>
1365
-
1366
  <div id="actions_fieldset" class="adminform fm_fieldset_deactive">
1367
  <div class="wd-table">
1368
  <div class="wd-table-col-70">
228
  wp_enqueue_script('jquery-ui-slider');
229
  wp_enqueue_script('jquery-ui-spinner');
230
  wp_enqueue_script('jquery-ui-datepicker');
231
+ if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
232
+ wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library::localize_ui_datepicker());
233
+ }
234
+ else {
235
+ echo '<script>' . WDW_FM_Library::localize_ui_datepicker() . '</script>';
236
+ }
237
  wp_enqueue_media();
238
  wp_enqueue_script('google-maps');
239
  wp_enqueue_script('fm-gmap_form');
671
  wp_enqueue_script('jquery-ui-slider');
672
  wp_enqueue_script('jquery-ui-spinner');
673
  wp_enqueue_script('jquery-ui-datepicker');
674
+ if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
675
+ wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library::localize_ui_datepicker());
676
+ }
677
+ else {
678
+ echo '<script>' . WDW_FM_Library::localize_ui_datepicker() . '</script>';
679
+ }
680
  wp_enqueue_media();
681
  wp_enqueue_script('google-maps');
682
  wp_enqueue_script('fm-form-options');
932
  </div>
933
  </div>
934
  </div>
 
935
  <div id="emailTab_fieldset" class="adminform fm_fieldset_deactive js">
936
  <div class="wd-table">
937
  <div class="wd-table-col wd-table-col-100">
943
  <label class="wd-label-radio" for="fm_sendemail-1"><?php _e('Yes', WDFM()->prefix); ?></label>
944
  <input type="radio" name="sendemail" <?php echo $row->sendemail == 0 ? 'checked="checked"' : '' ?> id="fm_sendemail-0" class="wd-radio" value="0" onchange="fm_toggle_email_options(false)" />
945
  <label class="wd-label-radio" for="fm_sendemail-0"><?php _e('No', WDFM()->prefix); ?></label>
946
+ <p class="description"><?php _e('Enable this setting to send submitted information to administrators, as well as the submitter.', WDFM()->prefix); ?></p>
947
+ <p class="description fm_email_options"><?php _e('In case you cannot find the submission email in your Inbox, make sure to check the Spam folder as well.', WDFM()->prefix); ?></p>
948
  </div>
949
  </div>
950
  </div>
951
  </div>
952
  </div>
953
  <div class="fm-clear"></div>
954
+ <div class="wd-table meta-box-sortables fm_email_options" id="fm_email_options">
955
  <div class="wd-table-col wd-table-col-50 wd-table-col-left">
956
  <div class="wd-box-section">
957
  <div class="wd-box-title">
977
  }
978
  ?>
979
  </div>
980
+ <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.', WDFM()->prefix); ?></p>
981
  </div>
982
  <div class="wd-group">
983
  <label class="wd-label" for="mail_subject"><?php _e('Subject', WDFM()->prefix); ?></label>
1003
  echo "<a onClick=\"insertAtCursor(" . $choise . ",'username'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Username</a>";
1004
  echo '</div></div>';
1005
  ?>
1006
+ <p class="description"><?php _e('Add a custom subject for the submission email. Click the Plus (+) button to select a form field, the value of which will be set as the subject. In case it’s left blank, Form Title will be set as the subject of submission emails.', WDFM()->prefix); ?></p>
1007
  </div>
1008
  <div class="wd-group">
1009
  <label class="wd-label" for="script_mail"><?php _e('Custom Text in Email For Administrator', WDFM()->prefix); ?></label>
1055
  <?php
1056
  }
1057
  ?>
1058
+ <p class="description"><?php _e('Write custom content to the email message which is sent to administrator. Include All Fields List to forward all submitted information, or click on fields buttons to use individual field values in the content.', WDFM()->prefix); ?></p>
1059
  </div>
1060
  <div class="postbox closed">
1061
  <button class="button-link handlediv" type="button" aria-expanded="true">
1092
  <p style="display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="mail_from_other_wrap">
1093
  <input type="text" name="mail_from_other" id="mail_from_other" value="<?php echo ($is_other) ? $row->from_mail : ''; ?>" />
1094
  </p>
1095
+ <p class="description"><?php _e('Specify the email address from which the administrator will receive the email.', WDFM()->prefix); ?></p>
1096
  </div>
1097
  <div class="wd-group">
1098
  <label class="wd-label" for="from_name"><?php _e('From Name', WDFM()->prefix); ?></label>
1121
  ?>
1122
  </div>
1123
  </div>
1124
+ <p class="description"><?php _e('Set the name which is shown as the sender’s name in submission or confirmation emails. Press the Plus (+) button to select a field value.', WDFM()->prefix); ?></p>
1125
  </div>
1126
  <div class="wd-group">
1127
  <label class="wd-label" for="from_name"><?php _e('Reply to (if different from "Email From")', WDFM()->prefix); ?></label>
1149
  <p style="display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="reply_to_other_wrap">
1150
  <input type="text" name="reply_to_other" value="<?php echo ($is_other && $row->reply_to) ? $row->reply_to : ''; ?>" id="reply_to_other" />
1151
  </p>
1152
+ <p class="description"><?php _e('Specify an alternative email address, to which the administrator will be able to reply upon receiving the message.', WDFM()->prefix); ?></p>
1153
  </div>
1154
  <div class="wd-group">
1155
  <label class="wd-label" for="mail_cc"><?php _e('CC', WDFM()->prefix); ?></label>
1156
  <input type="text" id="mail_cc" name="mail_cc" value="<?php echo $row->mail_cc ?>" />
1157
+ <p class="description"><?php _e('Provide additional email addresses to send the submission or confirmation email to. The receiver will be able to view all other recipients.', WDFM()->prefix); ?></p>
1158
  </div>
1159
  <div class="wd-group">
1160
  <label class="wd-label" for="mail_bcc"><?php _e('BCC', WDFM()->prefix); ?></label>
1161
  <input type="text" id="mail_bcc" name="mail_bcc" value="<?php echo $row->mail_bcc ?>" />
1162
+ <p class="description"><?php _e('Write additional email addresses to send the submission or confirmation email to. The receiver will not be able to view other recipients.', WDFM()->prefix); ?></p>
1163
  </div>
1164
  <div class="wd-group">
1165
  <label class="wd-label"><?php _e('Mode', WDFM()->prefix); ?></label>
1167
  <label class="wd-label-radio" for="fm_mo_mail_mode-1"><?php _e('HTML', WDFM()->prefix); ?></label>
1168
  <input type="radio" name="mail_mode" <?php echo $row->mail_mode == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_mode-0" class="wd-radio" value="0">
1169
  <label class="wd-label-radio" for="fm_mo_mail_mode-0"><?php _e('Text', WDFM()->prefix); ?></label>
1170
+ <p class="description"><?php _e('Select the layout of the submission email, Text or HTML.', WDFM()->prefix); ?></p>
1171
  </div>
1172
  <div class="wd-group">
1173
  <label class="wd-label"><?php _e('Attach File', WDFM()->prefix); ?></label>
1175
  <label class="wd-label-radio" for="fm_mo_mail_attachment-1"><?php _e('Yes', WDFM()->prefix); ?></label>
1176
  <input type="radio" name="mail_attachment" <?php echo $row->mail_attachment == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_attachment-0" class="wd-radio" value="0">
1177
  <label class="wd-label-radio" for="fm_mo_mail_attachment-0"><?php _e('No', WDFM()->prefix); ?></label>
1178
+ <p class="description"><?php _e('If you have File Upload fields on your form, enable this setting to attach uploaded files to submission or confirmation email.', WDFM()->prefix); ?></p>
1179
  </div>
1180
  <div class="wd-group">
1181
  <label class="wd-label"><?php _e('Email empty fields', WDFM()->prefix); ?></label>
1183
  <label class="wd-label-radio" for="fm_mo_mail_emptyfields-1"><?php _e('Yes', WDFM()->prefix); ?></label>
1184
  <input type="radio" name="mail_emptyfields" <?php echo $row->mail_emptyfields == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_emptyfields-0" class="wd-radio" value="0">
1185
  <label class="wd-label-radio" for="fm_mo_mail_emptyfields-0"><?php _e('No', WDFM()->prefix); ?></label>
1186
+ <p class="description"><?php _e('Disable this setting, in case you do not want to include form fields, which are left empty by the submitter.', WDFM()->prefix); ?></p>
1187
  </div>
1188
  </div>
1189
  </div>
1215
  }
1216
  }
1217
  ?>
1218
+ <p class="description"><?php _e('Use this setting to select the email field of your form, to which the submissions will be sent.', WDFM()->prefix); ?></p>
1219
  </div>
1220
  <div class="wd-group">
1221
  <label class="wd-label" for="mail_subject_user"><?php _e('Subject', WDFM()->prefix); ?></label>
1243
  ?>
1244
  </div>
1245
  </div>
1246
+ <p class="description"><?php _e('Add a custom subject for the submission email. Click the Plus (+) button to select a form field, the value of which will be set as the subject. In case it’s left blank, Form Title will be set as the subject of submission emails.', WDFM()->prefix); ?></p>
1247
  </div>
1248
  <div class="wd-group">
1249
  <label class="wd-label" for="script_mail_user"><?php _e('Custom Text in Email For User', WDFM()->prefix); ?></label>
1296
  <?php
1297
  }
1298
  ?>
1299
+ <p class="description"><?php _e('Write custom content to the email message which is sent to submitter. Include All Fields List to forward all submitted information, or click on fields buttons to use individual field values in the content.', WDFM()->prefix); ?></p>
1300
  </div>
1301
  <div class="postbox closed">
1302
  <button class="button-link handlediv" type="button" aria-expanded="true">
1310
  <div class="wd-group">
1311
  <label class="wd-label" for="mail_from_user"><?php _e('Email From', WDFM()->prefix); ?></label>
1312
  <input type="text" id="mail_from_user" name="mail_from_user" value="<?php echo $row->mail_from_user; ?>" />
1313
+ <p class="description"><?php _e('Specify the email address from which the submitter will receive the email.', WDFM()->prefix); ?></p>
1314
  </div>
1315
  <div class="wd-group">
1316
  <label class="wd-label" for="mail_from_name_user"><?php _e('From Name', WDFM()->prefix); ?></label>
1338
  ?>
1339
  </div>
1340
  </div>
1341
+ <p class="description"><?php _e('Set the name which is shown as the sender’s name in submission or confirmation emails. Press the Plus (+) button to select a field value.', WDFM()->prefix); ?></p>
1342
  </div>
1343
  <div class="wd-group">
1344
  <label class="wd-label" for="reply_to_user"><?php _e('Reply to (if different from "Email From")', WDFM()->prefix); ?></label>
1345
  <input type="text" name="reply_to_user" value="<?php echo $row->reply_to_user; ?>" id="reply_to_user" />
1346
+ <p class="description"><?php _e('Specify an alternative email address, to which the submitter will be able to reply upon receiving the message.', WDFM()->prefix); ?></p>
1347
  </div>
1348
  <div class="wd-group">
1349
  <label class="wd-label" for="mail_cc_user"><?php _e('CC', WDFM()->prefix); ?></label>
1350
  <input type="text" name="mail_cc_user" value="<?php echo $row->mail_cc_user ?>" id="mail_cc_user" />
1351
+ <p class="description"><?php _e('Provide additional email addresses to send the submission or confirmation email to. The receiver will be able to view all other recipients.', WDFM()->prefix); ?></p>
1352
  </div>
1353
  <div class="wd-group">
1354
  <label class="wd-label" for="mail_bcc_user"><?php _e('BCC', WDFM()->prefix); ?></label>
1355
  <input type="text" name="mail_bcc_user" value="<?php echo $row->mail_bcc_user ?>" id="mail_bcc_user" />
1356
+ <p class="description"><?php _e('Write additional email addresses to send the submission or confirmation email to. The receiver will not be able to view other recipients.', WDFM()->prefix); ?></p>
1357
  </div>
1358
  <div class="wd-group">
1359
  <label class="wd-label"><?php _e('Mode', WDFM()->prefix); ?></label>
1361
  <label class="wd-label-radio" for="fm_mo_mail_mode_user-1"><?php _e('HTML', WDFM()->prefix); ?></label>
1362
  <input type="radio" name="mail_mode_user" <?php echo $row->mail_mode_user == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_mode_user-0" class="wd-radio" value="0">
1363
  <label class="wd-label-radio" for="fm_mo_mail_mode_user-0"><?php _e('Text', WDFM()->prefix); ?></label>
1364
+ <p class="description"><?php _e('Select the layout of the submission email, Text or HTML.', WDFM()->prefix); ?></p>
1365
  </div>
1366
  <div class="wd-group">
1367
  <label class="wd-label"><?php _e('Attach File', WDFM()->prefix); ?></label>
1369
  <label class="wd-label-radio" for="fm_mo_mail_attachment_user-1"><?php _e('Yes', WDFM()->prefix); ?></label>
1370
  <input type="radio" name="mail_attachment_user" <?php echo $row->mail_attachment_user == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_attachment_user-0" class="wd-radio" value="0">
1371
  <label class="wd-label-radio" for="fm_mo_mail_attachment_user-0"><?php _e('No', WDFM()->prefix); ?></label>
1372
+ <p class="description"><?php _e('If you have File Upload fields on your form, enable this setting to attach uploaded files to submission or confirmation email.', WDFM()->prefix); ?></p>
1373
  </div>
1374
  <div class="wd-group">
1375
  <label class="wd-label"><?php _e('Email verification', WDFM()->prefix); ?></label>
1377
  <label class="wd-label-radio" for="fm_mo_mail_verify-1"><?php _e('Yes', WDFM()->prefix); ?></label>
1378
  <input type="radio" name="mail_verify" <?php echo $row->mail_verify == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_verify-0" onclick="wdhide('expire_link')" class="wd-radio" value="0">
1379
  <label class="wd-label-radio" for="fm_mo_mail_verify-0"><?php _e('No', WDFM()->prefix); ?></label>
1380
+ <p class="description"><?php _e('Activate this option, in case you would like the users to verify their email addresses. If it’s enabled, the user email will contain a verification link.', WDFM()->prefix); ?></p>
1381
  </div>
1382
  <div class="wd-group" <?php echo($row->mail_verify == 0 ? 'style="display:none;"' : '') ?> id="expire_link">
1383
  <label class="wd-label" for="mail_verify_expiretime"><?php _e('Verification link expires in', WDFM()->prefix); ?></label>
1387
  'post' => $params["mail_ver_id"],
1388
  'action' => 'edit',
1389
  ), admin_url('post.php')); ?>"><?php _e('Edit post', WDFM()->prefix); ?></a>
1390
+ <p class="description"><?php _e('Use this option to specify a time period (hours), during which the user will be able to verify their email address.', WDFM()->prefix); ?></p>
1391
  </div>
1392
  </div>
1393
  </div>
1396
  </div>
1397
  </div>
1398
  </div>
 
1399
  <div id="actions_fieldset" class="adminform fm_fieldset_deactive">
1400
  <div class="wd-table">
1401
  <div class="wd-table-col-70">
admin/views/Submissions_fm.php CHANGED
@@ -23,7 +23,12 @@ class FMViewSubmissions_fm extends FMAdminView {
23
  wp_enqueue_script('jquery-ui-mouse');
24
  wp_enqueue_script('jquery-ui-core');
25
  wp_enqueue_script('jquery-ui-datepicker');
26
- wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library::localize_ui_datepicker());
 
 
 
 
 
27
  wp_enqueue_script('fm-admin');
28
  wp_enqueue_script('fm-manage');
29
  wp_enqueue_script('fm-submissions');
23
  wp_enqueue_script('jquery-ui-mouse');
24
  wp_enqueue_script('jquery-ui-core');
25
  wp_enqueue_script('jquery-ui-datepicker');
26
+ if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
27
+ wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library::localize_ui_datepicker());
28
+ }
29
+ else {
30
+ echo '<script>' . WDW_FM_Library::localize_ui_datepicker() . '</script>';
31
+ }
32
  wp_enqueue_script('fm-admin');
33
  wp_enqueue_script('fm-manage');
34
  wp_enqueue_script('fm-submissions');
css/form_maker_frontend.css CHANGED
@@ -977,6 +977,7 @@ input[type=number].wd-type-number {
977
  .fm-form .wd-choice label {
978
  cursor: pointer;
979
  margin: 0 5px;
 
980
  }
981
 
982
  .fm-form div[type='type_date_new'] .wdform-element-section,
977
  .fm-form .wd-choice label {
978
  cursor: pointer;
979
  margin: 0 5px;
980
+ word-break: break-all;
981
  }
982
 
983
  .fm-form div[type='type_date_new'] .wdform-element-section,
css/form_maker_tables.css CHANGED
@@ -2452,4 +2452,11 @@ button:focus {
2452
  }
2453
  .fm-page-header .wp-heading-inline {
2454
  display: inline-block;
 
 
 
 
 
 
 
2455
  }
2452
  }
2453
  .fm-page-header .wp-heading-inline {
2454
  display: inline-block;
2455
+ }
2456
+
2457
+ .ch-rad-label {
2458
+ width: calc(100% - 50px);
2459
+ word-break: break-all;
2460
+ display: -webkit-inline-box;
2461
+ min-width:100px;
2462
  }
featured/admin.css CHANGED
@@ -583,6 +583,7 @@ span.fm_error{
583
  box-sizing: border-box;
584
  -webkit-box-sizing: border-box;
585
  -moz-box-sizing: border-box;
 
586
  }
587
  #fm-settings-content .fm-addon-price{
588
  background: #FFFFFF;
@@ -595,6 +596,7 @@ span.fm_error{
595
  color: #DDECF1;
596
  }
597
  #fm-settings-content .fm-add-on:hover .fm-addon,
 
598
  #fm-settings-content .fm-addon:hover{
599
  background: #23282D url(../images/Add_Ons_hover.jpg) no-repeat 6px center;
600
  color: #DDDEDE;
@@ -646,13 +648,15 @@ span.fm_error{
646
  -moz-transition: -moz-transform 0.4s;
647
  transition: transform 0.4s;
648
  }
649
- #fm-settings-content .fm-figure:hover img{
 
650
  -webkit-transform: translateX(25%);
651
  -moz-transform: translateX(25%);
652
  -ms-transform: translateX(25%);
653
  transform: translateX(25%);
654
  }
655
- #fm-settings-content .fm-figure:hover figcaption{
 
656
  opacity: 1;
657
  -webkit-transform: rotateY(0deg);
658
  -moz-transform: rotateY(0deg);
583
  box-sizing: border-box;
584
  -webkit-box-sizing: border-box;
585
  -moz-box-sizing: border-box;
586
+ text-transform: uppercase;
587
  }
588
  #fm-settings-content .fm-addon-price{
589
  background: #FFFFFF;
596
  color: #DDECF1;
597
  }
598
  #fm-settings-content .fm-add-on:hover .fm-addon,
599
+ #fm-settings-content .fm-addon.activated,
600
  #fm-settings-content .fm-addon:hover{
601
  background: #23282D url(../images/Add_Ons_hover.jpg) no-repeat 6px center;
602
  color: #DDDEDE;
648
  -moz-transition: -moz-transform 0.4s;
649
  transition: transform 0.4s;
650
  }
651
+ #fm-settings-content .fm-figure:hover img,
652
+ #fm-settings-content .fm-figure.activated img {
653
  -webkit-transform: translateX(25%);
654
  -moz-transform: translateX(25%);
655
  -ms-transform: translateX(25%);
656
  transform: translateX(25%);
657
  }
658
+ #fm-settings-content .fm-figure:hover figcaption,
659
+ #fm-settings-content .fm-figure.activated figcaption {
660
  opacity: 1;
661
  -webkit-transform: rotateY(0deg);
662
  -moz-transform: rotateY(0deg);
featured/featured.php CHANGED
@@ -2,97 +2,106 @@
2
  function fm_extensions_page($current_plugin = '') {
3
  wp_enqueue_style('fm-featured');
4
  wp_enqueue_style('fm-featured-admin');
5
- $addons = array(
6
- 'Form Maker Add-ons' => array(
7
- 'imp_exp' => array(
8
- 'name' => 'Import/Export',
9
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/export-import.html',
10
- 'description' => 'Form Maker Export/Import WordPress plugin allows exporting and importing forms with/without submissions.',
11
- 'icon' => '',
12
- 'image' => plugins_url( '../assets/import_export.png', __FILE__ ),
13
- ),
14
- 'mailchimp' => array(
15
- 'name' => 'MailChimp',
16
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/mailchimp.html',
17
- 'description' => 'This add-on is an integration of the Form Maker with MailChimp which allows to add contacts to your subscription lists just from submitted forms.',
18
- 'icon' => '',
19
- 'image' => plugins_url( '../assets/mailchimp.png', __FILE__ ),
20
- ),
21
- 'reg' => array(
22
- 'name' => 'Registration',
23
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/registration.html',
24
- 'description' => 'User Registration add-on integrates with Form maker forms allowing users to create accounts at your website.',
25
- 'icon' => '',
26
- 'image' => plugins_url( '../assets/reg.png', __FILE__ ),
27
- ),
28
- 'post_generation' => array(
29
- 'name' => 'Post Generation',
30
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/post-generation.html',
31
- 'description' => 'Post Generation add-on allows creating a post, page or custom post based on the submitted data.',
32
- 'icon' => '',
33
- 'image' => plugins_url( '../assets/post-generation-update.png', __FILE__ ),
34
- ),
35
- 'conditional_emails' => array(
36
- 'name' => 'Conditional Emails',
37
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/conditional-emails.html',
38
- 'description' => 'Conditional Emails add-on allows to send emails to different recipients depending on the submitted data .',
39
- 'icon' => '',
40
- 'image' => plugins_url( '../assets/conditional-emails-update.png', __FILE__ ),
41
- ),
42
- 'dropbox_integration' => array(
43
- 'name' => 'Dropbox Integration',
44
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/dropbox.html',
45
- 'description' => 'The Form Maker Dropbox Integration addon is extending the Form Maker capabilities allowing to store the form attachments straight to your Dropbox account.',
46
- 'icon' => '',
47
- 'image' => plugins_url( '../assets/dropbox-integration-update.png', __FILE__ ),
48
- ),
49
- 'gdrive_integration' => array(
50
- 'name' => 'Google Drive Integration',
51
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/google-drive.html',
52
- 'description' => 'The Google Drive Integration add-on integrates Form Maker with Google Drive and allows you to send the file uploads to the Google Drive',
53
- 'icon' => '',
54
- 'image' => plugins_url( '../assets/google_drive_integration.png', __FILE__ ),
55
- ),
56
- 'pdf_integration' => array(
57
- 'name' => 'PDF Integration',
58
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/pdf.html',
59
- 'description' => 'The Form Maker PDF Integration add-on allows sending submitted forms in PDF format.',
60
- 'icon' => '',
61
- 'image' => plugins_url( '../assets/pdf-integration.png', __FILE__ ),
62
- ),
63
- 'pushover' => array(
64
- 'name' => 'Pushover',
65
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/pushover.html',
66
- 'description' => 'Form Maker Pushover integration allows to receive real-time notifications when a user submits a new form. This means messages can be pushed to Android and Apple devices, as well as desktop notification board.',
67
- 'icon' => '',
68
- 'image' => plugins_url( '../assets/pushover.png', __FILE__ ),
69
- ),
70
- 'form-maker-save-progress' => array(
71
- 'name' => 'Save Progress',
72
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/save-progress.html',
73
- 'description' => 'The add-on allows to save filled in forms as draft and continue editing them subsequently.',
74
- 'icon' => '',
75
- 'image' => plugins_url( '../assets/save-progress.png', __FILE__ ),
76
- ),
77
- 'stripe' => array(
78
- 'name' => 'Stripe',
79
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html',
80
- 'description' => 'Form Maker Stripe Integration Add-on allows to accept direct payments made by Credit Cards. Users will remain on your website during the entire process.',
81
- 'icon' => '',
82
- 'image' => plugins_url( '../assets/stripe-integration-update.png', __FILE__ ),
83
- ),
84
- 'calculator' => array(
85
- 'name' => 'Calculator',
86
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/calculator.html',
87
- 'description' => 'The Form Maker Calculator add-on allows creating forms with dynamically calculated fields.',
88
- 'icon' => '',
89
- 'image' => plugins_url( '../assets/calculator.png', __FILE__ ),
90
- )
 
 
 
 
 
 
 
 
 
 
 
91
  )
92
- );
93
-
94
-
95
-
96
  ?>
97
  <div class="wrap">
98
  <?php settings_errors(); ?>
@@ -101,16 +110,16 @@ function fm_extensions_page($current_plugin = '') {
101
  <h2 id="add_on_title"><?php echo esc_html(get_admin_page_title()); ?></h2>
102
  <?php
103
  if($addons){
104
- foreach ($addons as $name=>$cat) {
105
- ?>
106
-
107
- <!-- <div style="clear: both; margin-top: 15px;"> <h3 class="fm-addon-subtitle"><?php echo $name?> </h3></div> -->
108
- <?php
109
  foreach ( $cat as $addon ) {
 
 
 
 
110
  ?>
111
  <div class="fm-add-on">
112
  <h2><?php echo $addon['name'] ?></h2>
113
- <figure class="fm-figure">
114
  <div class="fm-figure-img">
115
  <a href="<?php echo $addon['url'] ?>" target="_blank">
116
  <?php if ( $addon['image'] ) { ?>
@@ -118,23 +127,25 @@ function fm_extensions_page($current_plugin = '') {
118
  <?php } ?>
119
  </a>
120
  </div>
121
-
122
  <figcaption class="fm-addon-descr fm-figcaption">
123
-
124
  <?php if ( $addon['icon'] ) { ?>
125
  <img src="<?php echo $addon['icon'] ?>"/>
126
  <?php } ?>
127
  <?php echo $addon['description'] ?>
128
  </figcaption>
129
  </figure>
130
- <?php if ( $addon['url'] !== '#' ) { ?>
131
- <a href="<?php echo $addon['url'] ?>"
132
- target="_blank" class="fm-addon"><span>GET THIS ADD ON</span></a>
133
-
134
- <?php } else { ?>
 
 
 
 
 
135
  <div class="fm_coming_soon">
136
- <img
137
- src="<?php echo plugins_url( '../../assets/coming_soon.png', __FILE__ ); ?>"/>
138
  </div>
139
  <?php } ?>
140
  </div>
@@ -143,12 +154,10 @@ function fm_extensions_page($current_plugin = '') {
143
  }
144
  }
145
  ?>
146
-
147
  </div>
148
  <!-- #fm-settings-content -->
149
  </div>
150
  <!-- #fm-settings -->
151
  </div><!-- .wrap -->
152
-
153
  <?php
154
  }
2
  function fm_extensions_page($current_plugin = '') {
3
  wp_enqueue_style('fm-featured');
4
  wp_enqueue_style('fm-featured-admin');
5
+ $addons = array(
6
+ 'Form Maker Add-ons' => array(
7
+ 'imp_exp' => array(
8
+ 'name' => 'Import/Export',
9
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/export-import.html',
10
+ 'description' => 'Form Maker Export/Import WordPress plugin allows exporting and importing forms with/without submissions.',
11
+ 'icon' => '',
12
+ 'image' => plugins_url( '../assets/import_export.png', __FILE__ ),
13
+ 'file_dir' => 'form-maker-export-import/fm_exp_imp.php'
14
+ ),
15
+ 'mailchimp' => array(
16
+ 'name' => 'MailChimp',
17
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/mailchimp.html',
18
+ 'description' => 'This add-on is an integration of the Form Maker with MailChimp which allows to add contacts to your subscription lists just from submitted forms.',
19
+ 'icon' => '',
20
+ 'image' => plugins_url( '../assets/mailchimp.png', __FILE__ ),
21
+ 'file_dir' => 'form-maker-mailchimp/fm_mailchimp.php'
22
+ ),
23
+ 'reg' => array(
24
+ 'name' => 'Registration',
25
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/registration.html',
26
+ 'description' => 'User Registration add-on integrates with Form maker forms allowing users to create accounts at your website.',
27
+ 'icon' => '',
28
+ 'image' => plugins_url( '../assets/reg.png', __FILE__ ),
29
+ 'file_dir' => 'form-maker-reg/fm_reg.php'
30
+ ),
31
+ 'post_generation' => array(
32
+ 'name' => 'Post Generation',
33
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/post-generation.html',
34
+ 'description' => 'Post Generation add-on allows creating a post, page or custom post based on the submitted data.',
35
+ 'icon' => '',
36
+ 'image' => plugins_url( '../assets/post-generation-update.png', __FILE__ ),
37
+ 'file_dir' => 'form-maker-post-generation/fm_post_generation.php'
38
+ ),
39
+ 'conditional_emails' => array(
40
+ 'name' => 'Conditional Emails',
41
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/conditional-emails.html',
42
+ 'description' => 'Conditional Emails add-on allows to send emails to different recipients depending on the submitted data .',
43
+ 'icon' => '',
44
+ 'image' => plugins_url( '../assets/conditional-emails-update.png', __FILE__ ),
45
+ 'file_dir' => 'form-maker-conditional-emails/fm_conditional_emails.php'
46
+ ),
47
+ 'dropbox_integration' => array(
48
+ 'name' => 'Dropbox Integration',
49
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/dropbox.html',
50
+ 'description' => 'The Form Maker Dropbox Integration addon is extending the Form Maker capabilities allowing to store the form attachments straight to your Dropbox account.',
51
+ 'icon' => '',
52
+ 'image' => plugins_url( '../assets/dropbox-integration-update.png', __FILE__ ),
53
+ 'file_dir' => 'form-maker-dropbox-integration/fm_dropbox_integration.php'
54
+ ),
55
+ 'gdrive_integration' => array(
56
+ 'name' => 'Google Drive Integration',
57
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/google-drive.html',
58
+ 'description' => 'The Google Drive Integration add-on integrates Form Maker with Google Drive and allows you to send the file uploads to the Google Drive',
59
+ 'icon' => '',
60
+ 'image' => plugins_url( '../assets/google_drive_integration.png', __FILE__ ),
61
+ 'file_dir' => 'form-maker-gdrive-integration/fm_gdrive_integration.php'
62
+ ),
63
+ 'pdf_integration' => array(
64
+ 'name' => 'PDF Integration',
65
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/pdf.html',
66
+ 'description' => 'The Form Maker PDF Integration add-on allows sending submitted forms in PDF format.',
67
+ 'icon' => '',
68
+ 'image' => plugins_url( '../assets/pdf-integration.png', __FILE__ ),
69
+ 'file_dir' => 'form-maker-pdf-integration/fm_pdf_integration.php'
70
+ ),
71
+ 'pushover' => array(
72
+ 'name' => 'Pushover',
73
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/pushover.html',
74
+ 'description' => 'Form Maker Pushover integration allows to receive real-time notifications when a user submits a new form. This means messages can be pushed to Android and Apple devices, as well as desktop notification board.',
75
+ 'icon' => '',
76
+ 'image' => plugins_url( '../assets/pushover.png', __FILE__ ),
77
+ 'file_dir' => 'form-maker-pushover/fm_pushover.php'
78
+ ),
79
+ 'form-maker-save-progress' => array(
80
+ 'name' => 'Save Progress',
81
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/save-progress.html',
82
+ 'description' => 'The add-on allows to save filled in forms as draft and continue editing them subsequently.',
83
+ 'icon' => '',
84
+ 'image' => plugins_url( '../assets/save-progress.png', __FILE__ ),
85
+ 'file_dir' => 'form-maker-save-progress/fm_save.php'
86
+ ),
87
+ 'stripe' => array(
88
+ 'name' => 'Stripe',
89
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html',
90
+ 'description' => 'Form Maker Stripe Integration Add-on allows to accept direct payments made by Credit Cards. Users will remain on your website during the entire process.',
91
+ 'icon' => '',
92
+ 'image' => plugins_url( '../assets/stripe-integration-update.png', __FILE__ ),
93
+ 'file_dir' => 'form-maker-stripe/fm_stripe.php'
94
+ ),
95
+ 'calculator' => array(
96
+ 'name' => 'Calculator',
97
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/calculator.html',
98
+ 'description' => 'The Form Maker Calculator add-on allows creating forms with dynamically calculated fields.',
99
+ 'icon' => '',
100
+ 'image' => plugins_url( '../assets/calculator.png', __FILE__ ),
101
+ 'file_dir' => 'form-maker-calculator/fm_calculator.php'
102
  )
103
+ )
104
+ );
 
 
105
  ?>
106
  <div class="wrap">
107
  <?php settings_errors(); ?>
110
  <h2 id="add_on_title"><?php echo esc_html(get_admin_page_title()); ?></h2>
111
  <?php
112
  if($addons){
113
+ foreach ($addons as $name => $cat) {
 
 
 
 
114
  foreach ( $cat as $addon ) {
115
+ $activated = '';
116
+ if ( is_plugin_active( $addon['file_dir'] ) ) {
117
+ $activated = 'activated';
118
+ }
119
  ?>
120
  <div class="fm-add-on">
121
  <h2><?php echo $addon['name'] ?></h2>
122
+ <figure class="fm-figure <?php echo $activated; ?>">
123
  <div class="fm-figure-img">
124
  <a href="<?php echo $addon['url'] ?>" target="_blank">
125
  <?php if ( $addon['image'] ) { ?>
127
  <?php } ?>
128
  </a>
129
  </div>
 
130
  <figcaption class="fm-addon-descr fm-figcaption">
 
131
  <?php if ( $addon['icon'] ) { ?>
132
  <img src="<?php echo $addon['icon'] ?>"/>
133
  <?php } ?>
134
  <?php echo $addon['description'] ?>
135
  </figcaption>
136
  </figure>
137
+ <?php
138
+ if ( $addon['url'] !== '#' ) {
139
+ if ( !empty($activated) ) {
140
+ ?>
141
+ <span class="fm-addon activated"><span><?php _e('Add on activated', WDFM()->prefix); ?></span></span>
142
+ <?php }
143
+ else { ?>
144
+ <a href="<?php echo $addon['url'] ?>" target="_blank" class="fm-addon"><span><?php _e('Get this add on', WDFM()->prefix); ?></span></a>
145
+ <?php }
146
+ } else { ?>
147
  <div class="fm_coming_soon">
148
+ <img src="<?php echo plugins_url( '../../assets/coming_soon.png', __FILE__ ); ?>"/>
 
149
  </div>
150
  <?php } ?>
151
  </div>
154
  }
155
  }
156
  ?>
 
157
  </div>
158
  <!-- #fm-settings-content -->
159
  </div>
160
  <!-- #fm-settings -->
161
  </div><!-- .wrap -->
 
162
  <?php
163
  }
form-maker.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Form Maker
4
  * Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
5
  * Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
6
- * Version: 1.12.13
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
@@ -89,8 +89,8 @@ final class WDFM {
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.13';
93
- $this->db_version = '2.12.13';
94
  $this->menu_slug = 'manage_fm';
95
  $this->prefix = 'form_maker';
96
  $this->css_prefix = 'fm_';
@@ -172,7 +172,7 @@ final class WDFM {
172
 
173
  // Form Maker Widget.
174
  if (class_exists('WP_Widget')) {
175
- add_action('widgets_init', array($this, 'register_widgets'));
176
  }
177
 
178
  // Form maker activation.
@@ -197,7 +197,7 @@ final class WDFM {
197
 
198
  add_action('plugins_loaded', array($this, 'plugins_loaded'));
199
 
200
- add_filter('wpseo_whitelist_permalink_vars', array($this, 'add_query_vars_seo'));
201
  }
202
 
203
  /**
@@ -318,7 +318,7 @@ final class WDFM {
318
  fm_extensions_page('form-maker');
319
  }
320
 
321
- /**
322
  * Register widgets.
323
  */
324
  public function register_widgets() {
@@ -1097,7 +1097,7 @@ final class WDFM {
1097
  $add_ons = array(
1098
  'form-maker-export-import' => array('version' => '2.0.7', 'file' => 'fm_exp_imp.php'),
1099
  'form-maker-save-progress' => array('version' => '1.0.1', 'file' => 'fm_save.php'),
1100
- 'form-maker-conditional-emails' => array('version' => '1.0.1', 'file' => 'fm_conditional_emails.php'),
1101
  'form-maker-pushover' => array('version' => '1.0.1', 'file' => 'fm_pushover.php'),
1102
  'form-maker-mailchimp' => array('version' => '1.0.1', 'file' => 'fm_mailchimp.php'),
1103
  'form-maker-reg' => array('version' => '1.1.0', 'file' => 'fm_reg.php'),
3
  * Plugin Name: Form Maker
4
  * Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
5
  * Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
6
+ * Version: 1.12.16
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
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.16';
93
+ $this->db_version = '2.12.16';
94
  $this->menu_slug = 'manage_fm';
95
  $this->prefix = 'form_maker';
96
  $this->css_prefix = 'fm_';
172
 
173
  // Form Maker Widget.
174
  if (class_exists('WP_Widget')) {
175
+ add_action('widgets_init', array($this, 'register_widgets'));
176
  }
177
 
178
  // Form maker activation.
197
 
198
  add_action('plugins_loaded', array($this, 'plugins_loaded'));
199
 
200
+ add_filter('wpseo_whitelist_permalink_vars', array($this, 'add_query_vars_seo'));
201
  }
202
 
203
  /**
318
  fm_extensions_page('form-maker');
319
  }
320
 
321
+ /**
322
  * Register widgets.
323
  */
324
  public function register_widgets() {
1097
  $add_ons = array(
1098
  'form-maker-export-import' => array('version' => '2.0.7', 'file' => 'fm_exp_imp.php'),
1099
  'form-maker-save-progress' => array('version' => '1.0.1', 'file' => 'fm_save.php'),
1100
+ 'form-maker-conditional-emails' => array('version' => '1.1.2', 'file' => 'fm_conditional_emails.php'),
1101
  'form-maker-pushover' => array('version' => '1.0.1', 'file' => 'fm_pushover.php'),
1102
  'form-maker-mailchimp' => array('version' => '1.0.1', 'file' => 'fm_mailchimp.php'),
1103
  'form-maker-reg' => array('version' => '1.1.0', 'file' => 'fm_reg.php'),
framework/WDW_FM_Library.php CHANGED
@@ -1,6 +1,8 @@
1
  <?php
2
 
3
  class WDW_FM_Library {
 
 
4
  /**
5
  * Get request value.
6
  *
@@ -3335,7 +3337,8 @@ class WDW_FM_Library {
3335
  $onload_js .= '
3336
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '")[0].spin = null;
3337
  spinner = jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner();
3338
- ' . ($param['w_field_value'] != 'null' ? 'spinner.spinner( "value", "' . $param['w_field_value'] . '");' : '') . ' jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ min: "' . $param['w_field_min_value'] . '"});
 
3339
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ max: "' . $param['w_field_max_value'] . '"});
3340
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ step: "' . $param['w_field_step'] . '"});';
3341
  if ( $required ) {
@@ -3429,10 +3432,10 @@ class WDW_FM_Library {
3429
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '0")[0].spin = null;
3430
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '1")[0].spin = null;
3431
  spinner0 = jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '0").spinner();
3432
- ' . ($param['w_field_value1'] != 'null' ? 'spinner0.spinner( "value", "' . $param['w_field_value1'] . '");' : '') . '
3433
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ step: ' . $param['w_field_range_step'] . '});
3434
  spinner1 = jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '1").spinner();
3435
- ' . ($param['w_field_value2'] != 'null' ? 'spinner1.spinner( "value", "' . $param['w_field_value2'] . '");' : '') . '
3436
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ step: ' . $param['w_field_range_step'] . '});';
3437
  if ( $required ) {
3438
  array_push($req_fields, $id1);
@@ -3540,7 +3543,7 @@ class WDW_FM_Library {
3540
  }
3541
  $onsubmit_js .= '
3542
  var disabled_fields = "";
3543
- jQuery("div[wdid]").each(function() {
3544
  if(jQuery(this).css("display") == "none") {
3545
  disabled_fields += jQuery(this).attr("wdid");
3546
  disabled_fields += ",";
@@ -3600,6 +3603,7 @@ class WDW_FM_Library {
3600
  });
3601
  <?php
3602
  $js_content = ob_get_clean();
 
3603
  fwrite($jsfile, $js_content);
3604
  fclose($jsfile);
3605
  clearstatcache();
@@ -4263,6 +4267,110 @@ class WDW_FM_Library {
4263
  </body>
4264
  </html>';
4265
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4266
  }
4267
 
4268
  /*
1
  <?php
2
 
3
  class WDW_FM_Library {
4
+
5
+ public static $fm_js_content;
6
  /**
7
  * Get request value.
8
  *
3337
  $onload_js .= '
3338
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '")[0].spin = null;
3339
  spinner = jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner();
3340
+ if ("' . $param['w_field_value'] . '" == "null") { spinner.spinner("value", ""); }
3341
+ jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ min: "' . $param['w_field_min_value'] . '"});
3342
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ max: "' . $param['w_field_max_value'] . '"});
3343
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ step: "' . $param['w_field_step'] . '"});';
3344
  if ( $required ) {
3432
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '0")[0].spin = null;
3433
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '1")[0].spin = null;
3434
  spinner0 = jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '0").spinner();
3435
+ if ("' . $param['w_field_value1'] . '" == "null") { spinner0.spinner("value", ""); }
3436
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ step: ' . $param['w_field_range_step'] . '});
3437
  spinner1 = jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '1").spinner();
3438
+ if ("' . $param['w_field_value2'] . '" == "null") { spinner1.spinner("value", ""); }
3439
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ step: ' . $param['w_field_range_step'] . '});';
3440
  if ( $required ) {
3441
  array_push($req_fields, $id1);
3543
  }
3544
  $onsubmit_js .= '
3545
  var disabled_fields = "";
3546
+ jQuery("#form' . $form_id . ' div[wdid]").each(function() {
3547
  if(jQuery(this).css("display") == "none") {
3548
  disabled_fields += jQuery(this).attr("wdid");
3549
  disabled_fields += ",";
3603
  });
3604
  <?php
3605
  $js_content = ob_get_clean();
3606
+ WDW_FM_Library::$fm_js_content = $js_content;
3607
  fwrite($jsfile, $js_content);
3608
  fclose($jsfile);
3609
  clearstatcache();
4267
  </body>
4268
  </html>';
4269
  }
4270
+
4271
+ /**
4272
+ * Sanitize parameters and send email.
4273
+ *
4274
+ * @param string $recipient
4275
+ * @param string $subject
4276
+ * @param string $message
4277
+ * @param array $header_arr
4278
+ * @param array $attachment
4279
+ *
4280
+ * @return bool
4281
+ */
4282
+ public static function mail($recipient, $subject, $message = '', $header_arr = array(), $attachment = array()) {
4283
+ $recipient = trim($recipient, ',');
4284
+ $recipient = explode(',', $recipient);
4285
+ $recipient = array_map('trim', $recipient);
4286
+ if ( empty($recipient) ) {
4287
+ return FALSE;
4288
+ }
4289
+
4290
+ $subject = html_entity_decode($subject, ENT_QUOTES);
4291
+ $subject = stripslashes($subject);
4292
+
4293
+ $message = stripslashes($message);
4294
+
4295
+ $headers = array();
4296
+
4297
+ if ( isset($header_arr['from']) && $header_arr['from'] ) {
4298
+ $from = $header_arr['from'];
4299
+ $from = trim($from);
4300
+ $from = trim($from, ',');
4301
+ // $from_str = "From: ";
4302
+ if ( isset($header_arr['from_name']) && $header_arr['from_name'] ) {
4303
+ $from_name = $header_arr['from_name'];
4304
+ $from_name = html_entity_decode($from_name, ENT_QUOTES);
4305
+ $from_name = stripslashes($from_name);
4306
+ // $from_str .= "'" . $from_name . "' ";
4307
+ self::$email_from_name = $from_name;
4308
+ add_filter('wp_mail_from_name', array('WDW_FM_Library', 'mail_from_name'));
4309
+ }
4310
+ // $from_str .= "<" . $from . ">";
4311
+ // $headers[] = $from_str;
4312
+ self::$email_from = $from;
4313
+ add_filter('wp_mail_from', array('WDW_FM_Library', 'mail_from'));
4314
+ }
4315
+
4316
+ if ( isset($header_arr['content_type']) && $header_arr['content_type'] ) {
4317
+ // $headers[] = "Content-Type: " . $header_arr['content_type'];
4318
+ self::$email_content_type = $header_arr['content_type'];
4319
+ add_filter('wp_mail_content_type', array('WDW_FM_Library', 'mail_content_type'));
4320
+ }
4321
+
4322
+ if ( isset($header_arr['charset']) && $header_arr['charset'] ) {
4323
+ // $headers[] = $header_arr['charset'];
4324
+ self::$email_charset = $header_arr['charset'];
4325
+ add_filter('wp_mail_charset', array('WDW_FM_Library', 'mail_charset'));
4326
+ }
4327
+
4328
+ if ( isset($header_arr['reply_to']) && $header_arr['reply_to'] ) {
4329
+ $reply_to = $header_arr['reply_to'];
4330
+ $reply_to = trim($reply_to);
4331
+ $reply_to = trim($reply_to, ',');
4332
+ $headers[] = "Reply-To: <" . $reply_to . ">";
4333
+ }
4334
+
4335
+ if ( isset($header_arr['cc']) && $header_arr['cc'] ) {
4336
+ $cc = $header_arr['cc'];
4337
+ $cc = trim($cc);
4338
+ $cc = trim($cc, ',');
4339
+ $headers[] = "Cc: " . $cc;
4340
+ }
4341
+
4342
+ if ( isset($header_arr['bcc']) && $header_arr['bcc'] ) {
4343
+ $bcc = $header_arr['bcc'];
4344
+ $bcc = trim($bcc);
4345
+ $bcc = trim($bcc, ',');
4346
+ $headers[] = "Bcc: " . $bcc;
4347
+ }
4348
+
4349
+ $sent = wp_mail($recipient, $subject, $message, $headers, $attachment);
4350
+
4351
+ remove_filter('wp_mail_content_type', array('WDW_FM_Library', 'mail_content_type'));
4352
+ remove_filter('wp_mail_charset', array('WDW_FM_Library', 'mail_charset'));
4353
+ remove_filter('wp_mail_from', array('WDW_FM_Library', 'mail_from'));
4354
+ remove_filter('wp_mail_from_name', array('WDW_FM_Library', 'mail_from_name'));
4355
+
4356
+ return $sent;
4357
+ }
4358
+ public static $email_content_type;
4359
+ public static $email_charset;
4360
+ public static $email_from;
4361
+ public static $email_from_name;
4362
+ public static function mail_content_type() {
4363
+ return self::$email_content_type;
4364
+ }
4365
+ public static function mail_charset() {
4366
+ return self::$email_charset;
4367
+ }
4368
+ public static function mail_from() {
4369
+ return self::$email_from;
4370
+ }
4371
+ public static function mail_from_name() {
4372
+ return self::$email_from_name;
4373
+ }
4374
  }
4375
 
4376
  /*
frontend/models/form_maker.php CHANGED
@@ -4,6 +4,8 @@
4
  * Class FMModelForm_maker
5
  */
6
  class FMModelForm_maker {
 
 
7
  /**
8
  * @param $id
9
  * @param string $type
@@ -56,8 +58,19 @@ class FMModelForm_maker {
56
  $wp_upload_dir = wp_upload_dir();
57
  $frontend_dir ='/form-maker-frontend/';
58
  $fm_style = $wp_upload_dir['baseurl'] . $frontend_dir . 'css/fm-style-' . $theme_id . '.css';
59
- wp_register_style('fm-style-' . $theme_id, $fm_style, array(), $cssver);
60
- wp_enqueue_style('fm-style-' . $theme_id);
 
 
 
 
 
 
 
 
 
 
 
61
  $label_id = array();
62
  $label_type = array();
63
  $label_all = explode('#****#', $row->label_order);
@@ -702,6 +715,7 @@ class FMModelForm_maker {
702
  ( !empty($form_theme['SCPBGColor']) ? 'background-color:' . $form_theme['SCPBGColor'] . ';' : '').
703
  ( !empty($form_theme['SCPBoxShadow']) ? 'box-shadow:' . $form_theme['SCPBoxShadow'] . ';' : '').
704
  ( (isset($form_theme['SCPBorderRadius']) && $form_theme['SCPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['SCPBorderRadius'] . 'px;' : '').
 
705
  '}';
706
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .radio-div input[type="radio"]:checked + label span:after {'.
707
  ( !empty($form_theme['SCCPWidth']) ? 'content:""; display: block;' : '').
@@ -735,6 +749,7 @@ class FMModelForm_maker {
735
  ( !empty($form_theme['MCPBGColor']) ? 'background-color:' . $form_theme['MCPBGColor'] . ';' : '').
736
  ( !empty($form_theme['MCPBoxShadow']) ? 'box-shadow:' . $form_theme['MCPBoxShadow'] . ';' : '').
737
  ( (isset($form_theme['MCPBorderRadius']) && $form_theme['MCPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['MCPBorderRadius'] . 'px;' : '').
 
738
  '}';
739
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .checkbox-div input[type="checkbox"]:checked + label span:after {'.
740
  ( (!empty($form_theme['MCCPBackground']) || !empty($form_theme['MCCPBGColor'])) ? 'content:""; display: block;' : '').
@@ -1059,6 +1074,7 @@ class FMModelForm_maker {
1059
  $theme = preg_replace($pattern, ' ', $theme);
1060
  $css_content .= str_replace('[SITE_ROOT]', WDFM()->plugin_url, $theme);
1061
  }
 
1062
  file_put_contents($frontend_css, $css_content);
1063
  }
1064
 
@@ -2396,7 +2412,6 @@ class FMModelForm_maker {
2396
  }
2397
  }
2398
  $ip = $_SERVER['REMOTE_ADDR'];
2399
- $replyto = '';
2400
  global $wpdb;
2401
  $row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=%d", $id));
2402
  if ( !$row->form_front ) {
@@ -2990,9 +3005,6 @@ class FMModelForm_maker {
2990
  else {
2991
  $subject = $row->title;
2992
  }
2993
- if ( $row->reply_to_user ) {
2994
- $replyto = $row->reply_to_user;
2995
- }
2996
  $attachment_user = array();
2997
  if ( !WDFM()->is_demo ) {
2998
  for ( $k = 0; $k < count($all_files); $k++ ) {
@@ -3044,30 +3056,19 @@ class FMModelForm_maker {
3044
  $subject = str_replace("%" . $label_each . "%", $new_value, $subject);
3045
  }
3046
  }
3047
- $recipient = '';
3048
- $cca = $row->mail_cc_user;
3049
- $bcc = $row->mail_bcc_user;
3050
  if ( $row->mail_from_user != '' ) {
3051
- if ( $fromname != '' ) {
3052
- $from = "From: '" . $fromname . "' <" . $row->mail_from_user . ">" . "\r\n";
3053
- }
3054
- else {
3055
- $from = "From: '' <" . $row->mail_from_user . ">" . "\r\n";
3056
- }
3057
- }
3058
- else {
3059
- $from = '';
3060
- }
3061
- $headers = $from . " Content-Type: " . $content_type . "; charset=\"" . get_option('blog_charset') . "\"\n";
3062
- if ( $replyto ) {
3063
- $headers .= "Reply-To: <" . $replyto . ">\r\n";
3064
- }
3065
- if ( $cca ) {
3066
- $headers .= "Cc: " . $cca . "\r\n";
3067
- }
3068
- if ( $bcc ) {
3069
- $headers .= "Bcc: " . $bcc . "\r\n";
3070
- }
3071
  $custom_fields_value = array( $ip, $useremail, $username, $subid, $list_user );
3072
  foreach ( $custom_fields as $key => $custom_field ) {
3073
  if ( strpos($new_script, "%" . $custom_field . "%") > -1 ) {
@@ -3101,20 +3102,22 @@ class FMModelForm_maker {
3101
  $mail_verification_post_id = (int) $wpdb->get_var($wpdb->prepare('SELECT mail_verification_post_id FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
3102
  $verification_link = get_post($mail_verification_post_id);
3103
  foreach ( $send_tos as $index => $send_to ) {
3104
- $recipient = isset($_POST['wdform_' . str_replace('*', '', $send_to) . "_element" . $id]) ? $_POST['wdform_' . str_replace('*', '', $send_to) . "_element" . $id] : NULL;
3105
  if ( strpos($new_script, "%Verification link%") > -1 && $verification_link !== NULL ) {
3106
  $ver_link = $row->mail_mode_user ? "<a href =" . add_query_arg(array(
3107
  'gid' => $_SESSION['gid'],
3108
- 'h' => $_SESSION['hash'][$index] . '@' . str_replace("*", "", $send_to),
3109
  ), get_post_permalink($mail_verification_post_id)) . ">" . add_query_arg(array(
3110
  'gid' => $_SESSION['gid'],
3111
- 'h' => $_SESSION['hash'][$index] . '@' . str_replace("*", "", $send_to),
3112
  ), get_post_permalink($mail_verification_post_id)) . "</a><br/>" : add_query_arg(array(
3113
  'gid' => $_SESSION['gid'],
3114
- 'h' => $_SESSION['hash'][$index] . '@' . str_replace("*", "", $send_to),
3115
  ), get_post_permalink($mail_verification_post_id));
3116
  $body = $row->mail_verify ? str_replace("%Verification link%", $ver_link, $new_script) : str_replace("%Verification link%", '', $new_script);
3117
  }
 
 
3118
  if ( $recipient ) {
3119
  if ( $row->mail_attachment_user ) {
3120
  $remove_parrent_array_user = new RecursiveIteratorIterator(new RecursiveArrayIterator($attachment_user));
@@ -3123,7 +3126,7 @@ class FMModelForm_maker {
3123
  else {
3124
  $attachment_user = array();
3125
  }
3126
- $send = wp_mail(str_replace(' ', '', $recipient), $subject, stripslashes($body), $headers, $attachment_user);
3127
  }
3128
  }
3129
  }
@@ -3131,19 +3134,10 @@ class FMModelForm_maker {
3131
  }
3132
 
3133
  if ( $row->sendemail ) {
3134
- if ( $row->reply_to ) {
3135
- $replyto = isset($_POST['wdform_' . $row->reply_to . "_element" . $id]) ? $_POST['wdform_' . $row->reply_to . "_element" . $id] : NULL;
3136
- if ( !isset($replyto) ) {
3137
- $replyto = $row->reply_to;
3138
- }
3139
- }
3140
- $recipient = $row->mail;
3141
- if ( $row->mail_subject ) {
3142
- $subject = $row->mail_subject;
3143
- }
3144
- else {
3145
- $subject = $row->title;
3146
- }
3147
  $fromname = $row->from_name;
3148
  $attachment = array();
3149
  if ( !WDFM()->is_demo ) {
@@ -3173,6 +3167,7 @@ class FMModelForm_maker {
3173
  $list = wordwrap($list, 1000, "\n", TRUE);
3174
  $new_script = str_replace(array( '<p>', '</p>' ), '', $row->script_mail);
3175
  }
 
3176
  foreach ( $label_order_original as $key => $label_each ) {
3177
  $type = $label_type[$key];
3178
  $key1 = $type == 'type_hidden' ? $label_each : $key;
@@ -3204,32 +3199,14 @@ class FMModelForm_maker {
3204
  }
3205
  }
3206
  if ( $row->from_mail ) {
3207
- $from = isset($_POST['wdform_' . $row->from_mail . "_element" . $id]) ? $_POST['wdform_' . $row->from_mail . "_element" . $id] : NULL;
3208
- if ( !isset($from) ) {
3209
- $from = $row->from_mail;
3210
- }
3211
- if ( $fromname != '' ) {
3212
- $from = "From: '" . $fromname . "' <" . $from . ">" . "\r\n";
3213
- }
3214
- else {
3215
- $from = "From: '' <" . $from . ">" . "\r\n";
3216
- }
3217
- }
3218
- else {
3219
- $from = "";
3220
- }
3221
- $cca = $row->mail_cc;
3222
- $bcc = $row->mail_bcc;
3223
- $headers = $from . " Content-Type: " . $content_type . "; charset=\"" . get_option('blog_charset') . "\"\n";
3224
- if ( $replyto ) {
3225
- $headers .= "Reply-To: <" . $replyto . ">\r\n";
3226
- }
3227
- if ( $cca ) {
3228
- $headers .= "Cc: " . $cca . "\r\n";
3229
- }
3230
- if ( $bcc ) {
3231
- $headers .= "Bcc: " . $bcc . "\r\n";
3232
- }
3233
  $custom_fields_value = array( $ip, $useremail, $username, $subid, $list );
3234
  foreach ( $custom_fields as $key => $custom_field ) {
3235
  if ( strpos($new_script, "%" . $custom_field . "%") > -1 ) {
@@ -3252,20 +3229,17 @@ class FMModelForm_maker {
3252
  else {
3253
  $attachment = array();
3254
  }
3255
- if ( $recipient ) {
3256
- $send = wp_mail(str_replace(' ', '', $recipient), $subject, stripslashes($admin_body), $headers, $attachment);
3257
- }
3258
  }
3259
  $_SESSION['error_or_no' . $id] = 0;
3260
  $msg = addslashes(__('Your form was successfully submitted.', WDFM()->prefix));
3261
- $succes = 1;
3262
  if ( $row->sendemail ) {
3263
  if ( $row->mail || $row->send_to ) {
3264
  if ( $send ) {
3265
  if ( $send !== TRUE ) {
3266
  $_SESSION['error_or_no' . $id] = 1;
3267
  $msg = addslashes(__('Error, email was not sent.', WDFM()->prefix));
3268
- $succes = 0;
3269
  }
3270
  else {
3271
  $_SESSION['error_or_no' . $id] = 0;
@@ -3280,7 +3254,7 @@ class FMModelForm_maker {
3280
  'admin_body' => $admin_body,
3281
  'body' => $body,
3282
  'subject' => $subject,
3283
- 'headers' => $headers,
3284
  'attachment' => $attachment,
3285
  'attachment_user' => $attachment_user,
3286
  ) : array();
4
  * Class FMModelForm_maker
5
  */
6
  class FMModelForm_maker {
7
+
8
+ public $fm_css_content;
9
  /**
10
  * @param $id
11
  * @param string $type
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();
75
  $label_type = array();
76
  $label_all = explode('#****#', $row->label_order);
715
  ( !empty($form_theme['SCPBGColor']) ? 'background-color:' . $form_theme['SCPBGColor'] . ';' : '').
716
  ( !empty($form_theme['SCPBoxShadow']) ? 'box-shadow:' . $form_theme['SCPBoxShadow'] . ';' : '').
717
  ( (isset($form_theme['SCPBorderRadius']) && $form_theme['SCPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['SCPBorderRadius'] . 'px;' : '').
718
+ ( !empty($form_theme['SCPWidth']) ? 'min-width:' . $form_theme['SCPWidth'] . 'px;' : '').
719
  '}';
720
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .radio-div input[type="radio"]:checked + label span:after {'.
721
  ( !empty($form_theme['SCCPWidth']) ? 'content:""; display: block;' : '').
749
  ( !empty($form_theme['MCPBGColor']) ? 'background-color:' . $form_theme['MCPBGColor'] . ';' : '').
750
  ( !empty($form_theme['MCPBoxShadow']) ? 'box-shadow:' . $form_theme['MCPBoxShadow'] . ';' : '').
751
  ( (isset($form_theme['MCPBorderRadius']) && $form_theme['MCPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['MCPBorderRadius'] . 'px;' : '').
752
+ ( !empty($form_theme['MCPWidth']) ? 'min-width:' . $form_theme['MCPWidth'] . 'px;' : '').
753
  '}';
754
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .checkbox-div input[type="checkbox"]:checked + label span:after {'.
755
  ( (!empty($form_theme['MCCPBackground']) || !empty($form_theme['MCCPBGColor'])) ? 'content:""; display: block;' : '').
1074
  $theme = preg_replace($pattern, ' ', $theme);
1075
  $css_content .= str_replace('[SITE_ROOT]', WDFM()->plugin_url, $theme);
1076
  }
1077
+ $this->fm_css_content = $css_content;
1078
  file_put_contents($frontend_css, $css_content);
1079
  }
1080
 
2412
  }
2413
  }
2414
  $ip = $_SERVER['REMOTE_ADDR'];
 
2415
  global $wpdb;
2416
  $row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=%d", $id));
2417
  if ( !$row->form_front ) {
3005
  else {
3006
  $subject = $row->title;
3007
  }
 
 
 
3008
  $attachment_user = array();
3009
  if ( !WDFM()->is_demo ) {
3010
  for ( $k = 0; $k < count($all_files); $k++ ) {
3056
  $subject = str_replace("%" . $label_each . "%", $new_value, $subject);
3057
  }
3058
  }
3059
+
3060
+ $header_arr = array();
3061
+
3062
  if ( $row->mail_from_user != '' ) {
3063
+ $header_arr['from'] = $row->mail_from_user;
3064
+ $header_arr['from_name'] = $fromname;
3065
+ }
3066
+ $header_arr['content_type'] = $content_type;
3067
+ $header_arr['charset'] = 'charset=UTF-8';
3068
+ $header_arr['reply_to'] = $row->reply_to_user;
3069
+ $header_arr['cc'] = $row->mail_cc_user;
3070
+ $header_arr['bcc'] = $row->mail_bcc_user;
3071
+
 
 
 
 
 
 
 
 
 
 
 
3072
  $custom_fields_value = array( $ip, $useremail, $username, $subid, $list_user );
3073
  foreach ( $custom_fields as $key => $custom_field ) {
3074
  if ( strpos($new_script, "%" . $custom_field . "%") > -1 ) {
3102
  $mail_verification_post_id = (int) $wpdb->get_var($wpdb->prepare('SELECT mail_verification_post_id FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
3103
  $verification_link = get_post($mail_verification_post_id);
3104
  foreach ( $send_tos as $index => $send_to ) {
3105
+ $send_to = str_replace('*', '', $send_to);
3106
  if ( strpos($new_script, "%Verification link%") > -1 && $verification_link !== NULL ) {
3107
  $ver_link = $row->mail_mode_user ? "<a href =" . add_query_arg(array(
3108
  'gid' => $_SESSION['gid'],
3109
+ 'h' => $_SESSION['hash'][$index] . '@' . $send_to,
3110
  ), get_post_permalink($mail_verification_post_id)) . ">" . add_query_arg(array(
3111
  'gid' => $_SESSION['gid'],
3112
+ 'h' => $_SESSION['hash'][$index] . '@' . $send_to,
3113
  ), get_post_permalink($mail_verification_post_id)) . "</a><br/>" : add_query_arg(array(
3114
  'gid' => $_SESSION['gid'],
3115
+ 'h' => $_SESSION['hash'][$index] . '@' . $send_to,
3116
  ), get_post_permalink($mail_verification_post_id));
3117
  $body = $row->mail_verify ? str_replace("%Verification link%", $ver_link, $new_script) : str_replace("%Verification link%", '', $new_script);
3118
  }
3119
+
3120
+ $recipient = isset($_POST['wdform_' . str_replace('*', '', $send_to) . "_element" . $id]) ? $_POST['wdform_' . $send_to . "_element" . $id] : NULL;
3121
  if ( $recipient ) {
3122
  if ( $row->mail_attachment_user ) {
3123
  $remove_parrent_array_user = new RecursiveIteratorIterator(new RecursiveArrayIterator($attachment_user));
3126
  else {
3127
  $attachment_user = array();
3128
  }
3129
+ WDW_FM_Library::mail($recipient, $subject, $body, $header_arr, $attachment_user);
3130
  }
3131
  }
3132
  }
3134
  }
3135
 
3136
  if ( $row->sendemail ) {
3137
+ $recipient = $row->mail ? $row->mail : '';
3138
+
3139
+ $subject = $row->mail_subject ? $row->mail_subject : $row->title;
3140
+
 
 
 
 
 
 
 
 
 
3141
  $fromname = $row->from_name;
3142
  $attachment = array();
3143
  if ( !WDFM()->is_demo ) {
3167
  $list = wordwrap($list, 1000, "\n", TRUE);
3168
  $new_script = str_replace(array( '<p>', '</p>' ), '', $row->script_mail);
3169
  }
3170
+ $header_arr = array();
3171
  foreach ( $label_order_original as $key => $label_each ) {
3172
  $type = $label_type[$key];
3173
  $key1 = $type == 'type_hidden' ? $label_each : $key;
3199
  }
3200
  }
3201
  if ( $row->from_mail ) {
3202
+ $header_arr['from'] = isset($_POST['wdform_' . $row->from_mail . "_element" . $id]) ? $_POST['wdform_' . $row->from_mail . "_element" . $id] : $row->from_mail;
3203
+ $header_arr['from_name'] = $fromname;
3204
+ }
3205
+ $header_arr['content_type'] = $content_type;
3206
+ $header_arr['charset'] = 'charset=UTF-8';
3207
+ $header_arr['reply_to'] = isset($_POST['wdform_' . $row->reply_to . "_element" . $id]) ? $_POST['wdform_' . $row->reply_to . "_element" . $id] : $row->reply_to;
3208
+ $header_arr['cc'] = $row->mail_cc;
3209
+ $header_arr['bcc'] = $row->mail_bcc;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3210
  $custom_fields_value = array( $ip, $useremail, $username, $subid, $list );
3211
  foreach ( $custom_fields as $key => $custom_field ) {
3212
  if ( strpos($new_script, "%" . $custom_field . "%") > -1 ) {
3229
  else {
3230
  $attachment = array();
3231
  }
3232
+
3233
+ $send = WDW_FM_Library::mail($recipient, $subject, $admin_body, $header_arr, $attachment);
 
3234
  }
3235
  $_SESSION['error_or_no' . $id] = 0;
3236
  $msg = addslashes(__('Your form was successfully submitted.', WDFM()->prefix));
 
3237
  if ( $row->sendemail ) {
3238
  if ( $row->mail || $row->send_to ) {
3239
  if ( $send ) {
3240
  if ( $send !== TRUE ) {
3241
  $_SESSION['error_or_no' . $id] = 1;
3242
  $msg = addslashes(__('Error, email was not sent.', WDFM()->prefix));
 
3243
  }
3244
  else {
3245
  $_SESSION['error_or_no' . $id] = 0;
3254
  'admin_body' => $admin_body,
3255
  'body' => $body,
3256
  'subject' => $subject,
3257
+ 'headers' => $header_arr,
3258
  'attachment' => $attachment,
3259
  'attachment_user' => $attachment_user,
3260
  ) : array();
frontend/views/form_maker.php CHANGED
@@ -1099,7 +1099,12 @@ class FMViewForm_maker {
1099
  }
1100
  case 'type_date': { //Todo: Depricated.
1101
  wp_enqueue_script('jquery-ui-datepicker');
1102
- wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library::localize_ui_datepicker());
 
 
 
 
 
1103
 
1104
  $params_names = array(
1105
  'w_field_label_size',
@@ -1672,10 +1677,20 @@ class FMViewForm_maker {
1672
  $form_maker_front_end .= '</form>';
1673
  $jsversion = $row->jsversion ? $row->jsversion : 1;
1674
  $wp_upload_dir = wp_upload_dir();
 
 
1675
 
1676
  WDW_FM_Library::create_js($form_id);
1677
- wp_register_script('fm-script-' . $form_id, $wp_upload_dir['baseurl'] . '/form-maker-frontend/js/fm-script-' . $form_id . '.js', array(), $jsversion);
1678
- wp_enqueue_script('fm-script-' . $form_id);
 
 
 
 
 
 
 
 
1679
 
1680
  $_GET['addon_view'] = 'frontend';
1681
  $_GET['form_id'] = $form_id;
@@ -1917,7 +1932,12 @@ class FMViewForm_maker {
1917
  if ( $onload_js ) {
1918
  $onload_js = 'jQuery(document).ready(function () {' . $onload_js . '})';
1919
  }
1920
- wp_add_inline_script('fm-script-' . $id, $onload_js);
 
 
 
 
 
1921
 
1922
  return WDW_FM_Library::fm_container($form->theme, $fm_form);
1923
  }
@@ -2425,7 +2445,12 @@ class FMViewForm_maker {
2425
  */
2426
  private function type_date_new($params, $row, $form_id, $id1, $type, $param) {
2427
  wp_enqueue_script('jquery-ui-datepicker');
2428
- wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library::localize_ui_datepicker());
 
 
 
 
 
2429
 
2430
  $params_names = array(
2431
  'w_field_label_size',
@@ -2680,7 +2705,12 @@ class FMViewForm_maker {
2680
  */
2681
  private function type_date_range($params, $row, $form_id, $id1, $type, $param) {
2682
  wp_enqueue_script('jquery-ui-datepicker');
2683
- wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library::localize_ui_datepicker());
 
 
 
 
 
2684
 
2685
  $params_names = array(
2686
  'w_field_label_size',
1099
  }
1100
  case 'type_date': { //Todo: Depricated.
1101
  wp_enqueue_script('jquery-ui-datepicker');
1102
+ if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
1103
+ wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library::localize_ui_datepicker());
1104
+ }
1105
+ else {
1106
+ echo '<script>' . WDW_FM_Library::localize_ui_datepicker() . '</script>';
1107
+ }
1108
 
1109
  $params_names = array(
1110
  'w_field_label_size',
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_FM_Library::create_js($form_id);
1684
+ if( !file_exists($fm_script_dir) ){
1685
+ if( function_exists('wp_add_inline_script') ) {
1686
+ wp_add_inline_script('fm-frontend', WDW_FM_Library::$fm_js_content);
1687
+ } else {
1688
+ echo '<script>'.WDW_FM_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
 
1695
  $_GET['addon_view'] = 'frontend';
1696
  $_GET['form_id'] = $form_id;
1932
  if ( $onload_js ) {
1933
  $onload_js = 'jQuery(document).ready(function () {' . $onload_js . '})';
1934
  }
1935
+ if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
1936
+ wp_add_inline_script('fm-script-' . $id, $onload_js);
1937
+ }
1938
+ else {
1939
+ echo '<script>' . $onload_js . '</script>';
1940
+ }
1941
 
1942
  return WDW_FM_Library::fm_container($form->theme, $fm_form);
1943
  }
2445
  */
2446
  private function type_date_new($params, $row, $form_id, $id1, $type, $param) {
2447
  wp_enqueue_script('jquery-ui-datepicker');
2448
+ if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
2449
+ wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library::localize_ui_datepicker());
2450
+ }
2451
+ else {
2452
+ echo '<script>' . WDW_FM_Library::localize_ui_datepicker() . '</script>';
2453
+ }
2454
 
2455
  $params_names = array(
2456
  'w_field_label_size',
2705
  */
2706
  private function type_date_range($params, $row, $form_id, $id1, $type, $param) {
2707
  wp_enqueue_script('jquery-ui-datepicker');
2708
+ if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
2709
+ wp_add_inline_script('jquery-ui-datepicker', WDW_FM_Library::localize_ui_datepicker());
2710
+ }
2711
+ else {
2712
+ echo '<script>' . WDW_FM_Library::localize_ui_datepicker() . '</script>';
2713
+ }
2714
 
2715
  $params_names = array(
2716
  'w_field_label_size',
js/add_field.js CHANGED
@@ -942,7 +942,7 @@ function edit(id) {
942
  w_field_range_step = document.getElementById(id + "_range_stepform_id_temp").value;
943
  w_field_value1 = document.getElementById(id + "_elementform_id_temp0").getAttribute("aria-valuenow");
944
  w_field_value2 = document.getElementById(id + "_elementform_id_temp1").getAttribute("aria-valuenow");
945
- atrs = return_attributes(id + '_elementform_id_temp');
946
  w_attr_name = atrs[0];
947
  w_attr_value = atrs[1];
948
  w_mini_labels = [document.getElementById(id + "_mini_label_from").innerHTML, document.getElementById(id + "_mini_label_to").innerHTML];
@@ -2723,16 +2723,16 @@ function change_regExpAlert(regAlert, id) {
2723
  document.getElementById(id).value = regAlert;
2724
  }
2725
 
2726
- function create_additional_attributes(i, w_attr_name) {
2727
  var label = jQuery('<label class="fm-field-label">Additional Attributes</label>');
2728
- var button = jQuery('<span class="fm-add-attribute dashicons dashicons-plus-alt" onClick="add_attr(' + i + ', \'type_text\')" title="Add"></span>');
2729
  var attr_table = jQuery('<div id="attributes" class="fm-width-100"></div>');
2730
  var attr_header = jQuery('<div idi="0" class="fm-width-100"><div class="fm-header-label fm-width-45">Name</div><div class="fm-header-label fm-width-45">Value</div><div></div></div>');
2731
  attr_table.append(attr_header);
2732
  attr_table.hide();
2733
  n = w_attr_name.length;
2734
  for (j = 1; j <= n; j++) {
2735
- var attr = jQuery('<div idi="' + j + '" id="attr_row_' + j + '" class="fm-width-100"><div class="fm-table-col fm-width-45"><input type="text" class="fm-field-choice" id="attr_name' + j + '" value="' + w_attr_name[j - 1] + '" onChange="change_attribute_name(\'' + i + '\', this, \'type_text\')" /></div><div class="fm-table-col fm-width-45"><input type="text" class="fm-field-choice" id="attr_value' + j + '" value="' + w_attr_value[j - 1] + '" onChange="change_attribute_value(' + i + ', ' + j + ', \'type_text\')" /></div><div class="fm-table-col"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_choices' + j + '_remove" onClick="remove_attr(' + j + ', ' + i + ', \'type_text\')"></span></div></div>');
2736
  attr_table.append(attr);
2737
  attr_table.show();
2738
  }
@@ -2749,7 +2749,7 @@ function add_attr(i, type) {
2749
  j = parseInt(el_attr_table.children().last().attr('idi')) + 1;
2750
  w_attr_name = "attribute";
2751
  w_attr_value = "value";
2752
- var attr = jQuery('<div idi="' + j + '" id="attr_row_' + j + '" class="fm-width-100"><div class="fm-table-col fm-width-45"><input type="text" class="fm-field-choice" id="attr_name' + j + '" value="' + w_attr_name + '" onChange="change_attribute_name(\'' + i + '\', this, \'type_text\')" /></div><div class="fm-table-col fm-width-45"><input type="text" class="fm-field-choice" id="attr_value' + j + '" value="' + w_attr_value + '" onChange="change_attribute_value(' + i + ', ' + j + ', \'type_text\')" /></div><div class="fm-table-col"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_choices' + j + '_remove" onClick="remove_attr(' + j + ', ' + i + ', \'type_text\')"></span></div></div>');
2753
  el_attr_table.append(attr);
2754
  refresh_attr(i, type);
2755
 
@@ -2998,7 +2998,7 @@ function type_text(i, w_field_label, w_field_label_size, w_field_label_pos, w_hi
2998
  advanced_options_container.append(create_custom_regexp(i, w_regExp_status, w_regExp_value));
2999
  advanced_options_container.append(create_case_sensitive(i, w_regExp_status, w_regExp_arg));
3000
  advanced_options_container.append(create_alert_message(i, w_regExp_status, w_regExp_alert));
3001
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
3002
 
3003
  // Preview
3004
  element = 'input';
@@ -3224,7 +3224,7 @@ function type_file_upload(i, w_field_label, w_field_label_size, w_field_label_po
3224
 
3225
  advanced_options_container.append(create_class(i, w_class));
3226
  advanced_options_container.append(create_multiple_upload(i, w_multiple));
3227
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
3228
 
3229
  // Preview
3230
  element = 'input';
@@ -3449,7 +3449,7 @@ function type_textarea(i, w_field_label, w_field_label_size, w_field_label_pos,
3449
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
3450
  advanced_options_container.append(create_unique_values(i, w_unique));
3451
  advanced_options_container.append(create_class(i, w_class));
3452
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
3453
 
3454
  // Preview
3455
  element = 'textarea';
@@ -3616,7 +3616,7 @@ function type_spinner(i, w_field_label, w_field_label_size, w_field_label_pos, w
3616
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
3617
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
3618
  advanced_options_container.append(create_class(i, w_class));
3619
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
3620
 
3621
  // Preview
3622
  var adding_type = document.createElement("input");
@@ -3727,7 +3727,10 @@ function type_spinner(i, w_field_label, w_field_label_size, w_field_label_pos, w
3727
 
3728
  jQuery("#" + i + "_elementform_id_temp").spinner();
3729
  var spinner = jQuery("#" + i + "_elementform_id_temp").spinner();
3730
- spinner.spinner("value", w_field_value);
 
 
 
3731
  jQuery("#" + i + "_elementform_id_temp").spinner({min: w_field_min_value});
3732
  jQuery("#" + i + "_elementform_id_temp").spinner({max: w_field_max_value});
3733
  jQuery("#" + i + "_elementform_id_temp").spinner({step: w_field_step});
@@ -3984,7 +3987,7 @@ function type_date_new(i, w_field_label, w_field_label_size, w_field_label_pos,
3984
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
3985
  advanced_options_container.append(create_class(i, w_class));
3986
  advanced_options_container.append(create_show_date_picker_button(i, w_show_image, 'new_date'));
3987
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
3988
 
3989
  // Preview.
3990
  var adding_type = document.createElement("input");
@@ -4622,7 +4625,7 @@ function type_own_select(i, w_field_label, w_field_label_size, w_field_label_pos
4622
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
4623
  advanced_options_container.append(create_class(i, w_class));
4624
  advanced_options_container.append(create_enable_options_value(i, w_value_disabled, 'select'));
4625
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
4626
 
4627
  // Preview.
4628
  n = w_choices.length;
@@ -4821,7 +4824,7 @@ function refresh_rowcol(num, type) {
4821
  var adding = document.createElement('input');
4822
  adding.setAttribute("type", type);
4823
  adding.setAttribute("id", num + "_elementform_id_temp" + index);
4824
- if (jQuery("#"+num + "_elementform_id_temp" + index).attr("checked") == "checked")
4825
  adding.setAttribute("checked", "checked");
4826
  if (document.getElementById(num + "_option_left_right").value == "right")
4827
  adding.style.cssText = "float: left !important";
@@ -5164,7 +5167,7 @@ function type_radio(i, w_field_label, w_field_label_size, w_field_label_pos, w_f
5164
  advanced_options_container.append(create_randomize(i, w_randomize));
5165
  advanced_options_container.append(create_enable_options_value(i, w_value_disabled, 'radio'));
5166
  advanced_options_container.append(create_allow_other(i, w_allow_other, 'radio'));
5167
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
5168
 
5169
  // Preview.
5170
  element = 'input';
@@ -5346,7 +5349,7 @@ function type_checkbox(i, w_field_label, w_field_label_size, w_field_label_pos,
5346
  advanced_options_container.append(create_randomize(i, w_randomize));
5347
  advanced_options_container.append(create_enable_options_value(i, w_value_disabled, 'checkbox'));
5348
  advanced_options_container.append(create_allow_other(i, w_allow_other, 'checkbox'));
5349
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
5350
 
5351
  // Preview.
5352
  element = 'input';
@@ -5708,7 +5711,7 @@ function type_submit_reset(i, w_submit_title , w_reset_title , w_class, w_act, w
5708
  var advanced_options_container = jQuery('<div class="inside"></div>');
5709
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
5710
  advanced_options_container.append(create_class(i, w_class));
5711
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
5712
 
5713
  // Preview.
5714
  var br = document.createElement('br');
@@ -6052,7 +6055,7 @@ function type_page_break(i,w_page_title, w_title , w_type , w_class, w_check, w_
6052
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
6053
  advanced_options_container.append(create_next_class(i, w_class));
6054
  advanced_options_container.append(create_previous_class(i, w_class));
6055
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
6056
 
6057
  // Preview.
6058
  var br = document.createElement('br');
@@ -6360,7 +6363,7 @@ function type_name(i, w_field_label, w_field_label_size, w_field_label_pos, w_hi
6360
  advanced_options_container.append(create_unique_values(i, w_unique));
6361
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
6362
  advanced_options_container.append(create_class(i, w_class));
6363
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
6364
 
6365
  // Preview.
6366
  var br = document.createElement('br');
@@ -6646,7 +6649,7 @@ function type_submitter_mail(i, w_field_label, w_field_label_size, w_field_label
6646
  advanced_options_container.append(create_unique_values(i, w_unique));
6647
  advanced_options_container.append(create_field_label_size(i, w_field_label_size, '\'' + i + '_label_sectionform_id_temp\'', '\'' + i + '_1_label_sectionform_id_temp\''));
6648
  advanced_options_container.append(create_class(i, w_class));
6649
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
6650
 
6651
  // Preview.
6652
  element = 'input';
@@ -6835,7 +6838,7 @@ function type_phone_new(i, w_field_label, w_field_label_size, w_field_label_pos,
6835
  advanced_options_container.append(create_unique_values(i, w_unique));
6836
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
6837
  advanced_options_container.append(create_class(i, w_class));
6838
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
6839
 
6840
  // Preview.
6841
  var br = document.createElement('br');
@@ -6938,7 +6941,7 @@ function type_phone_new(i, w_field_label, w_field_label_size, w_field_label_pos,
6938
  label_top(i);
6939
 
6940
  change_class(w_class, i);
6941
- refresh_attr(i, 'type_name');
6942
 
6943
  jQuery("#" + i + "_elementform_id_temp").intlTelInput({
6944
  nationalMode: false,
@@ -7264,7 +7267,7 @@ function type_address(i, w_field_label, w_field_label_size, w_field_label_pos, w
7264
  advanced_options_container.append(create_disable_address_fields(i, w_disabled_fields, w_mini_labels));
7265
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
7266
  advanced_options_container.append(create_class(i, w_class));
7267
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
7268
 
7269
  // Preview.
7270
  var adding_type = document.createElement("input");
@@ -7643,7 +7646,7 @@ function type_mark_map(i, w_field_label, w_field_label_size, w_field_label_pos,
7643
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
7644
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
7645
  advanced_options_container.append(create_class(i, w_class));
7646
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
7647
 
7648
  // Preview.
7649
  element = 'div';
@@ -7751,7 +7754,7 @@ function type_country(i, w_field_label, w_field_label_size, w_hide_label, w_coun
7751
  advanced_options_container.append(create_edit_country_list(i));
7752
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
7753
  advanced_options_container.append(create_class(i, w_class));
7754
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
7755
 
7756
  // Preview.
7757
  var br = document.createElement('br');
@@ -8163,7 +8166,7 @@ function type_date_fields(i, w_field_label, w_field_label_size, w_field_label_po
8163
  advanced_options_container.append(jQuery('<div class="notice notice-info"><p>Leave the second field empty and the current year will be used automatically. For a specific year (other than current) fill out both the start and finish points of the range.</p></div>'));
8164
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
8165
  advanced_options_container.append(create_class(i, w_class));
8166
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
8167
 
8168
  // Preview.
8169
  var br = document.createElement('br');
@@ -8470,7 +8473,7 @@ function type_paypal_price_new(i, w_field_label, w_field_label_size, w_field_lab
8470
  advanced_options_container.append(create_hide_payment_currency(i, w_currency));
8471
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
8472
  advanced_options_container.append(create_class(i, w_class));
8473
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
8474
 
8475
  // Preview
8476
  var adding_type = document.createElement("input");
@@ -9004,7 +9007,7 @@ function type_paypal_select(i, w_field_label, w_field_label_size, w_field_label_
9004
  advanced_options_container.append(create_payment_property(i));
9005
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
9006
  advanced_options_container.append(create_class(i, w_class));
9007
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
9008
 
9009
  // Preview.
9010
  var adding_type = document.createElement("input");
@@ -9353,7 +9356,7 @@ function type_paypal_radio(i, w_field_label, w_field_label_size, w_field_label_p
9353
  advanced_options_container.append(create_payment_property(i));
9354
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
9355
  advanced_options_container.append(create_class(i, w_class));
9356
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
9357
 
9358
  // Preview.
9359
  var br3 = document.createElement('br');
@@ -9583,7 +9586,7 @@ function type_paypal_checkbox(i, w_field_label, w_field_label_size, w_field_labe
9583
  advanced_options_container.append(create_payment_property(i));
9584
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
9585
  advanced_options_container.append(create_class(i, w_class));
9586
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
9587
 
9588
  // Preview.
9589
  element = 'input';
@@ -9810,7 +9813,7 @@ function type_paypal_shipping(i, w_field_label, w_field_label_size, w_field_labe
9810
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
9811
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
9812
  advanced_options_container.append(create_class(i, w_class));
9813
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
9814
 
9815
  // Preview.
9816
  element = 'input';
@@ -10215,7 +10218,7 @@ function type_map(i, w_center_x, w_center_y, w_long, w_lat, w_zoom, w_width, w_h
10215
  var advanced_options_container = jQuery('<div class="inside"></div>');
10216
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
10217
  advanced_options_container.append(create_class(i, w_class));
10218
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
10219
 
10220
  // Preview.
10221
  var br2 = document.createElement('br');
@@ -10494,7 +10497,7 @@ function type_time(i, w_field_label, w_field_label_size, w_field_label_pos, w_hi
10494
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
10495
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
10496
  advanced_options_container.append(create_class(i, w_class));
10497
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
10498
 
10499
  // Preview.
10500
  var adding_type = document.createElement("input");
@@ -10779,7 +10782,7 @@ function type_send_copy(i, w_field_label, w_field_label_size, w_field_label_pos,
10779
  var advanced_options_container = jQuery('<div class="inside"></div>');
10780
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
10781
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
10782
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
10783
 
10784
  // Preview.
10785
  element = 'input';
@@ -11066,7 +11069,7 @@ function type_date_range(i, w_field_label, w_field_label_size, w_field_label_pos
11066
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
11067
  advanced_options_container.append(create_class(i, w_class));
11068
  advanced_options_container.append(create_show_date_picker_button(i, w_show_image, 'date_range'));
11069
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
11070
 
11071
  // Preview.
11072
  var adding_type = document.createElement("input");
@@ -11636,7 +11639,7 @@ function type_star_rating(i, w_field_label, w_field_label_size, w_field_label_po
11636
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
11637
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
11638
  advanced_options_container.append(create_class(i, w_class));
11639
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
11640
 
11641
  // Preview
11642
  var adding_type = document.createElement("input");
@@ -11812,7 +11815,7 @@ function type_scale_rating(i, w_field_label, w_field_label_size, w_field_label_p
11812
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
11813
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
11814
  advanced_options_container.append(create_class(i, w_class));
11815
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
11816
 
11817
  // Preview
11818
  var adding_type = document.createElement("input");
@@ -12096,7 +12099,7 @@ function type_slider(i, w_field_label, w_field_label_size, w_field_label_pos, w_
12096
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
12097
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
12098
  advanced_options_container.append(create_class(i, w_class));
12099
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
12100
 
12101
  // Preview
12102
  var adding_type = document.createElement("input");
@@ -12318,7 +12321,7 @@ function type_range(i, w_field_label, w_field_label_size, w_field_label_pos, w_h
12318
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
12319
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
12320
  advanced_options_container.append(create_class(i, w_class));
12321
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
12322
 
12323
  // Preview
12324
  var adding_type = document.createElement("input");
@@ -12482,12 +12485,12 @@ function type_range(i, w_field_label, w_field_label_size, w_field_label_pos, w_h
12482
 
12483
  jQuery("#" + i + "_elementform_id_temp0").spinner();
12484
  var spinner1 = jQuery("#" + i + "_elementform_id_temp0").spinner();
12485
- spinner1.spinner("value", w_field_value1);
12486
  jQuery("#" + i + "_elementform_id_temp0").spinner({step: w_field_range_step});
12487
 
12488
  jQuery("#" + i + "_elementform_id_temp1").spinner();
12489
  var spinner2 = jQuery("#" + i + "_elementform_id_temp1").spinner();
12490
- spinner2.spinner("value", w_field_value2);
12491
  jQuery("#" + i + "_elementform_id_temp1").spinner({step: w_field_range_step});
12492
 
12493
  jQuery(document).ready(function () {
@@ -12576,7 +12579,7 @@ function type_hidden(i, w_name, w_value, w_attr_name, w_attr_value) {
12576
 
12577
  var advanced_options_container = jQuery('<div class="inside"></div>');
12578
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
12579
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
12580
 
12581
  // Preview
12582
  element = 'input';
@@ -12708,7 +12711,7 @@ function type_captcha(i,w_field_label, w_field_label_size, w_field_label_pos, w_
12708
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
12709
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
12710
  advanced_options_container.append(create_class(i, w_class));
12711
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
12712
 
12713
  // Preview
12714
  element = 'img';
@@ -12905,7 +12908,7 @@ function type_arithmetic_captcha(i,w_field_label, w_field_label_size, w_field_la
12905
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
12906
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
12907
  advanced_options_container.append(create_class(i, w_class));
12908
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
12909
 
12910
  // Preview
12911
  var adding_type = document.createElement("input");
@@ -13058,7 +13061,7 @@ function type_phone(i, w_field_label, w_field_label_size, w_field_label_pos, w_h
13058
  advanced_options_container.append(create_unique_values(i, w_unique));
13059
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
13060
  advanced_options_container.append(create_class(i, w_class));
13061
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
13062
 
13063
  // Preview.
13064
  var br1 = document.createElement('br');
@@ -13306,7 +13309,7 @@ function type_password(i, w_field_label, w_field_label_size, w_field_label_pos,
13306
  advanced_options_container.append(create_confirmation_password_label(i, w_verification, w_verification_label));
13307
  advanced_options_container.append(create_field_label_size(i, w_field_label_size, '\'' + i + '_label_sectionform_id_temp\'', '\'' + i + '_1_label_sectionform_id_temp\''));
13308
  advanced_options_container.append(create_class(i, w_class));
13309
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
13310
 
13311
  // Preview.
13312
  element = 'input';
@@ -13547,7 +13550,7 @@ function type_button(i, w_title , w_func , w_class, w_attr_name, w_attr_value) {
13547
  var advanced_options_container = jQuery('<div class="inside"></div>');
13548
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
13549
  advanced_options_container.append(create_class(i, w_class));
13550
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
13551
 
13552
  // Preview.
13553
  element = 'button';
@@ -13620,7 +13623,7 @@ function create_grading_total(i, w_total) {
13620
  }
13621
 
13622
  function check_isnum_or_minus(e) {
13623
- var chCode1 = e.which || e.keyCode;
13624
  if (chCode1 != 45) {
13625
  if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
13626
  return false;
@@ -13628,6 +13631,15 @@ function check_isnum_or_minus(e) {
13628
  else if(e.target.selectionStart != 0 || e.target.value[0] == '-') {
13629
  return false;
13630
  }
 
 
 
 
 
 
 
 
 
13631
  return true;
13632
  }
13633
 
@@ -13821,7 +13833,7 @@ function type_grading(i, w_field_label, w_field_label_size, w_field_label_pos, w
13821
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
13822
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
13823
  advanced_options_container.append(create_class(i, w_class));
13824
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
13825
 
13826
  // Preview.
13827
  element = 'input';
@@ -14202,7 +14214,7 @@ function type_matrix(i, w_field_label, w_field_label_size, w_field_label_pos, w_
14202
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
14203
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
14204
  advanced_options_container.append(create_class(i, w_class));
14205
- advanced_options_container.append(create_additional_attributes(i, w_attr_name));
14206
 
14207
  // Preview.
14208
  element = 'input';
@@ -15702,7 +15714,7 @@ function gen_form_fields() {
15702
  w_field_value1 = document.getElementById(id + "_elementform_id_temp0").getAttribute("aria-valuenow");
15703
  w_field_value2 = document.getElementById(id + "_elementform_id_temp1").getAttribute("aria-valuenow");
15704
 
15705
- atrs = return_attributes(id + '_elementform_id_temp');
15706
  w_attr_name = atrs[0];
15707
  w_attr_value = atrs[1];
15708
 
942
  w_field_range_step = document.getElementById(id + "_range_stepform_id_temp").value;
943
  w_field_value1 = document.getElementById(id + "_elementform_id_temp0").getAttribute("aria-valuenow");
944
  w_field_value2 = document.getElementById(id + "_elementform_id_temp1").getAttribute("aria-valuenow");
945
+ atrs = return_attributes(id + '_elementform_id_temp0');
946
  w_attr_name = atrs[0];
947
  w_attr_value = atrs[1];
948
  w_mini_labels = [document.getElementById(id + "_mini_label_from").innerHTML, document.getElementById(id + "_mini_label_to").innerHTML];
2723
  document.getElementById(id).value = regAlert;
2724
  }
2725
 
2726
+ function create_additional_attributes(i, w_attr_name, type) {
2727
  var label = jQuery('<label class="fm-field-label">Additional Attributes</label>');
2728
+ var button = jQuery('<span class="fm-add-attribute dashicons dashicons-plus-alt" onClick="add_attr(' + i + ', \'' + type + '\')" title="Add"></span>');
2729
  var attr_table = jQuery('<div id="attributes" class="fm-width-100"></div>');
2730
  var attr_header = jQuery('<div idi="0" class="fm-width-100"><div class="fm-header-label fm-width-45">Name</div><div class="fm-header-label fm-width-45">Value</div><div></div></div>');
2731
  attr_table.append(attr_header);
2732
  attr_table.hide();
2733
  n = w_attr_name.length;
2734
  for (j = 1; j <= n; j++) {
2735
+ var attr = jQuery('<div idi="' + j + '" id="attr_row_' + j + '" class="fm-width-100"><div class="fm-table-col fm-width-45"><input type="text" class="fm-field-choice" id="attr_name' + j + '" value="' + w_attr_name[j - 1] + '" onChange="change_attribute_name(\'' + i + '\', this, \'' + type + '\')" /></div><div class="fm-table-col fm-width-45"><input type="text" class="fm-field-choice" id="attr_value' + j + '" value="' + w_attr_value[j - 1] + '" onChange="change_attribute_value(' + i + ', ' + j + ', \'' + type + '\')" /></div><div class="fm-table-col"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_choices' + j + '_remove" onClick="remove_attr(' + j + ', ' + i + ', \'' + type + '\')"></span></div></div>');
2736
  attr_table.append(attr);
2737
  attr_table.show();
2738
  }
2749
  j = parseInt(el_attr_table.children().last().attr('idi')) + 1;
2750
  w_attr_name = "attribute";
2751
  w_attr_value = "value";
2752
+ var attr = jQuery('<div idi="' + j + '" id="attr_row_' + j + '" class="fm-width-100"><div class="fm-table-col fm-width-45"><input type="text" class="fm-field-choice" id="attr_name' + j + '" value="' + w_attr_name + '" onChange="change_attribute_name(\'' + i + '\', this, \'' + type + '\')" /></div><div class="fm-table-col fm-width-45"><input type="text" class="fm-field-choice" id="attr_value' + j + '" value="' + w_attr_value + '" onChange="change_attribute_value(' + i + ', ' + j + ', \'' + type + '\')" /></div><div class="fm-table-col"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_choices' + j + '_remove" onClick="remove_attr(' + j + ', ' + i + ', \'' + type + '\')"></span></div></div>');
2753
  el_attr_table.append(attr);
2754
  refresh_attr(i, type);
2755
 
2998
  advanced_options_container.append(create_custom_regexp(i, w_regExp_status, w_regExp_value));
2999
  advanced_options_container.append(create_case_sensitive(i, w_regExp_status, w_regExp_arg));
3000
  advanced_options_container.append(create_alert_message(i, w_regExp_status, w_regExp_alert));
3001
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_text'));
3002
 
3003
  // Preview
3004
  element = 'input';
3224
 
3225
  advanced_options_container.append(create_class(i, w_class));
3226
  advanced_options_container.append(create_multiple_upload(i, w_multiple));
3227
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_file_upload'));
3228
 
3229
  // Preview
3230
  element = 'input';
3449
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
3450
  advanced_options_container.append(create_unique_values(i, w_unique));
3451
  advanced_options_container.append(create_class(i, w_class));
3452
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_textarea'));
3453
 
3454
  // Preview
3455
  element = 'textarea';
3616
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
3617
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
3618
  advanced_options_container.append(create_class(i, w_class));
3619
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_spinner'));
3620
 
3621
  // Preview
3622
  var adding_type = document.createElement("input");
3727
 
3728
  jQuery("#" + i + "_elementform_id_temp").spinner();
3729
  var spinner = jQuery("#" + i + "_elementform_id_temp").spinner();
3730
+ if ( w_field_value == null ) {
3731
+ spinner.spinner("value", "");
3732
+ }
3733
+
3734
  jQuery("#" + i + "_elementform_id_temp").spinner({min: w_field_min_value});
3735
  jQuery("#" + i + "_elementform_id_temp").spinner({max: w_field_max_value});
3736
  jQuery("#" + i + "_elementform_id_temp").spinner({step: w_field_step});
3987
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
3988
  advanced_options_container.append(create_class(i, w_class));
3989
  advanced_options_container.append(create_show_date_picker_button(i, w_show_image, 'new_date'));
3990
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_date_new'));
3991
 
3992
  // Preview.
3993
  var adding_type = document.createElement("input");
4625
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
4626
  advanced_options_container.append(create_class(i, w_class));
4627
  advanced_options_container.append(create_enable_options_value(i, w_value_disabled, 'select'));
4628
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_own_select'));
4629
 
4630
  // Preview.
4631
  n = w_choices.length;
4824
  var adding = document.createElement('input');
4825
  adding.setAttribute("type", type);
4826
  adding.setAttribute("id", num + "_elementform_id_temp" + index);
4827
+ if (jQuery(this).find('#el_choices' + index)[0].getAttribute("checked") == "true")
4828
  adding.setAttribute("checked", "checked");
4829
  if (document.getElementById(num + "_option_left_right").value == "right")
4830
  adding.style.cssText = "float: left !important";
5167
  advanced_options_container.append(create_randomize(i, w_randomize));
5168
  advanced_options_container.append(create_enable_options_value(i, w_value_disabled, 'radio'));
5169
  advanced_options_container.append(create_allow_other(i, w_allow_other, 'radio'));
5170
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_radio'));
5171
 
5172
  // Preview.
5173
  element = 'input';
5349
  advanced_options_container.append(create_randomize(i, w_randomize));
5350
  advanced_options_container.append(create_enable_options_value(i, w_value_disabled, 'checkbox'));
5351
  advanced_options_container.append(create_allow_other(i, w_allow_other, 'checkbox'));
5352
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_checkbox'));
5353
 
5354
  // Preview.
5355
  element = 'input';
5711
  var advanced_options_container = jQuery('<div class="inside"></div>');
5712
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
5713
  advanced_options_container.append(create_class(i, w_class));
5714
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_submit_reset'));
5715
 
5716
  // Preview.
5717
  var br = document.createElement('br');
6055
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
6056
  advanced_options_container.append(create_next_class(i, w_class));
6057
  advanced_options_container.append(create_previous_class(i, w_class));
6058
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_page_break'));
6059
 
6060
  // Preview.
6061
  var br = document.createElement('br');
6363
  advanced_options_container.append(create_unique_values(i, w_unique));
6364
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
6365
  advanced_options_container.append(create_class(i, w_class));
6366
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_name'));
6367
 
6368
  // Preview.
6369
  var br = document.createElement('br');
6649
  advanced_options_container.append(create_unique_values(i, w_unique));
6650
  advanced_options_container.append(create_field_label_size(i, w_field_label_size, '\'' + i + '_label_sectionform_id_temp\'', '\'' + i + '_1_label_sectionform_id_temp\''));
6651
  advanced_options_container.append(create_class(i, w_class));
6652
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_submitter_mail'));
6653
 
6654
  // Preview.
6655
  element = 'input';
6838
  advanced_options_container.append(create_unique_values(i, w_unique));
6839
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
6840
  advanced_options_container.append(create_class(i, w_class));
6841
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_phone_new'));
6842
 
6843
  // Preview.
6844
  var br = document.createElement('br');
6941
  label_top(i);
6942
 
6943
  change_class(w_class, i);
6944
+ refresh_attr(i, 'type_text');
6945
 
6946
  jQuery("#" + i + "_elementform_id_temp").intlTelInput({
6947
  nationalMode: false,
7267
  advanced_options_container.append(create_disable_address_fields(i, w_disabled_fields, w_mini_labels));
7268
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
7269
  advanced_options_container.append(create_class(i, w_class));
7270
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_address'));
7271
 
7272
  // Preview.
7273
  var adding_type = document.createElement("input");
7646
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
7647
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
7648
  advanced_options_container.append(create_class(i, w_class));
7649
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_mark_map'));
7650
 
7651
  // Preview.
7652
  element = 'div';
7754
  advanced_options_container.append(create_edit_country_list(i));
7755
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
7756
  advanced_options_container.append(create_class(i, w_class));
7757
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_country'));
7758
 
7759
  // Preview.
7760
  var br = document.createElement('br');
8166
  advanced_options_container.append(jQuery('<div class="notice notice-info"><p>Leave the second field empty and the current year will be used automatically. For a specific year (other than current) fill out both the start and finish points of the range.</p></div>'));
8167
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
8168
  advanced_options_container.append(create_class(i, w_class));
8169
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_date_fields'));
8170
 
8171
  // Preview.
8172
  var br = document.createElement('br');
8473
  advanced_options_container.append(create_hide_payment_currency(i, w_currency));
8474
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
8475
  advanced_options_container.append(create_class(i, w_class));
8476
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_paypal_price_new'));
8477
 
8478
  // Preview
8479
  var adding_type = document.createElement("input");
9007
  advanced_options_container.append(create_payment_property(i));
9008
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
9009
  advanced_options_container.append(create_class(i, w_class));
9010
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_paypal_select'));
9011
 
9012
  // Preview.
9013
  var adding_type = document.createElement("input");
9356
  advanced_options_container.append(create_payment_property(i));
9357
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
9358
  advanced_options_container.append(create_class(i, w_class));
9359
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_paypal_radio'));
9360
 
9361
  // Preview.
9362
  var br3 = document.createElement('br');
9586
  advanced_options_container.append(create_payment_property(i));
9587
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
9588
  advanced_options_container.append(create_class(i, w_class));
9589
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_paypal_checkbox'));
9590
 
9591
  // Preview.
9592
  element = 'input';
9813
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
9814
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
9815
  advanced_options_container.append(create_class(i, w_class));
9816
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_paypal_shipping'));
9817
 
9818
  // Preview.
9819
  element = 'input';
10218
  var advanced_options_container = jQuery('<div class="inside"></div>');
10219
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
10220
  advanced_options_container.append(create_class(i, w_class));
10221
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_map'));
10222
 
10223
  // Preview.
10224
  var br2 = document.createElement('br');
10497
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
10498
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
10499
  advanced_options_container.append(create_class(i, w_class));
10500
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_time'));
10501
 
10502
  // Preview.
10503
  var adding_type = document.createElement("input");
10782
  var advanced_options_container = jQuery('<div class="inside"></div>');
10783
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
10784
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
10785
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_send_copy'));
10786
 
10787
  // Preview.
10788
  element = 'input';
11069
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
11070
  advanced_options_container.append(create_class(i, w_class));
11071
  advanced_options_container.append(create_show_date_picker_button(i, w_show_image, 'date_range'));
11072
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_date_range'));
11073
 
11074
  // Preview.
11075
  var adding_type = document.createElement("input");
11639
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
11640
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
11641
  advanced_options_container.append(create_class(i, w_class));
11642
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_star_rating'));
11643
 
11644
  // Preview
11645
  var adding_type = document.createElement("input");
11815
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
11816
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
11817
  advanced_options_container.append(create_class(i, w_class));
11818
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_scale_rating'));
11819
 
11820
  // Preview
11821
  var adding_type = document.createElement("input");
12099
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
12100
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
12101
  advanced_options_container.append(create_class(i, w_class));
12102
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_slider'));
12103
 
12104
  // Preview
12105
  var adding_type = document.createElement("input");
12321
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
12322
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
12323
  advanced_options_container.append(create_class(i, w_class));
12324
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_range'));
12325
 
12326
  // Preview
12327
  var adding_type = document.createElement("input");
12485
 
12486
  jQuery("#" + i + "_elementform_id_temp0").spinner();
12487
  var spinner1 = jQuery("#" + i + "_elementform_id_temp0").spinner();
12488
+ /*spinner1.spinner("value", w_field_value1);*/
12489
  jQuery("#" + i + "_elementform_id_temp0").spinner({step: w_field_range_step});
12490
 
12491
  jQuery("#" + i + "_elementform_id_temp1").spinner();
12492
  var spinner2 = jQuery("#" + i + "_elementform_id_temp1").spinner();
12493
+ /*spinner2.spinner("value", w_field_value2);*/
12494
  jQuery("#" + i + "_elementform_id_temp1").spinner({step: w_field_range_step});
12495
 
12496
  jQuery(document).ready(function () {
12579
 
12580
  var advanced_options_container = jQuery('<div class="inside"></div>');
12581
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
12582
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_hidden'));
12583
 
12584
  // Preview
12585
  element = 'input';
12711
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
12712
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
12713
  advanced_options_container.append(create_class(i, w_class));
12714
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_captcha'));
12715
 
12716
  // Preview
12717
  element = 'img';
12908
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
12909
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
12910
  advanced_options_container.append(create_class(i, w_class));
12911
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_arithmetic_captcha'));
12912
 
12913
  // Preview
12914
  var adding_type = document.createElement("input");
13061
  advanced_options_container.append(create_unique_values(i, w_unique));
13062
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
13063
  advanced_options_container.append(create_class(i, w_class));
13064
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_phone'));
13065
 
13066
  // Preview.
13067
  var br1 = document.createElement('br');
13309
  advanced_options_container.append(create_confirmation_password_label(i, w_verification, w_verification_label));
13310
  advanced_options_container.append(create_field_label_size(i, w_field_label_size, '\'' + i + '_label_sectionform_id_temp\'', '\'' + i + '_1_label_sectionform_id_temp\''));
13311
  advanced_options_container.append(create_class(i, w_class));
13312
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_password'));
13313
 
13314
  // Preview.
13315
  element = 'input';
13550
  var advanced_options_container = jQuery('<div class="inside"></div>');
13551
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
13552
  advanced_options_container.append(create_class(i, w_class));
13553
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_button'));
13554
 
13555
  // Preview.
13556
  element = 'button';
13623
  }
13624
 
13625
  function check_isnum_or_minus(e) {
13626
+ /*var chCode1 = e.which || e.keyCode;
13627
  if (chCode1 != 45) {
13628
  if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
13629
  return false;
13631
  else if(e.target.selectionStart != 0 || e.target.value[0] == '-') {
13632
  return false;
13633
  }
13634
+ return true;*/
13635
+ var chCode1 = e.which || e.keyCode;
13636
+ if ( chCode1 > 31
13637
+ && (chCode1 < 48 || chCode1 > 57)
13638
+ && (chCode1 != 46)
13639
+ && (chCode1 != 45)
13640
+ && (chCode1 < 35 || chCode1 > 40) ) {
13641
+ return false;
13642
+ }
13643
  return true;
13644
  }
13645
 
13833
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
13834
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
13835
  advanced_options_container.append(create_class(i, w_class));
13836
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_grading'));
13837
 
13838
  // Preview.
13839
  element = 'input';
14214
  edit_main_table.append(create_advanced_options_container(advanced_options_container));
14215
  advanced_options_container.append(create_field_label_size(i, w_field_label_size));
14216
  advanced_options_container.append(create_class(i, w_class));
14217
+ advanced_options_container.append(create_additional_attributes(i, w_attr_name, 'type_matrix'));
14218
 
14219
  // Preview.
14220
  element = 'input';
15714
  w_field_value1 = document.getElementById(id + "_elementform_id_temp0").getAttribute("aria-valuenow");
15715
  w_field_value2 = document.getElementById(id + "_elementform_id_temp1").getAttribute("aria-valuenow");
15716
 
15717
+ atrs = return_attributes(id + '_elementform_id_temp0');
15718
  w_attr_name = atrs[0];
15719
  w_attr_value = atrs[1];
15720
 
js/form_maker_form_options.js CHANGED
@@ -191,9 +191,9 @@ function codemirror_for_javascript() {
191
 
192
  function fm_toggle_email_options(show) {
193
  if (show) {
194
- jQuery('#fm_email_options').show();
195
  }
196
  else {
197
- jQuery('#fm_email_options').hide();
198
  }
199
  }
191
 
192
  function fm_toggle_email_options(show) {
193
  if (show) {
194
+ jQuery('.fm_email_options').show();
195
  }
196
  else {
197
+ jQuery('.fm_email_options').hide();
198
  }
199
  }
js/form_maker_manage_edit.js CHANGED
@@ -583,7 +583,9 @@ function formOnload(rows) {
583
  var spinner_step = document.getElementById(t + "_stepform_id_temp").value;
584
  jQuery("#" + t + "_elementform_id_temp")[0].spin = null;
585
  spinner = jQuery("#" + t + "_elementform_id_temp").spinner();
586
- spinner.spinner("value", spinner_value);
 
 
587
  jQuery("#" + t + "_elementform_id_temp").spinner({ min:spinner_min_value});
588
  jQuery("#" + t + "_elementform_id_temp").spinner({ max:spinner_max_value});
589
  jQuery("#" + t + "_elementform_id_temp").spinner({ step:spinner_step});
@@ -614,11 +616,15 @@ function formOnload(rows) {
614
  jQuery("#" + t + "_elementform_id_temp0")[0].spin = null;
615
  jQuery("#" + t + "_elementform_id_temp1")[0].spin = null;
616
  spinner0 = jQuery("#" + t + "_elementform_id_temp0").spinner();
617
- spinner0.spinner("value", spinner_value0);
 
 
618
  jQuery("#" + t + "_elementform_id_temp0").spinner({ step:spinner_step});
619
  var spinner_value1 = document.getElementById(t + "_elementform_id_temp1").value;
620
  spinner1 = jQuery("#" + t + "_elementform_id_temp1").spinner();
621
- spinner1.spinner("value", spinner_value1);
 
 
622
  jQuery("#" + t + "_elementform_id_temp1").spinner({ step:spinner_step});
623
  var myu = t;
624
  jQuery(document).ready(function () {
@@ -711,8 +717,8 @@ function formOnload(rows) {
711
  remove_whitespace(document.getElementById('take'));
712
  form_view = 1;
713
  form_view_count = 0;
714
-
715
- for (i = 1; i <= 30; i++) {
716
  if (document.getElementById('form_id_tempform_view' + i)) {
717
  form_view_count++;
718
  form_view_max = i;
583
  var spinner_step = document.getElementById(t + "_stepform_id_temp").value;
584
  jQuery("#" + t + "_elementform_id_temp")[0].spin = null;
585
  spinner = jQuery("#" + t + "_elementform_id_temp").spinner();
586
+ if ( spinner_value == null ) {
587
+ spinner.spinner("value", "");
588
+ }
589
  jQuery("#" + t + "_elementform_id_temp").spinner({ min:spinner_min_value});
590
  jQuery("#" + t + "_elementform_id_temp").spinner({ max:spinner_max_value});
591
  jQuery("#" + t + "_elementform_id_temp").spinner({ step:spinner_step});
616
  jQuery("#" + t + "_elementform_id_temp0")[0].spin = null;
617
  jQuery("#" + t + "_elementform_id_temp1")[0].spin = null;
618
  spinner0 = jQuery("#" + t + "_elementform_id_temp0").spinner();
619
+ if ( spinner_value0 == null ) {
620
+ spinner0.spinner("value", "");
621
+ }
622
  jQuery("#" + t + "_elementform_id_temp0").spinner({ step:spinner_step});
623
  var spinner_value1 = document.getElementById(t + "_elementform_id_temp1").value;
624
  spinner1 = jQuery("#" + t + "_elementform_id_temp1").spinner();
625
+ if ( spinner_value1 == null ) {
626
+ spinner1.spinner("value", "");
627
+ }
628
  jQuery("#" + t + "_elementform_id_temp1").spinner({ step:spinner_step});
629
  var myu = t;
630
  jQuery(document).ready(function () {
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;
js/form_maker_submissions.js CHANGED
@@ -264,4 +264,3 @@ function change_option_values(a,id,rows_count,columns_count){
264
  document.getElementById('submission_'+id).value=element+'***matrix***';
265
  document.getElementById(id+'_matrixform_id_temp').value=element;
266
  }
267
-
264
  document.getElementById('submission_'+id).value=element+'***matrix***';
265
  document.getElementById(id+'_matrixform_id_temp').value=element;
266
  }
 
js/formmaker_div.js CHANGED
@@ -2999,8 +2999,8 @@ 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
-
3003
- for (i = 1; i <= 30; i++) {
3004
  if (document.getElementById('form_id_tempform_view' + i)) {
3005
  form_view_count++;
3006
  }
@@ -3059,13 +3059,14 @@ function refresh_pages(id) {
3059
  temp = 1;
3060
  form_view_count = 0;
3061
  destroyChildren(document.getElementById("pages"));
3062
- for (i = 1; i <= 30; i++) {
 
3063
  if (document.getElementById('form_id_tempform_view' + i)) {
3064
  form_view_count++;
3065
  }
3066
  }
3067
  if (form_view_count > 1) {
3068
- for (i = 1; i <= 30; i++) {
3069
  if (document.getElementById('form_id_tempform_view' + i)) {
3070
  page_number = document.createElement('span');
3071
  page_number.setAttribute('id', 'page_' + i);
@@ -3078,7 +3079,7 @@ function refresh_pages(id) {
3078
  }
3079
  else {
3080
  destroyChildren(document.getElementById("edit_page_navigation"));
3081
- for (i = 1; i <= 30; i++) {
3082
  if (document.getElementById('form_id_tempform_view' + i)) {
3083
  document.getElementById('form_id_tempform_view' + i).parentNode.style.borderWidth = "0px";
3084
  document.getElementById('form_id_tempform_view' + i).style.display = "block";
@@ -3088,7 +3089,7 @@ function refresh_pages(id) {
3088
  }
3089
  }
3090
  }
3091
- for (i = parseInt(id) + 1; i <= 30; i++) {
3092
  if (document.getElementById('form_id_tempform_view' + i)) {
3093
  generate_page_nav(i);
3094
  return;
@@ -3106,8 +3107,8 @@ function refresh_pages_without_deleting(id) {
3106
  form_view_count = 0;
3107
  form_view_elemet = document.getElementById("form_id_tempform_view" + id);
3108
  wdform_row = form_view_elemet.getElementsByClassName('wdform_row');
3109
-
3110
- for (i = 1; i <= 30; i++) {
3111
  if (document.getElementById('form_id_tempform_view' + i)) {
3112
  form_view_count++;
3113
  }
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
  }
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);
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";
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;
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
  }
js/main_div_front_end.js CHANGED
@@ -246,7 +246,6 @@ function add_0(that) {
246
  * @returns {boolean}
247
  */
248
  function wd_validate(that, ids) {
249
- //console.log();
250
  if ( !jQuery(that).is("input") ) {
251
  return true;
252
  }
@@ -285,7 +284,7 @@ function wd_validate(that, ids) {
285
  }
286
  case "number": {
287
  error_message = fm_objectL10n.number_validation;
288
- reg_exp = /^$|^-?\d+$/;
289
  break;
290
  }
291
  case "day": {
@@ -306,20 +305,24 @@ function wd_validate(that, ids) {
306
  }
307
 
308
  // To differ empty string value from invalid value.
309
- var isValid = document.getElementById(id).validity.valid;
310
 
311
- if ( isValid ) {
312
- isValid = reg_exp.test(value);
313
- }
314
 
315
- if ( isValid ) {
316
- for ( var i in ids ) {
317
- isValid = wd_validate("#" + ids[i], '');
318
- if ( !isValid ) {
319
- break;
320
- }
321
- }
322
- }
 
 
 
 
323
 
324
  jQuery("#check_email_" + wdid + "_" + form_id).remove();
325
  if ( !isValid ) {
@@ -548,7 +551,8 @@ function fm_initilize_form(form_id) {
548
  }
549
 
550
  function display_none_form_views_all(form_id) {
551
- for(t=1; t<30; t++) {
 
552
  if(document.getElementById(form_id+'form_view'+t)) {
553
  document.getElementById(form_id+'form_view'+t).parentNode.style.display="none";
554
  }
@@ -1988,7 +1992,8 @@ function formOnload(form_id) {
1988
  }
1989
 
1990
  function fm_document_ready(form_id) {
1991
- for(i=1; i<=30; i++) {
 
1992
  if (document.getElementById(form_id + 'form_view' + i)) {
1993
  window['form_view_count' + form_id]++;
1994
  window['form_view_max' + form_id] = i;
246
  * @returns {boolean}
247
  */
248
  function wd_validate(that, ids) {
 
249
  if ( !jQuery(that).is("input") ) {
250
  return true;
251
  }
284
  }
285
  case "number": {
286
  error_message = fm_objectL10n.number_validation;
287
+ reg_exp = /^\-{0,1}\d+(.\d+){0,1}$/;
288
  break;
289
  }
290
  case "day": {
305
  }
306
 
307
  // To differ empty string value from invalid value.
308
+ //var isValid = document.getElementById(id).validity.valid;
309
 
310
+ //if ( isValid ) {
311
+ // isValid = reg_exp.test(value);
312
+ //}
313
 
314
+ isValid = reg_exp.test(value);
315
+ if ( value == '' ) {
316
+ isValid = true;
317
+ }
318
+ if ( isValid ) {
319
+ for ( var i in ids ) {
320
+ isValid = wd_validate("#" + ids[i], '');
321
+ if ( !isValid ) {
322
+ break;
323
+ }
324
+ }
325
+ }
326
 
327
  jQuery("#check_email_" + wdid + "_" + form_id).remove();
328
  if ( !isValid ) {
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
  }
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;
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: webdorado,10web,wdsupport,formmakersupport
3
  Tags: form, form builder, contact form, custom form, feedback, contact, contact forms, captcha, email, form manager, forms, survey
4
  Requires at least: 3.4
5
  Tested up to: 4.9
6
- Stable tag: 1.12.13
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -11,20 +11,10 @@ Form Maker is a power-packed yet user-friendly form builder plugin.
11
 
12
  == Description ==
13
 
14
- Special offer:
15
-
16
- [Try Form Maker premium and 60 other plugins for free at 10Web](https://10web.io/plugins/wordpress-form-maker/)
17
-
18
- 10Web is a new platform from WebDorado
19
-
20
-
21
-
22
-
23
  https://www.youtube.com/watch?v=tN3_c6MhqFk
24
 
25
-
26
  = Useful Links: =
27
-
28
  [WordPress Form Maker](https://web-dorado.com/products/wordpress-form.html)
29
  [Demo](http://wpdemo.web-dorado.com/)
30
  [Demo Admin](http://wpdemo.web-dorado.com/wp-admin/admin.php?page=Form_maker)
@@ -34,32 +24,32 @@ https://www.youtube.com/watch?v=tN3_c6MhqFk
34
 
35
 
36
 
37
- Form Maker is a power-packed yet user-friendly form maker plugin. With an intuitive drag and drop interface, form maker is the ultimate solution to help you create responsive WordPress Forms easily and in a timely manner. Add modern and functional forms to your website with a few clicks. Using the plugin you can create forms for pretty much any purpose, from simple contact forms to multi page application, registration survey and questionnaire forms with conditional fields, captcha protection, multiple choice questions and more. It will take you just a few clicks to create the forms and a couple of minutes to customize them with the available themes, styling and display options.WordPress Form Maker plugin can be a good addition to any website, so go ahead and give it a try.
38
 
39
  **Benefits**
40
 
41
  * **Better communication between your visitors and you -** Contact forms serve as a communication tool between you and your site visitors, and make it easy to get/receive orders, requests, and inquiries. If you offer memberships, courses or trainings on your website, forms are an easy way to order, apply or register online.
42
  * **Valuable User/Customer Feedback** - You are what your user/customer thinks of you! Handy forms to put together surveys and questionnaires and get feedback from your users/customers.
43
- * **One plugin, different purposes** - Whether you want to have a single form on the contact page, or multiple forms on different pages on your website, that&#39;s absolutely doable with Form Maker plugin. You can create unlimited number of different forms and display them using one of the available display options.
44
- * **Save time –** Form Maker plugin uses an intuitive drag and drop interface, which makes it easy to create forms and add/remove fields to/from the forms.
45
  * **Add to the overall website design -** A well designed form can contribute to your website&#39;s overall look and feel. Custom style your forms and have them match with your website design.
46
- * **Improve accessibility -** Form Maker provides four different form display options, which make your forms easily accessible. Whether you want to embed the form into a post or a page, or have it follow the visitors as they scroll up and down, you have the option to do that.
47
- * **Awesome Support -** The team behind Form Maker plugin provides timely and effective support to all its users. We keep standards high and response time low.
48
 
49
 
50
  **What&#39;s in it**
51
 
52
  **MULTIPLE FORM FIELDS**
53
- Form Maker plugin comes with a myriad of form field options to let you create high performing forms. The fields you can add to the forms include: text input, multiple and single choice fields, select box, submit and reset buttons, custom HTML, 3 types of captcha protection and many more. In addition to these fields, the Premium version of the plugin offers file upload, Google Maps, and payment fields with automatic PayPal integration or Stripe integration with an add on.
54
 
55
  **FOUR FORM DISPLAY OPTIONS**
56
  There are four form display options in the plugin: Embedded, Pop-Up, Scroll-box, and Top-bar. Each of the display options has its own set of settings you can customize.
57
 
58
  **DRAG &amp; DROP**
59
- The intuitive drag-and-drop interface of the Form Maker makes it the most user-friendly form plugin for WordPress. Easily re-order the sequence of the form fields or move the fields between columns, sections and pages, organizing your forms in no time.
60
 
61
  **15 CUSTOMIZABLE THEMES**
62
- Form Maker comes with 15 fully customizable themes that you can apply to your forms. Under the theme options you can configure pretty much any setting of the theme, personalizing options for form header, content, pagination, buttons and more. You can also create your own themes with your personal styling and features.
63
 
64
  **CUSTOM CSS EDITOR**
65
  You can use the custom CSS editor to give additional styling features to the forms.
@@ -77,7 +67,7 @@ Conditional fields feature of the plugin lets you display/hide specific fields o
77
  The form builder plugin comes with 5 pre-built templates, which you can use as they are or customize to better fit your needs.
78
 
79
  **ADD-ONs**
80
- WordPress Form Maker supports 12 premium add-ons to power up your forms even further. Whether you want to integrate your forms with Mailchimp service, send out conditional emails, or give your visitors an additional payment method like Stripe, Form Maker got you covered. Find the full list of the Form Maker add-ons bellow.
81
 
82
  * [Export/Import](https://web-dorado.com/products/wordpress-form/add-ons/export-import.html)
83
  * [Save Progress](https://web-dorado.com/products/wordpress-form/add-ons/save-progress.html)
@@ -101,24 +91,6 @@ The available form themes are fully configurable, allowing you make the necessar
101
 
102
  With conditional fields option you can set to hide/show specific fields on the form based on the selections your visitors make. You just choose the field you want to show or hide, then set the conditions based on which the field will appear on the form or will be hidden. Form Maker plugin features a user-friendly interface, which makes it easy to create, style and customize the forms.
103
 
104
- ##FEATURE SUMMARY
105
-
106
- **Free version**
107
-
108
- * Responsive layout &amp; design
109
- * 5 sample form templates
110
- * 15 customizable themes
111
- * Submissions Management
112
- * Multi-page forms
113
- * Fully Customizable Layout
114
- * Export submissions to CSV/XML
115
- * Conditional logic / formatting
116
- * Customizable Emails
117
- * Customizable Thank You Page
118
- * Unlimited Number of Forms
119
- * Add ons support
120
- * 7 fields in one form
121
-
122
 
123
  **[Premium version adds](https://web-dorado.com/products/wordpress-form.html)**
124
 
@@ -278,6 +250,17 @@ Form Maker uses modern verification methods, such as ReCaptcha and invisible ReC
278
 
279
  == Changelog ==
280
 
 
 
 
 
 
 
 
 
 
 
 
281
  = 1.12.13 =
282
  * Fixed: Bug on Popup forms on mobile.
283
  * Fixed: Major bug.
3
  Tags: form, form builder, contact form, custom form, feedback, contact, contact forms, captcha, email, form manager, forms, survey
4
  Requires at least: 3.4
5
  Tested up to: 4.9
6
+ Stable tag: 1.12.16
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
11
 
12
  == Description ==
13
 
 
 
 
 
 
 
 
 
 
14
  https://www.youtube.com/watch?v=tN3_c6MhqFk
15
 
 
16
  = Useful Links: =
17
+ [Special Offer for all Premium Plugins](https://web-dorado.com/wordpress-plugins-bundle.html)
18
  [WordPress Form Maker](https://web-dorado.com/products/wordpress-form.html)
19
  [Demo](http://wpdemo.web-dorado.com/)
20
  [Demo Admin](http://wpdemo.web-dorado.com/wp-admin/admin.php?page=Form_maker)
24
 
25
 
26
 
27
+ Form Maker is a power-packed yet user-friendly form builder plugin. With an intuitive drag and drop interface, form maker is the ultimate solution to help you create responsive WordPress Forms easily and in a timely manner. Add modern and functional forms to your website with a few clicks. Using the plugin you can create forms for pretty much any purpose, from simple contact forms to multi page application, registration survey and questionnaire forms with conditional fields, captcha protection, multiple choice questions and more. It will take you just a few clicks to create the forms and a couple of minutes to customize them with the available themes, styling and display options. This plugin can be a good addition to any website, so go ahead and give it a try.
28
 
29
  **Benefits**
30
 
31
  * **Better communication between your visitors and you -** Contact forms serve as a communication tool between you and your site visitors, and make it easy to get/receive orders, requests, and inquiries. If you offer memberships, courses or trainings on your website, forms are an easy way to order, apply or register online.
32
  * **Valuable User/Customer Feedback** - You are what your user/customer thinks of you! Handy forms to put together surveys and questionnaires and get feedback from your users/customers.
33
+ * **One plugin, different purposes** - Whether you want to have a single form on the contact page, or multiple forms on different pages on your website, that&#39;s absolutely doable with this form builder plugin. You can create unlimited number of different forms and display them using one of the available display options.
34
+ * **Save time –** Plugin uses an intuitive drag and drop interface, which makes it easy to create forms and add/remove fields to/from the forms.
35
  * **Add to the overall website design -** A well designed form can contribute to your website&#39;s overall look and feel. Custom style your forms and have them match with your website design.
36
+ * **Improve accessibility -** Plugin provides four different form display options, which make your forms easily accessible. Whether you want to embed the form into a post or a page, or have it follow the visitors as they scroll up and down, you have the option to do that.
37
+ * **Awesome Support -** The team behind this form builder plugin provides timely and effective support to all its users. We keep standards high and response time low.
38
 
39
 
40
  **What&#39;s in it**
41
 
42
  **MULTIPLE FORM FIELDS**
43
+ Plugin comes with a myriad of form field options to let you create high performing forms. The fields you can add to the forms include: text input, multiple and single choice fields, select box, submit and reset buttons, custom HTML, 3 types of captcha protection and many more. In addition to these fields, the Premium version of the plugin offers file upload, Google Maps, and payment fields with automatic PayPal integration or Stripe integration with an add on.
44
 
45
  **FOUR FORM DISPLAY OPTIONS**
46
  There are four form display options in the plugin: Embedded, Pop-Up, Scroll-box, and Top-bar. Each of the display options has its own set of settings you can customize.
47
 
48
  **DRAG &amp; DROP**
49
+ The intuitive drag-and-drop interface of the plugin makes it the most user-friendly form plugin for WordPress. Easily re-order the sequence of the form fields or move the fields between columns, sections and pages, organizing your forms in no time.
50
 
51
  **15 CUSTOMIZABLE THEMES**
52
+ Plugin comes with 15 fully customizable themes that you can apply to your forms. Under the theme options you can configure pretty much any setting of the theme, personalizing options for form header, content, pagination, buttons and more. You can also create your own themes with your personal styling and features.
53
 
54
  **CUSTOM CSS EDITOR**
55
  You can use the custom CSS editor to give additional styling features to the forms.
67
  The form builder plugin comes with 5 pre-built templates, which you can use as they are or customize to better fit your needs.
68
 
69
  **ADD-ONs**
70
+ Form Maker supports 12 premium add-ons to power up your forms even further. Whether you want to integrate your forms with Mailchimp service, send out conditional emails, or give your visitors an additional payment method like Stripe. Find the full list of add-ons bellow.
71
 
72
  * [Export/Import](https://web-dorado.com/products/wordpress-form/add-ons/export-import.html)
73
  * [Save Progress](https://web-dorado.com/products/wordpress-form/add-ons/save-progress.html)
91
 
92
  With conditional fields option you can set to hide/show specific fields on the form based on the selections your visitors make. You just choose the field you want to show or hide, then set the conditions based on which the field will appear on the form or will be hidden. Form Maker plugin features a user-friendly interface, which makes it easy to create, style and customize the forms.
93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
95
  **[Premium version adds](https://web-dorado.com/products/wordpress-form.html)**
96
 
250
 
251
  == Changelog ==
252
 
253
+ = 1.12.16 =
254
+ * Improved: Email functionality.
255
+ * Fixed: Multiple choice and single choice with long labels.
256
+ * Fixed: Submissions CSV export with UTF-8 encoding.
257
+
258
+ = 1.12.15 =
259
+ * Fixed: Error on adding a field.
260
+
261
+ = 1.12.14 =
262
+ * Fixed: Submissions page.
263
+
264
  = 1.12.13 =
265
  * Fixed: Bug on Popup forms on mobile.
266
  * Fixed: Major bug.