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

Version Description

Added: File upload as a link in email

Download this release

Release Info

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

Code changes from version 1.8.23 to 1.8.24

admin/views/FMViewFormmakerwindow.php CHANGED
@@ -32,9 +32,7 @@ class FMViewFormmakerwindow {
32
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
33
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
34
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
35
- <script language="javascript" type="text/javascript" src="<?php echo WD_FM_URL; ?>/js/calendar/calendar.js"></script>
36
- <script language="javascript" type="text/javascript" src="<?php echo WD_FM_URL; ?>/js/calendar/calendar_function.js"></script>
37
- <link rel="stylesheet" href="<?php echo WD_FM_URL; ?>/css/calendar-jos.css" type="text/css" media="all">
38
  <?php
39
  wp_print_scripts('jquery');
40
  ?>
@@ -71,7 +69,7 @@ class FMViewFormmakerwindow {
71
  margin: 0 !important;
72
  }
73
  </style>
74
- <div class="panel_wrapper">
75
  <div id="display_panel" class="panel current">
76
  <table>
77
  <tr>
@@ -92,6 +90,9 @@ class FMViewFormmakerwindow {
92
  </table>
93
  </div>
94
  <div id="submissions_panel" class="panel">
 
 
 
95
  <table>
96
  <tr>
97
  <td class="smaller_font">Select a Form:</td>
@@ -234,30 +235,6 @@ class FMViewFormmakerwindow {
234
  if (!short_code['type']) {
235
  document.getElementById("form_maker_id").value = short_code['id'];
236
  }
237
- else {
238
- mcTabs.displayTab('submissions_tab','submissions_panel');
239
- document.getElementById("submissions_id").value = short_code['id'];
240
- document.getElementById("startdate").value = short_code['startdate'];
241
- document.getElementById("enddate").value = short_code['enddate'];
242
- document.getElementById("submit_date").checked = short_code['submit_date'] == "1" ? true : false;
243
- document.getElementById("submitter_ip").checked = short_code['submitter_ip'] == "1" ? true : false;
244
- document.getElementById("username").checked = short_code['username'] == "1" ? true : false;
245
- document.getElementById("useremail").checked = short_code['useremail'] == "1" ? true : false;
246
- document.getElementById("form_fields").checked = short_code['form_fields'] == "1" ? true : false;
247
-
248
- show = short_code['show'].split(",");
249
-
250
- document.getElementById("csv").checked = show[0] == 1 ? true : false;
251
- document.getElementById("xml").checked = show[1] == 1 ? true : false;
252
- document.getElementById("title").checked = show[2] == 1 ? true : false;
253
- document.getElementById("search").checked = show[3] == 1 ? true : false;
254
- document.getElementById("ordering").checked = show[4] == 1 ? true : false;
255
- document.getElementById("entries").checked = show[5] == 1 ? true : false;
256
- document.getElementById("views").checked = show[6] == 1 ? true : false;
257
- document.getElementById("conversion_rate").checked = show[7] == 1 ? true : false;
258
- document.getElementById("pagination").checked = show[8] == 1 ? true : false;
259
- document.getElementById("stats").checked = show[9] == 1 ? true : false;
260
- }
261
  }
262
  // Get shortcodes attributes.
263
  function get_params(module_name) {
@@ -295,25 +272,7 @@ class FMViewFormmakerwindow {
295
  }
296
  }
297
  else {
298
- if (document.getElementById('submissions_id').value == '- Select Form -') {
299
- tinyMCEPopup.close();
300
- }
301
- else {
302
- var tagtext;
303
- show = document.getElementById('csv').checked ? "1," : "0,";
304
- show += document.getElementById('xml').checked ? "1," : "0,";
305
- show += document.getElementById('title').checked ? "1," : "0,";
306
- show += document.getElementById('search').checked ? "1," : "0,";
307
- show += document.getElementById('ordering').checked ? "1," : "0,";
308
- show += document.getElementById('entries').checked ? "1," : "0,";
309
- show += document.getElementById('views').checked ? "1," : "0,";
310
- show += document.getElementById('conversion_rate').checked ? "1," : "0,";
311
- show += document.getElementById('pagination').checked ? "1," : "0,";
312
- show += document.getElementById('stats').checked ? "1" : "0";
313
- tagtext = '[Form id="' + document.getElementById('submissions_id').value + '" type="submission" startdate="' + document.getElementById('startdate').value + '" enddate="' + document.getElementById('enddate').value + '" submit_date="' + (document.getElementById('submit_date').checked ? 1 : 0) + '" submitter_ip="' + (document.getElementById('submitter_ip').checked ? 1 : 0) + '" username="' + (document.getElementById('username').checked ? 1 : 0) + '" useremail="' + (document.getElementById('useremail').checked ? 1 : 0) + '" form_fields="' + (document.getElementById('form_fields').checked ? 1 : 0) + '" show="' + show + '"]';
314
- window.tinyMCE.execCommand('mceInsertContent', false, tagtext);
315
- tinyMCEPopup.close();
316
- }
317
  }
318
  }
319
  </script>
32
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
33
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
34
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
35
+
 
 
36
  <?php
37
  wp_print_scripts('jquery');
38
  ?>
69
  margin: 0 !important;
70
  }
71
  </style>
72
+ <div class="panel_wrapper" style="overflow: hidden;">
73
  <div id="display_panel" class="panel current">
74
  <table>
75
  <tr>
90
  </table>
91
  </div>
92
  <div id="submissions_panel" class="panel">
93
+ <div class="error" style="position: relative; padding: 5px; font-size: 20px; color: red; opacity: 1; font-weight: bolder;">Front end submissions are disabled in free version.</div>
94
+ <div style="position: absolute; background: gray; width: 92%; height: 65%; opacity: 0.3;">
95
+ </div>
96
  <table>
97
  <tr>
98
  <td class="smaller_font">Select a Form:</td>
235
  if (!short_code['type']) {
236
  document.getElementById("form_maker_id").value = short_code['id'];
237
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  }
239
  // Get shortcodes attributes.
240
  function get_params(module_name) {
272
  }
273
  }
274
  else {
275
+ alert("Front end submissions are disabled in free version.");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  }
277
  }
278
  </script>
admin/views/FMViewManage_fm.php CHANGED
@@ -3417,11 +3417,17 @@ class FMViewManage_fm {
3417
  $fld_label = $fld_label[0] . ' ...';
3418
  }
3419
 
3420
- if($label_type[$i]=="type_file_upload")
3421
- $fld_label .= '(as image)';
3422
- ?>
3423
- <input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
3424
- <?php
 
 
 
 
 
 
3425
  }
3426
  ?>
3427
  <input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Submission ID" onClick="insertAtCursor(<?php echo $choise; ?>,'subid')" />
@@ -3618,7 +3624,7 @@ class FMViewManage_fm {
3618
  <?php
3619
  $choise = "document.getElementById('script_mail_user')";
3620
  for ($i = 0; $i < count($label_label); $i++) {
3621
- if ($label_type[$i] == "type_submit_reset" || $label_type[$i] == "type_editor" || $label_type[$i] == "type_map" || $label_type[$i] == "type_mark_map" || $label_type[$i] == "type_captcha" || $label_type[$i] == "type_recaptcha" || $label_type[$i] == "type_button" || $label_type[$i] == "type_file_upload" || $label_type[$i] == "type_send_copy")
3622
  continue;
3623
 
3624
  $param = htmlspecialchars(addslashes($label_label[$i]));
@@ -3628,11 +3634,17 @@ class FMViewManage_fm {
3628
  $fld_label = explode("\n", $fld_label);
3629
  $fld_label = $fld_label[0] . ' ...';
3630
  }
3631
- if($label_type[$i]=="type_file_upload")
3632
- $fld_label .= '(as image)';
3633
- ?>
3634
- <input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
3635
- <?php
 
 
 
 
 
 
3636
  }
3637
  ?>
3638
  <input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Submission ID" onClick="insertAtCursor(<?php echo $choise; ?>,'subid')" />
3417
  $fld_label = $fld_label[0] . ' ...';
3418
  }
3419
 
3420
+ if($label_type[$i]=="type_file_upload") {
3421
+ ?>
3422
+ <input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label.'(as image)'; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
3423
+ <input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label.'(as link)'; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param.'(link)'; ?>')" />
3424
+ <?php
3425
+ }
3426
+ else{
3427
+ ?>
3428
+ <input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
3429
+ <?php
3430
+ }
3431
  }
3432
  ?>
3433
  <input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Submission ID" onClick="insertAtCursor(<?php echo $choise; ?>,'subid')" />
3624
  <?php
3625
  $choise = "document.getElementById('script_mail_user')";
3626
  for ($i = 0; $i < count($label_label); $i++) {
3627
+ if ($label_type[$i] == "type_submit_reset" || $label_type[$i] == "type_editor" || $label_type[$i] == "type_map" || $label_type[$i] == "type_mark_map" || $label_type[$i] == "type_captcha" || $label_type[$i] == "type_recaptcha" || $label_type[$i] == "type_button" || $label_type[$i] == "type_send_copy")
3628
  continue;
3629
 
3630
  $param = htmlspecialchars(addslashes($label_label[$i]));
3634
  $fld_label = explode("\n", $fld_label);
3635
  $fld_label = $fld_label[0] . ' ...';
3636
  }
3637
+ if($label_type[$i]=="type_file_upload") {
3638
+ ?>
3639
+ <input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label.'(as image)'; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
3640
+ <input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label.'(as link)'; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param.'(link)'; ?>')" />
3641
+ <?php
3642
+ }
3643
+ else{
3644
+ ?>
3645
+ <input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
3646
+ <?php
3647
+ }
3648
  }
3649
  ?>
3650
  <input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Submission ID" onClick="insertAtCursor(<?php echo $choise; ?>,'subid')" />
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.8.23
7
  * Author: WebDorado
8
  * Author URI: https://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -271,7 +271,7 @@ function register_fmemailverification_cpt(){
271
  // Activate plugin.
272
  function form_maker_activate() {
273
  $version = get_option("wd_form_maker_version");
274
- $new_version = '1.8.23';
275
  global $wpdb;
276
  if (!$version) {
277
  add_option("wd_form_maker_version", $new_version, '', 'no');
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.8.24
7
  * Author: WebDorado
8
  * Author URI: https://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
271
  // Activate plugin.
272
  function form_maker_activate() {
273
  $version = get_option("wd_form_maker_version");
274
+ $new_version = '1.8.24';
275
  global $wpdb;
276
  if (!$version) {
277
  add_option("wd_form_maker_version", $new_version, '', 'no');
frontend/models/FMModelForm_maker.php CHANGED
@@ -429,7 +429,7 @@ class FMModelForm_maker {
429
  }
430
 
431
  $files['tmp_name'][$file_key]=$fileTemp;
432
- $temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key]);
433
  }
434
  else
435
  $check_both ++;
@@ -453,7 +453,7 @@ class FMModelForm_maker {
453
  }
454
 
455
  $files['tmp_name'][$file_key]=$fileTemp;
456
- $temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key]);
457
  }
458
  else
459
  $check_both ++;
@@ -467,7 +467,7 @@ class FMModelForm_maker {
467
  if($check_both != 0){
468
  $value.= '';
469
  $files['tmp_name'][$file_key]=$fileTemp;
470
- $temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key]);
471
  }
472
  // dropbox and google drive integration addons
473
  if($form->save_uploads == 1){
@@ -477,7 +477,7 @@ class FMModelForm_maker {
477
  }
478
  $value.= site_url() . '/' . $destination . '/' . $fileName . '*@@url@@*';
479
  $files['tmp_name'][$file_key]=$destination . "/" . $fileName;
480
- $temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key]);
481
 
482
  }
483
  array_push($all_files,$temp_file);
@@ -2280,7 +2280,9 @@ class FMModelForm_maker {
2280
  if ($row->mail_attachment_user) {
2281
  for ($k = 0; $k < count($all_files); $k++) {
2282
  if (isset($all_files[$k]['tmp_name'])) {
2283
- $attachment_user[$k] = $all_files[$k]['tmp_name'];
 
 
2284
  }
2285
  }
2286
  }
@@ -2300,9 +2302,15 @@ class FMModelForm_maker {
2300
 
2301
  foreach($label_order_original as $key => $label_each) {
2302
  $type=$label_type[$key];
2303
- if(strpos($row->script_mail_user, "%".$label_each."%")>-1) {
2304
- $new_value = $this->custom_fields_mail($type, $key, $id, $attachment_user, '');
2305
- $new_script = str_replace("%".$label_each."%", $new_value, $new_script);
 
 
 
 
 
 
2306
  }
2307
 
2308
  if(strpos($fromname, "%".$label_each."%")>-1) {
@@ -2394,6 +2402,8 @@ class FMModelForm_maker {
2394
  }
2395
 
2396
  if($recipient) {
 
 
2397
  $send = wp_mail(str_replace(' ', '', $recipient), $subject, stripslashes($body), $headers, $attachment_user);
2398
  }
2399
  }
@@ -2426,7 +2436,9 @@ class FMModelForm_maker {
2426
  if ($row->mail_attachment) {
2427
  for ($k = 0; $k < count($all_files); $k++) {
2428
  if (isset($all_files[$k]['tmp_name'])) {
2429
- $attachment[$k] = $all_files[$k]['tmp_name'];
 
 
2430
  }
2431
  }
2432
  }
@@ -2450,9 +2462,15 @@ class FMModelForm_maker {
2450
 
2451
  foreach($label_order_original as $key => $label_each) {
2452
  $type=$label_type[$key];
2453
- if(strpos($row->script_mail, "%".$label_each."%")>-1) {
2454
- $new_value = $this->custom_fields_mail($type, $key, $id, $attachment, '');
2455
- $new_script = str_replace("%".$label_each."%", $new_value, $new_script);
 
 
 
 
 
 
2456
  }
2457
 
2458
  if(strpos($fromname, "%".$label_each."%")>-1) {
@@ -2516,6 +2534,8 @@ class FMModelForm_maker {
2516
  }
2517
  }
2518
  $admin_body = $new_script;
 
 
2519
  if($recipient) {
2520
  $send = wp_mail(str_replace(' ', '', $recipient), $subject, stripslashes($admin_body), $headers, $attachment);
2521
  }
@@ -4335,28 +4355,34 @@ class FMModelForm_maker {
4335
  }
4336
  break;
4337
  }
4338
- case "type_file_upload": {
4339
- if($attachment)
4340
- foreach($attachment as $attachment_temp)
4341
- {
4342
- $uploadedFileNameParts = explode('.',$attachment_temp[1]);
4343
  $uploadedFileExtension = array_pop($uploadedFileNameParts);
4344
-
4345
- $invalidFileExts = array('gif', 'jpg', 'jpeg', 'png', 'swf', 'psd', 'bmp', 'tiff', 'jpc', 'jp2', 'jpf', 'jb2', 'swc', 'aiff', 'wbmp', 'xbm' );
4346
- $extOk = false;
4347
-
4348
- foreach($invalidFileExts as $key => $valuee)
4349
- {
4350
- if(is_numeric(strpos(strtolower($valuee), strtolower($uploadedFileExtension) )) )
4351
- $extOk = true;
4352
  }
4353
-
4354
- if ($extOk == true)
4355
- $new_value .= '<img src="'.site_url().'/'.$attachment_temp.'" alt="'.$attachment_temp[1].'"/>';
 
 
 
 
 
 
4356
 
4357
- }
 
 
 
 
 
 
4358
  break;
4359
  }
 
4360
  case "type_hidden": {
4361
  $element = isset($_POST[$element_label]) ? $_POST[$element_label] : NULL;
4362
  if(isset($element)) {
429
  }
430
 
431
  $files['tmp_name'][$file_key]=$fileTemp;
432
+ $temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key], 'field_key' => $i);
433
  }
434
  else
435
  $check_both ++;
453
  }
454
 
455
  $files['tmp_name'][$file_key]=$fileTemp;
456
+ $temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key], 'field_key' => $i);
457
  }
458
  else
459
  $check_both ++;
467
  if($check_both != 0){
468
  $value.= '';
469
  $files['tmp_name'][$file_key]=$fileTemp;
470
+ $temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key], 'field_key' => $i);
471
  }
472
  // dropbox and google drive integration addons
473
  if($form->save_uploads == 1){
477
  }
478
  $value.= site_url() . '/' . $destination . '/' . $fileName . '*@@url@@*';
479
  $files['tmp_name'][$file_key]=$destination . "/" . $fileName;
480
+ $temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key], 'field_key' => $i);
481
 
482
  }
483
  array_push($all_files,$temp_file);
2280
  if ($row->mail_attachment_user) {
2281
  for ($k = 0; $k < count($all_files); $k++) {
2282
  if (isset($all_files[$k]['tmp_name'])) {
2283
+ if(!isset($attachment_user[$all_files[$k]['field_key']]))
2284
+ $attachment_user[$all_files[$k]['field_key']] = array();
2285
+ array_push($attachment_user[$all_files[$k]['field_key']], $all_files[$k]['tmp_name']);
2286
  }
2287
  }
2288
  }
2302
 
2303
  foreach($label_order_original as $key => $label_each) {
2304
  $type=$label_type[$key];
2305
+ if(strpos($row->script_mail_user, "%".$label_each."%") > -1) {
2306
+ $new_value = $this->custom_fields_mail($type, $key, $id, $attachment_user, '');
2307
+ $new_script = str_replace("%".$label_each."%", $new_value, $new_script);
2308
+ }
2309
+ else{
2310
+ if($type == "type_file_upload" && strpos($row->script_mail_user, "%".$label_each."(link)%") > -1) {
2311
+ $new_value = $this->custom_fields_mail($type, $key, $id, $attachment_user, '', 1);
2312
+ $new_script = str_replace("%".$label_each."(link)%", $new_value, $new_script);
2313
+ }
2314
  }
2315
 
2316
  if(strpos($fromname, "%".$label_each."%")>-1) {
2402
  }
2403
 
2404
  if($recipient) {
2405
+ $remove_parrent_array_user = new RecursiveIteratorIterator(new RecursiveArrayIterator($attachment_user));
2406
+ $attachment_user = iterator_to_array($remove_parrent_array_user, false);
2407
  $send = wp_mail(str_replace(' ', '', $recipient), $subject, stripslashes($body), $headers, $attachment_user);
2408
  }
2409
  }
2436
  if ($row->mail_attachment) {
2437
  for ($k = 0; $k < count($all_files); $k++) {
2438
  if (isset($all_files[$k]['tmp_name'])) {
2439
+ if(!isset($attachment[$all_files[$k]['field_key']]))
2440
+ $attachment[$all_files[$k]['field_key']] = array();
2441
+ array_push($attachment[$all_files[$k]['field_key']], $all_files[$k]['tmp_name']);
2442
  }
2443
  }
2444
  }
2462
 
2463
  foreach($label_order_original as $key => $label_each) {
2464
  $type=$label_type[$key];
2465
+ if(strpos($row->script_mail, "%".$label_each."%") > -1) {
2466
+ $new_value = $this->custom_fields_mail($type, $key, $id, $attachment, '');
2467
+ $new_script = str_replace("%".$label_each."%", $new_value, $new_script);
2468
+ }
2469
+ else{
2470
+ if($type == "type_file_upload" && strpos($row->script_mail, "%".$label_each."(link)%") > -1) {
2471
+ $new_value = $this->custom_fields_mail($type, $key, $id, $attachment, '', 1);
2472
+ $new_script = str_replace("%".$label_each."(link)%", $new_value, $new_script);
2473
+ }
2474
  }
2475
 
2476
  if(strpos($fromname, "%".$label_each."%")>-1) {
2534
  }
2535
  }
2536
  $admin_body = $new_script;
2537
+ $remove_parrent_array = new RecursiveIteratorIterator(new RecursiveArrayIterator($attachment));
2538
+ $attachment = iterator_to_array($remove_parrent_array, false);
2539
  if($recipient) {
2540
  $send = wp_mail(str_replace(' ', '', $recipient), $subject, stripslashes($admin_body), $headers, $attachment);
2541
  }
4355
  }
4356
  break;
4357
  }
4358
+ case "type_file_upload": {
4359
+ if(isset($attachment[$key])) {
4360
+ foreach($attachment[$key] as $attach) {
4361
+ $uploadedFileNameParts = explode('.', $attach);
 
4362
  $uploadedFileExtension = array_pop($uploadedFileNameParts);
4363
+ if($file_upload_link == 1){
4364
+ $new_value .= '<a href="'.site_url().'/'.$attach.'"/>'.site_url().'/'.$attach.'</a><br />';
 
 
 
 
 
 
4365
  }
4366
+ else {
4367
+ $invalidFileExts = array('gif', 'jpg', 'jpeg', 'png', 'swf', 'psd', 'bmp', 'tiff', 'jpc', 'jp2', 'jpf', 'jb2', 'swc', 'aiff', 'wbmp', 'xbm' );
4368
+ $extOk = false;
4369
+
4370
+ foreach($invalidFileExts as $key => $valuee)
4371
+ {
4372
+ if(is_numeric(strpos(strtolower($valuee), strtolower($uploadedFileExtension) )) )
4373
+ $extOk = true;
4374
+ }
4375
 
4376
+ if ($extOk == true)
4377
+ $new_value .= '<img src="'.site_url().'/'.$attach.'" alt="'.$attach.'"/>';
4378
+
4379
+ }
4380
+ }
4381
+ }
4382
+
4383
  break;
4384
  }
4385
+
4386
  case "type_hidden": {
4387
  $element = isset($_POST[$element_label]) ? $_POST[$element_label] : NULL;
4388
  if(isset($element)) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-form.html
4
  Tags: form, forms, form builder, form maker, form manager, form plugin, form with recaptcha, forms plugin, multiple forms, paypal form, survey form, feedback form, feedback forms, contact form, contact form plugin, contact form builder, form creator, email form, secure form, web form, form to email, contact forms, custom forms, form widget, captcha form, wordpress contact form ,recaptcha contact form, form creation, contact form with auto reply, widget contact form, builder, feedback, contacts form plugin , custom contact form, contact us form, admin, captcha, contact, database, email, javascript, jquery, page, plugin, survey, widget, custom form, forms creator, input, validation, send copy, form with captcha, pdf, mysql
5
  Requires at least: 3.4
6
  Tested up to: 4.4
7
- Stable tag: 1.8.23
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -302,6 +302,9 @@ The Form Maker (Pro version) has simple PayPal integration. This allows the user
302
 
303
  == Changelog ==
304
 
 
 
 
305
  = 1.8.23 =
306
  Fixed: Bug in textarea field with line breaks
307
 
4
  Tags: form, forms, form builder, form maker, form manager, form plugin, form with recaptcha, forms plugin, multiple forms, paypal form, survey form, feedback form, feedback forms, contact form, contact form plugin, contact form builder, form creator, email form, secure form, web form, form to email, contact forms, custom forms, form widget, captcha form, wordpress contact form ,recaptcha contact form, form creation, contact form with auto reply, widget contact form, builder, feedback, contacts form plugin , custom contact form, contact us form, admin, captcha, contact, database, email, javascript, jquery, page, plugin, survey, widget, custom form, forms creator, input, validation, send copy, form with captcha, pdf, mysql
5
  Requires at least: 3.4
6
  Tested up to: 4.4
7
+ Stable tag: 1.8.24
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
302
 
303
  == Changelog ==
304
 
305
+ = 1.8.24 =
306
+ Added: File upload as a link in email
307
+
308
  = 1.8.23 =
309
  Fixed: Bug in textarea field with line breaks
310