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

Version Description

Download this release

Release Info

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

Code changes from version 1.7.27 to 1.7.28

admin/controllers/FMControllerBlocked_ips_fm.php CHANGED
@@ -23,9 +23,8 @@ class FMControllerBlocked_ips_fm {
23
  $id = WDW_FM_Library::get('current_id', 0);
24
  $message = WDW_FM_Library::get('message');
25
  echo WDW_FM_Library::message_id($message);
26
- // $task = ((isset($_POST['task'])) ? esc_html($_POST['task']) : '');
27
- // $id = ((isset($_POST['current_id'])) ? esc_html($_POST['current_id']) : 0);
28
  if (method_exists($this, $task)) {
 
29
  $this->$task($id);
30
  }
31
  else {
@@ -94,6 +93,9 @@ class FMControllerBlocked_ips_fm {
94
  if ($flag) {
95
  $message = 1;
96
  }
 
 
 
97
  // $this->display();
98
  $page = WDW_FM_Library::get('page');
99
  WDW_FM_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
23
  $id = WDW_FM_Library::get('current_id', 0);
24
  $message = WDW_FM_Library::get('message');
25
  echo WDW_FM_Library::message_id($message);
 
 
26
  if (method_exists($this, $task)) {
27
+ check_admin_referer('nonce_fm', 'nonce_fm');
28
  $this->$task($id);
29
  }
30
  else {
93
  if ($flag) {
94
  $message = 1;
95
  }
96
+ else {
97
+ $message = 0;
98
+ }
99
  // $this->display();
100
  $page = WDW_FM_Library::get('page');
101
  WDW_FM_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
admin/controllers/FMControllerFormMakerSQLMapping.php CHANGED
@@ -20,8 +20,8 @@ class FMControllerFormMakerSQLMapping {
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  public function execute() {
22
  $task = ((isset($_GET['task'])) ? esc_html($_GET['task']) : 0);
23
- $id = ((isset($_GET['id'])) ? esc_html($_GET['id']) : 0);
24
- $form_id = ((isset($_GET['form_id'])) ? esc_html($_GET['form_id']) : 0);
25
  if ($task && method_exists($this, $task)) {
26
  $this->$task($form_id);
27
  }
@@ -73,7 +73,7 @@ class FMControllerFormMakerSQLMapping {
73
 
74
  public function save_query() {
75
  global $wpdb;
76
- $form_id = ((isset($_GET['form_id'])) ? esc_html($_GET['form_id']) : 0);
77
  $query = ((isset($_POST['query'])) ? stripslashes(wp_specialchars_decode($_POST['query'])) : "");
78
  $details = ((isset($_POST['details'])) ? esc_html($_POST['details']) : "");
79
  $save = $wpdb->insert($wpdb->prefix . 'formmaker_query', array(
@@ -89,8 +89,8 @@ class FMControllerFormMakerSQLMapping {
89
 
90
  public function update_query() {
91
  global $wpdb;
92
- $id = ((isset($_GET['id'])) ? esc_html($_GET['id']) : 0);
93
- $form_id = ((isset($_GET['form_id'])) ? esc_html($_GET['form_id']) : 0);
94
  $query = ((isset($_POST['query'])) ? stripslashes(wp_specialchars_decode($_POST['query'])) : "");
95
  $details = ((isset($_POST['details'])) ? esc_html($_POST['details']) : "");
96
  $save = $wpdb->update($wpdb->prefix . 'formmaker_query', array(
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  public function execute() {
22
  $task = ((isset($_GET['task'])) ? esc_html($_GET['task']) : 0);
23
+ $id = ((isset($_GET['id'])) ? (int) $_GET['id'] : 0);
24
+ $form_id = ((isset($_GET['form_id'])) ? (int) $_GET['form_id'] : 0);
25
  if ($task && method_exists($this, $task)) {
26
  $this->$task($form_id);
27
  }
73
 
74
  public function save_query() {
75
  global $wpdb;
76
+ $form_id = ((isset($_GET['form_id'])) ? (int) $_GET['form_id'] : 0);
77
  $query = ((isset($_POST['query'])) ? stripslashes(wp_specialchars_decode($_POST['query'])) : "");
78
  $details = ((isset($_POST['details'])) ? esc_html($_POST['details']) : "");
79
  $save = $wpdb->insert($wpdb->prefix . 'formmaker_query', array(
89
 
90
  public function update_query() {
91
  global $wpdb;
92
+ $id = ((isset($_GET['id'])) ? (int) $_GET['id'] : 0);
93
+ $form_id = ((isset($_GET['form_id'])) ? (int) $_GET['form_id'] : 0);
94
  $query = ((isset($_POST['query'])) ? stripslashes(wp_specialchars_decode($_POST['query'])) : "");
95
  $details = ((isset($_POST['details'])) ? esc_html($_POST['details']) : "");
96
  $save = $wpdb->update($wpdb->prefix . 'formmaker_query', array(
admin/controllers/FMControllerManage_fm.php CHANGED
@@ -19,13 +19,12 @@ class FMControllerManage_fm {
19
  // Public Methods //
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  public function execute() {
22
- // $task = ((isset($_POST['task'])) ? esc_html($_POST['task']) : '');
23
- // $id = ((isset($_POST['current_id'])) ? esc_html($_POST['current_id']) : 0);
24
  $task = WDW_FM_Library::get('task');
25
  $id = WDW_FM_Library::get('current_id', 0);
26
  $message = WDW_FM_Library::get('message');
27
  echo WDW_FM_Library::message_id($message);
28
  if (method_exists($this, $task)) {
 
29
  $this->$task($id);
30
  }
31
  else {
@@ -57,7 +56,6 @@ class FMControllerManage_fm {
57
 
58
  require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php";
59
  $view = new FMViewManage_fm($model);
60
- // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
61
  $id = WDW_FM_Library::get('current_id', 0);
62
  $view->edit($id);
63
  }
@@ -68,7 +66,6 @@ class FMControllerManage_fm {
68
 
69
  require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php";
70
  $view = new FMViewManage_fm($model);
71
- // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
72
  $id = WDW_FM_Library::get('current_id', 0);
73
  $view->edit_old($id);
74
  }
@@ -82,7 +79,6 @@ class FMControllerManage_fm {
82
 
83
  require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php";
84
  $view = new FMViewManage_fm($model);
85
- // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
86
  global $wpdb;
87
  $id = WDW_FM_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker"));
88
  $view->form_options_old($id);
@@ -125,7 +121,6 @@ function before_reset() {
125
 
126
  }";
127
  global $wpdb;
128
- // $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes($_POST['current_id'])) : 0);
129
  $id = WDW_FM_Library::get('current_id', 0);
130
  $mail = (isset($_POST['mail']) ? esc_html(stripslashes($_POST['mail'])) : '');
131
  $theme = (isset($_POST['theme']) ? esc_html(stripslashes($_POST['theme'])) : 1);
@@ -198,7 +193,6 @@ function before_reset() {
198
 
199
  require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php";
200
  $view = new FMViewManage_fm($model);
201
- // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
202
  global $wpdb;
203
  $id = WDW_FM_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker"));
204
  $view->form_layout($id);
@@ -219,7 +213,6 @@ function before_reset() {
219
 
220
  require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php";
221
  $view = new FMViewManage_fm($model);
222
- // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
223
  $page = WDW_FM_Library::get('page');
224
  $current_id = WDW_FM_Library::get('current_id', 0);
225
  WDW_FM_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'form_layout', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
@@ -228,7 +221,6 @@ function before_reset() {
228
 
229
  public function save_db_layout() {
230
  global $wpdb;
231
- // $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes($_POST['current_id'])) : 0);
232
  $id = WDW_FM_Library::get('current_id', 0);
233
  $custom_front = (isset($_POST['custom_front']) ? stripslashes($_POST['custom_front']) : '');
234
  $autogen_layout = (isset($_POST['autogen_layout']) ? 1 : 0);
@@ -656,7 +648,6 @@ function before_submit() {
656
  // before form reset
657
  function before_reset() {
658
  }";
659
- // $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes($_POST['current_id'])) : 0);
660
  $id = WDW_FM_Library::get('current_id', 0);
661
  $title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
662
  $form_front = (isset($_POST['form_front']) ? stripslashes($_POST['form_front']) : '');
@@ -671,7 +662,6 @@ function before_reset() {
671
  $recaptcha_theme = (isset($_POST['recaptcha_theme']) ? esc_html(stripslashes($_POST['recaptcha_theme'])) : '');
672
  $label_order_current = (isset($_POST['label_order_current']) ? esc_html(stripslashes($_POST['label_order_current'])) : '');
673
  $form_fields = (isset($_POST['form_fields']) ? stripslashes($_POST['form_fields']) : '');
674
-
675
  if ($id != 0) {
676
  $save = $wpdb->update($wpdb->prefix . 'formmaker', array(
677
  'title' => $title,
19
  // Public Methods //
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  public function execute() {
 
 
22
  $task = WDW_FM_Library::get('task');
23
  $id = WDW_FM_Library::get('current_id', 0);
24
  $message = WDW_FM_Library::get('message');
25
  echo WDW_FM_Library::message_id($message);
26
  if (method_exists($this, $task)) {
27
+ check_admin_referer('nonce_fm', 'nonce_fm');
28
  $this->$task($id);
29
  }
30
  else {
56
 
57
  require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php";
58
  $view = new FMViewManage_fm($model);
 
59
  $id = WDW_FM_Library::get('current_id', 0);
60
  $view->edit($id);
61
  }
66
 
67
  require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php";
68
  $view = new FMViewManage_fm($model);
 
69
  $id = WDW_FM_Library::get('current_id', 0);
70
  $view->edit_old($id);
71
  }
79
 
80
  require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php";
81
  $view = new FMViewManage_fm($model);
 
82
  global $wpdb;
83
  $id = WDW_FM_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker"));
84
  $view->form_options_old($id);
121
 
122
  }";
123
  global $wpdb;
 
124
  $id = WDW_FM_Library::get('current_id', 0);
125
  $mail = (isset($_POST['mail']) ? esc_html(stripslashes($_POST['mail'])) : '');
126
  $theme = (isset($_POST['theme']) ? esc_html(stripslashes($_POST['theme'])) : 1);
193
 
194
  require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php";
195
  $view = new FMViewManage_fm($model);
 
196
  global $wpdb;
197
  $id = WDW_FM_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker"));
198
  $view->form_layout($id);
213
 
214
  require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php";
215
  $view = new FMViewManage_fm($model);
 
216
  $page = WDW_FM_Library::get('page');
217
  $current_id = WDW_FM_Library::get('current_id', 0);
218
  WDW_FM_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'form_layout', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
221
 
222
  public function save_db_layout() {
223
  global $wpdb;
 
224
  $id = WDW_FM_Library::get('current_id', 0);
225
  $custom_front = (isset($_POST['custom_front']) ? stripslashes($_POST['custom_front']) : '');
226
  $autogen_layout = (isset($_POST['autogen_layout']) ? 1 : 0);
648
  // before form reset
649
  function before_reset() {
650
  }";
 
651
  $id = WDW_FM_Library::get('current_id', 0);
652
  $title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
653
  $form_front = (isset($_POST['form_front']) ? stripslashes($_POST['form_front']) : '');
662
  $recaptcha_theme = (isset($_POST['recaptcha_theme']) ? esc_html(stripslashes($_POST['recaptcha_theme'])) : '');
663
  $label_order_current = (isset($_POST['label_order_current']) ? esc_html(stripslashes($_POST['label_order_current'])) : '');
664
  $form_fields = (isset($_POST['form_fields']) ? stripslashes($_POST['form_fields']) : '');
 
665
  if ($id != 0) {
666
  $save = $wpdb->update($wpdb->prefix . 'formmaker', array(
667
  'title' => $title,
admin/controllers/FMControllerSubmissions_fm.php CHANGED
@@ -23,6 +23,7 @@ class FMControllerSubmissions_fm {
23
  $id = ((isset($_POST['current_id'])) ? esc_html($_POST['current_id']) : 0);
24
  $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? esc_html($_POST['form_id']) : 0);
25
  if (method_exists($this, $task)) {
 
26
  $this->$task($id);
27
  }
28
  else {
@@ -52,29 +53,33 @@ class FMControllerSubmissions_fm {
52
 
53
  public function edit() {
54
  global $wpdb;
55
- $new_form = false;
56
  require_once WD_FM_DIR . "/admin/models/FMModelSubmissions_fm.php";
57
  $model = new FMModelSubmissions_fm();
58
 
59
  require_once WD_FM_DIR . "/admin/views/FMViewSubmissions_fm.php";
60
  $view = new FMViewSubmissions_fm($model);
61
- $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
62
 
63
  $form_id = $wpdb->get_var("SELECT form_id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "'");
64
- $theme_id = $wpdb->get_var("SELECT theme FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form_id . "'");
 
65
  $css = $wpdb->get_var("SELECT css FROM " . $wpdb->prefix . "formmaker_themes WHERE id='" . $theme_id . "'");
66
-
67
- if (strpos($css,'.wdform_section') > -1) {
68
- $new_form = true;
69
- }
70
- if ($new_form == false) {
71
- $view->edit($id);
72
  }
73
  else {
 
 
 
 
74
  $view->new_edit($id);
75
  }
76
- }
77
-
 
 
 
78
  public function save() {
79
  $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? esc_html($_POST['form_id']) : 0);
80
  $this->save_db();
23
  $id = ((isset($_POST['current_id'])) ? esc_html($_POST['current_id']) : 0);
24
  $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? esc_html($_POST['form_id']) : 0);
25
  if (method_exists($this, $task)) {
26
+ check_admin_referer('nonce_fm', 'nonce_fm');
27
  $this->$task($id);
28
  }
29
  else {
53
 
54
  public function edit() {
55
  global $wpdb;
 
56
  require_once WD_FM_DIR . "/admin/models/FMModelSubmissions_fm.php";
57
  $model = new FMModelSubmissions_fm();
58
 
59
  require_once WD_FM_DIR . "/admin/views/FMViewSubmissions_fm.php";
60
  $view = new FMViewSubmissions_fm($model);
61
+ $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? (int) $_POST['current_id'] : 0);
62
 
63
  $form_id = $wpdb->get_var("SELECT form_id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "'");
64
+ $form = $wpdb->get_var("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form_id . "'");
65
+ $theme_id = $form->theme;
66
  $css = $wpdb->get_var("SELECT css FROM " . $wpdb->prefix . "formmaker_themes WHERE id='" . $theme_id . "'");
67
+
68
+ if (isset($form->form)) {
69
+ $old = TRUE;
 
 
 
70
  }
71
  else {
72
+ $old = FALSE;
73
+ }
74
+
75
+ if ($old == FALSE || ($old == TRUE && $form->form == '')) {
76
  $view->new_edit($id);
77
  }
78
+ else {
79
+ $view->edit($id);
80
+ }
81
+ }
82
+
83
  public function save() {
84
  $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? esc_html($_POST['form_id']) : 0);
85
  $this->save_db();
admin/controllers/FMControllerThemes_fm.php CHANGED
@@ -23,9 +23,8 @@ class FMControllerThemes_fm {
23
  $id = WDW_FM_Library::get('current_id', 0);
24
  $message = WDW_FM_Library::get('message');
25
  echo WDW_FM_Library::message_id($message);
26
- // $task = ((isset($_POST['task'])) ? esc_html($_POST['task']) : '');
27
- // $id = ((isset($_POST['current_id'])) ? esc_html($_POST['current_id']) : 0);
28
  if (method_exists($this, $task)) {
 
29
  $this->$task($id);
30
  }
31
  else {
23
  $id = WDW_FM_Library::get('current_id', 0);
24
  $message = WDW_FM_Library::get('message');
25
  echo WDW_FM_Library::message_id($message);
 
 
26
  if (method_exists($this, $task)) {
27
+ check_admin_referer('nonce_fm', 'nonce_fm');
28
  $this->$task($id);
29
  }
30
  else {
admin/controllers/FMControllerUninstall_fm.php CHANGED
@@ -21,6 +21,7 @@ class FMControllerUninstall_fm {
21
  public function execute() {
22
  $task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
23
  if (method_exists($this, $task)) {
 
24
  $this->$task();
25
  }
26
  else {
21
  public function execute() {
22
  $task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
23
  if (method_exists($this, $task)) {
24
+ check_admin_referer('nonce_fm', 'nonce_fm');
25
  $this->$task();
26
  }
27
  else {
admin/views/FMViewBlocked_ips_fm.php CHANGED
@@ -44,6 +44,7 @@ class FMViewBlocked_ips_fm {
44
  </div>
45
  </div>
46
  <form onkeypress="spider_doNothing(event)" class="wrap" id="blocked_ips" method="post" action="admin.php?page=blocked_ips_fm" style="float: left; width: 99%;">
 
47
  <span class="block_icon"></span>
48
  <h2>Blocked IPs</h2>
49
  <div class="buttons_div">
44
  </div>
45
  </div>
46
  <form onkeypress="spider_doNothing(event)" class="wrap" id="blocked_ips" method="post" action="admin.php?page=blocked_ips_fm" style="float: left; width: 99%;">
47
+ <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
48
  <span class="block_icon"></span>
49
  <h2>Blocked IPs</h2>
50
  <div class="buttons_div">
admin/views/FMViewFormMakerEditCSS.php CHANGED
@@ -27,6 +27,7 @@ class FMViewFormMakerEditCSS {
27
  $form_id = ((isset($_GET['form_id'])) ? esc_html(stripslashes($_GET['form_id'])) : 0);
28
  $row = $this->model->get_theme_row($theme_id);
29
  wp_print_scripts('jquery');
 
30
  ?>
31
  <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&amp;dir=ltr&amp;load=admin-bar,dashicons,wp-admin,buttons,wp-auth-check" rel="stylesheet">
32
  <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>css/colors<?php echo ((get_bloginfo('version') < '3.8') ? '-fresh' : ''); ?>.min.css" id="colors-css" rel="stylesheet">
27
  $form_id = ((isset($_GET['form_id'])) ? esc_html(stripslashes($_GET['form_id'])) : 0);
28
  $row = $this->model->get_theme_row($theme_id);
29
  wp_print_scripts('jquery');
30
+
31
  ?>
32
  <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&amp;dir=ltr&amp;load=admin-bar,dashicons,wp-admin,buttons,wp-auth-check" rel="stylesheet">
33
  <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>css/colors<?php echo ((get_bloginfo('version') < '3.8') ? '-fresh' : ''); ?>.min.css" id="colors-css" rel="stylesheet">
admin/views/FMViewFormMakerSQLMapping.php CHANGED
@@ -110,7 +110,7 @@ class FMViewFormMakerSQLMapping {
110
  jQuery("#fieldlist").hide();
111
  }
112
  });
113
- jQuery('.cols input[type="text"]').live('click', function() {
114
  event.stopPropagation();
115
  jQuery("#fieldlist").css("top",jQuery(this).offset().top+jQuery(this).height()+2);
116
  jQuery("#fieldlist").css("left",jQuery(this).offset().left);
@@ -483,7 +483,7 @@ class FMViewFormMakerSQLMapping {
483
  </tr>
484
  <tr valign="top">
485
  <td class="key">
486
- <label>Method: </label>
487
  </td>
488
  <td >
489
  <input type="radio" name="con_method" id="insert" value="insert" <?php if($con_method=='insert') echo 'checked="checked"'?> disabled>
@@ -781,7 +781,7 @@ class FMViewFormMakerSQLMapping {
781
  </tr>
782
  <tr valign="top">
783
  <td class="key">
784
- <label>Method: </label>
785
  </td>
786
  <td >
787
  <input type="radio" name="con_method" id="insert" value="insert" checked="checked">
@@ -942,7 +942,7 @@ class FMViewFormMakerSQLMapping {
942
  }
943
  });
944
 
945
- jQuery('.cols input[type="text"]').live('click', function() {
946
  event.stopPropagation();
947
  jQuery("#fieldlist").css("top",jQuery(this).offset().top+jQuery(this).height()+2);
948
  jQuery("#fieldlist").css("left",jQuery(this).offset().left);
110
  jQuery("#fieldlist").hide();
111
  }
112
  });
113
+ jQuery('.cols input[type="text"]').on('click', function() {
114
  event.stopPropagation();
115
  jQuery("#fieldlist").css("top",jQuery(this).offset().top+jQuery(this).height()+2);
116
  jQuery("#fieldlist").css("left",jQuery(this).offset().left);
483
  </tr>
484
  <tr valign="top">
485
  <td class="key">
486
+ <label>Type: </label>
487
  </td>
488
  <td >
489
  <input type="radio" name="con_method" id="insert" value="insert" <?php if($con_method=='insert') echo 'checked="checked"'?> disabled>
781
  </tr>
782
  <tr valign="top">
783
  <td class="key">
784
+ <label>Type: </label>
785
  </td>
786
  <td >
787
  <input type="radio" name="con_method" id="insert" value="insert" checked="checked">
942
  }
943
  });
944
 
945
+ jQuery('.cols input[type="text"]').on('click', function() {
946
  event.stopPropagation();
947
  jQuery("#fieldlist").css("top",jQuery(this).offset().top+jQuery(this).height()+2);
948
  jQuery("#fieldlist").css("left",jQuery(this).offset().left);
admin/views/FMViewManage_fm.php CHANGED
@@ -44,6 +44,7 @@ class FMViewManage_fm {
44
  </div>
45
  </div>
46
  <form onkeypress="spider_doNothing(event)" class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fm" style="float: left; width: 99%;">
 
47
  <span class="form_maker_icon"></span>
48
  <h2>
49
  Form Maker
@@ -428,6 +429,7 @@ class FMViewManage_fm {
428
  </div>
429
  </div>
430
  <form class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fm" style="float: left; width: 99%;">
 
431
  <h2><?php echo $page_title; ?></h2>
432
  <div style="float: right; margin: 0 5px 0 0;">
433
  <input class="button-primary" type="submit" onclick="if (spider_check_required('title', 'Form title') || !submitbutton()) {return false;}; spider_set_input_value('task', 'form_options');" value="Form Options"/>
@@ -1392,6 +1394,7 @@ class FMViewManage_fm {
1392
  </div>
1393
  </div>
1394
  <form class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fm" style="float: left; width: 99%;">
 
1395
  <h2><?php echo $page_title; ?></h2>
1396
  <div style="float: right; margin: 0 5px 0 0;">
1397
  <a href="<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'id' => $row->theme, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" class="button-primary thickbox thickbox-preview" id="preview_form" title="Form Preview" onclick="return false;">
@@ -2269,6 +2272,7 @@ class FMViewManage_fm {
2269
  </div>
2270
  </div>
2271
  <form class="wrap" method="post" action="admin.php?page=manage_fm" style="float: left; width: 99%;" name="adminForm" id="adminForm">
 
2272
  <h2><?php echo $page_title; ?></h2>
2273
  <div style="float: right; margin: 0 5px 0 0;">
2274
  <input class="button-secondary" type="submit" onclick="if (spider_check_email('mail') ||
@@ -2714,6 +2718,7 @@ class FMViewManage_fm {
2714
  </div>
2715
  </div>
2716
  <form class="wrap" method="post" action="admin.php?page=manage_fm" style="float: left; width: 99%;" name="adminForm" id="adminForm">
 
2717
  <h2><?php echo $page_title; ?></h2>
2718
  <div style="float: right; margin: 0 5px 0 0;">
2719
  <input class="button-secondary" type="submit" onclick="if (spider_check_email('mailToAdd') ||
@@ -4049,6 +4054,7 @@ class FMViewManage_fm {
4049
 
4050
  <div class="fm_layout" style="width: 99%;">
4051
  <form action="admin.php?page=manage_fm" method="post" name="adminForm" enctype="multipart/form-data">
 
4052
  <div class="buttons_div">
4053
  <input class="button-secondary" type="submit" onclick="submitbutton(); spider_set_input_value('task', 'save_layout')" value="Save"/>
4054
  <input class="button-secondary" type="submit" onclick="submitbutton(); spider_set_input_value('task', 'apply_layout')" value="Apply"/>
44
  </div>
45
  </div>
46
  <form onkeypress="spider_doNothing(event)" class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fm" style="float: left; width: 99%;">
47
+ <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
48
  <span class="form_maker_icon"></span>
49
  <h2>
50
  Form Maker
429
  </div>
430
  </div>
431
  <form class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fm" style="float: left; width: 99%;">
432
+ <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
433
  <h2><?php echo $page_title; ?></h2>
434
  <div style="float: right; margin: 0 5px 0 0;">
435
  <input class="button-primary" type="submit" onclick="if (spider_check_required('title', 'Form title') || !submitbutton()) {return false;}; spider_set_input_value('task', 'form_options');" value="Form Options"/>
1394
  </div>
1395
  </div>
1396
  <form class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fm" style="float: left; width: 99%;">
1397
+ <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
1398
  <h2><?php echo $page_title; ?></h2>
1399
  <div style="float: right; margin: 0 5px 0 0;">
1400
  <a href="<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'id' => $row->theme, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" class="button-primary thickbox thickbox-preview" id="preview_form" title="Form Preview" onclick="return false;">
2272
  </div>
2273
  </div>
2274
  <form class="wrap" method="post" action="admin.php?page=manage_fm" style="float: left; width: 99%;" name="adminForm" id="adminForm">
2275
+ <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
2276
  <h2><?php echo $page_title; ?></h2>
2277
  <div style="float: right; margin: 0 5px 0 0;">
2278
  <input class="button-secondary" type="submit" onclick="if (spider_check_email('mail') ||
2718
  </div>
2719
  </div>
2720
  <form class="wrap" method="post" action="admin.php?page=manage_fm" style="float: left; width: 99%;" name="adminForm" id="adminForm">
2721
+ <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
2722
  <h2><?php echo $page_title; ?></h2>
2723
  <div style="float: right; margin: 0 5px 0 0;">
2724
  <input class="button-secondary" type="submit" onclick="if (spider_check_email('mailToAdd') ||
4054
 
4055
  <div class="fm_layout" style="width: 99%;">
4056
  <form action="admin.php?page=manage_fm" method="post" name="adminForm" enctype="multipart/form-data">
4057
+ <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
4058
  <div class="buttons_div">
4059
  <input class="button-secondary" type="submit" onclick="submitbutton(); spider_set_input_value('task', 'save_layout')" value="Save"/>
4060
  <input class="button-secondary" type="submit" onclick="submitbutton(); spider_set_input_value('task', 'apply_layout')" value="Apply"/>
admin/views/FMViewSubmissions_fm.php CHANGED
@@ -155,6 +155,7 @@ class FMViewSubmissions_fm {
155
  </div>
156
  <div style="background-color: #FFFFFF; width: 350px; max-height: 350px; overflow-y: auto; padding: 20px; position: fixed; top: 100px; display: none; border: 2px solid #AAAAAA; z-index: 65556;" id="ChBDiv">
157
  <form action="#">
 
158
  <p style="font-weight: bold; font-size: 18px; margin-top: 0px;">Select Columns</p>
159
  <div class="fm_check_labels"><input type="checkbox" <?php echo ($lists['hide_label_list'] === '') ? 'checked="checked"' : ''; ?> onclick="clickLabChBAll(this)" id="ChBAll"/><label for="ChBAll"> All</label></div>
160
  <?php
@@ -202,6 +203,7 @@ class FMViewSubmissions_fm {
202
  </div>
203
  </div>
204
  <form action="admin.php?page=submissions_fm" method="post" id="admin_form" name="admin_form">
 
205
  <input type="hidden" name="option" value="com_formmaker" />
206
  <input type="hidden" id="task" name="task" value="" />
207
  <input type="hidden" id="current_id" name="current_id" value="" />
@@ -793,6 +795,7 @@ class FMViewSubmissions_fm {
793
 
794
  ?>
795
  <form action="admin.php?page=submissions_fm" method="post" id="adminForm" name="adminForm">
 
796
  <table width="99%">
797
  <tbody>
798
  <tr>
@@ -1050,6 +1053,7 @@ class FMViewSubmissions_fm {
1050
 
1051
  ?>
1052
  <form action="admin.php?page=submissions_fm" method="post" id="formform_id_temp" name="formform_id_temp">
 
1053
  <table width="99%">
1054
  <tbody>
1055
  <tr>
155
  </div>
156
  <div style="background-color: #FFFFFF; width: 350px; max-height: 350px; overflow-y: auto; padding: 20px; position: fixed; top: 100px; display: none; border: 2px solid #AAAAAA; z-index: 65556;" id="ChBDiv">
157
  <form action="#">
158
+ <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
159
  <p style="font-weight: bold; font-size: 18px; margin-top: 0px;">Select Columns</p>
160
  <div class="fm_check_labels"><input type="checkbox" <?php echo ($lists['hide_label_list'] === '') ? 'checked="checked"' : ''; ?> onclick="clickLabChBAll(this)" id="ChBAll"/><label for="ChBAll"> All</label></div>
161
  <?php
203
  </div>
204
  </div>
205
  <form action="admin.php?page=submissions_fm" method="post" id="admin_form" name="admin_form">
206
+ <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
207
  <input type="hidden" name="option" value="com_formmaker" />
208
  <input type="hidden" id="task" name="task" value="" />
209
  <input type="hidden" id="current_id" name="current_id" value="" />
795
 
796
  ?>
797
  <form action="admin.php?page=submissions_fm" method="post" id="adminForm" name="adminForm">
798
+ <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
799
  <table width="99%">
800
  <tbody>
801
  <tr>
1053
 
1054
  ?>
1055
  <form action="admin.php?page=submissions_fm" method="post" id="formform_id_temp" name="formform_id_temp">
1056
+ <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
1057
  <table width="99%">
1058
  <tbody>
1059
  <tr>
admin/views/FMViewThemes_fm.php CHANGED
@@ -44,6 +44,7 @@ class FMViewThemes_fm {
44
  </div>
45
  </div>
46
  <form class="wrap" id="themes_form" method="post" action="admin.php?page=themes_fm" style="float: left; width: 99%;">
 
47
  <span class="theme_icon"></span>
48
  <h2>
49
  Themes
@@ -178,6 +179,7 @@ class FMViewThemes_fm {
178
  </div>
179
  </div>
180
  <form class="wrap" method="post" action="admin.php?page=themes_fm" style="float: left; width: 99%;">
 
181
  <span class="theme_icon"></span>
182
  <h2><?php echo $page_title; ?></h2>
183
  <div style="float: right; margin: 0 5px 0 0;">
44
  </div>
45
  </div>
46
  <form class="wrap" id="themes_form" method="post" action="admin.php?page=themes_fm" style="float: left; width: 99%;">
47
+ <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
48
  <span class="theme_icon"></span>
49
  <h2>
50
  Themes
179
  </div>
180
  </div>
181
  <form class="wrap" method="post" action="admin.php?page=themes_fm" style="float: left; width: 99%;">
182
+ <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
183
  <span class="theme_icon"></span>
184
  <h2><?php echo $page_title; ?></h2>
185
  <div style="float: right; margin: 0 5px 0 0;">
admin/views/FMViewUninstall_fm.php CHANGED
@@ -27,7 +27,7 @@ class FMViewUninstall_fm {
27
  $prefix = $wpdb->prefix;
28
  ?>
29
  <form method="post" action="admin.php?page=uninstall_fm" style="width:95%;">
30
- <?php wp_nonce_field('form_maker uninstall');?>
31
  <div class="wrap">
32
  <span class="uninstall_icon"></span>
33
  <h2>Uninstall Form Maker</h2>
@@ -89,7 +89,8 @@ class FMViewUninstall_fm {
89
  $this->model->delete_db_tables();
90
  global $wpdb;
91
  $prefix = $wpdb->prefix;
92
- $deactivate_url = wp_nonce_url('plugins.php?action=deactivate&amp;plugin=form-maker/form-maker.php', 'deactivate-plugin_form-maker/form-maker.php');
 
93
  ?>
94
  <div id="message" class="updated fade">
95
  <p>The following Database Tables succesfully deleted:</p>
27
  $prefix = $wpdb->prefix;
28
  ?>
29
  <form method="post" action="admin.php?page=uninstall_fm" style="width:95%;">
30
+ <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
31
  <div class="wrap">
32
  <span class="uninstall_icon"></span>
33
  <h2>Uninstall Form Maker</h2>
89
  $this->model->delete_db_tables();
90
  global $wpdb;
91
  $prefix = $wpdb->prefix;
92
+ $deactivate_url = add_query_arg(array('action' => 'deactivate', 'plugin' => 'form-maker/form-maker.php'), admin_url('plugins.php'));
93
+ $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_form-maker/form-maker.php');
94
  ?>
95
  <div id="message" class="updated fade">
96
  <p>The following Database Tables succesfully deleted:</p>
css/form_maker_tables.css CHANGED
@@ -603,4 +603,3 @@ div.wd_preview a {
603
  padding: 0;
604
  vertical-align: middle;
605
  }
606
-
603
  padding: 0;
604
  vertical-align: middle;
605
  }
 
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.27
7
  * Author: WebDorado
8
  * Author URI: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -208,7 +208,7 @@ if (class_exists('WP_Widget')) {
208
  // Activate plugin.
209
  function form_maker_activate() {
210
  $version = get_option("wd_form_maker_version");
211
- $new_version = '1.7.20';
212
  if (!$version) {
213
  add_option("wd_form_maker_version", $new_version, '', 'no');
214
  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.28
7
  * Author: WebDorado
8
  * Author URI: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
208
  // Activate plugin.
209
  function form_maker_activate() {
210
  $version = get_option("wd_form_maker_version");
211
+ $new_version = '1.7.28';
212
  if (!$version) {
213
  add_option("wd_form_maker_version", $new_version, '', 'no');
214
  global $wpdb;
framework/WDW_FM_Library.php CHANGED
@@ -404,6 +404,7 @@ class WDW_FM_Library {
404
  }
405
 
406
  public static function spider_redirect($url) {
 
407
  ?>
408
  <script>
409
  window.location = "<?php echo $url; ?>";
404
  }
405
 
406
  public static function spider_redirect($url) {
407
+ $url = html_entity_decode(wp_nonce_url($url, 'nonce_fm', 'nonce_fm'));
408
  ?>
409
  <script>
410
  window.location = "<?php echo $url; ?>";
frontend/models/FMModelForm_maker.php CHANGED
@@ -281,11 +281,16 @@ class FMModelForm_maker {
281
  }
282
 
283
  $fileTemp = $files['tmp_name'][$file_key];
284
- $p=1;
285
- while(file_exists( $destination . "/" . $fileName)) {
286
- $to = strlen($files['name'][$file_key]) - strlen($uploadedFileExtension) - 1;
287
- $fileName = substr($fileName, 0, $to) . '(' . $p . ').' . $uploadedFileExtension;
288
- $p++;
 
 
 
 
 
289
  }
290
  if(!move_uploaded_file($fileTemp, ABSPATH . $destination . '/' . $fileName)) {
291
  echo "<script> alert('" . addslashes(__('Error, file cannot be moved.', 'form_maker')) . "');</script>";
@@ -797,11 +802,15 @@ class FMModelForm_maker {
797
  }
798
  $fileTemp = $file['tmp_name'];
799
  $p = 1;
800
- while (file_exists($destination . "/" . $fileName)) {
801
- $to = strlen($file['name']) - strlen($uploadedFileExtension) - 1;
802
- $fileName = substr($fileName, 0, $to) . '(' . $p . ').' . $uploadedFileExtension;
803
- $file['name'] = $fileName;
804
- $p++;
 
 
 
 
805
  }
806
  if (is_dir(ABSPATH . $destination)) {
807
  if (!move_uploaded_file($fileTemp, ABSPATH . $destination . '/' . $fileName)) {
@@ -1628,7 +1637,7 @@ class FMModelForm_maker {
1628
  break;
1629
  }
1630
 
1631
- case "type_paypal_select": {
1632
  if(isset($_POST['wdform_'.$i."_element_label".$id]) && $_POST['wdform_'.$i."_element".$id] != '') {
1633
  $value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
1634
  }
@@ -1886,7 +1895,7 @@ class FMModelForm_maker {
1886
  if ($row->mail_attachment_user) {
1887
  for ($k = 0; $k < count($all_files); $k++) {
1888
  if (isset($all_files[$k]['tmp_name'])) {
1889
- $attachment_user[$k]=$all_files[$k]['tmp_name'];
1890
  }
1891
  }
1892
  }
281
  }
282
 
283
  $fileTemp = $files['tmp_name'][$file_key];
284
+ $p = 1;
285
+ if (file_exists($destination . "/" . $fileName)) {
286
+ $fileName1 = $filename;
287
+ while (file_exists($destination . "/" . $fileName1)) {
288
+ $to = strlen($file['name']) - strlen($uploadedFileExtension) - 1;
289
+ $fileName1 = substr($fileName, 0, $to) . '(' . $p . ').' . $uploadedFileExtension;
290
+ $file['name'] = $fileName;
291
+ $p++;
292
+ }
293
+ $fileName = $fileName1;
294
  }
295
  if(!move_uploaded_file($fileTemp, ABSPATH . $destination . '/' . $fileName)) {
296
  echo "<script> alert('" . addslashes(__('Error, file cannot be moved.', 'form_maker')) . "');</script>";
802
  }
803
  $fileTemp = $file['tmp_name'];
804
  $p = 1;
805
+ if (file_exists($destination . "/" . $fileName)) {
806
+ $fileName1 = $filename;
807
+ while (file_exists($destination . "/" . $fileName1)) {
808
+ $to = strlen($file['name']) - strlen($uploadedFileExtension) - 1;
809
+ $fileName1 = substr($fileName, 0, $to) . '(' . $p . ').' . $uploadedFileExtension;
810
+ $file['name'] = $fileName;
811
+ $p++;
812
+ }
813
+ $fileName = $fileName1;
814
  }
815
  if (is_dir(ABSPATH . $destination)) {
816
  if (!move_uploaded_file($fileTemp, ABSPATH . $destination . '/' . $fileName)) {
1637
  break;
1638
  }
1639
 
1640
+ case "type_paypal_select": {
1641
  if(isset($_POST['wdform_'.$i."_element_label".$id]) && $_POST['wdform_'.$i."_element".$id] != '') {
1642
  $value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
1643
  }
1895
  if ($row->mail_attachment_user) {
1896
  for ($k = 0; $k < count($all_files); $k++) {
1897
  if (isset($all_files[$k]['tmp_name'])) {
1898
+ $attachment_user[$k] = $all_files[$k]['tmp_name'];
1899
  }
1900
  }
1901
  }
frontend/views/FMViewForm_maker.php CHANGED
@@ -2512,7 +2512,7 @@ class FMViewForm_maker {
2512
  break;
2513
  }
2514
 
2515
- case 'type_submit_reset': {
2516
  $params_names=array('w_submit_title','w_reset_title','w_class','w_act');
2517
  $temp=$params;
2518
  foreach($params_names as $params_name ) {
@@ -2532,7 +2532,7 @@ class FMViewForm_maker {
2532
  break;
2533
  }
2534
 
2535
- case 'type_button': {
2536
  $params_names=array('w_title','w_func','w_class');
2537
  $temp=$params;
2538
  foreach($params_names as $params_name ) {
2512
  break;
2513
  }
2514
 
2515
+ case 'type_submit_reset': {
2516
  $params_names=array('w_submit_title','w_reset_title','w_class','w_act');
2517
  $temp=$params;
2518
  foreach($params_names as $params_name ) {
2532
  break;
2533
  }
2534
 
2535
+ case 'type_button': {
2536
  $params_names=array('w_title','w_func','w_class');
2537
  $temp=$params;
2538
  foreach($params_names as $params_name ) {
js/form_maker_manage.js CHANGED
@@ -251,21 +251,18 @@ function refresh_old() {
251
  remove_add_(i + "_elementform_id_temp");
252
  break;
253
  }
254
-
255
  case "type_submit_reset": {
256
  remove_add_(i + "_element_submitform_id_temp");
257
  if (document.getElementById(i + "_element_resetform_id_temp"))
258
  remove_add_(i + "_element_resetform_id_temp");
259
  break;
260
  }
261
-
262
  case "type_captcha": {
263
  remove_add_("_wd_captchaform_id_temp");
264
  remove_add_("_element_refreshform_id_temp");
265
  remove_add_("_wd_captcha_inputform_id_temp");
266
  break;
267
  }
268
-
269
  case "type_recaptcha": {
270
  document.getElementById("public_key").value = document.getElementById("wd_recaptchaform_id_temp").getAttribute("public_key");
271
  document.getElementById("private_key").value = document.getElementById("wd_recaptchaform_id_temp").getAttribute("private_key");
@@ -274,17 +271,14 @@ function refresh_old() {
274
  remove_add_("wd_recaptchaform_id_temp");
275
  break;
276
  }
277
-
278
  case "type_file_upload": {
279
  remove_add_(i + "_elementform_id_temp");
280
  break;
281
  }
282
-
283
  case "type_textarea": {
284
  remove_add_(i + "_elementform_id_temp");
285
  break;
286
  }
287
-
288
  case "type_name": {
289
  if (document.getElementById(i + "_element_titleform_id_temp")) {
290
  remove_add_(i + "_element_titleform_id_temp");
@@ -298,19 +292,16 @@ function refresh_old() {
298
  }
299
  break;
300
  }
301
-
302
  case "type_phone": {
303
  remove_add_(i + "_element_firstform_id_temp");
304
  remove_add_(i + "_element_lastform_id_temp");
305
  break;
306
  }
307
-
308
  case "type_paypal_price": {
309
  remove_add_(i + "_element_dollarsform_id_temp");
310
  remove_add_(i + "_element_centsform_id_temp");
311
  break;
312
  }
313
-
314
  case "type_address": {
315
  if (document.getElementById(id_for_country+"_disable_fieldsform_id_temp")) {
316
  if (document.getElementById(id_for_country+"_disable_fieldsform_id_temp").getAttribute('street1') == 'no') {
@@ -334,7 +325,6 @@ function refresh_old() {
334
  }
335
  break;
336
  }
337
-
338
  case "type_checkbox":
339
  case "type_radio":
340
  case "type_paypal_checkbox":
@@ -348,33 +338,27 @@ function refresh_old() {
348
  }
349
  break;
350
  }
351
-
352
  case "type_star_rating": {
353
  remove_add_(i+"_elementform_id_temp");
354
  break;
355
  }
356
-
357
  case "type_scale_rating": {
358
  remove_add_(i+"_elementform_id_temp");
359
  break;
360
  }
361
-
362
  case "type_spinner": {
363
  remove_add_(i+"_elementform_id_temp");
364
  break;
365
  }
366
-
367
  case "type_slider": {
368
  remove_add_(i+"_elementform_id_temp");
369
  break;
370
  }
371
-
372
  case "type_range": {
373
  remove_add_(i+"_elementform_id_temp0");
374
  remove_add_(i+"_elementform_id_temp1");
375
  break;
376
  }
377
-
378
  case "type_grading": {
379
  for (k = 0; k < 100; k++) {
380
  if (document.getElementById(i+"_elementform_id_temp"+k)) {
@@ -383,12 +367,10 @@ function refresh_old() {
383
  }
384
  break;
385
  }
386
-
387
  case "type_matrix": {
388
  remove_add_(i+"_elementform_id_temp");
389
  break;
390
  }
391
-
392
  case "type_button": {
393
  for (j = 0; j < 100; j++) {
394
  if (document.getElementById(i + "_elementform_id_temp" + j)) {
@@ -397,7 +379,6 @@ function refresh_old() {
397
  }
398
  break;
399
  }
400
-
401
  case "type_time": {
402
  if (document.getElementById(i + "_ssform_id_temp")) {
403
  remove_add_(i + "_ssform_id_temp");
@@ -410,13 +391,11 @@ function refresh_old() {
410
  }
411
  break;
412
  }
413
-
414
  case "type_date": {
415
  remove_add_(i + "_elementform_id_temp");
416
  remove_add_(i + "_buttonform_id_temp");
417
  break;
418
  }
419
-
420
  case "type_date_fields": {
421
  remove_add_(i + "_dayform_id_temp");
422
  remove_add_(i + "_monthform_id_temp");
@@ -481,13 +460,12 @@ function cfm_create_input(toAdd_id, value_id, parent_id, cfm_url) {
481
  jQuery("#" + toAdd_id).val(jQuery("#" + toAdd_id).val() + value + ",");
482
  }
483
  }
 
484
  function fm_delete_mail(img, value) {
485
  jQuery(img).parent().remove();
486
  jQuery("#mail").val(jQuery("#mail").val().replace(value + ',', ''));
487
  }
488
 
489
-
490
-
491
  function form_maker_options_tabs(id) {
492
  if (spider_check_email('mailToAdd') || spider_check_email('from_mail') || spider_check_email('reply_to') || spider_check_email('mail_from_user') || spider_check_email('reply_to_user') || spider_check_email('mail_from_other') || spider_check_email('reply_to_other') || spider_check_email('paypal_email')) {
493
  return false;
@@ -634,28 +612,21 @@ function wdhide(id) {
634
  function wdshow(id) {
635
  document.getElementById(id).style.display = "block";
636
  }
637
-
638
- function delete_field_condition(id)
639
- {
640
  var cond_id = id.split("_");
641
  document.getElementById("condition"+cond_id[0]).removeChild(document.getElementById("condition_div"+id));
642
  }
643
 
644
- function change_choices(value, ids, types, params)
645
- {
646
-
647
  value = value.split("_");
648
  global_index = value[0];
649
  id = value[1];
650
  index = value[2];
651
-
652
-
653
  ids_array = ids.split("@@**@@");
654
  types_array = types.split("@@**@@");
655
  params_array = params.split("@@**@@");
656
 
657
- switch(types_array[id])
658
- {
659
  case "type_text":
660
  case "type_password":
661
  case "type_textarea":
@@ -673,11 +644,8 @@ function change_choices(value, ids, types, params)
673
  else
674
  var keypress_function = "";
675
 
676
- if(document.getElementById("field_value"+global_index+"_"+index).tagName=="SELECT")
677
- {
678
-
679
- document.getElementById("condition_div"+global_index+"_"+index).removeChild(document.getElementById("field_value"+global_index+"_"+index));
680
-
681
  var label_input = document.createElement('input');
682
  label_input.setAttribute("id", "field_value"+global_index+'_'+index);
683
  label_input.setAttribute("type", "text");
@@ -688,13 +656,10 @@ function change_choices(value, ids, types, params)
688
  document.getElementById("condition_div"+global_index+"_"+index).insertBefore(label_input,document.getElementById("delete_condition"+global_index+"_"+index));
689
  document.getElementById("condition_div"+global_index+"_"+index).insertBefore(document.createTextNode(' '),document.getElementById("delete_condition"+global_index+"_"+index));
690
  }
691
- else
692
- {
693
  document.getElementById("field_value"+global_index+'_'+index).value="";
694
  document.getElementById("field_value"+global_index+'_'+index).setAttribute("onKeyPress", keypress_function);
695
  }
696
-
697
-
698
  break;
699
 
700
  case "type_own_select":
@@ -710,12 +675,10 @@ function change_choices(value, ids, types, params)
710
  else
711
  w_size = params_array[id].split('*:*w_flow*:*');
712
 
713
-
714
  w_choices = w_size[1].split('*:*w_choices*:*');
715
  w_choices_array = w_choices[0].split('***');
716
 
717
- if(types_array[id]== "type_paypal_checkbox")
718
- {
719
  w_choices_price = w_choices[1].split('*:*w_choices_price*:*');
720
  w_choices_price_array = w_choices_price[0].split('***');
721
  }
@@ -723,14 +686,12 @@ function change_choices(value, ids, types, params)
723
  var choise_select = document.createElement('select');
724
  choise_select.setAttribute("id", "field_value"+global_index+'_'+index);
725
  choise_select.style.cssText = "vertical-align: top; width:200px;";
726
- if(types_array[id]== "type_checkbox" || types_array[id]== "type_paypal_checkbox")
727
- {
728
  choise_select.setAttribute('multiple', 'multiple');
729
  choise_select.setAttribute('class', 'multiple_select');
730
  }
731
 
732
- for(k=0; k<w_choices_array.length; k++)
733
- {
734
  var choise_option = document.createElement('option');
735
  choise_option.setAttribute("id", "choise_"+global_index+'_'+k);
736
  if(types_array[id]== "type_paypal_checkbox")
@@ -756,8 +717,7 @@ function change_choices(value, ids, types, params)
756
  choise_select.setAttribute("id", "field_value"+global_index+'_'+m);
757
  choise_select.style.cssText = "vertical-align: top; width:200px;";
758
 
759
- for(k=0; k<coutries.length; k++)
760
- {
761
  var choise_option = document.createElement('option');
762
  choise_select.setAttribute("id", "field_value"+global_index+'_'+index);
763
  choise_select.style.cssText = "vertical-align: top; width:200px;";
@@ -773,24 +733,18 @@ function change_choices(value, ids, types, params)
773
 
774
  break;
775
  }
776
-
777
  }
778
 
779
-
780
- function add_condition_fields(num, ids1, labels1, types1, params1)
781
- {
782
-
783
  ids = ids1.split("@@**@@");
784
  labels = labels1.split("@@**@@");
785
  types = types1.split("@@**@@");
786
  params = params1.split("@@**@@");
787
 
788
- for(i=100; i>=0; i--)
789
- {
790
  if(document.getElementById('condition_div'+num+'_'+i))
791
  break;
792
- }
793
-
794
  m=i+1;
795
 
796
  var condition_div = document.createElement('div');
@@ -801,10 +755,8 @@ function add_condition_fields(num, ids1, labels1, types1, params1)
801
  labels_select.setAttribute("onchange", "change_choices(options[selectedIndex].id+'_"+m+"','"+ids1+"','"+types1+"','"+params1.replace(/\'/g,"\\'")+"')");
802
  labels_select.style.cssText="width:350px; vertical-align:top;";
803
 
804
- for(k=0; k<labels.length; k++)
805
- {
806
- if(ids[k]!=document.getElementById('fields'+num).value)
807
- {
808
  var labels_option = document.createElement('option');
809
  labels_option.setAttribute("id", num+"_"+k);
810
  labels_option.setAttribute("value", ids[k]);
@@ -842,8 +794,7 @@ function add_condition_fields(num, ids1, labels1, types1, params1)
842
  else
843
  var index_of_field = 1;
844
 
845
- switch(types[index_of_field])
846
- {
847
  case "type_text":
848
  case "type_password":
849
  case "type_textarea":
@@ -888,8 +839,7 @@ function add_condition_fields(num, ids1, labels1, types1, params1)
888
  w_choices = w_size[1].split('*:*w_choices*:*');
889
  w_choices_array = w_choices[0].split('***');
890
 
891
- if(types[index_of_field]== "type_paypal_checkbox")
892
- {
893
  w_choices_price = w_choices[1].split('*:*w_choices_price*:*');
894
  w_choices_price_array = w_choices_price[0].split('***');
895
  }
@@ -897,14 +847,12 @@ function add_condition_fields(num, ids1, labels1, types1, params1)
897
  var choise_select = document.createElement('select');
898
  choise_select.setAttribute("id", "field_value"+num+'_'+m);
899
  choise_select.style.cssText = "vertical-align: top; width:200px;";
900
- if(types[index_of_field]== "type_checkbox" || types[index_of_field]== "type_paypal_checkbox")
901
- {
902
  choise_select.setAttribute('multiple', 'multiple');
903
  choise_select.setAttribute('class', 'multiple_select');
904
  }
905
 
906
- for(k=0; k<w_choices_array.length; k++)
907
- {
908
  var choise_option = document.createElement('option');
909
  choise_option.setAttribute("id", "choise_"+num+'_'+k);
910
  if(types[index_of_field]== "type_paypal_checkbox")
@@ -915,7 +863,6 @@ function add_condition_fields(num, ids1, labels1, types1, params1)
915
 
916
  choise_select.appendChild(choise_option);
917
  }
918
-
919
  condition_div.appendChild(choise_select);
920
 
921
  break;
@@ -927,8 +874,7 @@ function add_condition_fields(num, ids1, labels1, types1, params1)
927
  choise_select.setAttribute("id", "field_value"+num+'_'+m);
928
  choise_select.style.cssText = "vertical-align: top; width:200px;";
929
 
930
- for(k=0; k<coutries.length; k++)
931
- {
932
  var choise_option = document.createElement('option');
933
  choise_option.setAttribute("id", "choise_"+num+'_'+k);
934
  choise_option.setAttribute("value", coutries[k]);
@@ -936,12 +882,9 @@ function add_condition_fields(num, ids1, labels1, types1, params1)
936
 
937
  choise_select.appendChild(choise_option);
938
  }
939
-
940
  condition_div.appendChild(choise_select);
941
-
942
  break;
943
  }
944
-
945
  condition_div.appendChild(document.createTextNode(' '));
946
 
947
  var img=document.createElement('img');
@@ -950,20 +893,15 @@ function add_condition_fields(num, ids1, labels1, types1, params1)
950
  img.setAttribute('onClick','delete_field_condition("'+num+'_'+m+'")');
951
  img.style.cssText = "vertical-align: top";
952
 
953
- condition_div.appendChild(img);
954
-
955
- document.getElementById('condition'+num).appendChild(condition_div);
956
-
957
  }
958
 
959
-
960
- function add_condition(ids1, labels1, types1, params1, all_ids, all_labels)
961
- {
962
- for(i=100; i>=0; i--)
963
- {
964
  if(document.getElementById('condition'+i))
965
  break;
966
- }
967
 
968
  num=i+1;
969
 
@@ -997,14 +935,12 @@ function add_condition(ids1, labels1, types1, params1, all_ids, all_labels)
997
  fields_select.setAttribute("name", "fields"+num);
998
  fields_select.style.cssText="width:400px;";
999
 
1000
- for(k=0; k<labels.length; k++)
1001
- {
1002
  var fields_option = document.createElement('option');
1003
  fields_option.setAttribute("value", ids[k]);
1004
- fields_option.innerHTML = labels[k];
1005
 
1006
- fields_select.appendChild(fields_option);
1007
-
1008
  }
1009
 
1010
  var span = document.createElement('span');
@@ -1032,7 +968,7 @@ function add_condition(ids1, labels1, types1, params1, all_ids, all_labels)
1032
 
1033
  var add_img = document.createElement('img');
1034
  add_img.setAttribute('src',plugin_url + '/images/add.png');
1035
- add_img.setAttribute('onClick','add_condition_fields("'+num+'", "'+ids1+'", "'+labels1.replace(/\'/g,"\\'").replace(/\"/g,"&quot;")+'", "'+types1.replace(/\'/g,"\\'")+'", "'+params1.replace(/\'/g,"\\'")+'")');
1036
  add_img.style.cssText = "cursor: pointer; vertical-align: middle;";
1037
 
1038
  var delete_img = document.createElement('img');
@@ -1058,8 +994,7 @@ function add_condition(ids1, labels1, types1, params1, all_ids, all_labels)
1058
  document.getElementById('conditions_fieldset').appendChild(condition_div);
1059
  }
1060
 
1061
- function delete_condition(num)
1062
- {
1063
  document.getElementById('conditions_fieldset').removeChild(document.getElementById('condition'+num));
1064
  }
1065
 
251
  remove_add_(i + "_elementform_id_temp");
252
  break;
253
  }
 
254
  case "type_submit_reset": {
255
  remove_add_(i + "_element_submitform_id_temp");
256
  if (document.getElementById(i + "_element_resetform_id_temp"))
257
  remove_add_(i + "_element_resetform_id_temp");
258
  break;
259
  }
 
260
  case "type_captcha": {
261
  remove_add_("_wd_captchaform_id_temp");
262
  remove_add_("_element_refreshform_id_temp");
263
  remove_add_("_wd_captcha_inputform_id_temp");
264
  break;
265
  }
 
266
  case "type_recaptcha": {
267
  document.getElementById("public_key").value = document.getElementById("wd_recaptchaform_id_temp").getAttribute("public_key");
268
  document.getElementById("private_key").value = document.getElementById("wd_recaptchaform_id_temp").getAttribute("private_key");
271
  remove_add_("wd_recaptchaform_id_temp");
272
  break;
273
  }
 
274
  case "type_file_upload": {
275
  remove_add_(i + "_elementform_id_temp");
276
  break;
277
  }
 
278
  case "type_textarea": {
279
  remove_add_(i + "_elementform_id_temp");
280
  break;
281
  }
 
282
  case "type_name": {
283
  if (document.getElementById(i + "_element_titleform_id_temp")) {
284
  remove_add_(i + "_element_titleform_id_temp");
292
  }
293
  break;
294
  }
 
295
  case "type_phone": {
296
  remove_add_(i + "_element_firstform_id_temp");
297
  remove_add_(i + "_element_lastform_id_temp");
298
  break;
299
  }
 
300
  case "type_paypal_price": {
301
  remove_add_(i + "_element_dollarsform_id_temp");
302
  remove_add_(i + "_element_centsform_id_temp");
303
  break;
304
  }
 
305
  case "type_address": {
306
  if (document.getElementById(id_for_country+"_disable_fieldsform_id_temp")) {
307
  if (document.getElementById(id_for_country+"_disable_fieldsform_id_temp").getAttribute('street1') == 'no') {
325
  }
326
  break;
327
  }
 
328
  case "type_checkbox":
329
  case "type_radio":
330
  case "type_paypal_checkbox":
338
  }
339
  break;
340
  }
 
341
  case "type_star_rating": {
342
  remove_add_(i+"_elementform_id_temp");
343
  break;
344
  }
 
345
  case "type_scale_rating": {
346
  remove_add_(i+"_elementform_id_temp");
347
  break;
348
  }
 
349
  case "type_spinner": {
350
  remove_add_(i+"_elementform_id_temp");
351
  break;
352
  }
 
353
  case "type_slider": {
354
  remove_add_(i+"_elementform_id_temp");
355
  break;
356
  }
 
357
  case "type_range": {
358
  remove_add_(i+"_elementform_id_temp0");
359
  remove_add_(i+"_elementform_id_temp1");
360
  break;
361
  }
 
362
  case "type_grading": {
363
  for (k = 0; k < 100; k++) {
364
  if (document.getElementById(i+"_elementform_id_temp"+k)) {
367
  }
368
  break;
369
  }
 
370
  case "type_matrix": {
371
  remove_add_(i+"_elementform_id_temp");
372
  break;
373
  }
 
374
  case "type_button": {
375
  for (j = 0; j < 100; j++) {
376
  if (document.getElementById(i + "_elementform_id_temp" + j)) {
379
  }
380
  break;
381
  }
 
382
  case "type_time": {
383
  if (document.getElementById(i + "_ssform_id_temp")) {
384
  remove_add_(i + "_ssform_id_temp");
391
  }
392
  break;
393
  }
 
394
  case "type_date": {
395
  remove_add_(i + "_elementform_id_temp");
396
  remove_add_(i + "_buttonform_id_temp");
397
  break;
398
  }
 
399
  case "type_date_fields": {
400
  remove_add_(i + "_dayform_id_temp");
401
  remove_add_(i + "_monthform_id_temp");
460
  jQuery("#" + toAdd_id).val(jQuery("#" + toAdd_id).val() + value + ",");
461
  }
462
  }
463
+
464
  function fm_delete_mail(img, value) {
465
  jQuery(img).parent().remove();
466
  jQuery("#mail").val(jQuery("#mail").val().replace(value + ',', ''));
467
  }
468
 
 
 
469
  function form_maker_options_tabs(id) {
470
  if (spider_check_email('mailToAdd') || spider_check_email('from_mail') || spider_check_email('reply_to') || spider_check_email('mail_from_user') || spider_check_email('reply_to_user') || spider_check_email('mail_from_other') || spider_check_email('reply_to_other') || spider_check_email('paypal_email')) {
471
  return false;
612
  function wdshow(id) {
613
  document.getElementById(id).style.display = "block";
614
  }
615
+ function delete_field_condition(id) {
 
 
616
  var cond_id = id.split("_");
617
  document.getElementById("condition"+cond_id[0]).removeChild(document.getElementById("condition_div"+id));
618
  }
619
 
620
+ function change_choices(value, ids, types, params) {
 
 
621
  value = value.split("_");
622
  global_index = value[0];
623
  id = value[1];
624
  index = value[2];
 
 
625
  ids_array = ids.split("@@**@@");
626
  types_array = types.split("@@**@@");
627
  params_array = params.split("@@**@@");
628
 
629
+ switch(types_array[id]) {
 
630
  case "type_text":
631
  case "type_password":
632
  case "type_textarea":
644
  else
645
  var keypress_function = "";
646
 
647
+ if(document.getElementById("field_value"+global_index+"_"+index).tagName=="SELECT") {
648
+ document.getElementById("condition_div"+global_index+"_"+index).removeChild(document.getElementById("field_value"+global_index+"_"+index));
 
 
 
649
  var label_input = document.createElement('input');
650
  label_input.setAttribute("id", "field_value"+global_index+'_'+index);
651
  label_input.setAttribute("type", "text");
656
  document.getElementById("condition_div"+global_index+"_"+index).insertBefore(label_input,document.getElementById("delete_condition"+global_index+"_"+index));
657
  document.getElementById("condition_div"+global_index+"_"+index).insertBefore(document.createTextNode(' '),document.getElementById("delete_condition"+global_index+"_"+index));
658
  }
659
+ else {
 
660
  document.getElementById("field_value"+global_index+'_'+index).value="";
661
  document.getElementById("field_value"+global_index+'_'+index).setAttribute("onKeyPress", keypress_function);
662
  }
 
 
663
  break;
664
 
665
  case "type_own_select":
675
  else
676
  w_size = params_array[id].split('*:*w_flow*:*');
677
 
 
678
  w_choices = w_size[1].split('*:*w_choices*:*');
679
  w_choices_array = w_choices[0].split('***');
680
 
681
+ if(types_array[id]== "type_paypal_checkbox") {
 
682
  w_choices_price = w_choices[1].split('*:*w_choices_price*:*');
683
  w_choices_price_array = w_choices_price[0].split('***');
684
  }
686
  var choise_select = document.createElement('select');
687
  choise_select.setAttribute("id", "field_value"+global_index+'_'+index);
688
  choise_select.style.cssText = "vertical-align: top; width:200px;";
689
+ if(types_array[id]== "type_checkbox" || types_array[id]== "type_paypal_checkbox") {
 
690
  choise_select.setAttribute('multiple', 'multiple');
691
  choise_select.setAttribute('class', 'multiple_select');
692
  }
693
 
694
+ for(k=0; k<w_choices_array.length; k++) {
 
695
  var choise_option = document.createElement('option');
696
  choise_option.setAttribute("id", "choise_"+global_index+'_'+k);
697
  if(types_array[id]== "type_paypal_checkbox")
717
  choise_select.setAttribute("id", "field_value"+global_index+'_'+m);
718
  choise_select.style.cssText = "vertical-align: top; width:200px;";
719
 
720
+ for(k=0; k<coutries.length; k++) {
 
721
  var choise_option = document.createElement('option');
722
  choise_select.setAttribute("id", "field_value"+global_index+'_'+index);
723
  choise_select.style.cssText = "vertical-align: top; width:200px;";
733
 
734
  break;
735
  }
 
736
  }
737
 
738
+ function add_condition_fields(num, ids1, labels1, types1, params1) {
 
 
 
739
  ids = ids1.split("@@**@@");
740
  labels = labels1.split("@@**@@");
741
  types = types1.split("@@**@@");
742
  params = params1.split("@@**@@");
743
 
744
+ for(i=100; i>=0; i--) {
 
745
  if(document.getElementById('condition_div'+num+'_'+i))
746
  break;
747
+ }
 
748
  m=i+1;
749
 
750
  var condition_div = document.createElement('div');
755
  labels_select.setAttribute("onchange", "change_choices(options[selectedIndex].id+'_"+m+"','"+ids1+"','"+types1+"','"+params1.replace(/\'/g,"\\'")+"')");
756
  labels_select.style.cssText="width:350px; vertical-align:top;";
757
 
758
+ for(k=0; k<labels.length; k++) {
759
+ if(ids[k]!=document.getElementById('fields'+num).value) {
 
 
760
  var labels_option = document.createElement('option');
761
  labels_option.setAttribute("id", num+"_"+k);
762
  labels_option.setAttribute("value", ids[k]);
794
  else
795
  var index_of_field = 1;
796
 
797
+ switch(types[index_of_field]) {
 
798
  case "type_text":
799
  case "type_password":
800
  case "type_textarea":
839
  w_choices = w_size[1].split('*:*w_choices*:*');
840
  w_choices_array = w_choices[0].split('***');
841
 
842
+ if(types[index_of_field]== "type_paypal_checkbox") {
 
843
  w_choices_price = w_choices[1].split('*:*w_choices_price*:*');
844
  w_choices_price_array = w_choices_price[0].split('***');
845
  }
847
  var choise_select = document.createElement('select');
848
  choise_select.setAttribute("id", "field_value"+num+'_'+m);
849
  choise_select.style.cssText = "vertical-align: top; width:200px;";
850
+ if(types[index_of_field]== "type_checkbox" || types[index_of_field]== "type_paypal_checkbox") {
 
851
  choise_select.setAttribute('multiple', 'multiple');
852
  choise_select.setAttribute('class', 'multiple_select');
853
  }
854
 
855
+ for(k=0; k<w_choices_array.length; k++) {
 
856
  var choise_option = document.createElement('option');
857
  choise_option.setAttribute("id", "choise_"+num+'_'+k);
858
  if(types[index_of_field]== "type_paypal_checkbox")
863
 
864
  choise_select.appendChild(choise_option);
865
  }
 
866
  condition_div.appendChild(choise_select);
867
 
868
  break;
874
  choise_select.setAttribute("id", "field_value"+num+'_'+m);
875
  choise_select.style.cssText = "vertical-align: top; width:200px;";
876
 
877
+ for(k=0; k<coutries.length; k++) {
 
878
  var choise_option = document.createElement('option');
879
  choise_option.setAttribute("id", "choise_"+num+'_'+k);
880
  choise_option.setAttribute("value", coutries[k]);
882
 
883
  choise_select.appendChild(choise_option);
884
  }
 
885
  condition_div.appendChild(choise_select);
 
886
  break;
887
  }
 
888
  condition_div.appendChild(document.createTextNode(' '));
889
 
890
  var img=document.createElement('img');
893
  img.setAttribute('onClick','delete_field_condition("'+num+'_'+m+'")');
894
  img.style.cssText = "vertical-align: top";
895
 
896
+ condition_div.appendChild(img);
897
+ document.getElementById('condition'+num).appendChild(condition_div);
 
 
898
  }
899
 
900
+ function add_condition(ids1, labels1, types1, params1, all_ids, all_labels) {
901
+ for(i=100; i>=0; i--) {
 
 
 
902
  if(document.getElementById('condition'+i))
903
  break;
904
+ }
905
 
906
  num=i+1;
907
 
935
  fields_select.setAttribute("name", "fields"+num);
936
  fields_select.style.cssText="width:400px;";
937
 
938
+ for(k=0; k<labels.length; k++) {
 
939
  var fields_option = document.createElement('option');
940
  fields_option.setAttribute("value", ids[k]);
941
+ fields_option.innerHTML = labels[k];
942
 
943
+ fields_select.appendChild(fields_option);
 
944
  }
945
 
946
  var span = document.createElement('span');
968
 
969
  var add_img = document.createElement('img');
970
  add_img.setAttribute('src',plugin_url + '/images/add.png');
971
+ add_img.setAttribute('onClick','add_condition_fields("'+num+'", "'+ids1+'", "'+labels1.replace(/\'/g,"\\'").replace(/\"/g,"&quot;")+'", "'+types1.replace(/\'/g,"\\'").replace(/\"/g,"&quot;")+'", "'+params1.replace(/\'/g,"\\'").replace(/\"/g,"&quot;")+'")');
972
  add_img.style.cssText = "cursor: pointer; vertical-align: middle;";
973
 
974
  var delete_img = document.createElement('img');
994
  document.getElementById('conditions_fieldset').appendChild(condition_div);
995
  }
996
 
997
+ function delete_condition(num) {
 
998
  document.getElementById('conditions_fieldset').removeChild(document.getElementById('condition'+num));
999
  }
1000
 
js/formmaker_div_free.js CHANGED
@@ -1964,9 +1964,7 @@ function right_row(id)
1964
  {
1965
  var wdform_column_new = document.createElement('div');
1966
  wdform_column_new.setAttribute("class", "wdform_column");
1967
-
1968
- // tr_big.appendChild(new_td);
1969
-
1970
  wdform_section.appendChild(wdform_column_new);
1971
 
1972
  wdform_column_new.appendChild(wdform_row);
@@ -2594,6 +2592,7 @@ function close_window() {
2594
  }
2595
 
2596
  function change_label(id, label) {
 
2597
  document.getElementById(id).innerHTML = label;
2598
  document.getElementById(id).value = label;
2599
  }
@@ -2615,7 +2614,8 @@ function change_func(id, label) {
2615
  }
2616
 
2617
  function change_in_value(id, label) {
2618
- label = label.replace(/"/g, "&quot;");
 
2619
  document.getElementById(id).setAttribute("value", label);
2620
  }
2621
 
@@ -23468,8 +23468,8 @@ if(need_enable)
23468
  //refresh_attr(i, 'type_checkbox');
23469
  }
23470
 
23471
- function set_page_title(title, id)
23472
- {
23473
  document.getElementById("form_id_tempform_view"+id).setAttribute('page_title',title);
23474
  show_title_pagebreak();
23475
  }
@@ -24158,8 +24158,8 @@ function set_checkable(type)
24158
  document.getElementById("_div_between").setAttribute(type+'_checkable',document.getElementById("el_check_"+type+"_input").checked);
24159
  }
24160
 
24161
- function pagebreak_title_change(val)
24162
- {
24163
  document.getElementById("_div_between").setAttribute('page_title',val);
24164
  document.getElementById("div_page_title").innerHTML=val+'<br/><br/>';
24165
  }
1964
  {
1965
  var wdform_column_new = document.createElement('div');
1966
  wdform_column_new.setAttribute("class", "wdform_column");
1967
+
 
 
1968
  wdform_section.appendChild(wdform_column_new);
1969
 
1970
  wdform_column_new.appendChild(wdform_row);
2592
  }
2593
 
2594
  function change_label(id, label) {
2595
+ label = label.replace(/(<([^>]+)>)/ig, "");
2596
  document.getElementById(id).innerHTML = label;
2597
  document.getElementById(id).value = label;
2598
  }
2614
  }
2615
 
2616
  function change_in_value(id, label) {
2617
+ label = label.replace(/(<([^>]+)>)/ig, "");
2618
+ label = label.replace(/"/g, "&quot;");
2619
  document.getElementById(id).setAttribute("value", label);
2620
  }
2621
 
23468
  //refresh_attr(i, 'type_checkbox');
23469
  }
23470
 
23471
+ function set_page_title(title, id) {
23472
+ title = title.replace(/(<([^>]+)>)/ig, "");
23473
  document.getElementById("form_id_tempform_view"+id).setAttribute('page_title',title);
23474
  show_title_pagebreak();
23475
  }
24158
  document.getElementById("_div_between").setAttribute(type+'_checkable',document.getElementById("el_check_"+type+"_input").checked);
24159
  }
24160
 
24161
+ function pagebreak_title_change(val) {
24162
+ val = val.replace(/(<([^>]+)>)/ig, "");
24163
  document.getElementById("_div_between").setAttribute('page_title',val);
24164
  document.getElementById("div_page_title").innerHTML=val+'<br/><br/>';
24165
  }
js/formmaker_free.js CHANGED
@@ -2381,6 +2381,7 @@ function close_window() {
2381
  }
2382
 
2383
  function change_label(id, label) {
 
2384
  document.getElementById(id).innerHTML = label;
2385
  document.getElementById(id).value = label;
2386
  }
@@ -2401,8 +2402,8 @@ function change_func(id, label) {
2401
  document.getElementById(id).setAttribute("onclick", label);
2402
  }
2403
 
2404
- function change_in_value(id, label)
2405
- {
2406
  document.getElementById(id).setAttribute("value", label);
2407
  }
2408
 
@@ -22353,8 +22354,8 @@ function type_page_navigation(w_type, w_show_title, w_show_numbers, w_attr_name,
22353
  //refresh_attr(i, 'type_checkbox');
22354
  }
22355
 
22356
- function set_page_title(title, id)
22357
- {
22358
  document.getElementById("form_id_tempform_view"+id).setAttribute('page_title',title);
22359
  show_title_pagebreak();
22360
  }
@@ -23072,8 +23073,8 @@ function set_checkable(type)
23072
  document.getElementById("_div_between").setAttribute(type+'_checkable',document.getElementById("el_check_"+type+"_input").checked);
23073
  }
23074
 
23075
- function pagebreak_title_change(val)
23076
- {
23077
  document.getElementById("_div_between").setAttribute('page_title',val);
23078
  document.getElementById("div_page_title").innerHTML=val+'<br/><br/>';
23079
  }
2381
  }
2382
 
2383
  function change_label(id, label) {
2384
+ label = label.replace(/(<([^>]+)>)/ig, "");
2385
  document.getElementById(id).innerHTML = label;
2386
  document.getElementById(id).value = label;
2387
  }
2402
  document.getElementById(id).setAttribute("onclick", label);
2403
  }
2404
 
2405
+ function change_in_value(id, label) {
2406
+ label = label.replace(/(<([^>]+)>)/ig, "");
2407
  document.getElementById(id).setAttribute("value", label);
2408
  }
2409
 
22354
  //refresh_attr(i, 'type_checkbox');
22355
  }
22356
 
22357
+ function set_page_title(title, id) {
22358
+ title = title.replace(/(<([^>]+)>)/ig, "");
22359
  document.getElementById("form_id_tempform_view"+id).setAttribute('page_title',title);
22360
  show_title_pagebreak();
22361
  }
23073
  document.getElementById("_div_between").setAttribute(type+'_checkable',document.getElementById("el_check_"+type+"_input").checked);
23074
  }
23075
 
23076
+ function pagebreak_title_change(val) {
23077
+ val = val.replace(/(<([^>]+)>)/ig, "");
23078
  document.getElementById("_div_between").setAttribute('page_title',val);
23079
  document.getElementById("div_page_title").innerHTML=val+'<br/><br/>';
23080
  }
js/main.js CHANGED
@@ -325,6 +325,7 @@ function change_value(id)
325
  tag=input.tagName;
326
  if(tag=="TEXTAREA")
327
  {
 
328
  input.innerHTML=input.value;
329
  }
330
  else
@@ -512,6 +513,7 @@ function display_none_form_views_all(form_id)
512
  if(document.getElementById(form_id+'form_view'+t))
513
  document.getElementById(form_id+'form_view'+t).parentNode.style.display="none";
514
  }
 
515
  function generate_page_bar(form_view, form_id, form_view_count, form_view_max)
516
  {
517
  if(document.getElementById(form_id+'pages').getAttribute('type')=='steps')
325
  tag=input.tagName;
326
  if(tag=="TEXTAREA")
327
  {
328
+
329
  input.innerHTML=input.value;
330
  }
331
  else
513
  if(document.getElementById(form_id+'form_view'+t))
514
  document.getElementById(form_id+'form_view'+t).parentNode.style.display="none";
515
  }
516
+
517
  function generate_page_bar(form_view, form_id, form_view_count, form_view_max)
518
  {
519
  if(document.getElementById(form_id+'pages').getAttribute('type')=='steps')
js/main_front_end.js CHANGED
@@ -585,6 +585,7 @@ else
585
 
586
 
587
  }
 
588
  }
589
 
590
  function display_none_form_views_all(form_id)
@@ -593,7 +594,6 @@ function display_none_form_views_all(form_id)
593
  if(document.getElementById(form_id+'form_view'+t))
594
  document.getElementById(form_id+'form_view'+t).parentNode.style.display="none";
595
  }
596
-
597
  function generate_page_bar(form_view, form_id, form_view_count, form_view_max)
598
  {
599
  if(document.getElementById(form_id+'pages').getAttribute('type')=='steps')
585
 
586
 
587
  }
588
+
589
  }
590
 
591
  function display_none_form_views_all(form_id)
594
  if(document.getElementById(form_id+'form_view'+t))
595
  document.getElementById(form_id+'form_view'+t).parentNode.style.display="none";
596
  }
 
597
  function generate_page_bar(form_view, form_id, form_view_count, form_view_max)
598
  {
599
  if(document.getElementById(form_id+'pages').getAttribute('type')=='steps')
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
5
  Requires at least: 3.4
6
  Tested up to: 4.1
7
- Stable tag: 1.7.27
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
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
5
  Requires at least: 3.4
6
  Tested up to: 4.1
7
+ Stable tag: 1.7.28
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10