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

Version Description

Allow to use entry values in "Custom text after submission"

Download this release

Release Info

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

Code changes from version 1.7.39 to 1.7.40

admin/views/FMViewManage_fm.php CHANGED
@@ -3567,6 +3567,30 @@ class FMViewManage_fm {
3567
  <label for="submit_text">Text</label>
3568
  </td>
3569
  <td class="fm_options_value">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3570
  <?php
3571
  if (user_can_richedit()) {
3572
  wp_editor($row->submit_text, 'submit_text', array('teeny' => FALSE, 'textarea_name' => 'submit_text', 'media_buttons' => FALSE, 'textarea_rows' => 5));
3567
  <label for="submit_text">Text</label>
3568
  </td>
3569
  <td class="fm_options_value">
3570
+ <?php $choise = "document.getElementById('submit_text')";
3571
+ for ($i = 0; $i < count($label_label); $i++) {
3572
+ 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" || $label_type[$i]=="type_file_upload") {
3573
+ continue;
3574
+ }
3575
+ $param = htmlspecialchars(addslashes($label_label[$i]));
3576
+ $fld_label = $param;
3577
+ if(strlen($fld_label)>30)
3578
+ {
3579
+ $fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
3580
+ $fld_label = explode("\n", $fld_label);
3581
+ $fld_label = $fld_label[0] . ' ...';
3582
+ }
3583
+
3584
+ ?>
3585
+ <input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
3586
+ <?php
3587
+ }
3588
+ ?>
3589
+ <input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Submission ID" onClick="insertAtCursor(<?php echo $choise; ?>,'subid')" />
3590
+ <input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Ip" onClick="insertAtCursor(<?php echo $choise; ?>,'ip')" />
3591
+ <input style="border: 1px solid silver; font-size: 10px; margin:3px;" type="button" value="User Id" onClick="insertAtCursor(<?php echo $choise; ?>, 'userid')" />
3592
+ <input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Username" onClick="insertAtCursor(<?php echo $choise; ?>,'username')" />
3593
+ <input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="User Email" onClick="insertAtCursor(<?php echo $choise; ?>,'useremail')" />
3594
  <?php
3595
  if (user_can_richedit()) {
3596
  wp_editor($row->submit_text, 'submit_text', array('teeny' => FALSE, 'textarea_name' => 'submit_text', 'media_buttons' => FALSE, 'textarea_rows' => 5));
form-maker.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Form Maker
4
  * Plugin URI: http://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.7.39
7
  * Author: WebDorado
8
  * Author URI: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -207,7 +207,7 @@ if (class_exists('WP_Widget')) {
207
  // Activate plugin.
208
  function form_maker_activate() {
209
  $version = get_option("wd_form_maker_version");
210
- $new_version = '1.7.39';
211
  if (!$version) {
212
  add_option("wd_form_maker_version", $new_version, '', 'no');
213
  global $wpdb;
3
  * Plugin Name: Form Maker
4
  * Plugin URI: http://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.7.40
7
  * Author: WebDorado
8
  * Author URI: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
207
  // Activate plugin.
208
  function form_maker_activate() {
209
  $version = get_option("wd_form_maker_version");
210
+ $new_version = '1.7.40';
211
  if (!$version) {
212
  add_option("wd_form_maker_version", $new_version, '', 'no');
213
  global $wpdb;
frontend/models/FMModelForm_maker.php CHANGED
@@ -1201,7 +1201,7 @@ class FMModelForm_maker {
1201
  return array($max + 1);
1202
  }
1203
  }
1204
-
1205
  $r = $wpdb->prefix . "formmaker_submits";
1206
 
1207
  $save_or_no = $wpdb->insert($r, array(
@@ -1401,9 +1401,63 @@ class FMModelForm_maker {
1401
  $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id= %d', $group_id));
1402
  }
1403
 
1404
- public function get_after_submission_text($form_id) {
1405
  global $wpdb;
1406
- return $wpdb->get_var("SELECT submit_text FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form_id . "'");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1407
  }
1408
 
1409
  public function increment_views_count($id) {
1201
  return array($max + 1);
1202
  }
1203
  }
1204
+
1205
  $r = $wpdb->prefix . "formmaker_submits";
1206
 
1207
  $save_or_no = $wpdb->insert($r, array(
1401
  $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id= %d', $group_id));
1402
  }
1403
 
1404
+ public function get_after_submission_text($form_id) {
1405
  global $wpdb;
1406
+ $submit_text = $wpdb->get_var("SELECT submit_text FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form_id . "'");
1407
+ $current_user = wp_get_current_user();
1408
+ if ($current_user->ID != 0){
1409
+ $userid = $current_user->ID;
1410
+ $username = $current_user->display_name;
1411
+ $useremail = $current_user->user_email;
1412
+ } else{
1413
+ $userid = '';
1414
+ $username = '';
1415
+ $useremail = '';
1416
+ }
1417
+ $ip = $_SERVER['REMOTE_ADDR'];
1418
+ $subid = $wpdb->get_var("SELECT MAX( group_id ) FROM " . $wpdb->prefix ."formmaker_submits" );
1419
+ $row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=%d", $form_id));
1420
+
1421
+ $old = false;
1422
+ if(isset($row->form)) {
1423
+ $old = true;
1424
+ }
1425
+ $label_order_original = array();
1426
+ $label_order_ids = array();
1427
+ $submission_array = array();
1428
+ if($old == false || ($old == true && $row->form == '')) {
1429
+ $label_all = explode('#****#',$row->label_order_current);
1430
+ } else {
1431
+ $label_all = explode('#****#',$row->label_order);
1432
+ }
1433
+ $label_all = array_slice($label_all, 0, count($label_all) - 1);
1434
+ foreach ($label_all as $key => $label_each) {
1435
+ $label_id_each = explode('#**id**#', $label_each);
1436
+ $label_id = $label_id_each[0];
1437
+ array_push($label_order_ids, $label_id);
1438
+ $label_order_each = explode('#**label**#', $label_id_each[1]);
1439
+ $label_order_original[$label_id] = $label_order_each[0];
1440
+ }
1441
+
1442
+ $submissions_row = $wpdb->get_results($wpdb->prepare("SELECT `element_label`, `element_value` FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id=%d AND group_id=%d", $form_id, $subid));
1443
+ foreach ($submissions_row as $sub_row){
1444
+ $submission_array[$sub_row->element_label] = $sub_row->element_value;
1445
+ }
1446
+
1447
+ foreach($label_order_original as $key => $label_each) {
1448
+ if(strpos($submit_text, "%".$label_each."%")>-1) {
1449
+ $submit_text = str_replace("%".$label_each."%", $submission_array[$key], $submit_text);
1450
+ }
1451
+ }
1452
+
1453
+ $custom_fields = array( "subid"=>$subid, "ip"=>$ip, "userid"=>$userid, "username"=>$username, "useremail"=>$useremail);
1454
+ foreach($custom_fields as $key=>$custom_field)
1455
+ {
1456
+ if(strpos($submit_text, "%".$key."%")>-1)
1457
+ $submit_text = str_replace("%".$key."%", $custom_field, $submit_text);
1458
+ }
1459
+
1460
+ return $submit_text;
1461
  }
1462
 
1463
  public function increment_views_count($id) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://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, formular, formulario, admin, captcha, contact, database, email, javascript, jquery, page, plugin, survey, widget, custom form, forms creator, input, validation, send copy, form with captcha
5
  Requires at least: 3.4
6
  Tested up to: 4.2
7
- Stable tag: 1.7.39
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -276,6 +276,8 @@ The Form Maker (Pro version) has simple PayPal integration. This allows the user
276
 
277
 
278
  == Changelog ==
 
 
279
 
280
  = 1.7.39 =
281
  New: User informetion in mysql mapping
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, formular, formulario, admin, captcha, contact, database, email, javascript, jquery, page, plugin, survey, widget, custom form, forms creator, input, validation, send copy, form with captcha
5
  Requires at least: 3.4
6
  Tested up to: 4.2
7
+ Stable tag: 1.7.40
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
276
 
277
 
278
  == Changelog ==
279
+ = 1.7.40 =
280
+ Allow to use entry values in "Custom text after submission"
281
 
282
  = 1.7.39 =
283
  New: User informetion in mysql mapping