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

Version Description

  • Improved: Security.
  • Fixed: Make Slider field to work with floating steps.
  • Fixed: Paypal checkout with empty quantity.
  • Fixed: Labels ordering after page drag&drop.
Download this release

Release Info

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

Code changes from version 1.13.29 to 1.13.30

admin/controllers/Blocked_ips_fm.php CHANGED
@@ -229,8 +229,8 @@ class FMControllerBlocked_ips_fm extends FMAdminController {
229
  }
230
 
231
  public function save_db() {
232
- $id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : 0);
233
- $ip = (isset($_POST['ip']) ? esc_html(stripslashes($_POST['ip'])) : '');
234
  if ( $id != 0 ) {
235
  $save = $this->model->update_fm_blocked(array(
236
  'ip' => $ip,
@@ -257,7 +257,7 @@ class FMControllerBlocked_ips_fm extends FMAdminController {
257
  $ips_id_col = $this->model->get_col_data();
258
  foreach ( $ips_id_col as $ip_id ) {
259
  if ( isset($_POST['ip' . $ip_id]) ) {
260
- $ip = esc_html(stripslashes($_POST['ip' . $ip_id]));
261
  if ( $ip == '' ) {
262
  $this->model->delete_data($ip_id);
263
  }
229
  }
230
 
231
  public function save_db() {
232
+ $id = WDW_FM_Library(self::PLUGIN)->get( 'current_id', 0, 'intval' );
233
+ $ip = WDW_FM_Library(self::PLUGIN)->get( 'ip' );
234
  if ( $id != 0 ) {
235
  $save = $this->model->update_fm_blocked(array(
236
  'ip' => $ip,
257
  $ips_id_col = $this->model->get_col_data();
258
  foreach ( $ips_id_col as $ip_id ) {
259
  if ( isset($_POST['ip' . $ip_id]) ) {
260
+ $ip = WDW_FM_Library(self::PLUGIN)->get( 'ip' . $ip_id );
261
  if ( $ip == '' ) {
262
  $this->model->delete_data($ip_id);
263
  }
admin/controllers/FormMakerSQLMapping.php CHANGED
@@ -144,9 +144,9 @@ class FMControllerFormMakerSQLMapping extends FMAdminController {
144
  */
145
  public function save_query() {
146
  global $wpdb;
147
- $form_id = ((isset($_GET['form_id'])) ? (int) $_GET['form_id'] : 0);
148
- $query = ((isset($_POST['query'])) ? stripslashes(wp_specialchars_decode($_POST['query'])) : "");
149
- $details = ((isset($_POST['details'])) ? esc_html($_POST['details']) : "");
150
  $save = $wpdb->insert($wpdb->prefix . 'formmaker_query', array(
151
  'form_id' => $form_id,
152
  'query' => $query,
@@ -163,10 +163,10 @@ class FMControllerFormMakerSQLMapping extends FMAdminController {
163
  */
164
  public function update_query() {
165
  global $wpdb;
166
- $id = ((isset($_GET['id'])) ? (int) $_GET['id'] : 0);
167
- $form_id = ((isset($_GET['form_id'])) ? (int) $_GET['form_id'] : 0);
168
- $query = ((isset($_POST['query'])) ? stripslashes(wp_specialchars_decode($_POST['query'])) : "");
169
- $details = ((isset($_POST['details'])) ? esc_html($_POST['details']) : "");
170
  $save = $wpdb->update($wpdb->prefix . 'formmaker_query', array(
171
  'form_id' => $form_id,
172
  'query' => $query,
144
  */
145
  public function save_query() {
146
  global $wpdb;
147
+ $form_id = WDW_FM_Library(self::PLUGIN)->get( 'form_id', 0, 'intval' );
148
+ $query = WDW_FM_Library(self::PLUGIN)->get( 'query' );
149
+ $details = WDW_FM_Library(self::PLUGIN)->get( 'details' );
150
  $save = $wpdb->insert($wpdb->prefix . 'formmaker_query', array(
151
  'form_id' => $form_id,
152
  'query' => $query,
163
  */
164
  public function update_query() {
165
  global $wpdb;
166
+ $id = WDW_FM_Library(self::PLUGIN)->get( 'id', 0, 'intval' );
167
+ $form_id = WDW_FM_Library(self::PLUGIN)->get( 'form_id', 0, 'intval' );
168
+ $query = WDW_FM_Library(self::PLUGIN)->get( 'query' );
169
+ $details = WDW_FM_Library(self::PLUGIN)->get( 'details' );
170
  $save = $wpdb->update($wpdb->prefix . 'formmaker_query', array(
171
  'form_id' => $form_id,
172
  'query' => $query,
admin/controllers/FormMakerSubmits.php CHANGED
@@ -21,9 +21,9 @@ class FMControllerFormMakerSubmits extends FMAdminController {
21
 
22
  public function display() {
23
  $params = array();
24
- $form_id = esc_html(stripslashes($_GET['form_id']));
25
  $params['label_order'] = $this->model->get_from_label_order($form_id);
26
- $group_id = esc_html(stripslashes($_GET['group_id']));
27
  $params['rows'] = $this->model->get_submissions($group_id);
28
  $labels_id = array();
29
  $labels_name = array();
21
 
22
  public function display() {
23
  $params = array();
24
+ $form_id = stripslashes(WDW_FM_Library(self::PLUGIN)->get( 'form_id','', 'intval' ) );
25
  $params['label_order'] = $this->model->get_from_label_order($form_id);
26
+ $group_id = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'group_id', '', 'intval' ) );
27
  $params['rows'] = $this->model->get_submissions($group_id);
28
  $labels_id = array();
29
  $labels_name = array();
admin/controllers/Generete_csv.php CHANGED
@@ -26,9 +26,9 @@ class FMControllerGenerete_csv extends FMAdminController {
26
  update_option( $option_key, $fm_settings );
27
  }
28
  $csv_delimiter = isset($fm_settings['csv_delimiter']) ? $fm_settings['csv_delimiter'] : ',';
29
- $form_id = (int) $_REQUEST['form_id'];
30
- $limitstart = (int) $_REQUEST['limitstart'];
31
- $send_header = (int) $_REQUEST['send_header'];
32
  $params = WDW_FM_Library(self::PLUGIN)->get_submissions_to_export();
33
  if ( !empty($params) ) {
34
  $data = $params[0];
26
  update_option( $option_key, $fm_settings );
27
  }
28
  $csv_delimiter = isset($fm_settings['csv_delimiter']) ? $fm_settings['csv_delimiter'] : ',';
29
+ $form_id = WDW_FM_Library(self::PLUGIN)->get( 'form_id', 0, 'intval' );
30
+ $limitstart = WDW_FM_Library(self::PLUGIN)->get( 'limitstart', 0, 'intval' );
31
+ $send_header = WDW_FM_Library(self::PLUGIN)->get( 'send_header', 0, 'intval' );
32
  $params = WDW_FM_Library(self::PLUGIN)->get_submissions_to_export();
33
  if ( !empty($params) ) {
34
  $data = $params[0];
admin/controllers/Generete_xml.php CHANGED
@@ -22,9 +22,9 @@ class FMControllerGenerete_xml extends FMAdminController {
22
  $fm_settings['ajax_export_per_page'] = WDW_FM_Library(self::PLUGIN)->get('page_num');
23
  update_option( $option_key, $fm_settings );
24
  }
25
- $form_id = (int) $_REQUEST['form_id'];
26
- $limitstart = (int) $_REQUEST['limitstart'];
27
- $send_header = (int) $_REQUEST['send_header'];
28
  $params = WDW_FM_Library(self::PLUGIN)->get_submissions_to_export();
29
  if (!empty($params) ) {
30
  $data = $params[0];
22
  $fm_settings['ajax_export_per_page'] = WDW_FM_Library(self::PLUGIN)->get('page_num');
23
  update_option( $option_key, $fm_settings );
24
  }
25
+ $form_id = WDW_FM_Library(self::PLUGIN)->get( 'form_id', 0, 'intval' );
26
+ $limitstart = WDW_FM_Library(self::PLUGIN)->get( 'limitstart', 0, 'intval' );
27
+ $send_header = WDW_FM_Library(self::PLUGIN)->get( 'send_header', 0, 'intval' );
28
  $params = WDW_FM_Library(self::PLUGIN)->get_submissions_to_export();
29
  if (!empty($params) ) {
30
  $data = $params[0];
admin/controllers/Manage_fm.php CHANGED
@@ -1474,9 +1474,9 @@ function after_submit() {
1474
  }
1475
 
1476
  public function fm_live_search() {
1477
- $search_string = !empty($_POST['pp_live_search']) ? sanitize_text_field($_POST['pp_live_search']) : '';
1478
- $post_type = !empty($_POST['pp_post_type']) ? sanitize_text_field($_POST['pp_post_type']) : 'any';
1479
- $full_content = !empty($_POST['pp_full_content']) ? sanitize_text_field($_POST['pp_full_content']) : 'true';
1480
  $args['s'] = $search_string;
1481
  $results = $this->fm_posts_query($args, $post_type);
1482
  $output = '<ul class="pp_search_results">';
1474
  }
1475
 
1476
  public function fm_live_search() {
1477
+ $search_string = WDW_FM_Library(self::PLUGIN)->get( 'pp_live_search' );
1478
+ $post_type = WDW_FM_Library(self::PLUGIN)->get( 'pp_post_type', 'any' );
1479
+ $full_content = WDW_FM_Library(self::PLUGIN)->get( 'pp_full_content', 'true' );
1480
  $args['s'] = $search_string;
1481
  $results = $this->fm_posts_query($args, $post_type);
1482
  $output = '<ul class="pp_search_results">';
admin/controllers/Submissions_fm.php CHANGED
@@ -229,18 +229,14 @@ class FMControllerSubmissions_fm extends FMAdminController {
229
  /* Get sorting value on $_POST for redirect */
230
  if ( !empty($_POST['order_by']) || !empty($_POST['asc_or_desc']) ) {
231
  $is_sort = true;
232
- $order_by = $_POST['order_by'];
233
  $asc_or_desc = ($_POST['asc_or_desc'] == 'desc' ? 'desc' : 'asc');
234
  }
235
  if ( !empty($is_search) || $is_sort || isset($_POST['current_page']) ) {
236
- if ( !empty($_POST['fm_is_search']) ) {
237
- $post_url_args['paged'] = 1;
238
- } else {
239
- $post_url_args['paged'] = WDW_FM_Library(self::PLUGIN)->get('current_page', 1);
240
- if ( isset($_POST['current_page']) ) {
241
- $post_url_args['paged'] = $_POST['current_page'];
242
- }
243
- }
244
  $url_args = array_merge(
245
  array('page' => $this->page, 'task' => 'display', 'current_id' => $id, 'order_by' => $order_by, 'asc_or_desc' => $asc_or_desc),
246
  $post_url_args
@@ -252,7 +248,7 @@ class FMControllerSubmissions_fm extends FMAdminController {
252
  $pagination_url_args = array();
253
  foreach ( $lists as $list_key => $list_val ) {
254
  if ( !empty($_GET[$list_key]) ) {
255
- $lists[$list_key] = urlencode(WDW_FM_Library(self::PLUGIN)->get($list_key));
256
  $pagination_url_args[$list_key] = WDW_FM_Library(self::PLUGIN)->get($list_key);
257
  $pagination_url_args['is_search'] = 1;
258
  }
@@ -296,9 +292,9 @@ class FMControllerSubmissions_fm extends FMAdminController {
296
  */
297
  public function show_stats( $id = 0 ) {
298
  ob_clean();
299
- $key = (int) WDW_FM_Library(self::PLUGIN)->get('sorted_label_key', '');
300
 
301
- $page = (int) WDW_FM_Library(self::PLUGIN)->get('paged', 1);
302
  $page_num = $page ? ($page - 1) * $this->page_per_num : 0;
303
 
304
  $labels_parameters = $this->model->get_labels_parameters( $id, $page_num, $this->page_per_num);
@@ -345,7 +341,7 @@ class FMControllerSubmissions_fm extends FMAdminController {
345
  * @param int $id
346
  */
347
  public function edit( $id = 0 ) {
348
- $form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
349
  $data = $this->model->get_data_of_group_id( $id );
350
  if ( empty($data[0]) ) {
351
  WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display', 'current_id' => $id ), admin_url('admin.php') ) );
@@ -389,7 +385,7 @@ class FMControllerSubmissions_fm extends FMAdminController {
389
  * @param int $id
390
  */
391
  public function save( $id = 0 ) {
392
- $form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
393
  $this->save_db( $id, $form_id );
394
  }
395
 
@@ -399,9 +395,9 @@ class FMControllerSubmissions_fm extends FMAdminController {
399
  * @param int $form_id
400
  */
401
  public function save_db( $id = 0, $form_id = 0 ) {
402
- $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes($_POST['current_id'])) : 0);
403
- $date = esc_html($_POST['date']);
404
- $ip = esc_html($_POST['ip']);
405
 
406
  $form = $this->model->get_all($form_id);
407
  $label_id = array();
@@ -421,7 +417,7 @@ class FMControllerSubmissions_fm extends FMAdminController {
421
  }
422
  foreach ( $label_id as $key => $label_id_1 ) {
423
  if ( isset($_POST["submission_" . $label_id_1]) ) {
424
- $element_value = (isset($_POST["submission_" . $label_id_1]) ? esc_html(stripslashes($_POST["submission_" . $label_id_1])) : " ");
425
  $result = $this->model->get_id($id, $label_id_1);
426
  if ( $label_type[$key] == 'type_file_upload' ) {
427
  if ( $element_value ) {
@@ -468,7 +464,7 @@ class FMControllerSubmissions_fm extends FMAdminController {
468
  if ( isset($_POST["submission_" . $label_id_1 . '_0']) ) {
469
  $element_value = '';
470
  for ( $z = 0; $z < 21; $z++ ) {
471
- $element_value_ch = isset($_POST["submission_" . $label_id_1 . '_' . $z]) ? $_POST["submission_" . $label_id_1 . '_' . $z] : NULL;
472
  if ( isset($element_value_ch) ) {
473
  $element_value = $element_value . $element_value_ch . '***br***';
474
  }
@@ -535,8 +531,8 @@ class FMControllerSubmissions_fm extends FMAdminController {
535
  * @return int
536
  */
537
  public function delete( $id = 0, $bulk = FALSE ) {
538
- $paged = (int) WDW_FM_Library(self::PLUGIN)->get('paged', 1);
539
- $form_id = (int) WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
540
  $delete = $this->model->delete_row($id);
541
  $message = 2;
542
  if ( $delete ) {
@@ -571,8 +567,8 @@ class FMControllerSubmissions_fm extends FMAdminController {
571
  public function block_ip( $id = 0, $bulk = FALSE ) {
572
  global $wpdb;
573
 
574
- $paged = (int) WDW_FM_Library(self::PLUGIN)->get('paged', 1);
575
- $form_id = (int) WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
576
  $q = $wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id ="%d"', $id);
577
  $row = $wpdb->get_row($q);
578
  $message = 2;
@@ -614,8 +610,8 @@ class FMControllerSubmissions_fm extends FMAdminController {
614
  public function unblock_ip( $id = 0, $bulk = FALSE ) {
615
  global $wpdb;
616
 
617
- $paged = (int) WDW_FM_Library(self::PLUGIN)->get('paged', 1);
618
- $form_id = (int) WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
619
  $q = $wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id ="%d"', $id);
620
  $row = $wpdb->get_row($q);
621
  $message = 2;
229
  /* Get sorting value on $_POST for redirect */
230
  if ( !empty($_POST['order_by']) || !empty($_POST['asc_or_desc']) ) {
231
  $is_sort = true;
232
+ $order_by = WDW_FM_Library(self::PLUGIN)->get( 'order_by' );
233
  $asc_or_desc = ($_POST['asc_or_desc'] == 'desc' ? 'desc' : 'asc');
234
  }
235
  if ( !empty($is_search) || $is_sort || isset($_POST['current_page']) ) {
236
+ $post_url_args['paged'] = WDW_FM_Library(self::PLUGIN)->get('current_page', 1, 'intval');
237
+ if ( !empty($_POST['fm_is_search']) ) {
238
+ $post_url_args['paged'] = 1;
239
+ }
 
 
 
 
240
  $url_args = array_merge(
241
  array('page' => $this->page, 'task' => 'display', 'current_id' => $id, 'order_by' => $order_by, 'asc_or_desc' => $asc_or_desc),
242
  $post_url_args
248
  $pagination_url_args = array();
249
  foreach ( $lists as $list_key => $list_val ) {
250
  if ( !empty($_GET[$list_key]) ) {
251
+ $lists[$list_key] = urldecode(WDW_FM_Library(self::PLUGIN)->get($list_key));
252
  $pagination_url_args[$list_key] = WDW_FM_Library(self::PLUGIN)->get($list_key);
253
  $pagination_url_args['is_search'] = 1;
254
  }
292
  */
293
  public function show_stats( $id = 0 ) {
294
  ob_clean();
295
+ $key = WDW_FM_Library(self::PLUGIN)->get('sorted_label_key', 0, 'intval');
296
 
297
+ $page = WDW_FM_Library(self::PLUGIN)->get('paged', 1, 'intval');
298
  $page_num = $page ? ($page - 1) * $this->page_per_num : 0;
299
 
300
  $labels_parameters = $this->model->get_labels_parameters( $id, $page_num, $this->page_per_num);
341
  * @param int $id
342
  */
343
  public function edit( $id = 0 ) {
344
+ $form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', 0, 'intval');
345
  $data = $this->model->get_data_of_group_id( $id );
346
  if ( empty($data[0]) ) {
347
  WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display', 'current_id' => $id ), admin_url('admin.php') ) );
385
  * @param int $id
386
  */
387
  public function save( $id = 0 ) {
388
+ $form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', 0, 'intval');
389
  $this->save_db( $id, $form_id );
390
  }
391
 
395
  * @param int $form_id
396
  */
397
  public function save_db( $id = 0, $form_id = 0 ) {
398
+ $id = WDW_FM_Library(self::PLUGIN)->get( 'current_id', 0, 'intval');
399
+ $date = WDW_FM_Library(self::PLUGIN)->get( 'date' );
400
+ $ip = WDW_FM_Library(self::PLUGIN)->get( 'ip' );
401
 
402
  $form = $this->model->get_all($form_id);
403
  $label_id = array();
417
  }
418
  foreach ( $label_id as $key => $label_id_1 ) {
419
  if ( isset($_POST["submission_" . $label_id_1]) ) {
420
+ $element_value = WDW_FM_Library(self::PLUGIN)->get( "submission_" . $label_id_1 );
421
  $result = $this->model->get_id($id, $label_id_1);
422
  if ( $label_type[$key] == 'type_file_upload' ) {
423
  if ( $element_value ) {
464
  if ( isset($_POST["submission_" . $label_id_1 . '_0']) ) {
465
  $element_value = '';
466
  for ( $z = 0; $z < 21; $z++ ) {
467
+ $element_value_ch = WDW_FM_Library(self::PLUGIN)->get( "submission_" . $label_id_1 . '_' . $z, NULL );
468
  if ( isset($element_value_ch) ) {
469
  $element_value = $element_value . $element_value_ch . '***br***';
470
  }
531
  * @return int
532
  */
533
  public function delete( $id = 0, $bulk = FALSE ) {
534
+ $paged = WDW_FM_Library(self::PLUGIN)->get('paged', 1, 'intval');
535
+ $form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', 0, 'intval');
536
  $delete = $this->model->delete_row($id);
537
  $message = 2;
538
  if ( $delete ) {
567
  public function block_ip( $id = 0, $bulk = FALSE ) {
568
  global $wpdb;
569
 
570
+ $paged = WDW_FM_Library(self::PLUGIN)->get('paged', 1, 'intval');
571
+ $form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', 0, 'intval');
572
  $q = $wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id ="%d"', $id);
573
  $row = $wpdb->get_row($q);
574
  $message = 2;
610
  public function unblock_ip( $id = 0, $bulk = FALSE ) {
611
  global $wpdb;
612
 
613
+ $paged = WDW_FM_Library(self::PLUGIN)->get('paged', 1, 'intval');
614
+ $form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', 0, 'intval');
615
  $q = $wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id ="%d"', $id);
616
  $row = $wpdb->get_row($q);
617
  $message = 2;
admin/controllers/Uninstall_fm.php CHANGED
@@ -36,7 +36,7 @@ class FMControllerUninstall_fm extends FMAdminController {
36
  }
37
 
38
  public function execute() {
39
- $task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
40
  if ( method_exists($this, $task) ) {
41
  check_admin_referer(WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce);
42
  $this->$task();
36
  }
37
 
38
  public function execute() {
39
+ $task = WDW_FM_Library::get( 'task' );
40
  if ( method_exists($this, $task) ) {
41
  check_admin_referer(WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce);
42
  $this->$task();
admin/models/Manage_fm.php CHANGED
@@ -2144,7 +2144,6 @@ class FMModelManage_fm extends FMAdminModel {
2144
  $rep = '<div id="wdform_field' . $id . '" type="type_captcha" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display:' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_captcha" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><div style="display: table;"><div style="display: table-row;"><div valign="middle" style="display: table-cell;"><img type="captcha" digit="' . $param['w_digit'] . '" src="' . add_query_arg(array(
2145
  'action' => 'formmakerwdcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix,
2146
  'digit' => $param['w_digit'],
2147
- 'nonce' => $fm_nonce,
2148
  'i' => 'form_id_temp',
2149
  ), admin_url('admin-ajax.php')) . '" id="_wd_captchaform_id_temp" class="captcha_img" onclick="captcha_refresh(&quot;_wd_captcha&quot;,&quot;form_id_temp&quot;)" ' . $param['attributes'] . '></div><div valign="middle" style="display: table-cell;"><div class="captcha_refresh" id="_element_refreshform_id_temp" onclick="captcha_refresh(&quot;_wd_captcha&quot;,&quot;form_id_temp&quot;)" ' . $param['attributes'] . '></div></div></div><div style="display: table-row;"><div style="display: table-cell;"><input type="text" class="captcha_input" id="_wd_captcha_inputform_id_temp" name="captcha_input" style="width: ' . ($param['w_digit'] * 10 + 15) . 'px;" ' . $param['attributes'] . ' disabled/><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/></div></div></div></div></div>';
2150
  break;
@@ -2192,7 +2191,6 @@ class FMModelManage_fm extends FMAdminModel {
2192
  'action' => 'formmakerwdmathcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix,
2193
  'operations_count' => $param['w_count'],
2194
  'operations' => urlencode($param['w_operations']),
2195
- 'nonce' => $fm_nonce,
2196
  'i' => 'form_id_temp',
2197
  ), admin_url('admin-ajax.php')) . '" id="_wd_arithmetic_captchaform_id_temp" class="arithmetic_captcha_img" onclick="captcha_refresh(&quot;_wd_arithmetic_captcha&quot;,&quot;form_id_temp&quot;)" ' . $param['attributes'] . '></div><div style="display: table-cell;"><input type="text" class="arithmetic_captcha_input" id="_wd_arithmetic_captcha_inputform_id_temp" name="arithmetic_captcha_input" onkeypress="return check_isnum(event)" style="width: ' . $param['w_input_size'] . 'px;" ' . $param['attributes'] . ' disabled/><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/></div><div style="display: table-cell; vertical-align: middle;"><div class="captcha_refresh" id="_element_refreshform_id_temp" onclick="captcha_refresh(&quot;_wd_arithmetic_captcha&quot;,&quot;form_id_temp&quot;)" ' . $param['attributes'] . '></div></div></div></div></div></div>';
2198
  break;
2144
  $rep = '<div id="wdform_field' . $id . '" type="type_captcha" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display:' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_captcha" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><div style="display: table;"><div style="display: table-row;"><div valign="middle" style="display: table-cell;"><img type="captcha" digit="' . $param['w_digit'] . '" src="' . add_query_arg(array(
2145
  'action' => 'formmakerwdcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix,
2146
  'digit' => $param['w_digit'],
 
2147
  'i' => 'form_id_temp',
2148
  ), admin_url('admin-ajax.php')) . '" id="_wd_captchaform_id_temp" class="captcha_img" onclick="captcha_refresh(&quot;_wd_captcha&quot;,&quot;form_id_temp&quot;)" ' . $param['attributes'] . '></div><div valign="middle" style="display: table-cell;"><div class="captcha_refresh" id="_element_refreshform_id_temp" onclick="captcha_refresh(&quot;_wd_captcha&quot;,&quot;form_id_temp&quot;)" ' . $param['attributes'] . '></div></div></div><div style="display: table-row;"><div style="display: table-cell;"><input type="text" class="captcha_input" id="_wd_captcha_inputform_id_temp" name="captcha_input" style="width: ' . ($param['w_digit'] * 10 + 15) . 'px;" ' . $param['attributes'] . ' disabled/><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/></div></div></div></div></div>';
2149
  break;
2191
  'action' => 'formmakerwdmathcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix,
2192
  'operations_count' => $param['w_count'],
2193
  'operations' => urlencode($param['w_operations']),
 
2194
  'i' => 'form_id_temp',
2195
  ), admin_url('admin-ajax.php')) . '" id="_wd_arithmetic_captchaform_id_temp" class="arithmetic_captcha_img" onclick="captcha_refresh(&quot;_wd_arithmetic_captcha&quot;,&quot;form_id_temp&quot;)" ' . $param['attributes'] . '></div><div style="display: table-cell;"><input type="text" class="arithmetic_captcha_input" id="_wd_arithmetic_captcha_inputform_id_temp" name="arithmetic_captcha_input" onkeypress="return check_isnum(event)" style="width: ' . $param['w_input_size'] . 'px;" ' . $param['attributes'] . ' disabled/><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/></div><div style="display: table-cell; vertical-align: middle;"><div class="captcha_refresh" id="_element_refreshform_id_temp" onclick="captcha_refresh(&quot;_wd_arithmetic_captcha&quot;,&quot;form_id_temp&quot;)" ' . $param['attributes'] . '></div></div></div></div></div></div>';
2196
  break;
admin/models/Submissions_fm.php CHANGED
@@ -131,13 +131,13 @@ class FMModelSubmissions_fm extends FMAdminModel {
131
 
132
  $order_by = WDW_FM_Library(self::PLUGIN)->get('order_by', 'group_id');
133
  $asc_or_desc = (WDW_FM_Library(self::PLUGIN)->get('asc_or_desc', 'desc') == 'desc' ? 'desc' : 'asc');
134
- $lists['hide_label_list'] = WDW_FM_Library(self::PLUGIN)->get('hide_label_list', '');
135
- $lists['startdate'] = WDW_FM_Library(self::PLUGIN)->get('startdate', '');
136
- $lists['enddate'] = WDW_FM_Library(self::PLUGIN)->get('enddate', '');
137
- $lists['ip_search'] = WDW_FM_Library(self::PLUGIN)->get('ip_search', '');
138
- $lists['username_search'] = WDW_FM_Library(self::PLUGIN)->get('username_search', '');
139
- $lists['useremail_search'] = WDW_FM_Library(self::PLUGIN)->get('useremail_search', '');
140
- $lists['id_search'] = WDW_FM_Library(self::PLUGIN)->get('id_search', '');
141
  if ( $lists['ip_search'] ) {
142
  $where[] = 'ip LIKE "%' . $lists['ip_search'] . '%"';
143
  }
@@ -205,8 +205,8 @@ class FMModelSubmissions_fm extends FMAdminModel {
205
  array_push($sorted_label_names_original, $label_names_original[$key]);
206
  $search_temp = '';
207
  $_search_key = $form_id . '_' . $label_id . '_search';
208
- if ( WDW_FM_Library(self::PLUGIN)->get($_search_key, '') ) {
209
- $search_temp = WDW_FM_Library(self::PLUGIN)->get($_search_key, '');
210
  }
211
  $search_temp = urldecode($search_temp);
212
  /* TODO conflict other DB version
@@ -220,7 +220,7 @@ class FMModelSubmissions_fm extends FMAdminModel {
220
  }
221
  $search_verified = '';
222
  if ( isset($_POST[$form_id . '_' . $label_id . '_search_verified']) ) {
223
- $search_verified = $_POST[$form_id . '_' . $label_id . '_search_verified'];
224
  $lists[$form_id . '_' . $label_id . '_search_verified'] = $search_verified;
225
  }
226
  if ( $search_verified && isset($ver_emails_array[$label_id]) ) {
@@ -899,6 +899,7 @@ class FMModelSubmissions_fm extends FMAdminModel {
899
  */
900
  public function select_data_from_db_for_labels( $db_info = '', $label_column = '', $table = '', $where = '', $order_by = '' ) {
901
  global $wpdb;
 
902
  $query = "SELECT `" . $label_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
903
  $db_info = trim($db_info, '[]');
904
  if ( $db_info ) {
131
 
132
  $order_by = WDW_FM_Library(self::PLUGIN)->get('order_by', 'group_id');
133
  $asc_or_desc = (WDW_FM_Library(self::PLUGIN)->get('asc_or_desc', 'desc') == 'desc' ? 'desc' : 'asc');
134
+ $lists['hide_label_list'] = WDW_FM_Library(self::PLUGIN)->get('hide_label_list');
135
+ $lists['startdate'] = WDW_FM_Library(self::PLUGIN)->get('startdate');
136
+ $lists['enddate'] = WDW_FM_Library(self::PLUGIN)->get('enddate');
137
+ $lists['ip_search'] = WDW_FM_Library(self::PLUGIN)->get('ip_search');
138
+ $lists['username_search'] = WDW_FM_Library(self::PLUGIN)->get('username_search');
139
+ $lists['useremail_search'] = WDW_FM_Library(self::PLUGIN)->get('useremail_search');
140
+ $lists['id_search'] = WDW_FM_Library(self::PLUGIN)->get('id_search');
141
  if ( $lists['ip_search'] ) {
142
  $where[] = 'ip LIKE "%' . $lists['ip_search'] . '%"';
143
  }
205
  array_push($sorted_label_names_original, $label_names_original[$key]);
206
  $search_temp = '';
207
  $_search_key = $form_id . '_' . $label_id . '_search';
208
+ if ( WDW_FM_Library(self::PLUGIN)->get( $_search_key ) ) {
209
+ $search_temp = WDW_FM_Library(self::PLUGIN)->get( $_search_key );
210
  }
211
  $search_temp = urldecode($search_temp);
212
  /* TODO conflict other DB version
220
  }
221
  $search_verified = '';
222
  if ( isset($_POST[$form_id . '_' . $label_id . '_search_verified']) ) {
223
+ $search_verified = WDW_FM_Library(self::PLUGIN)->get( $form_id . '_' . $label_id . '_search_verified' );
224
  $lists[$form_id . '_' . $label_id . '_search_verified'] = $search_verified;
225
  }
226
  if ( $search_verified && isset($ver_emails_array[$label_id]) ) {
899
  */
900
  public function select_data_from_db_for_labels( $db_info = '', $label_column = '', $table = '', $where = '', $order_by = '' ) {
901
  global $wpdb;
902
+ $where = html_entity_decode($where, ENT_QUOTES);
903
  $query = "SELECT `" . $label_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
904
  $db_info = trim($db_info, '[]');
905
  if ( $db_info ) {
admin/views/FMCaptcha.php CHANGED
@@ -9,11 +9,11 @@ class FMViewFormmakerwdcaptcha extends FMAdminView {
9
  */
10
  public function display( $params = array() ) {
11
  if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwdcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix) {
12
- $i = (isset($_GET["i"]) ? esc_html($_GET["i"]) : '');
13
- $r2 = (isset($_GET["r2"]) ? (int) $_GET["r2"] : 0);
14
- $rrr = (isset($_GET["rrr"]) ? (int) $_GET["rrr"] : 0);
15
  $randNum = 0 + $r2 + $rrr;
16
- $digit = (isset($_GET["digit"]) ? (int) $_GET["digit"] : 6);
17
  $cap_width = $digit * 10 + 15;
18
  $cap_height = 26;
19
  $cap_quality = 100;
9
  */
10
  public function display( $params = array() ) {
11
  if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwdcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix) {
12
+ $i = WDW_FM_Library(self::PLUGIN)->get( "i", '', 'esc_html' );
13
+ $r2 = WDW_FM_Library(self::PLUGIN)->get( "r2", 0, 'intval' );
14
+ $rrr = WDW_FM_Library(self::PLUGIN)->get( "rrr", 0, 'intval' );
15
  $randNum = 0 + $r2 + $rrr;
16
+ $digit = WDW_FM_Library(self::PLUGIN)->get( "digit", 6, 'intval' );
17
  $cap_width = $digit * 10 + 15;
18
  $cap_height = 26;
19
  $cap_quality = 100;
admin/views/FMMathCaptcha.php CHANGED
@@ -9,12 +9,12 @@ class FMViewFormmakerwdmathcaptcha extends FMAdminView {
9
  */
10
  public function display() {
11
  if ( isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwdmathcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix ) {
12
- $i = (isset($_GET["i"]) ? esc_html($_GET["i"]) : '');
13
- $r2 = (isset($_GET["r2"]) ? (int) $_GET["r2"] : 0);
14
- $rrr = (isset($_GET["rrr"]) ? (int) $_GET["rrr"] : 0);
15
  $randNum = 0 + $r2 + $rrr;
16
- $operations_count = ((isset($_GET["operations_count"]) && (int) $_GET["operations_count"]) ? ((int) $_GET["operations_count"] > 5 ? 5 : (int) $_GET["operations_count"]) : 1);
17
- $operations = (isset($_GET["operations"]) ? str_replace('@', '+', $_GET["operations"]) : '+,-');
18
  $operations = preg_replace('/\s+/', '', $operations);
19
  $cap_width = 2 * ($operations_count + 1) * 20 + 10;
20
  $cap_height = 26;
9
  */
10
  public function display() {
11
  if ( isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwdmathcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix ) {
12
+ $i = WDW_FM_Library(self::PLUGIN)->get( "i", '', 'esc_html' );
13
+ $r2 = WDW_FM_Library(self::PLUGIN)->get( "r2", 0, 'intval' );
14
+ $rrr = WDW_FM_Library(self::PLUGIN)->get( "rrr", 0, 'intval' );
15
  $randNum = 0 + $r2 + $rrr;
16
+ $operations_count = ((WDW_FM_Library(self::PLUGIN)->get("operations_count", 'intval') != '') ? (WDW_FM_Library(self::PLUGIN)->get("operations_count", 'intval') > 5 ? 5 : WDW_FM_Library(self::PLUGIN)->get("operations_count", 'intval')) : 1); //TODO??//
17
+ $operations = ((WDW_FM_Library(self::PLUGIN)->get("operations") != "") ? str_replace('@', '+', WDW_FM_Library(self::PLUGIN)->get("operations")) : '+,-'); //TODO??//
18
  $operations = preg_replace('/\s+/', '', $operations);
19
  $cap_width = 2 * ($operations_count + 1) * 20 + 10;
20
  $cap_height = 26;
admin/views/FMShowMatrix.php CHANGED
@@ -10,7 +10,7 @@ class FMViewShow_matrix extends FMAdminView {
10
  * @param array $params
11
  */
12
  public function display( $params = array() ) {
13
- $matrix_params = ((isset($_GET['matrix_params'])) ? esc_html(stripslashes($_GET['matrix_params'])) : 0);
14
  $new_filename = str_replace("***matrix***", '', $matrix_params);
15
  $new_filename = explode('***', $matrix_params);
16
  $mat_params = array_slice($new_filename, 0, count($new_filename) - 1);
10
  * @param array $params
11
  */
12
  public function display( $params = array() ) {
13
+ $matrix_params = WDW_FM_Library(self::PLUGIN)->get( 'matrix_params', 0, 'esc_html' );
14
  $new_filename = str_replace("***matrix***", '', $matrix_params);
15
  $new_filename = explode('***', $matrix_params);
16
  $mat_params = array_slice($new_filename, 0, count($new_filename) - 1);
admin/views/Submissions_fm.php CHANGED
@@ -468,7 +468,7 @@ class FMViewSubmissions_fm extends FMAdminView {
468
  break;
469
  default: ?>
470
  <th class="<?php echo $sorted_labels_id[$i]; ?>_fc" <?php echo $styleStr; ?>>
471
- <input name="<?php echo $form_id . '_' . $sorted_labels_id[$i] . '_search'; ?>" id="<?php echo $form_id . '_' . $sorted_labels_id[$i] . '_search'; ?>" type="text" value="<?php echo stripslashes( urldecode($lists[$form_id . '_' . $sorted_labels_id[$i] . '_search'] ) ); ?>">
472
  </th>
473
  <?php
474
  break;
@@ -940,9 +940,9 @@ class FMViewSubmissions_fm extends FMAdminView {
940
  <script type="text/javascript">
941
  var index = 1;
942
  var minLimit = 1;
943
- var total_count = <?php echo $subs_count; ?>;
944
  var page_num_update = false;
945
- var page_num = <?php echo !empty($fm_settings['ajax_export_per_page']) ? $fm_settings['ajax_export_per_page'] : 1000; ?>;
946
  var groupids = <?php echo json_encode($groupids);?>;
947
  var groupids_string = '';
948
 
@@ -978,24 +978,24 @@ class FMViewSubmissions_fm extends FMAdminView {
978
  verified_emails: verified_emails
979
  },
980
  beforeSend: function () {
981
- if ( page_num <= total_count ) {
982
  jQuery('.fm_modal').show();
983
  }
984
  },
985
  success: function (response, textStatus, xhr) {
986
  if ( limitstart < total_count ) {
987
- limitstart += page_num;
988
  ++index;
989
- if ( index <= total_count ) {
990
- end = index*page_num;
991
- start = end - page_num;
992
  ids = groupids.slice(start, end);
993
  groupids_string = ids.toString();
994
  }
995
  if ( limitstart >= total_count ) {
996
  ids = '';
997
  index = 1;
998
- start = page_num;
999
  }
1000
  if ( ids ) {
1001
  export_submissions(type, limitstart, ids);
@@ -1220,8 +1220,8 @@ class FMViewSubmissions_fm extends FMAdminView {
1220
  <div class="wrap">
1221
  <?php
1222
  // Generate message container by message id or directly by message.
1223
- $message_id = WDW_FM_Library(self::PLUGIN)->get('message', 0);
1224
- $message = WDW_FM_Library(self::PLUGIN)->get('msg', '');
1225
  echo WDW_FM_Library(self::PLUGIN)->message_id($message_id, $message);
1226
  ?>
1227
  <form action="admin.php?page=submissions<?php echo WDFMInstance(self::PLUGIN)->menu_postfix; ?>" method="post" id="adminForm" name="adminForm" class="form_maker_submissions_edit wd-form">
468
  break;
469
  default: ?>
470
  <th class="<?php echo $sorted_labels_id[$i]; ?>_fc" <?php echo $styleStr; ?>>
471
+ <input name="<?php echo $form_id . '_' . $sorted_labels_id[$i] . '_search'; ?>" id="<?php echo $form_id . '_' . $sorted_labels_id[$i] . '_search'; ?>" type="text" value="<?php echo stripslashes( htmlspecialchars( urldecode($lists[$form_id . '_' . $sorted_labels_id[$i] . '_search'] ) ) ); ?>">
472
  </th>
473
  <?php
474
  break;
940
  <script type="text/javascript">
941
  var index = 1;
942
  var minLimit = 1;
943
+ var total_count = '<?php echo $subs_count; ?>';
944
  var page_num_update = false;
945
+ var page_num = '<?php echo !empty($fm_settings['ajax_export_per_page']) ? $fm_settings['ajax_export_per_page'] : 1000; ?>';
946
  var groupids = <?php echo json_encode($groupids);?>;
947
  var groupids_string = '';
948
 
978
  verified_emails: verified_emails
979
  },
980
  beforeSend: function () {
981
+ if ( parseInt(page_num) <= total_count ) {
982
  jQuery('.fm_modal').show();
983
  }
984
  },
985
  success: function (response, textStatus, xhr) {
986
  if ( limitstart < total_count ) {
987
+ limitstart = limitstart + parseInt(page_num);
988
  ++index;
989
+ if ( index <= parseInt(total_count) ) {
990
+ end = index*parseInt(page_num);
991
+ start = end - parseInt(page_num);
992
  ids = groupids.slice(start, end);
993
  groupids_string = ids.toString();
994
  }
995
  if ( limitstart >= total_count ) {
996
  ids = '';
997
  index = 1;
998
+ start = parseInt(page_num);
999
  }
1000
  if ( ids ) {
1001
  export_submissions(type, limitstart, ids);
1220
  <div class="wrap">
1221
  <?php
1222
  // Generate message container by message id or directly by message.
1223
+ $message_id = WDW_FM_Library(self::PLUGIN)->get('message', 0, 'intval');
1224
+ $message = WDW_FM_Library(self::PLUGIN)->get('msg');
1225
  echo WDW_FM_Library(self::PLUGIN)->message_id($message_id, $message);
1226
  ?>
1227
  <form action="admin.php?page=submissions<?php echo WDFMInstance(self::PLUGIN)->menu_postfix; ?>" method="post" id="adminForm" name="adminForm" class="form_maker_submissions_edit wd-form">
admin/views/view.php CHANGED
@@ -303,9 +303,9 @@ class FMAdminView {
303
  */
304
  protected function topbar() {
305
  $fm_settings = WDFMInstance(self::PLUGIN)->fm_settings;
306
- $page = isset($_GET['page']) ? esc_html($_GET['page']) : '';
307
  $page = str_replace(WDFMInstance(self::PLUGIN)->menu_postfix, '', $page);
308
- $task = isset($_REQUEST['task']) ? esc_html($_REQUEST['task']) : '';
309
  $user_guide_link = 'https://help.10web.io/hc/en-us/sections/360002133951-Form-Maker-Documentation?utm_source=form_maker&utm_medium=free_plugin';
310
  $show_content = true;
311
  $show_guide_link = true;
303
  */
304
  protected function topbar() {
305
  $fm_settings = WDFMInstance(self::PLUGIN)->fm_settings;
306
+ $page = WDW_FM_Library(self::PLUGIN)->get( 'page', '', 'esc_html' );
307
  $page = str_replace(WDFMInstance(self::PLUGIN)->menu_postfix, '', $page);
308
+ $task = WDW_FM_Library(self::PLUGIN)->get( 'task', '', 'esc_html' );
309
  $user_guide_link = 'https://help.10web.io/hc/en-us/sections/360002133951-Form-Maker-Documentation?utm_source=form_maker&utm_medium=free_plugin';
310
  $show_content = true;
311
  $show_guide_link = true;
css/form_maker_frontend.css CHANGED
@@ -1048,6 +1048,7 @@ input[type=number].wd-type-number {
1048
  }
1049
 
1050
  .wdform_star_rating img {
 
1051
  cursor: pointer;
1052
  }
1053
 
1048
  }
1049
 
1050
  .wdform_star_rating img {
1051
+ display: inline-block;
1052
  cursor: pointer;
1053
  }
1054
 
css/styles.min.css CHANGED
@@ -6,4 +6,4 @@
6
  * Licensed under the MIT license - http://opensource.org/licenses/MIT
7
  *
8
  * Copyright (c) 2016 Daniel Eden
9
- */.fm-animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.fm-animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.fm-animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}.fm-animated.bounceIn,.fm-animated.bounceOut,.fm-animated.flipOutX,.fm-animated.flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes bounce{20%,53%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}@keyframes bounce{20%,53%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes pulse{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes rubberBand{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes rubberBand{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shake{from,to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shake{from,to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}.headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}@keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}.swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes tada{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{from{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{-webkit-transform:none;transform:none}}@keyframes wobble{from{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{-webkit-transform:none;transform:none}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{11.1%,from,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{11.1%,from,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}.jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.bounceIn{-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.bounceOut{-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes flip{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.fm-animated.flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes flipOutX{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-backface-visibility:visible!important;backface-visibility:visible!important}@-webkit-keyframes flipOutY{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@keyframes flipOutY{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}@keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.hinge{-webkit-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}.zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}.zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp}@-webkit-keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}.fm-form *{box-sizing:border-box}.wdform_map img{max-width:none!important}.wdform_row .wdform-field .wdform_map{width:inherit!important}.checkbox-div,.checkbox-div *,.radio-div,.radio-div *,.wdform-page-button{-moz-box-sizing:content-box!important;box-sizing:content-box!important;-webkit-box-sizing:content-box!important}.page_percentage_deactive,.page_percentage_deactive *{word-wrap:normal}.wdform_percentage_arrow,.wdform_percentage_text{vertical-align:top!important}div[type=type_button],div[type=type_submit_reset]{justify-content:flex-end}div[type=type_captcha] .wdform-element-section *{vertical-align:middle}.file-upload-status{direction:inherit!important}.fm_datepicker.ui-datepicker{z-index:1000!important;font-size:15px!important;background:#f2f2f2!important;border:1px solid #f2f2f2!important;color:#777!important}.fm_datepicker .ui-widget-header{border:1px solid #e2e2e2!important;background:#e6e6e6!important;color:#cc0c0c}.fm_datepicker .ui-state-default,.fm_datepicker .ui-widget-content .ui-state-default,.fm_datepicker .ui-widget-header .ui-state-default{border:1px solid #e3e3e3!important;background:#fff!important;color:#8c8c8c!important}.fm_datepicker .ui-state-focus,.fm_datepicker .ui-state-hover,.fm_datepicker .ui-widget-content .ui-state-focus,.fm_datepicker .ui-widget-content .ui-state-hover,.fm_datepicker .ui-widget-header .ui-state-focus,.fm_datepicker .ui-widget-header .ui-state-hover{border:1px solid #d2d2d2!important;background:#dcdcdc!important;font-weight:700!important}.fm_datepicker .ui-state-highlight,.fm_datepicker .ui-widget-content .ui-state-highlight,.fm_datepicker .ui-widget-header .ui-state-highlight{border:1px solid #a9a9a9!important;background:#a9a9a9!important;color:#fff!important}.fm_datepicker .ui-state-active,.fm_datepicker .ui-widget-content .ui-state-active,.fm_datepicker .ui-widget-header .ui-state-active{border:1px solid #a2a2a2!important;background:#dcdcdc!important;color:#272727!important}.fm_datepicker .ui-icon,.fm_datepicker .ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)!important}.fm_datepicker.ui-datepicker{font-size:15px!important}.fm_datepicker.ui-datepicker{background:#f2f2f2!important;border:1px solid #f2f2f2!important;color:#777!important}.fm_datepicker .ui-widget-header{border:1px solid #e2e2e2!important;background:#e6e6e6!important;color:#cc0c0c}.fm_datepicker .ui-state-default,.fm_datepicker .ui-widget-content .ui-state-default,.fm_datepicker .ui-widget-header .ui-state-default{border:1px solid #e3e3e3!important;background:#fff!important;color:#8c8c8c!important}.fm_datepicker .ui-state-focus,.fm_datepicker .ui-state-hover,.fm_datepicker .ui-widget-content .ui-state-focus,.fm_datepicker .ui-widget-content .ui-state-hover,.fm_datepicker .ui-widget-header .ui-state-focus,.fm_datepicker .ui-widget-header .ui-state-hover{border:1px solid #d2d2d2!important;background:#dcdcdc!important;font-weight:700!important}.fm_datepicker .ui-state-highlight,.fm_datepicker .ui-widget-content .ui-state-highlight,.fm_datepicker .ui-widget-header .ui-state-highlight{border:1px solid #a9a9a9!important;background:#a9a9a9!important;color:#fff!important}.fm_datepicker .ui-state-active,.fm_datepicker .ui-widget-content .ui-state-active,.fm_datepicker .ui-widget-header .ui-state-active{border:1px solid #a2a2a2!important;background:#dcdcdc!important;color:#272727!important}.fm_datepicker .ui-icon,.fm_datepicker .ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)!important}.fm_datepicker#ui-datepicker-div{z-index:2147483647!important}.error_label,.error_label_check_mail,.error_label_check_pass,.error_label_confirm,.error_label_exp,.error_label_price,.error_label_upload,.wd-error-label{color:red!important}.fm-not-filled{color:red;font-size:13px;width:100%;padding-left:10px}.fm-form-container .fm-form div[type=type_phone_new] input[type=text]{padding-right:6px!important;padding-left:52px!important}.fm-form .other_input{max-width:150px}.fm-form a,.fm-form a:focus,.fm-form input,.fm-form input:focus,.fm-form select,.fm-form select:focus,.fm-form textarea,.fm-form textarea:focus{outline:0!important}.fm-form a,.fm-form button{cursor:pointer}.fm-form label{display:inline}.fm-form .wdform_section{display:flex;display:-webkit-flex;-webkit-flex-direction:row;flex-direction:row}.fm-form .wdform_column:first-child:nth-last-child(1){width:100%}.fm-form .wdform_column:first-child:nth-last-child(2),.fm-form .wdform_column:first-child:nth-last-child(2)~.wdform_column{width:50%}.fm-form .wdform_column:first-child:nth-last-child(3),.fm-form .wdform_column:first-child:nth-last-child(3)~.wdform_column{width:33.33%}.fm-form .wdform_column:first-child:nth-last-child(4),.fm-form .wdform_column:first-child:nth-last-child(4)~.wdform_column{width:25%}.fm-form .wdform_column:first-child:nth-last-child(5),.fm-form .wdform_column:first-child:nth-last-child(5)~.wdform_column{width:20%}.fm-form .wdform-field:not([type=type_hidden]){padding:10px 10px}.fm-form .wdform-label-section{text-align:left;margin-bottom:5px}div[type=type_file_upload] .wdform-element-section,div[type=type_submit_reset] .wdform-element-section{min-width:inherit}.wdform-element-section{text-align:left;line-height:initial}.fm-topbar{width:100%;left:0;z-index:999999}.fm-scrollbox{box-sizing:border-box;position:fixed;transition:bottom .4s ease 0s;z-index:999999;opacity:1;bottom:0}.fm-popover-content,.fm-scrollbox-form{width:100%}.fm-scrollbox-form.float-right{float:right}.fm-scrollbox-form.float-left{float:left}.fm-minimize-text{position:fixed;transition:bottom .4s ease 0s;z-index:99999;opacity:1;bottom:0;width:100%}.fm-popover-background{position:fixed;background-color:#000;left:0;top:0;width:100%;height:100%;z-index:1100000001;opacity:.7}.fm-popover{box-sizing:border-box;position:fixed;left:0;top:0;overflow:auto;width:100%;height:100%;outline:0!important;display:block;z-index:1100000002}.fm-popover-container{position:absolute;width:100%;height:100%;left:0;top:0;padding:20px 10px;box-sizing:border-box;text-align:center}.fm-popover-container:before{content:'';display:inline-block;height:100%;vertical-align:middle}.fm-popover-inner-background{position:absolute;width:100%;height:100%;left:0;top:0;z-index:1100000003}.fm-popover-content{position:relative;display:inline-block;max-width:95%;vertical-align:middle;margin:0 auto;text-align:left;z-index:1100000005}.fm-form .wdform-date{width:120px;vertical-align:top}.wdform_grading{margin:2px}.wdform_grading input{display:inline}.fm-form .wdform-page-button{display:inline-block;outline:0;cursor:pointer}.fm-form .page_active,.fm-form .page_deactive{text-align:center;display:inline-block;cursor:pointer}.fm-form .page_percentage_active,.fm-form .page_percentage_deactive{display:inline-block}.fm-form .wdform-section-break-div{border:none}.fm-form .wdform_tr_section_break{clear:both}.fm-form .captcha_refresh{width:30px;height:30px;border-width:0;margin:0;padding:0;vertical-align:middle;cursor:pointer;background-image:url(../images/refresh_black.png)}.fm-form .fm-right label span{float:right;left:5px;position:relative;top:5px}.fm-form .checkbox-div label,.fm-form .radio-div{margin:0 5px}.fm-form .if-ie-div-label{opacity:1!important}.fm-form .wdform-matrix-cell select{width:60px}.fm-form .wdform-matrix-table{display:table;border-spacing:0}.fm-form .wdform-matrix-column{text-align:left;display:table-cell}.fm-form .wdform-matrix-cell{text-align:center;display:table-cell;padding:6px 10px}.fm-form .wdform-matrix-head>div{display:table-cell;text-align:center}.fm-form .wdform-matrix-head{display:table-row}.fm-form .wdform-matrix-row0{background:#dfdfdf;display:table-row}.fm-form .wdform-matrix-row1{background:#e9e9e9;display:table-row}.fm-form .paypal-property .wdform-quantity{width:55px}.fm-form .paypal-property select{width:85px}.wdform_map img{max-width:none!important}.wdform_row .wdform-field .wdform_map{width:inherit!important}.checkbox-div,.checkbox-div *,.radio-div,.radio-div *,.wdform-page-button{-moz-box-sizing:content-box!important;box-sizing:content-box!important;-webkit-box-sizing:content-box!important}.page_percentage_deactive,.page_percentage_deactive *{word-wrap:normal}.wdform_percentage_arrow,.wdform_percentage_text{vertical-align:top!important}.fm_hide_mobile{display:none!important}.fm-hide{display:none!important}.fm-show{display:block!important}.fm-align-right{text-align:right}.fm-align-left{text-align:left}.fm-align-center{text-align:center}.fm-form .file-upload-status{position:static;direction:inherit!important}.fm-form .wdform_page{display:block!important;margin:0!important;float:none!important}.fm_mobile_full{width:100%!important;padding:0 5%!important}.fm-clear{content:'';display:block;clear:both}.fm-topbar .fm-header-bg{display:table-cell;vertical-align:middle}.fm-topbar .fm-header{display:table-cell}.fm-header{vertical-align:middle;display:table}.image_left_right .fm-header-img{display:table-cell;vertical-align:middle;text-align:center}.image_left_right .fm-header-text{display:table-cell;vertical-align:middle}@media screen and (max-width:768px){.fm-minimize-text,.fm-popover-content,.fm-scrollbox-form{width:95%!important}.fm-form-container .fm-scrollbox{width:97%!important}}@media screen and (max-width:480px){.fm-form{width:100%!important}.wdform-page-and-images{padding:0!important}.wdform_column{padding:2px!important}.image_left_right .fm-header-img,.image_left_right .fm-header-text{display:block}.fm-form .g-recaptcha:not([data-size=invisible]){transform:scale(.77);-webkit-transform:scale(.77);transform-origin:0 0;-webkit-transform-origin:0 0}}@media screen and (min-width:481px) and (max-width:768px){.fm-form{width:100%!important}.image_left_right .fm-header-img,.image_left_right .fm-header-text{display:block}}.fm-form-container .fm-form .fm-message{width:100%;color:#333;margin:0 0 15px 0;padding:15px 15px;text-align:left}.fm-form-container .fm-form .fm-message.fm-notice-success{background:#e0ffc7;border:1px solid #b4d39b}.fm-form-container .fm-form .fm-message.fm-notice-error{background:#fbeaea;border:1px solid #eed3d7}.fm-form-container .fm-form .fm-message.fm-warning-error{background:#fff8e5;border:1px solid #ffb900}.fm-form-container .fm-form .fm-message.fm-notice-dismiss{background:#deefff;border:1px solid #5b9dd9}.fm-form .wd-float-left{float:left}.fm-form .wd-float-right{float:right}.fm-form .wd-hidden{display:none}.fm-form .wd-block{display:block}.fm-form .wd-inline-block{display:inline-block}.fm-form .wd-table{display:table}.fm-form .wd-table-group{display:table-row-group}.fm-form .wd-table-cell{display:table-cell}.fm-form .wd-table-row{display:table-row}.fm-form .wd-vertical-middle{vertical-align:middle}.fm-form .wd-vertical-top{vertical-align:top}.fm-form .wd-width-100{width:100%}.fm-form .wd-width-90{width:90%}.fm-form .wd-width-80{width:80%}.fm-form .wd-width-70{width:70%}.fm-form .wd-width-60{width:60%}.fm-form .wd-width-50{width:50%}.fm-form .wd-width-40{width:40%}.fm-form .wd-width-49{width:49%}.fm-form .wd-width-33{width:33.3%}.fm-form .wd-width-30{width:30%}.fm-form .wd-width-20{width:20%}.fm-form .wd-width-10{width:10%}.fm-form .wd-width-5{width:5%}.fm-form .time_box{text-align:right;width:50px}.fm-form-container .fm-form .wdform_row select.am_pm_select{background-size:0;vertical-align:middle}.fm-form .wd-name-separator{margin:0 4px;padding:0}.fm-form .wd-clear{clear:both}.checkbox-div-right{margin:3px 8px 0 0}.fm-form .wd-paypal-cent{width:30px}.fm-form .paypal-property{margin-top:5px}.fm-form .wd-scale-rating{border-spacing:7px}.fm-form .wdform_grading input{width:70px}.fm-form .wdform_grading label{margin-left:5px}.fm-form .wd-calendar-button{width:20px;height:20px;margin:0 0 0 -25px;color:inherit;font-size:20px}.rtl .fm-form .wd-calendar-button{margin:0 -25px 0 0}input[type=number].wd-type-number::-webkit-inner-spin-button,input[type=number].wd-type-number::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number].wd-type-number{-moz-appearance:textfield;appearance:none}.fm-form .button-reset:not(:last-child),.fm-form .button-submit{margin-right:15px;position:relative}.fm-form .ui-spinner input[type=number]{border:none}.rtl .wdform-label-section.wd-float-left{float:right;text-align:right}.rtl .fm-form .intl-tel-input .selected-flag{padding:0 8px 0 0}.rtl .wdform-element-section{text-align:right}.rtl .ui-spinner input{text-align:left}.rtl .fm-form-container .fm-form div[type=type_phone_new] input[type=text]{padding-left:6px!important;padding-right:52px!important}.rtl .fm-form .wdform-label-section{text-align:right}.rtl .fm-form .button-submit{margin-left:15px;margin-right:0}.fm-form-container .fm-form{display:block;background:0 0;border:none!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.fm-form-container .fm-form .image_left_right.fm-header{padding:0!important}.fm-form-container .fm-form.header_left_right .wdform-page-and-images{display:table-cell}.fm-form-container .fm-form.header_left_right .fm-header{display:table-cell!important;vertical-align:middle}.fm-form-container .fm-minimize-text div{background-color:#fff;border:none!important;cursor:pointer;color:#444}.fm-form-container .fm-minimize-text div:hover{border:none!important;outline:0;cursor:pointer}.fm-form-container .fm-pages .page_active,.fm-form-container .fm-pages .page_deactive{cursor:pointer}.fm-form-container .fm-pages .page_percentage_active{min-width:7%}.fm-form-container .fm-action-buttons{font-family:monospace;text-align:center;cursor:pointer}.fm-form-container .fm-form .checkbox-div label span,.fm-form-container .fm-form .radio-div label span{border:none;display:inline-block;vertical-align:middle}.fm-form-container .fm-form .checkbox-div input[type=checkbox]:checked label span:after,.fm-form-container .fm-form .radio-div input[type=radio]:checked label span:after{content:"";display:block}.fm-form-container .fm-form input[type=number].time_box{min-width:45px}.fm-form-container .fm-popover .fm-popover-content,.fm-form-container .fm-scrollbox .fm-scrollbox-form{position:relative}.fm-form-container .fm-popover .fm-form,.fm-form-container .fm-scrollbox .fm-form,.fm-form-container .fm-topbar .fm-form{background:#fff;border:1px solid #ccc}@media screen and (max-width:768px){.fm-form .wdform_section{-webkit-flex-direction:column;flex-direction:column}.fm-form .wdform_column{width:100%!important}.fm-form-container .fm-form .wdform-field{-webkit-flex-direction:column;flex-direction:column}.fm-form-container .fm-form .wdform-element-section,.fm-form-container .fm-form .wdform-label-section{width:100%}}.fm-form .wd-flex{display:flex;display:-webkit-flex}.fm-form .wd-flex-column{-webkit-flex-direction:column;flex-direction:column}.fm-form .wd-flex-row{-webkit-flex-direction:row;flex-direction:row}.fm-form .wd-flex-row-reverse{-webkit-flex-direction:row-reverse;flex-direction:row-reverse}.fm-form .wd-flex-wrap{-webkit-flex-wrap:wrap;flex-wrap:wrap}.fm-form .wd-align-items{-webkit-align-items:baseline;align-items:baseline}.fm-form .wdform_row .wd-align-items-center{-webkit-align-items:center;align-items:center}.fm-form .wd-justify-content{-webkit-justify-content:space-between;justify-content:space-between}.fm-form .wd-justify-content-left{-webkit-justify-content:flex-start;justify-content:flex-start}.fm-form .wd-justify-content-right{-webkit-justify-content:flex-end;justify-content:flex-end}.fm-form .wd-justify-content-center{-webkit-justify-content:center;justify-content:center}.fm-form .wdform-field{-webkit-align-items:baseline;align-items:baseline}.checkbox-div.wd-flex,.fm-form .wdform-element-section{-webkit-align-items:baseline;align-items:baseline}@media all and (-ms-high-contrast:none){.checkbox-div.wd-flex,.fm-form .wdform-element-section{-webkit-align-items:flex-start;align-items:flex-start}.wdform-element-section.wdform_select{margin-right:auto}.fm-form-builder .wdform_column{width:auto!important}}.fm-form .wd-choice{align-items:center;margin:0 5px 5px 5px}.fm-form textarea{resize:vertical}.fm-form .intl-tel-input{width:100%}.fm-form .wd-address{padding-bottom:8px}.fm-form .wd-choice label{cursor:pointer;margin:0 5px;word-break:break-all}.fm-form div[type=type_date_new] .wdform-element-section,.fm-form div[type=type_date_range] .wdform-element-section{align-items:center}.fm-form div[class^=div_total]{margin-bottom:10px}.fm-form div[class^=paypal_tax]{margin-top:10px}.fm-form .ui-slider-handle,.fm-form .ui-slider-range{padding:0!important}.fm-form label[for]{cursor:pointer}.fm-form .wdform-required{margin:0 5px}.fm-form .fm-header-description{text-align:justify}.wdform_star_rating img{cursor:pointer}.fm-message p{margin:0!important;padding:0!important}.arithmetic_captcha_img,.captcha_img{margin:0}div[type=type_slider] .label{color:inherit;background:0 0}.fm-form .form-group{margin:0;padding:0}.fm-form-container .fm-form .fm-gdpr-checkbox{display:initial!important;margin-right:5px}.fm-form .wdform_row{position:relative}.fm-form-builder .wdform_page{display:flex}.fm-form-builder .wdform_section{flex-direction:column;flex:1}.fm-form-builder .wdform_row{flex:1;max-width:100%}.wdform_column{display:flex;flex-direction:column}.fm-form-builder .wdform_column{width:initial!important;flex-direction:row}.fm-form-builder .wdform_section{display:inline-block;flex-wrap:unset;vertical-align:top}.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(1){width:100%}.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(2),.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(2)~.wdform_section{width:100%}.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(3),.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(3)~.wdform_section{width:50%}.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(4),.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(4)~.wdform_section{width:33.33%}@media screen and (max-width:768px){.fm-form .fm-form-builder .wdform_column,.fm-form .fm-form-builder .wdform_section{width:100%!important}.fm-form-container .fm-form-builder .fm-form .wdform-element-section,.fm-form-container .fm-form-builder .fm-form .wdform-label-section{width:100%}}.fm-loading{width:100%;height:100%;top:0;left:0;position:absolute;background-color:rgba(0,0,0,.25);background-image:url(../images/spinner.gif);background-position:center;background-repeat:no-repeat;background-size:10%;z-index:100100}.fm-submit-loading{display:none;margin:0 5px;position:relative;vertical-align:top}.fm-submit-loading.spinner:before{right:0}@keyframes spinner{to{transform:rotate(360deg)}}.fm-submit-loading.spinner:before{box-sizing:border-box;position:absolute;animation:spinner .6s linear infinite}.fm-col-1{flex:0 1 100%!important;width:100%!important}.fm-col-2{flex:0 1 50%!important;width:50%!important}.fm-col-3{flex:0 1 33.33%!important;width:33.33%!important}.fm-col-4{flex:0 1 25%!important;width:25%!important}#div_percentage,.wdform_percentage_arrow,.wdform_percentage_title{display:inline-block}.wdform_percentage_title{margin-left:5px}.button-submit[disabled]{opacity:.5;pointer-events:none}.StripeElement{padding:10px 12px!important;margin:10px!important}.intl-tel-input{position:relative;display:inline-block}.intl-tel-input *{box-sizing:border-box;-moz-box-sizing:border-box}.intl-tel-input .hide{display:none}.intl-tel-input .v-hide{visibility:hidden}.intl-tel-input input,.intl-tel-input input[type=tel],.intl-tel-input input[type=text]{position:relative;z-index:0;margin-top:0!important;margin-bottom:0!important;padding-right:36px;margin-right:0}.intl-tel-input .flag-container{position:absolute;top:0;bottom:0;right:0;padding:1px}.intl-tel-input .selected-flag{z-index:1;position:relative;width:36px;height:100%;padding:0 0 0 8px}.intl-tel-input .selected-flag .iti-flag{position:absolute;top:0;bottom:0;margin:auto}.intl-tel-input .selected-flag .iti-arrow{position:absolute;top:50%;margin-top:-2px;right:6px;width:0;height:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:4px solid #555}.rtl .intl-tel-input .selected-flag .iti-arrow{left:6px;right:auto}.intl-tel-input .selected-flag .iti-arrow.up{border-top:none;border-bottom:4px solid #555}.intl-tel-input .country-list{position:absolute;z-index:2;list-style:none;text-align:left;padding:0;margin:0 0 0 -1px;box-shadow:1px 1px 4px rgba(0,0,0,.2);background-color:#fff;border:1px solid #ccc;white-space:nowrap;max-height:200px;overflow-y:scroll}.intl-tel-input .country-list.dropup{bottom:100%;margin-bottom:-1px}.intl-tel-input .country-list .flag-box{display:inline-block;width:20px}@media (max-width:500px){.intl-tel-input .country-list{white-space:normal}}.intl-tel-input .country-list .divider{padding-bottom:5px;margin-bottom:5px;border-bottom:1px solid #ccc}.intl-tel-input .country-list .country{padding:5px 10px}.intl-tel-input .country-list .country .dial-code{color:#999}.intl-tel-input .country-list .country.highlight{background-color:rgba(0,0,0,.05)}.intl-tel-input .country-list .country-name,.intl-tel-input .country-list .dial-code,.intl-tel-input .country-list .flag-box{vertical-align:middle}.intl-tel-input .country-list .country-name,.intl-tel-input .country-list .flag-box{margin-right:6px}.intl-tel-input.allow-dropdown input,.intl-tel-input.allow-dropdown input[type=tel],.intl-tel-input.allow-dropdown input[type=text],.intl-tel-input.separate-dial-code input,.intl-tel-input.separate-dial-code input[type=tel],.intl-tel-input.separate-dial-code input[type=text]{padding-right:6px;padding-left:52px;margin-left:0}.intl-tel-input.allow-dropdown .flag-container,.intl-tel-input.separate-dial-code .flag-container{right:auto;left:0}.rtl .intl-tel-input.allow-dropdown .flag-container,.rtl .intl-tel-input.separate-dial-code .flag-container{left:auto;right:0}.intl-tel-input.allow-dropdown .selected-flag,.intl-tel-input.separate-dial-code .selected-flag{width:46px}.intl-tel-input.allow-dropdown .flag-container:hover{cursor:pointer}.intl-tel-input.allow-dropdown .flag-container:hover .selected-flag{background-color:rgba(0,0,0,.05)}.intl-tel-input.allow-dropdown input[disabled]+.flag-container:hover,.intl-tel-input.allow-dropdown input[readonly]+.flag-container:hover{cursor:default}.intl-tel-input.allow-dropdown input[disabled]+.flag-container:hover .selected-flag,.intl-tel-input.allow-dropdown input[readonly]+.flag-container:hover .selected-flag{background-color:transparent}.intl-tel-input.separate-dial-code .selected-flag{background-color:rgba(0,0,0,.05);display:table}.intl-tel-input.separate-dial-code .selected-dial-code{display:table-cell;vertical-align:middle;padding-left:28px}.intl-tel-input.separate-dial-code.iti-sdc-2 input,.intl-tel-input.separate-dial-code.iti-sdc-2 input[type=tel],.intl-tel-input.separate-dial-code.iti-sdc-2 input[type=text]{padding-left:66px}.intl-tel-input.separate-dial-code.iti-sdc-2 .selected-flag{width:60px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 input,.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 input[type=tel],.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 input[type=text]{padding-left:76px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 .selected-flag{width:70px}.intl-tel-input.separate-dial-code.iti-sdc-3 input,.intl-tel-input.separate-dial-code.iti-sdc-3 input[type=tel],.intl-tel-input.separate-dial-code.iti-sdc-3 input[type=text]{padding-left:74px}.intl-tel-input.separate-dial-code.iti-sdc-3 .selected-flag{width:68px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 input,.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 input[type=tel],.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 input[type=text]{padding-left:84px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 .selected-flag{width:78px}.intl-tel-input.separate-dial-code.iti-sdc-4 input,.intl-tel-input.separate-dial-code.iti-sdc-4 input[type=tel],.intl-tel-input.separate-dial-code.iti-sdc-4 input[type=text]{padding-left:82px}.intl-tel-input.separate-dial-code.iti-sdc-4 .selected-flag{width:76px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 input,.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 input[type=tel],.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 input[type=text]{padding-left:92px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 .selected-flag{width:86px}.intl-tel-input.separate-dial-code.iti-sdc-5 input,.intl-tel-input.separate-dial-code.iti-sdc-5 input[type=tel],.intl-tel-input.separate-dial-code.iti-sdc-5 input[type=text]{padding-left:90px}.intl-tel-input.separate-dial-code.iti-sdc-5 .selected-flag{width:84px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 input,.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 input[type=tel],.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 input[type=text]{padding-left:100px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 .selected-flag{width:94px}.intl-tel-input.iti-container{position:absolute;top:-1000px;left:-1000px;z-index:1060;padding:1px}.intl-tel-input.iti-container:hover{cursor:pointer}.iti-mobile .intl-tel-input.iti-container{top:30px;bottom:30px;left:30px;right:30px;position:fixed}.iti-mobile .intl-tel-input .country-list{max-height:100%;width:100%}.iti-mobile .intl-tel-input .country-list .country{padding:10px 10px;line-height:1.5em}.iti-flag{width:20px}.iti-flag.be{width:18px}.iti-flag.ch{width:15px}.iti-flag.mc{width:19px}.iti-flag.ne{width:18px}.iti-flag.np{width:13px}.iti-flag.va{width:15px}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-o-min-device-pixel-ratio:2 / 1),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.iti-flag{background-size:5630px 15px}}.iti-flag.ac{height:10px;background-position:0 0}.iti-flag.ad{height:14px;background-position:-22px 0}.iti-flag.ae{height:10px;background-position:-44px 0}.iti-flag.af{height:14px;background-position:-66px 0}.iti-flag.ag{height:14px;background-position:-88px 0}.iti-flag.ai{height:10px;background-position:-110px 0}.iti-flag.al{height:15px;background-position:-132px 0}.iti-flag.am{height:10px;background-position:-154px 0}.iti-flag.ao{height:14px;background-position:-176px 0}.iti-flag.aq{height:14px;background-position:-198px 0}.iti-flag.ar{height:13px;background-position:-220px 0}.iti-flag.as{height:10px;background-position:-242px 0}.iti-flag.at{height:14px;background-position:-264px 0}.iti-flag.au{height:10px;background-position:-286px 0}.iti-flag.aw{height:14px;background-position:-308px 0}.iti-flag.ax{height:13px;background-position:-330px 0}.iti-flag.az{height:10px;background-position:-352px 0}.iti-flag.ba{height:10px;background-position:-374px 0}.iti-flag.bb{height:14px;background-position:-396px 0}.iti-flag.bd{height:12px;background-position:-418px 0}.iti-flag.be{height:15px;background-position:-440px 0}.iti-flag.bf{height:14px;background-position:-460px 0}.iti-flag.bg{height:12px;background-position:-482px 0}.iti-flag.bh{height:12px;background-position:-504px 0}.iti-flag.bi{height:12px;background-position:-526px 0}.iti-flag.bj{height:14px;background-position:-548px 0}.iti-flag.bl{height:14px;background-position:-570px 0}.iti-flag.bm{height:10px;background-position:-592px 0}.iti-flag.bn{height:10px;background-position:-614px 0}.iti-flag.bo{height:14px;background-position:-636px 0}.iti-flag.bq{height:14px;background-position:-658px 0}.iti-flag.br{height:14px;background-position:-680px 0}.iti-flag.bs{height:10px;background-position:-702px 0}.iti-flag.bt{height:14px;background-position:-724px 0}.iti-flag.bv{height:15px;background-position:-746px 0}.iti-flag.bw{height:14px;background-position:-768px 0}.iti-flag.by{height:10px;background-position:-790px 0}.iti-flag.bz{height:14px;background-position:-812px 0}.iti-flag.ca{height:10px;background-position:-834px 0}.iti-flag.cc{height:10px;background-position:-856px 0}.iti-flag.cd{height:15px;background-position:-878px 0}.iti-flag.cf{height:14px;background-position:-900px 0}.iti-flag.cg{height:14px;background-position:-922px 0}.iti-flag.ch{height:15px;background-position:-944px 0}.iti-flag.ci{height:14px;background-position:-961px 0}.iti-flag.ck{height:10px;background-position:-983px 0}.iti-flag.cl{height:14px;background-position:-1005px 0}.iti-flag.cm{height:14px;background-position:-1027px 0}.iti-flag.cn{height:14px;background-position:-1049px 0}.iti-flag.co{height:14px;background-position:-1071px 0}.iti-flag.cp{height:14px;background-position:-1093px 0}.iti-flag.cr{height:12px;background-position:-1115px 0}.iti-flag.cu{height:10px;background-position:-1137px 0}.iti-flag.cv{height:12px;background-position:-1159px 0}.iti-flag.cw{height:14px;background-position:-1181px 0}.iti-flag.cx{height:10px;background-position:-1203px 0}.iti-flag.cy{height:13px;background-position:-1225px 0}.iti-flag.cz{height:14px;background-position:-1247px 0}.iti-flag.de{height:12px;background-position:-1269px 0}.iti-flag.dg{height:10px;background-position:-1291px 0}.iti-flag.dj{height:14px;background-position:-1313px 0}.iti-flag.dk{height:15px;background-position:-1335px 0}.iti-flag.dm{height:10px;background-position:-1357px 0}.iti-flag.do{height:13px;background-position:-1379px 0}.iti-flag.dz{height:14px;background-position:-1401px 0}.iti-flag.ea{height:14px;background-position:-1423px 0}.iti-flag.ec{height:14px;background-position:-1445px 0}.iti-flag.ee{height:13px;background-position:-1467px 0}.iti-flag.eg{height:14px;background-position:-1489px 0}.iti-flag.eh{height:10px;background-position:-1511px 0}.iti-flag.er{height:10px;background-position:-1533px 0}.iti-flag.es{height:14px;background-position:-1555px 0}.iti-flag.et{height:10px;background-position:-1577px 0}.iti-flag.eu{height:14px;background-position:-1599px 0}.iti-flag.fi{height:12px;background-position:-1621px 0}.iti-flag.fj{height:10px;background-position:-1643px 0}.iti-flag.fk{height:10px;background-position:-1665px 0}.iti-flag.fm{height:11px;background-position:-1687px 0}.iti-flag.fo{height:15px;background-position:-1709px 0}.iti-flag.fr{height:14px;background-position:-1731px 0}.iti-flag.ga{height:15px;background-position:-1753px 0}.iti-flag.gb{height:10px;background-position:-1775px 0}.iti-flag.gd{height:12px;background-position:-1797px 0}.iti-flag.ge{height:14px;background-position:-1819px 0}.iti-flag.gf{height:14px;background-position:-1841px 0}.iti-flag.gg{height:14px;background-position:-1863px 0}.iti-flag.gh{height:14px;background-position:-1885px 0}.iti-flag.gi{height:10px;background-position:-1907px 0}.iti-flag.gl{height:14px;background-position:-1929px 0}.iti-flag.gm{height:14px;background-position:-1951px 0}.iti-flag.gn{height:14px;background-position:-1973px 0}.iti-flag.gp{height:14px;background-position:-1995px 0}.iti-flag.gq{height:14px;background-position:-2017px 0}.iti-flag.gr{height:14px;background-position:-2039px 0}.iti-flag.gs{height:10px;background-position:-2061px 0}.iti-flag.gt{height:13px;background-position:-2083px 0}.iti-flag.gu{height:11px;background-position:-2105px 0}.iti-flag.gw{height:10px;background-position:-2127px 0}.iti-flag.gy{height:12px;background-position:-2149px 0}.iti-flag.hk{height:14px;background-position:-2171px 0}.iti-flag.hm{height:10px;background-position:-2193px 0}.iti-flag.hn{height:10px;background-position:-2215px 0}.iti-flag.hr{height:10px;background-position:-2237px 0}.iti-flag.ht{height:12px;background-position:-2259px 0}.iti-flag.hu{height:10px;background-position:-2281px 0}.iti-flag.ic{height:14px;background-position:-2303px 0}.iti-flag.id{height:14px;background-position:-2325px 0}.iti-flag.ie{height:10px;background-position:-2347px 0}.iti-flag.il{height:15px;background-position:-2369px 0}.iti-flag.im{height:10px;background-position:-2391px 0}.iti-flag.in{height:14px;background-position:-2413px 0}.iti-flag.io{height:10px;background-position:-2435px 0}.iti-flag.iq{height:14px;background-position:-2457px 0}.iti-flag.ir{height:12px;background-position:-2479px 0}.iti-flag.is{height:15px;background-position:-2501px 0}.iti-flag.it{height:14px;background-position:-2523px 0}.iti-flag.je{height:12px;background-position:-2545px 0}.iti-flag.jm{height:10px;background-position:-2567px 0}.iti-flag.jo{height:10px;background-position:-2589px 0}.iti-flag.jp{height:14px;background-position:-2611px 0}.iti-flag.ke{height:14px;background-position:-2633px 0}.iti-flag.kg{height:12px;background-position:-2655px 0}.iti-flag.kh{height:13px;background-position:-2677px 0}.iti-flag.ki{height:10px;background-position:-2699px 0}.iti-flag.km{height:12px;background-position:-2721px 0}.iti-flag.kn{height:14px;background-position:-2743px 0}.iti-flag.kp{height:10px;background-position:-2765px 0}.iti-flag.kr{height:14px;background-position:-2787px 0}.iti-flag.kw{height:10px;background-position:-2809px 0}.iti-flag.ky{height:10px;background-position:-2831px 0}.iti-flag.kz{height:10px;background-position:-2853px 0}.iti-flag.la{height:14px;background-position:-2875px 0}.iti-flag.lb{height:14px;background-position:-2897px 0}.iti-flag.lc{height:10px;background-position:-2919px 0}.iti-flag.li{height:12px;background-position:-2941px 0}.iti-flag.lk{height:10px;background-position:-2963px 0}.iti-flag.lr{height:11px;background-position:-2985px 0}.iti-flag.ls{height:14px;background-position:-3007px 0}.iti-flag.lt{height:12px;background-position:-3029px 0}.iti-flag.lu{height:12px;background-position:-3051px 0}.iti-flag.lv{height:10px;background-position:-3073px 0}.iti-flag.ly{height:10px;background-position:-3095px 0}.iti-flag.ma{height:14px;background-position:-3117px 0}.iti-flag.mc{height:15px;background-position:-3139px 0}.iti-flag.md{height:10px;background-position:-3160px 0}.iti-flag.me{height:10px;background-position:-3182px 0}.iti-flag.mf{height:14px;background-position:-3204px 0}.iti-flag.mg{height:14px;background-position:-3226px 0}.iti-flag.mh{height:11px;background-position:-3248px 0}.iti-flag.mk{height:10px;background-position:-3270px 0}.iti-flag.ml{height:14px;background-position:-3292px 0}.iti-flag.mm{height:14px;background-position:-3314px 0}.iti-flag.mn{height:10px;background-position:-3336px 0}.iti-flag.mo{height:14px;background-position:-3358px 0}.iti-flag.mp{height:10px;background-position:-3380px 0}.iti-flag.mq{height:14px;background-position:-3402px 0}.iti-flag.mr{height:14px;background-position:-3424px 0}.iti-flag.ms{height:10px;background-position:-3446px 0}.iti-flag.mt{height:14px;background-position:-3468px 0}.iti-flag.mu{height:14px;background-position:-3490px 0}.iti-flag.mv{height:14px;background-position:-3512px 0}.iti-flag.mw{height:14px;background-position:-3534px 0}.iti-flag.mx{height:12px;background-position:-3556px 0}.iti-flag.my{height:10px;background-position:-3578px 0}.iti-flag.mz{height:14px;background-position:-3600px 0}.iti-flag.na{height:14px;background-position:-3622px 0}.iti-flag.nc{height:10px;background-position:-3644px 0}.iti-flag.ne{height:15px;background-position:-3666px 0}.iti-flag.nf{height:10px;background-position:-3686px 0}.iti-flag.ng{height:10px;background-position:-3708px 0}.iti-flag.ni{height:12px;background-position:-3730px 0}.iti-flag.nl{height:14px;background-position:-3752px 0}.iti-flag.no{height:15px;background-position:-3774px 0}.iti-flag.np{height:15px;background-position:-3796px 0}.iti-flag.nr{height:10px;background-position:-3811px 0}.iti-flag.nu{height:10px;background-position:-3833px 0}.iti-flag.nz{height:10px;background-position:-3855px 0}.iti-flag.om{height:10px;background-position:-3877px 0}.iti-flag.pa{height:14px;background-position:-3899px 0}.iti-flag.pe{height:14px;background-position:-3921px 0}.iti-flag.pf{height:14px;background-position:-3943px 0}.iti-flag.pg{height:15px;background-position:-3965px 0}.iti-flag.ph{height:10px;background-position:-3987px 0}.iti-flag.pk{height:14px;background-position:-4009px 0}.iti-flag.pl{height:13px;background-position:-4031px 0}.iti-flag.pm{height:14px;background-position:-4053px 0}.iti-flag.pn{height:10px;background-position:-4075px 0}.iti-flag.pr{height:14px;background-position:-4097px 0}.iti-flag.ps{height:10px;background-position:-4119px 0}.iti-flag.pt{height:14px;background-position:-4141px 0}.iti-flag.pw{height:13px;background-position:-4163px 0}.iti-flag.py{height:11px;background-position:-4185px 0}.iti-flag.qa{height:8px;background-position:-4207px 0}.iti-flag.re{height:14px;background-position:-4229px 0}.iti-flag.ro{height:14px;background-position:-4251px 0}.iti-flag.rs{height:14px;background-position:-4273px 0}.iti-flag.ru{height:14px;background-position:-4295px 0}.iti-flag.rw{height:14px;background-position:-4317px 0}.iti-flag.sa{height:14px;background-position:-4339px 0}.iti-flag.sb{height:10px;background-position:-4361px 0}.iti-flag.sc{height:10px;background-position:-4383px 0}.iti-flag.sd{height:10px;background-position:-4405px 0}.iti-flag.se{height:13px;background-position:-4427px 0}.iti-flag.sg{height:14px;background-position:-4449px 0}.iti-flag.sh{height:10px;background-position:-4471px 0}.iti-flag.si{height:10px;background-position:-4493px 0}.iti-flag.sj{height:15px;background-position:-4515px 0}.iti-flag.sk{height:14px;background-position:-4537px 0}.iti-flag.sl{height:14px;background-position:-4559px 0}.iti-flag.sm{height:15px;background-position:-4581px 0}.iti-flag.sn{height:14px;background-position:-4603px 0}.iti-flag.so{height:14px;background-position:-4625px 0}.iti-flag.sr{height:14px;background-position:-4647px 0}.iti-flag.ss{height:10px;background-position:-4669px 0}.iti-flag.st{height:10px;background-position:-4691px 0}.iti-flag.sv{height:12px;background-position:-4713px 0}.iti-flag.sx{height:14px;background-position:-4735px 0}.iti-flag.sy{height:14px;background-position:-4757px 0}.iti-flag.sz{height:14px;background-position:-4779px 0}.iti-flag.ta{height:10px;background-position:-4801px 0}.iti-flag.tc{height:10px;background-position:-4823px 0}.iti-flag.td{height:14px;background-position:-4845px 0}.iti-flag.tf{height:14px;background-position:-4867px 0}.iti-flag.tg{height:13px;background-position:-4889px 0}.iti-flag.th{height:14px;background-position:-4911px 0}.iti-flag.tj{height:10px;background-position:-4933px 0}.iti-flag.tk{height:10px;background-position:-4955px 0}.iti-flag.tl{height:10px;background-position:-4977px 0}.iti-flag.tm{height:14px;background-position:-4999px 0}.iti-flag.tn{height:14px;background-position:-5021px 0}.iti-flag.to{height:10px;background-position:-5043px 0}.iti-flag.tr{height:14px;background-position:-5065px 0}.iti-flag.tt{height:12px;background-position:-5087px 0}.iti-flag.tv{height:10px;background-position:-5109px 0}.iti-flag.tw{height:14px;background-position:-5131px 0}.iti-flag.tz{height:14px;background-position:-5153px 0}.iti-flag.ua{height:14px;background-position:-5175px 0}.iti-flag.ug{height:14px;background-position:-5197px 0}.iti-flag.um{height:11px;background-position:-5219px 0}.iti-flag.us{height:11px;background-position:-5241px 0}.iti-flag.uy{height:14px;background-position:-5263px 0}.iti-flag.uz{height:10px;background-position:-5285px 0}.iti-flag.va{height:15px;background-position:-5307px 0}.iti-flag.vc{height:14px;background-position:-5324px 0}.iti-flag.ve{height:14px;background-position:-5346px 0}.iti-flag.vg{height:10px;background-position:-5368px 0}.iti-flag.vi{height:14px;background-position:-5390px 0}.iti-flag.vn{height:14px;background-position:-5412px 0}.iti-flag.vu{height:12px;background-position:-5434px 0}.iti-flag.wf{height:14px;background-position:-5456px 0}.iti-flag.ws{height:10px;background-position:-5478px 0}.iti-flag.xk{height:15px;background-position:-5500px 0}.iti-flag.ye{height:14px;background-position:-5522px 0}.iti-flag.yt{height:14px;background-position:-5544px 0}.iti-flag.za{height:14px;background-position:-5566px 0}.iti-flag.zm{height:14px;background-position:-5588px 0}.iti-flag.zw{height:10px;background-position:-5610px 0}.iti-flag{width:20px;height:15px;box-shadow:0 0 1px 0 #888;background-image:url(../images/flags.png);background-repeat:no-repeat;background-color:#dbdbdb;background-position:20px 0}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-o-min-device-pixel-ratio:2 / 1),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.iti-flag{background-image:url(../images/flags@2x.png)}}.iti-flag.np{background-color:transparent}@font-face{font-family:fm-icons;src:url(fonts/fm-icons.ttf?wjdy97) format('truetype'),url(fonts/fm-icons.woff?wjdy97) format('woff'),url(fonts/fm-icons.svg?wjdy97#fm-icons) format('svg');font-weight:400;font-style:normal}[class*=" fm-ico-"],[class^=fm-ico-]{font-family:fm-icons!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fm-ico-form-maker:before{content:"\e908";color:#6e7883}.fm-ico-plus-circle:before{content:"\e900"}.fm-ico-plus:before{content:"\e901"}.fm-ico-collapse:before{content:"\e902"}.fm-ico-expand:before{content:"\e906"}.fm-ico-duplicate:before{content:"\e904"}.fm-ico-edit:before{content:"\e905"}.fm-ico-delete:before{content:"\e907"}.fm-ico-draggable:before{content:"\e903"}.fm-ico-close:before{content:"\e909"}.fm-ico-spinner:before{content:"\e90a"}
6
  * Licensed under the MIT license - http://opensource.org/licenses/MIT
7
  *
8
  * Copyright (c) 2016 Daniel Eden
9
+ */.fm-animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.fm-animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.fm-animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}.fm-animated.bounceIn,.fm-animated.bounceOut,.fm-animated.flipOutX,.fm-animated.flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes bounce{20%,53%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}@keyframes bounce{20%,53%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes pulse{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes rubberBand{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes rubberBand{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shake{from,to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shake{from,to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}.headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}@keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}.swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes tada{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{from{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{-webkit-transform:none;transform:none}}@keyframes wobble{from{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{-webkit-transform:none;transform:none}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{11.1%,from,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{11.1%,from,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}.jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.bounceIn{-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.bounceOut{-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes flip{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.fm-animated.flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes flipOutX{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-backface-visibility:visible!important;backface-visibility:visible!important}@-webkit-keyframes flipOutY{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@keyframes flipOutY{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}@keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.hinge{-webkit-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}.zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}.zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp}@-webkit-keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}.fm-form *{box-sizing:border-box}.wdform_map img{max-width:none!important}.wdform_row .wdform-field .wdform_map{width:inherit!important}.checkbox-div,.checkbox-div *,.radio-div,.radio-div *,.wdform-page-button{-moz-box-sizing:content-box!important;box-sizing:content-box!important;-webkit-box-sizing:content-box!important}.page_percentage_deactive,.page_percentage_deactive *{word-wrap:normal}.wdform_percentage_arrow,.wdform_percentage_text{vertical-align:top!important}div[type=type_button],div[type=type_submit_reset]{justify-content:flex-end}div[type=type_captcha] .wdform-element-section *{vertical-align:middle}.file-upload-status{direction:inherit!important}.fm_datepicker.ui-datepicker{z-index:1000!important;font-size:15px!important;background:#f2f2f2!important;border:1px solid #f2f2f2!important;color:#777!important}.fm_datepicker .ui-widget-header{border:1px solid #e2e2e2!important;background:#e6e6e6!important;color:#cc0c0c}.fm_datepicker .ui-state-default,.fm_datepicker .ui-widget-content .ui-state-default,.fm_datepicker .ui-widget-header .ui-state-default{border:1px solid #e3e3e3!important;background:#fff!important;color:#8c8c8c!important}.fm_datepicker .ui-state-focus,.fm_datepicker .ui-state-hover,.fm_datepicker .ui-widget-content .ui-state-focus,.fm_datepicker .ui-widget-content .ui-state-hover,.fm_datepicker .ui-widget-header .ui-state-focus,.fm_datepicker .ui-widget-header .ui-state-hover{border:1px solid #d2d2d2!important;background:#dcdcdc!important;font-weight:700!important}.fm_datepicker .ui-state-highlight,.fm_datepicker .ui-widget-content .ui-state-highlight,.fm_datepicker .ui-widget-header .ui-state-highlight{border:1px solid #a9a9a9!important;background:#a9a9a9!important;color:#fff!important}.fm_datepicker .ui-state-active,.fm_datepicker .ui-widget-content .ui-state-active,.fm_datepicker .ui-widget-header .ui-state-active{border:1px solid #a2a2a2!important;background:#dcdcdc!important;color:#272727!important}.fm_datepicker .ui-icon,.fm_datepicker .ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)!important}.fm_datepicker.ui-datepicker{font-size:15px!important}.fm_datepicker.ui-datepicker{background:#f2f2f2!important;border:1px solid #f2f2f2!important;color:#777!important}.fm_datepicker .ui-widget-header{border:1px solid #e2e2e2!important;background:#e6e6e6!important;color:#cc0c0c}.fm_datepicker .ui-state-default,.fm_datepicker .ui-widget-content .ui-state-default,.fm_datepicker .ui-widget-header .ui-state-default{border:1px solid #e3e3e3!important;background:#fff!important;color:#8c8c8c!important}.fm_datepicker .ui-state-focus,.fm_datepicker .ui-state-hover,.fm_datepicker .ui-widget-content .ui-state-focus,.fm_datepicker .ui-widget-content .ui-state-hover,.fm_datepicker .ui-widget-header .ui-state-focus,.fm_datepicker .ui-widget-header .ui-state-hover{border:1px solid #d2d2d2!important;background:#dcdcdc!important;font-weight:700!important}.fm_datepicker .ui-state-highlight,.fm_datepicker .ui-widget-content .ui-state-highlight,.fm_datepicker .ui-widget-header .ui-state-highlight{border:1px solid #a9a9a9!important;background:#a9a9a9!important;color:#fff!important}.fm_datepicker .ui-state-active,.fm_datepicker .ui-widget-content .ui-state-active,.fm_datepicker .ui-widget-header .ui-state-active{border:1px solid #a2a2a2!important;background:#dcdcdc!important;color:#272727!important}.fm_datepicker .ui-icon,.fm_datepicker .ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)!important}.fm_datepicker#ui-datepicker-div{z-index:2147483647!important}.error_label,.error_label_check_mail,.error_label_check_pass,.error_label_confirm,.error_label_exp,.error_label_price,.error_label_upload,.wd-error-label{color:red!important}.fm-not-filled{color:red;font-size:13px;width:100%;padding-left:10px}.fm-form-container .fm-form div[type=type_phone_new] input[type=text]{padding-right:6px!important;padding-left:52px!important}.fm-form .other_input{max-width:150px}.fm-form a,.fm-form a:focus,.fm-form input,.fm-form input:focus,.fm-form select,.fm-form select:focus,.fm-form textarea,.fm-form textarea:focus{outline:0!important}.fm-form a,.fm-form button{cursor:pointer}.fm-form label{display:inline}.fm-form .wdform_section{display:flex;display:-webkit-flex;-webkit-flex-direction:row;flex-direction:row}.fm-form .wdform_column:first-child:nth-last-child(1){width:100%}.fm-form .wdform_column:first-child:nth-last-child(2),.fm-form .wdform_column:first-child:nth-last-child(2)~.wdform_column{width:50%}.fm-form .wdform_column:first-child:nth-last-child(3),.fm-form .wdform_column:first-child:nth-last-child(3)~.wdform_column{width:33.33%}.fm-form .wdform_column:first-child:nth-last-child(4),.fm-form .wdform_column:first-child:nth-last-child(4)~.wdform_column{width:25%}.fm-form .wdform_column:first-child:nth-last-child(5),.fm-form .wdform_column:first-child:nth-last-child(5)~.wdform_column{width:20%}.fm-form .wdform-field:not([type=type_hidden]){padding:10px 10px}.fm-form .wdform-label-section{text-align:left;margin-bottom:5px}div[type=type_file_upload] .wdform-element-section,div[type=type_submit_reset] .wdform-element-section{min-width:inherit}.wdform-element-section{text-align:left;line-height:initial}.fm-topbar{width:100%;left:0;z-index:999999}.fm-scrollbox{box-sizing:border-box;position:fixed;transition:bottom .4s ease 0s;z-index:999999;opacity:1;bottom:0}.fm-popover-content,.fm-scrollbox-form{width:100%}.fm-scrollbox-form.float-right{float:right}.fm-scrollbox-form.float-left{float:left}.fm-minimize-text{position:fixed;transition:bottom .4s ease 0s;z-index:99999;opacity:1;bottom:0;width:100%}.fm-popover-background{position:fixed;background-color:#000;left:0;top:0;width:100%;height:100%;z-index:1100000001;opacity:.7}.fm-popover{box-sizing:border-box;position:fixed;left:0;top:0;overflow:auto;width:100%;height:100%;outline:0!important;display:block;z-index:1100000002}.fm-popover-container{position:absolute;width:100%;height:100%;left:0;top:0;padding:20px 10px;box-sizing:border-box;text-align:center}.fm-popover-container:before{content:'';display:inline-block;height:100%;vertical-align:middle}.fm-popover-inner-background{position:absolute;width:100%;height:100%;left:0;top:0;z-index:1100000003}.fm-popover-content{position:relative;display:inline-block;max-width:95%;vertical-align:middle;margin:0 auto;text-align:left;z-index:1100000005}.fm-form .wdform-date{width:120px;vertical-align:top}.wdform_grading{margin:2px}.wdform_grading input{display:inline}.fm-form .wdform-page-button{display:inline-block;outline:0;cursor:pointer}.fm-form .page_active,.fm-form .page_deactive{text-align:center;display:inline-block;cursor:pointer}.fm-form .page_percentage_active,.fm-form .page_percentage_deactive{display:inline-block}.fm-form .wdform-section-break-div{border:none}.fm-form .wdform_tr_section_break{clear:both}.fm-form .captcha_refresh{width:30px;height:30px;border-width:0;margin:0;padding:0;vertical-align:middle;cursor:pointer;background-image:url(../images/refresh_black.png)}.fm-form .fm-right label span{float:right;left:5px;position:relative;top:5px}.fm-form .checkbox-div label,.fm-form .radio-div{margin:0 5px}.fm-form .if-ie-div-label{opacity:1!important}.fm-form .wdform-matrix-cell select{width:60px}.fm-form .wdform-matrix-table{display:table;border-spacing:0}.fm-form .wdform-matrix-column{text-align:left;display:table-cell}.fm-form .wdform-matrix-cell{text-align:center;display:table-cell;padding:6px 10px}.fm-form .wdform-matrix-head>div{display:table-cell;text-align:center}.fm-form .wdform-matrix-head{display:table-row}.fm-form .wdform-matrix-row0{background:#dfdfdf;display:table-row}.fm-form .wdform-matrix-row1{background:#e9e9e9;display:table-row}.fm-form .paypal-property .wdform-quantity{width:55px}.fm-form .paypal-property select{width:85px}.wdform_map img{max-width:none!important}.wdform_row .wdform-field .wdform_map{width:inherit!important}.checkbox-div,.checkbox-div *,.radio-div,.radio-div *,.wdform-page-button{-moz-box-sizing:content-box!important;box-sizing:content-box!important;-webkit-box-sizing:content-box!important}.page_percentage_deactive,.page_percentage_deactive *{word-wrap:normal}.wdform_percentage_arrow,.wdform_percentage_text{vertical-align:top!important}.fm_hide_mobile{display:none!important}.fm-hide{display:none!important}.fm-show{display:block!important}.fm-align-right{text-align:right}.fm-align-left{text-align:left}.fm-align-center{text-align:center}.fm-form .file-upload-status{position:static;direction:inherit!important}.fm-form .wdform_page{display:block!important;margin:0!important;float:none!important}.fm_mobile_full{width:100%!important;padding:0 5%!important}.fm-clear{content:'';display:block;clear:both}.fm-topbar .fm-header-bg{display:table-cell;vertical-align:middle}.fm-topbar .fm-header{display:table-cell}.fm-header{vertical-align:middle;display:table}.image_left_right .fm-header-img{display:table-cell;vertical-align:middle;text-align:center}.image_left_right .fm-header-text{display:table-cell;vertical-align:middle}@media screen and (max-width:768px){.fm-minimize-text,.fm-popover-content,.fm-scrollbox-form{width:95%!important}.fm-form-container .fm-scrollbox{width:97%!important}}@media screen and (max-width:480px){.fm-form{width:100%!important}.wdform-page-and-images{padding:0!important}.wdform_column{padding:2px!important}.image_left_right .fm-header-img,.image_left_right .fm-header-text{display:block}.fm-form .g-recaptcha:not([data-size=invisible]){transform:scale(.77);-webkit-transform:scale(.77);transform-origin:0 0;-webkit-transform-origin:0 0}}@media screen and (min-width:481px) and (max-width:768px){.fm-form{width:100%!important}.image_left_right .fm-header-img,.image_left_right .fm-header-text{display:block}}.fm-form-container .fm-form .fm-message{width:100%;color:#333;margin:0 0 15px 0;padding:15px 15px;text-align:left}.fm-form-container .fm-form .fm-message.fm-notice-success{background:#e0ffc7;border:1px solid #b4d39b}.fm-form-container .fm-form .fm-message.fm-notice-error{background:#fbeaea;border:1px solid #eed3d7}.fm-form-container .fm-form .fm-message.fm-warning-error{background:#fff8e5;border:1px solid #ffb900}.fm-form-container .fm-form .fm-message.fm-notice-dismiss{background:#deefff;border:1px solid #5b9dd9}.fm-form .wd-float-left{float:left}.fm-form .wd-float-right{float:right}.fm-form .wd-hidden{display:none}.fm-form .wd-block{display:block}.fm-form .wd-inline-block{display:inline-block}.fm-form .wd-table{display:table}.fm-form .wd-table-group{display:table-row-group}.fm-form .wd-table-cell{display:table-cell}.fm-form .wd-table-row{display:table-row}.fm-form .wd-vertical-middle{vertical-align:middle}.fm-form .wd-vertical-top{vertical-align:top}.fm-form .wd-width-100{width:100%}.fm-form .wd-width-90{width:90%}.fm-form .wd-width-80{width:80%}.fm-form .wd-width-70{width:70%}.fm-form .wd-width-60{width:60%}.fm-form .wd-width-50{width:50%}.fm-form .wd-width-40{width:40%}.fm-form .wd-width-49{width:49%}.fm-form .wd-width-33{width:33.3%}.fm-form .wd-width-30{width:30%}.fm-form .wd-width-20{width:20%}.fm-form .wd-width-10{width:10%}.fm-form .wd-width-5{width:5%}.fm-form .time_box{text-align:right;width:50px}.fm-form-container .fm-form .wdform_row select.am_pm_select{background-size:0;vertical-align:middle}.fm-form .wd-name-separator{margin:0 4px;padding:0}.fm-form .wd-clear{clear:both}.checkbox-div-right{margin:3px 8px 0 0}.fm-form .wd-paypal-cent{width:30px}.fm-form .paypal-property{margin-top:5px}.fm-form .wd-scale-rating{border-spacing:7px}.fm-form .wdform_grading input{width:70px}.fm-form .wdform_grading label{margin-left:5px}.fm-form .wd-calendar-button{width:20px;height:20px;margin:0 0 0 -25px;color:inherit;font-size:20px}.rtl .fm-form .wd-calendar-button{margin:0 -25px 0 0}input[type=number].wd-type-number::-webkit-inner-spin-button,input[type=number].wd-type-number::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number].wd-type-number{-moz-appearance:textfield;appearance:none}.fm-form .button-reset:not(:last-child),.fm-form .button-submit{margin-right:15px;position:relative}.fm-form .ui-spinner input[type=number]{border:none}.rtl .wdform-label-section.wd-float-left{float:right;text-align:right}.rtl .fm-form .intl-tel-input .selected-flag{padding:0 8px 0 0}.rtl .wdform-element-section{text-align:right}.rtl .ui-spinner input{text-align:left}.rtl .fm-form-container .fm-form div[type=type_phone_new] input[type=text]{padding-left:6px!important;padding-right:52px!important}.rtl .fm-form .wdform-label-section{text-align:right}.rtl .fm-form .button-submit{margin-left:15px;margin-right:0}.fm-form-container .fm-form{display:block;background:0 0;border:none!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.fm-form-container .fm-form .image_left_right.fm-header{padding:0!important}.fm-form-container .fm-form.header_left_right .wdform-page-and-images{display:table-cell}.fm-form-container .fm-form.header_left_right .fm-header{display:table-cell!important;vertical-align:middle}.fm-form-container .fm-minimize-text div{background-color:#fff;border:none!important;cursor:pointer;color:#444}.fm-form-container .fm-minimize-text div:hover{border:none!important;outline:0;cursor:pointer}.fm-form-container .fm-pages .page_active,.fm-form-container .fm-pages .page_deactive{cursor:pointer}.fm-form-container .fm-pages .page_percentage_active{min-width:7%}.fm-form-container .fm-action-buttons{font-family:monospace;text-align:center;cursor:pointer}.fm-form-container .fm-form .checkbox-div label span,.fm-form-container .fm-form .radio-div label span{border:none;display:inline-block;vertical-align:middle}.fm-form-container .fm-form .checkbox-div input[type=checkbox]:checked label span:after,.fm-form-container .fm-form .radio-div input[type=radio]:checked label span:after{content:"";display:block}.fm-form-container .fm-form input[type=number].time_box{min-width:45px}.fm-form-container .fm-popover .fm-popover-content,.fm-form-container .fm-scrollbox .fm-scrollbox-form{position:relative}.fm-form-container .fm-popover .fm-form,.fm-form-container .fm-scrollbox .fm-form,.fm-form-container .fm-topbar .fm-form{background:#fff;border:1px solid #ccc}@media screen and (max-width:768px){.fm-form .wdform_section{-webkit-flex-direction:column;flex-direction:column}.fm-form .wdform_column{width:100%!important}.fm-form-container .fm-form .wdform-field{-webkit-flex-direction:column;flex-direction:column}.fm-form-container .fm-form .wdform-element-section,.fm-form-container .fm-form .wdform-label-section{width:100%}}.fm-form .wd-flex{display:flex;display:-webkit-flex}.fm-form .wd-flex-column{-webkit-flex-direction:column;flex-direction:column}.fm-form .wd-flex-row{-webkit-flex-direction:row;flex-direction:row}.fm-form .wd-flex-row-reverse{-webkit-flex-direction:row-reverse;flex-direction:row-reverse}.fm-form .wd-flex-wrap{-webkit-flex-wrap:wrap;flex-wrap:wrap}.fm-form .wd-align-items{-webkit-align-items:baseline;align-items:baseline}.fm-form .wdform_row .wd-align-items-center{-webkit-align-items:center;align-items:center}.fm-form .wd-justify-content{-webkit-justify-content:space-between;justify-content:space-between}.fm-form .wd-justify-content-left{-webkit-justify-content:flex-start;justify-content:flex-start}.fm-form .wd-justify-content-right{-webkit-justify-content:flex-end;justify-content:flex-end}.fm-form .wd-justify-content-center{-webkit-justify-content:center;justify-content:center}.fm-form .wdform-field{-webkit-align-items:baseline;align-items:baseline}.checkbox-div.wd-flex,.fm-form .wdform-element-section{-webkit-align-items:baseline;align-items:baseline}@media all and (-ms-high-contrast:none){.checkbox-div.wd-flex,.fm-form .wdform-element-section{-webkit-align-items:flex-start;align-items:flex-start}.wdform-element-section.wdform_select{margin-right:auto}.fm-form-builder .wdform_column{width:auto!important}}.fm-form .wd-choice{align-items:center;margin:0 5px 5px 5px}.fm-form textarea{resize:vertical}.fm-form .intl-tel-input{width:100%}.fm-form .wd-address{padding-bottom:8px}.fm-form .wd-choice label{cursor:pointer;margin:0 5px;word-break:break-all}.fm-form div[type=type_date_new] .wdform-element-section,.fm-form div[type=type_date_range] .wdform-element-section{align-items:center}.fm-form div[class^=div_total]{margin-bottom:10px}.fm-form div[class^=paypal_tax]{margin-top:10px}.fm-form .ui-slider-handle,.fm-form .ui-slider-range{padding:0!important}.fm-form label[for]{cursor:pointer}.fm-form .wdform-required{margin:0 5px}.fm-form .fm-header-description{text-align:justify}.wdform_star_rating img{display:inline-block;cursor:pointer}.fm-message p{margin:0!important;padding:0!important}.arithmetic_captcha_img,.captcha_img{margin:0}div[type=type_slider] .label{color:inherit;background:0 0}.fm-form .form-group{margin:0;padding:0}.fm-form-container .fm-form .fm-gdpr-checkbox{display:initial!important;margin-right:5px}.fm-form .wdform_row{position:relative}.fm-form-builder .wdform_page{display:flex}.fm-form-builder .wdform_section{flex-direction:column;flex:1}.fm-form-builder .wdform_row{flex:1;max-width:100%}.wdform_column{display:flex;flex-direction:column}.fm-form-builder .wdform_column{width:initial!important;flex-direction:row}.fm-form-builder .wdform_section{display:inline-block;flex-wrap:unset;vertical-align:top}.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(1){width:100%}.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(2),.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(2)~.wdform_section{width:100%}.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(3),.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(3)~.wdform_section{width:50%}.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(4),.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(4)~.wdform_section{width:33.33%}@media screen and (max-width:768px){.fm-form .fm-form-builder .wdform_column,.fm-form .fm-form-builder .wdform_section{width:100%!important}.fm-form-container .fm-form-builder .fm-form .wdform-element-section,.fm-form-container .fm-form-builder .fm-form .wdform-label-section{width:100%}}.fm-loading{width:100%;height:100%;top:0;left:0;position:absolute;background-color:rgba(0,0,0,.25);background-image:url(../images/spinner.gif);background-position:center;background-repeat:no-repeat;background-size:10%;z-index:100100}.fm-submit-loading{display:none;margin:0 5px;position:relative;vertical-align:top}.fm-submit-loading.spinner:before{right:0}@keyframes spinner{to{transform:rotate(360deg)}}.fm-submit-loading.spinner:before{box-sizing:border-box;position:absolute;animation:spinner .6s linear infinite}.fm-col-1{flex:0 1 100%!important;width:100%!important}.fm-col-2{flex:0 1 50%!important;width:50%!important}.fm-col-3{flex:0 1 33.33%!important;width:33.33%!important}.fm-col-4{flex:0 1 25%!important;width:25%!important}#div_percentage,.wdform_percentage_arrow,.wdform_percentage_title{display:inline-block}.wdform_percentage_title{margin-left:5px}.button-submit[disabled]{opacity:.5;pointer-events:none}.StripeElement{padding:10px 12px!important;margin:10px!important}.intl-tel-input{position:relative;display:inline-block}.intl-tel-input *{box-sizing:border-box;-moz-box-sizing:border-box}.intl-tel-input .hide{display:none}.intl-tel-input .v-hide{visibility:hidden}.intl-tel-input input,.intl-tel-input input[type=tel],.intl-tel-input input[type=text]{position:relative;z-index:0;margin-top:0!important;margin-bottom:0!important;padding-right:36px;margin-right:0}.intl-tel-input .flag-container{position:absolute;top:0;bottom:0;right:0;padding:1px}.intl-tel-input .selected-flag{z-index:1;position:relative;width:36px;height:100%;padding:0 0 0 8px}.intl-tel-input .selected-flag .iti-flag{position:absolute;top:0;bottom:0;margin:auto}.intl-tel-input .selected-flag .iti-arrow{position:absolute;top:50%;margin-top:-2px;right:6px;width:0;height:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:4px solid #555}.rtl .intl-tel-input .selected-flag .iti-arrow{left:6px;right:auto}.intl-tel-input .selected-flag .iti-arrow.up{border-top:none;border-bottom:4px solid #555}.intl-tel-input .country-list{position:absolute;z-index:2;list-style:none;text-align:left;padding:0;margin:0 0 0 -1px;box-shadow:1px 1px 4px rgba(0,0,0,.2);background-color:#fff;border:1px solid #ccc;white-space:nowrap;max-height:200px;overflow-y:scroll}.intl-tel-input .country-list.dropup{bottom:100%;margin-bottom:-1px}.intl-tel-input .country-list .flag-box{display:inline-block;width:20px}@media (max-width:500px){.intl-tel-input .country-list{white-space:normal}}.intl-tel-input .country-list .divider{padding-bottom:5px;margin-bottom:5px;border-bottom:1px solid #ccc}.intl-tel-input .country-list .country{padding:5px 10px}.intl-tel-input .country-list .country .dial-code{color:#999}.intl-tel-input .country-list .country.highlight{background-color:rgba(0,0,0,.05)}.intl-tel-input .country-list .country-name,.intl-tel-input .country-list .dial-code,.intl-tel-input .country-list .flag-box{vertical-align:middle}.intl-tel-input .country-list .country-name,.intl-tel-input .country-list .flag-box{margin-right:6px}.intl-tel-input.allow-dropdown input,.intl-tel-input.allow-dropdown input[type=tel],.intl-tel-input.allow-dropdown input[type=text],.intl-tel-input.separate-dial-code input,.intl-tel-input.separate-dial-code input[type=tel],.intl-tel-input.separate-dial-code input[type=text]{padding-right:6px;padding-left:52px;margin-left:0}.intl-tel-input.allow-dropdown .flag-container,.intl-tel-input.separate-dial-code .flag-container{right:auto;left:0}.rtl .intl-tel-input.allow-dropdown .flag-container,.rtl .intl-tel-input.separate-dial-code .flag-container{left:auto;right:0}.intl-tel-input.allow-dropdown .selected-flag,.intl-tel-input.separate-dial-code .selected-flag{width:46px}.intl-tel-input.allow-dropdown .flag-container:hover{cursor:pointer}.intl-tel-input.allow-dropdown .flag-container:hover .selected-flag{background-color:rgba(0,0,0,.05)}.intl-tel-input.allow-dropdown input[disabled]+.flag-container:hover,.intl-tel-input.allow-dropdown input[readonly]+.flag-container:hover{cursor:default}.intl-tel-input.allow-dropdown input[disabled]+.flag-container:hover .selected-flag,.intl-tel-input.allow-dropdown input[readonly]+.flag-container:hover .selected-flag{background-color:transparent}.intl-tel-input.separate-dial-code .selected-flag{background-color:rgba(0,0,0,.05);display:table}.intl-tel-input.separate-dial-code .selected-dial-code{display:table-cell;vertical-align:middle;padding-left:28px}.intl-tel-input.separate-dial-code.iti-sdc-2 input,.intl-tel-input.separate-dial-code.iti-sdc-2 input[type=tel],.intl-tel-input.separate-dial-code.iti-sdc-2 input[type=text]{padding-left:66px}.intl-tel-input.separate-dial-code.iti-sdc-2 .selected-flag{width:60px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 input,.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 input[type=tel],.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 input[type=text]{padding-left:76px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 .selected-flag{width:70px}.intl-tel-input.separate-dial-code.iti-sdc-3 input,.intl-tel-input.separate-dial-code.iti-sdc-3 input[type=tel],.intl-tel-input.separate-dial-code.iti-sdc-3 input[type=text]{padding-left:74px}.intl-tel-input.separate-dial-code.iti-sdc-3 .selected-flag{width:68px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 input,.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 input[type=tel],.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 input[type=text]{padding-left:84px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 .selected-flag{width:78px}.intl-tel-input.separate-dial-code.iti-sdc-4 input,.intl-tel-input.separate-dial-code.iti-sdc-4 input[type=tel],.intl-tel-input.separate-dial-code.iti-sdc-4 input[type=text]{padding-left:82px}.intl-tel-input.separate-dial-code.iti-sdc-4 .selected-flag{width:76px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 input,.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 input[type=tel],.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 input[type=text]{padding-left:92px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 .selected-flag{width:86px}.intl-tel-input.separate-dial-code.iti-sdc-5 input,.intl-tel-input.separate-dial-code.iti-sdc-5 input[type=tel],.intl-tel-input.separate-dial-code.iti-sdc-5 input[type=text]{padding-left:90px}.intl-tel-input.separate-dial-code.iti-sdc-5 .selected-flag{width:84px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 input,.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 input[type=tel],.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 input[type=text]{padding-left:100px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 .selected-flag{width:94px}.intl-tel-input.iti-container{position:absolute;top:-1000px;left:-1000px;z-index:1060;padding:1px}.intl-tel-input.iti-container:hover{cursor:pointer}.iti-mobile .intl-tel-input.iti-container{top:30px;bottom:30px;left:30px;right:30px;position:fixed}.iti-mobile .intl-tel-input .country-list{max-height:100%;width:100%}.iti-mobile .intl-tel-input .country-list .country{padding:10px 10px;line-height:1.5em}.iti-flag{width:20px}.iti-flag.be{width:18px}.iti-flag.ch{width:15px}.iti-flag.mc{width:19px}.iti-flag.ne{width:18px}.iti-flag.np{width:13px}.iti-flag.va{width:15px}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-o-min-device-pixel-ratio:2 / 1),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.iti-flag{background-size:5630px 15px}}.iti-flag.ac{height:10px;background-position:0 0}.iti-flag.ad{height:14px;background-position:-22px 0}.iti-flag.ae{height:10px;background-position:-44px 0}.iti-flag.af{height:14px;background-position:-66px 0}.iti-flag.ag{height:14px;background-position:-88px 0}.iti-flag.ai{height:10px;background-position:-110px 0}.iti-flag.al{height:15px;background-position:-132px 0}.iti-flag.am{height:10px;background-position:-154px 0}.iti-flag.ao{height:14px;background-position:-176px 0}.iti-flag.aq{height:14px;background-position:-198px 0}.iti-flag.ar{height:13px;background-position:-220px 0}.iti-flag.as{height:10px;background-position:-242px 0}.iti-flag.at{height:14px;background-position:-264px 0}.iti-flag.au{height:10px;background-position:-286px 0}.iti-flag.aw{height:14px;background-position:-308px 0}.iti-flag.ax{height:13px;background-position:-330px 0}.iti-flag.az{height:10px;background-position:-352px 0}.iti-flag.ba{height:10px;background-position:-374px 0}.iti-flag.bb{height:14px;background-position:-396px 0}.iti-flag.bd{height:12px;background-position:-418px 0}.iti-flag.be{height:15px;background-position:-440px 0}.iti-flag.bf{height:14px;background-position:-460px 0}.iti-flag.bg{height:12px;background-position:-482px 0}.iti-flag.bh{height:12px;background-position:-504px 0}.iti-flag.bi{height:12px;background-position:-526px 0}.iti-flag.bj{height:14px;background-position:-548px 0}.iti-flag.bl{height:14px;background-position:-570px 0}.iti-flag.bm{height:10px;background-position:-592px 0}.iti-flag.bn{height:10px;background-position:-614px 0}.iti-flag.bo{height:14px;background-position:-636px 0}.iti-flag.bq{height:14px;background-position:-658px 0}.iti-flag.br{height:14px;background-position:-680px 0}.iti-flag.bs{height:10px;background-position:-702px 0}.iti-flag.bt{height:14px;background-position:-724px 0}.iti-flag.bv{height:15px;background-position:-746px 0}.iti-flag.bw{height:14px;background-position:-768px 0}.iti-flag.by{height:10px;background-position:-790px 0}.iti-flag.bz{height:14px;background-position:-812px 0}.iti-flag.ca{height:10px;background-position:-834px 0}.iti-flag.cc{height:10px;background-position:-856px 0}.iti-flag.cd{height:15px;background-position:-878px 0}.iti-flag.cf{height:14px;background-position:-900px 0}.iti-flag.cg{height:14px;background-position:-922px 0}.iti-flag.ch{height:15px;background-position:-944px 0}.iti-flag.ci{height:14px;background-position:-961px 0}.iti-flag.ck{height:10px;background-position:-983px 0}.iti-flag.cl{height:14px;background-position:-1005px 0}.iti-flag.cm{height:14px;background-position:-1027px 0}.iti-flag.cn{height:14px;background-position:-1049px 0}.iti-flag.co{height:14px;background-position:-1071px 0}.iti-flag.cp{height:14px;background-position:-1093px 0}.iti-flag.cr{height:12px;background-position:-1115px 0}.iti-flag.cu{height:10px;background-position:-1137px 0}.iti-flag.cv{height:12px;background-position:-1159px 0}.iti-flag.cw{height:14px;background-position:-1181px 0}.iti-flag.cx{height:10px;background-position:-1203px 0}.iti-flag.cy{height:13px;background-position:-1225px 0}.iti-flag.cz{height:14px;background-position:-1247px 0}.iti-flag.de{height:12px;background-position:-1269px 0}.iti-flag.dg{height:10px;background-position:-1291px 0}.iti-flag.dj{height:14px;background-position:-1313px 0}.iti-flag.dk{height:15px;background-position:-1335px 0}.iti-flag.dm{height:10px;background-position:-1357px 0}.iti-flag.do{height:13px;background-position:-1379px 0}.iti-flag.dz{height:14px;background-position:-1401px 0}.iti-flag.ea{height:14px;background-position:-1423px 0}.iti-flag.ec{height:14px;background-position:-1445px 0}.iti-flag.ee{height:13px;background-position:-1467px 0}.iti-flag.eg{height:14px;background-position:-1489px 0}.iti-flag.eh{height:10px;background-position:-1511px 0}.iti-flag.er{height:10px;background-position:-1533px 0}.iti-flag.es{height:14px;background-position:-1555px 0}.iti-flag.et{height:10px;background-position:-1577px 0}.iti-flag.eu{height:14px;background-position:-1599px 0}.iti-flag.fi{height:12px;background-position:-1621px 0}.iti-flag.fj{height:10px;background-position:-1643px 0}.iti-flag.fk{height:10px;background-position:-1665px 0}.iti-flag.fm{height:11px;background-position:-1687px 0}.iti-flag.fo{height:15px;background-position:-1709px 0}.iti-flag.fr{height:14px;background-position:-1731px 0}.iti-flag.ga{height:15px;background-position:-1753px 0}.iti-flag.gb{height:10px;background-position:-1775px 0}.iti-flag.gd{height:12px;background-position:-1797px 0}.iti-flag.ge{height:14px;background-position:-1819px 0}.iti-flag.gf{height:14px;background-position:-1841px 0}.iti-flag.gg{height:14px;background-position:-1863px 0}.iti-flag.gh{height:14px;background-position:-1885px 0}.iti-flag.gi{height:10px;background-position:-1907px 0}.iti-flag.gl{height:14px;background-position:-1929px 0}.iti-flag.gm{height:14px;background-position:-1951px 0}.iti-flag.gn{height:14px;background-position:-1973px 0}.iti-flag.gp{height:14px;background-position:-1995px 0}.iti-flag.gq{height:14px;background-position:-2017px 0}.iti-flag.gr{height:14px;background-position:-2039px 0}.iti-flag.gs{height:10px;background-position:-2061px 0}.iti-flag.gt{height:13px;background-position:-2083px 0}.iti-flag.gu{height:11px;background-position:-2105px 0}.iti-flag.gw{height:10px;background-position:-2127px 0}.iti-flag.gy{height:12px;background-position:-2149px 0}.iti-flag.hk{height:14px;background-position:-2171px 0}.iti-flag.hm{height:10px;background-position:-2193px 0}.iti-flag.hn{height:10px;background-position:-2215px 0}.iti-flag.hr{height:10px;background-position:-2237px 0}.iti-flag.ht{height:12px;background-position:-2259px 0}.iti-flag.hu{height:10px;background-position:-2281px 0}.iti-flag.ic{height:14px;background-position:-2303px 0}.iti-flag.id{height:14px;background-position:-2325px 0}.iti-flag.ie{height:10px;background-position:-2347px 0}.iti-flag.il{height:15px;background-position:-2369px 0}.iti-flag.im{height:10px;background-position:-2391px 0}.iti-flag.in{height:14px;background-position:-2413px 0}.iti-flag.io{height:10px;background-position:-2435px 0}.iti-flag.iq{height:14px;background-position:-2457px 0}.iti-flag.ir{height:12px;background-position:-2479px 0}.iti-flag.is{height:15px;background-position:-2501px 0}.iti-flag.it{height:14px;background-position:-2523px 0}.iti-flag.je{height:12px;background-position:-2545px 0}.iti-flag.jm{height:10px;background-position:-2567px 0}.iti-flag.jo{height:10px;background-position:-2589px 0}.iti-flag.jp{height:14px;background-position:-2611px 0}.iti-flag.ke{height:14px;background-position:-2633px 0}.iti-flag.kg{height:12px;background-position:-2655px 0}.iti-flag.kh{height:13px;background-position:-2677px 0}.iti-flag.ki{height:10px;background-position:-2699px 0}.iti-flag.km{height:12px;background-position:-2721px 0}.iti-flag.kn{height:14px;background-position:-2743px 0}.iti-flag.kp{height:10px;background-position:-2765px 0}.iti-flag.kr{height:14px;background-position:-2787px 0}.iti-flag.kw{height:10px;background-position:-2809px 0}.iti-flag.ky{height:10px;background-position:-2831px 0}.iti-flag.kz{height:10px;background-position:-2853px 0}.iti-flag.la{height:14px;background-position:-2875px 0}.iti-flag.lb{height:14px;background-position:-2897px 0}.iti-flag.lc{height:10px;background-position:-2919px 0}.iti-flag.li{height:12px;background-position:-2941px 0}.iti-flag.lk{height:10px;background-position:-2963px 0}.iti-flag.lr{height:11px;background-position:-2985px 0}.iti-flag.ls{height:14px;background-position:-3007px 0}.iti-flag.lt{height:12px;background-position:-3029px 0}.iti-flag.lu{height:12px;background-position:-3051px 0}.iti-flag.lv{height:10px;background-position:-3073px 0}.iti-flag.ly{height:10px;background-position:-3095px 0}.iti-flag.ma{height:14px;background-position:-3117px 0}.iti-flag.mc{height:15px;background-position:-3139px 0}.iti-flag.md{height:10px;background-position:-3160px 0}.iti-flag.me{height:10px;background-position:-3182px 0}.iti-flag.mf{height:14px;background-position:-3204px 0}.iti-flag.mg{height:14px;background-position:-3226px 0}.iti-flag.mh{height:11px;background-position:-3248px 0}.iti-flag.mk{height:10px;background-position:-3270px 0}.iti-flag.ml{height:14px;background-position:-3292px 0}.iti-flag.mm{height:14px;background-position:-3314px 0}.iti-flag.mn{height:10px;background-position:-3336px 0}.iti-flag.mo{height:14px;background-position:-3358px 0}.iti-flag.mp{height:10px;background-position:-3380px 0}.iti-flag.mq{height:14px;background-position:-3402px 0}.iti-flag.mr{height:14px;background-position:-3424px 0}.iti-flag.ms{height:10px;background-position:-3446px 0}.iti-flag.mt{height:14px;background-position:-3468px 0}.iti-flag.mu{height:14px;background-position:-3490px 0}.iti-flag.mv{height:14px;background-position:-3512px 0}.iti-flag.mw{height:14px;background-position:-3534px 0}.iti-flag.mx{height:12px;background-position:-3556px 0}.iti-flag.my{height:10px;background-position:-3578px 0}.iti-flag.mz{height:14px;background-position:-3600px 0}.iti-flag.na{height:14px;background-position:-3622px 0}.iti-flag.nc{height:10px;background-position:-3644px 0}.iti-flag.ne{height:15px;background-position:-3666px 0}.iti-flag.nf{height:10px;background-position:-3686px 0}.iti-flag.ng{height:10px;background-position:-3708px 0}.iti-flag.ni{height:12px;background-position:-3730px 0}.iti-flag.nl{height:14px;background-position:-3752px 0}.iti-flag.no{height:15px;background-position:-3774px 0}.iti-flag.np{height:15px;background-position:-3796px 0}.iti-flag.nr{height:10px;background-position:-3811px 0}.iti-flag.nu{height:10px;background-position:-3833px 0}.iti-flag.nz{height:10px;background-position:-3855px 0}.iti-flag.om{height:10px;background-position:-3877px 0}.iti-flag.pa{height:14px;background-position:-3899px 0}.iti-flag.pe{height:14px;background-position:-3921px 0}.iti-flag.pf{height:14px;background-position:-3943px 0}.iti-flag.pg{height:15px;background-position:-3965px 0}.iti-flag.ph{height:10px;background-position:-3987px 0}.iti-flag.pk{height:14px;background-position:-4009px 0}.iti-flag.pl{height:13px;background-position:-4031px 0}.iti-flag.pm{height:14px;background-position:-4053px 0}.iti-flag.pn{height:10px;background-position:-4075px 0}.iti-flag.pr{height:14px;background-position:-4097px 0}.iti-flag.ps{height:10px;background-position:-4119px 0}.iti-flag.pt{height:14px;background-position:-4141px 0}.iti-flag.pw{height:13px;background-position:-4163px 0}.iti-flag.py{height:11px;background-position:-4185px 0}.iti-flag.qa{height:8px;background-position:-4207px 0}.iti-flag.re{height:14px;background-position:-4229px 0}.iti-flag.ro{height:14px;background-position:-4251px 0}.iti-flag.rs{height:14px;background-position:-4273px 0}.iti-flag.ru{height:14px;background-position:-4295px 0}.iti-flag.rw{height:14px;background-position:-4317px 0}.iti-flag.sa{height:14px;background-position:-4339px 0}.iti-flag.sb{height:10px;background-position:-4361px 0}.iti-flag.sc{height:10px;background-position:-4383px 0}.iti-flag.sd{height:10px;background-position:-4405px 0}.iti-flag.se{height:13px;background-position:-4427px 0}.iti-flag.sg{height:14px;background-position:-4449px 0}.iti-flag.sh{height:10px;background-position:-4471px 0}.iti-flag.si{height:10px;background-position:-4493px 0}.iti-flag.sj{height:15px;background-position:-4515px 0}.iti-flag.sk{height:14px;background-position:-4537px 0}.iti-flag.sl{height:14px;background-position:-4559px 0}.iti-flag.sm{height:15px;background-position:-4581px 0}.iti-flag.sn{height:14px;background-position:-4603px 0}.iti-flag.so{height:14px;background-position:-4625px 0}.iti-flag.sr{height:14px;background-position:-4647px 0}.iti-flag.ss{height:10px;background-position:-4669px 0}.iti-flag.st{height:10px;background-position:-4691px 0}.iti-flag.sv{height:12px;background-position:-4713px 0}.iti-flag.sx{height:14px;background-position:-4735px 0}.iti-flag.sy{height:14px;background-position:-4757px 0}.iti-flag.sz{height:14px;background-position:-4779px 0}.iti-flag.ta{height:10px;background-position:-4801px 0}.iti-flag.tc{height:10px;background-position:-4823px 0}.iti-flag.td{height:14px;background-position:-4845px 0}.iti-flag.tf{height:14px;background-position:-4867px 0}.iti-flag.tg{height:13px;background-position:-4889px 0}.iti-flag.th{height:14px;background-position:-4911px 0}.iti-flag.tj{height:10px;background-position:-4933px 0}.iti-flag.tk{height:10px;background-position:-4955px 0}.iti-flag.tl{height:10px;background-position:-4977px 0}.iti-flag.tm{height:14px;background-position:-4999px 0}.iti-flag.tn{height:14px;background-position:-5021px 0}.iti-flag.to{height:10px;background-position:-5043px 0}.iti-flag.tr{height:14px;background-position:-5065px 0}.iti-flag.tt{height:12px;background-position:-5087px 0}.iti-flag.tv{height:10px;background-position:-5109px 0}.iti-flag.tw{height:14px;background-position:-5131px 0}.iti-flag.tz{height:14px;background-position:-5153px 0}.iti-flag.ua{height:14px;background-position:-5175px 0}.iti-flag.ug{height:14px;background-position:-5197px 0}.iti-flag.um{height:11px;background-position:-5219px 0}.iti-flag.us{height:11px;background-position:-5241px 0}.iti-flag.uy{height:14px;background-position:-5263px 0}.iti-flag.uz{height:10px;background-position:-5285px 0}.iti-flag.va{height:15px;background-position:-5307px 0}.iti-flag.vc{height:14px;background-position:-5324px 0}.iti-flag.ve{height:14px;background-position:-5346px 0}.iti-flag.vg{height:10px;background-position:-5368px 0}.iti-flag.vi{height:14px;background-position:-5390px 0}.iti-flag.vn{height:14px;background-position:-5412px 0}.iti-flag.vu{height:12px;background-position:-5434px 0}.iti-flag.wf{height:14px;background-position:-5456px 0}.iti-flag.ws{height:10px;background-position:-5478px 0}.iti-flag.xk{height:15px;background-position:-5500px 0}.iti-flag.ye{height:14px;background-position:-5522px 0}.iti-flag.yt{height:14px;background-position:-5544px 0}.iti-flag.za{height:14px;background-position:-5566px 0}.iti-flag.zm{height:14px;background-position:-5588px 0}.iti-flag.zw{height:10px;background-position:-5610px 0}.iti-flag{width:20px;height:15px;box-shadow:0 0 1px 0 #888;background-image:url(../images/flags.png);background-repeat:no-repeat;background-color:#dbdbdb;background-position:20px 0}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-o-min-device-pixel-ratio:2 / 1),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.iti-flag{background-image:url(../images/flags@2x.png)}}.iti-flag.np{background-color:transparent}@font-face{font-family:fm-icons;src:url(fonts/fm-icons.ttf?wjdy97) format('truetype'),url(fonts/fm-icons.woff?wjdy97) format('woff'),url(fonts/fm-icons.svg?wjdy97#fm-icons) format('svg');font-weight:400;font-style:normal}[class*=" fm-ico-"],[class^=fm-ico-]{font-family:fm-icons!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fm-ico-form-maker:before{content:"\e908";color:#6e7883}.fm-ico-plus-circle:before{content:"\e900"}.fm-ico-plus:before{content:"\e901"}.fm-ico-collapse:before{content:"\e902"}.fm-ico-expand:before{content:"\e906"}.fm-ico-duplicate:before{content:"\e904"}.fm-ico-edit:before{content:"\e905"}.fm-ico-delete:before{content:"\e907"}.fm-ico-draggable:before{content:"\e903"}.fm-ico-close:before{content:"\e909"}.fm-ico-spinner:before{content:"\e90a"}
form-maker.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Form Maker
4
  * Plugin URI: https://10web.io/plugins/wordpress-form-maker/?utm_source=form_maker&utm_medium=free_plugin
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.13.29
7
  * Author: 10Web Form Builder Team
8
  * Author URI: https://10web.io/plugins/?utm_source=form_maker&utm_medium=free_plugin
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -98,8 +98,8 @@ final class WDFM {
98
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
99
  $this->front_urls = $this->get_front_urls();
100
  $this->main_file = plugin_basename(__FILE__);
101
- $this->plugin_version = '1.13.29';
102
- $this->db_version = '2.13.29';
103
  $this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
104
  $this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
105
  $this->menu_slug = 'manage' . $this->menu_postfix;
@@ -118,6 +118,9 @@ final class WDFM {
118
  }
119
  if ( empty($this->fm_settings['fm_developer_mode']) ) {
120
  $this->fm_settings['fm_developer_mode'] = 0;
 
 
 
121
  }
122
  }
123
 
@@ -824,7 +827,7 @@ final class WDFM {
824
  $allowed_pages[] = 'paypal_info';
825
  $allowed_pages[] = 'checkpaypal';
826
  }
827
- $allowed_nonce_pages = array('checkpaypal');
828
 
829
  if ( !in_array($page, $allowed_nonce_pages) && wp_verify_nonce($ajax_nonce , 'fm_ajax_nonce') == FALSE ) {
830
  die(-1);
3
  * Plugin Name: Form Maker
4
  * Plugin URI: https://10web.io/plugins/wordpress-form-maker/?utm_source=form_maker&utm_medium=free_plugin
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.13.30
7
  * Author: 10Web Form Builder Team
8
  * Author URI: https://10web.io/plugins/?utm_source=form_maker&utm_medium=free_plugin
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
98
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
99
  $this->front_urls = $this->get_front_urls();
100
  $this->main_file = plugin_basename(__FILE__);
101
+ $this->plugin_version = '1.13.30';
102
+ $this->db_version = '2.13.30';
103
  $this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
104
  $this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
105
  $this->menu_slug = 'manage' . $this->menu_postfix;
118
  }
119
  if ( empty($this->fm_settings['fm_developer_mode']) ) {
120
  $this->fm_settings['fm_developer_mode'] = 0;
121
+ }
122
+ if ( empty($this->fm_settings['fm_ajax_submit']) ) {
123
+ $this->fm_settings['fm_ajax_submit'] = 0;
124
  }
125
  }
126
 
827
  $allowed_pages[] = 'paypal_info';
828
  $allowed_pages[] = 'checkpaypal';
829
  }
830
+ $allowed_nonce_pages = array('checkpaypal', 'formmakerwdcaptcha' . $this->plugin_postfix, 'formmakerwdmathcaptcha' . $this->plugin_postfix);
831
 
832
  if ( !in_array($page, $allowed_nonce_pages) && wp_verify_nonce($ajax_nonce , 'fm_ajax_nonce') == FALSE ) {
833
  die(-1);
framework/WDW_FM_Library.php CHANGED
@@ -369,7 +369,7 @@ class WDW_FM_Library {
369
  *
370
  * @return string|array
371
  */
372
- public static function get($key, $default_value = '', $callback = '') {
373
  if (isset($_GET[$key])) {
374
  $value = $_GET[$key];
375
  }
@@ -380,7 +380,11 @@ class WDW_FM_Library {
380
  $value = $_REQUEST[$key];
381
  }
382
  else {
383
- $value = $default_value;
 
 
 
 
384
  }
385
  if (is_array($value)) {
386
  array_walk_recursive($value, array('self', 'validate_data'), $callback);
@@ -722,8 +726,8 @@ class WDW_FM_Library {
722
  ?>
723
  </span>
724
  </div>
725
- <input type="hidden" id="page_number" name="page_number" value="<?php echo ((isset($_POST['page_number'])) ? (int) $_POST['page_number'] : 1); ?>" />
726
- <input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo ((isset($_POST['search_or_not'])) ? esc_html($_POST['search_or_not']) : ''); ?>"/>
727
  <?php
728
  }
729
 
@@ -861,8 +865,8 @@ class WDW_FM_Library {
861
  ?>
862
  </span>
863
  </div>
864
- <input type="hidden" id="page_number" name="page_number" value="<?php echo ((isset($_POST['page_number'])) ? (int) $_POST['page_number'] : 1); ?>" />
865
- <input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo ((isset($_POST['search_or_not'])) ? esc_html($_POST['search_or_not']) : ''); ?>"/>
866
  <?php
867
  }
868
 
@@ -1818,7 +1822,7 @@ class WDW_FM_Library {
1818
  }
1819
  foreach ( $params_names as $params_name ) {
1820
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1821
- $param[$params_name] = $temp[0];
1822
  $temp = $temp[1];
1823
  }
1824
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -1893,7 +1897,7 @@ class WDW_FM_Library {
1893
  }
1894
  foreach ( $params_names as $params_name ) {
1895
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1896
- $param[$params_name] = $temp[0];
1897
  $temp = $temp[1];
1898
  }
1899
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -1925,7 +1929,7 @@ class WDW_FM_Library {
1925
  $temp = $params;
1926
  foreach ( $params_names as $params_name ) {
1927
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1928
- $param[$params_name] = $temp[0];
1929
  $temp = $temp[1];
1930
  }
1931
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -1970,7 +1974,7 @@ class WDW_FM_Library {
1970
  }
1971
  foreach ( $params_names as $params_name ) {
1972
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1973
- $param[$params_name] = $temp[0];
1974
  $temp = $temp[1];
1975
  }
1976
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -2008,7 +2012,7 @@ class WDW_FM_Library {
2008
  }
2009
  foreach ( $params_names as $params_name ) {
2010
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2011
- $param[$params_name] = $temp[0];
2012
  $temp = $temp[1];
2013
  }
2014
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -2046,7 +2050,7 @@ class WDW_FM_Library {
2046
  }
2047
  foreach ( $params_names as $params_name ) {
2048
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2049
- $param[$params_name] = $temp[0];
2050
  $temp = $temp[1];
2051
  }
2052
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -2070,7 +2074,7 @@ class WDW_FM_Library {
2070
  $temp = $params;
2071
  foreach ( $params_names as $params_name ) {
2072
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2073
- $param[$params_name] = $temp[0];
2074
  $temp = $temp[1];
2075
  }
2076
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -2150,7 +2154,7 @@ class WDW_FM_Library {
2150
  }
2151
  foreach ( $params_names as $params_name ) {
2152
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2153
- $param[$params_name] = $temp[0];
2154
  $temp = $temp[1];
2155
  }
2156
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -2194,17 +2198,17 @@ class WDW_FM_Library {
2194
  }
2195
  foreach ( $params_names as $params_name ) {
2196
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2197
- $param[$params_name] = $temp[0];
2198
  $temp = $temp[1];
2199
  }
2200
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2201
  if ( $required ) {
2202
  array_push($req_fields, $id1);
2203
  }
2204
- $post = isset($_POST['wdform_' . ($id1 + 5) . '_country' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . ($id1 + 5) . '_country' . $form_id])) : NULL;
2205
  if ( isset($post) ) {
2206
  $onload_js .= '
2207
- jQuery("#wdform_' . $id1 . '_country' . $form_id . '").val("' . (isset($_POST['wdform_' . ($id1 + 5) . "_country" . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . ($id1 + 5) . "_country" . $form_id])) : '') . '");';
2208
  }
2209
  if ( isset($w_disabled_fields[6]) && $w_disabled_fields[6] == 'yes' ) {
2210
  $onload_js .= '
@@ -2219,7 +2223,7 @@ class WDW_FM_Library {
2219
  }
2220
  else {
2221
  if(jQuery("#wdform_' . $id1 . '_state' . $form_id . '").prop("tagName") == "SELECT") {
2222
- jQuery("#wdform_' . $id1 . '_state' . $form_id . '").parent().append("<input type=\"text\" id=\"wdform_' . $id1 . '_state' . $form_id . '\" name=\"wdform_' . ($id1 + 3) . '_state' . $form_id . '\" value=\"' . (isset($_POST['wdform_' . ($id1 + 3) . '_state' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . ($id1 + 3) . '_state' . $form_id])) : "") . '\" style=\"width: 100%;\" ' . $param['attributes'] . '><label class=\"mini_label\">' . $w_mini_labels[3] . '</label>");
2223
  jQuery("#wdform_' . $id1 . '_state' . $form_id . '").parent().children("select:first, label:first").remove();
2224
  }
2225
  }
@@ -2285,7 +2289,7 @@ class WDW_FM_Library {
2285
  }
2286
  foreach ( $params_names as $params_name ) {
2287
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2288
- $param[$params_name] = $temp[0];
2289
  $temp = $temp[1];
2290
  }
2291
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -2351,7 +2355,7 @@ class WDW_FM_Library {
2351
 
2352
  foreach ( $params_names as $params_name ) {
2353
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2354
- $param[$params_name] = $temp[0];
2355
  $temp = $temp[1];
2356
  }
2357
 
@@ -2370,12 +2374,12 @@ class WDW_FM_Library {
2370
  }
2371
 
2372
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2373
- $post_value = isset($_POST["counter" . $form_id]) ? esc_html($_POST["counter" . $form_id]) : NULL;
2374
  $is_other = FALSE;
2375
  if ( isset($post_value) ) {
2376
  if ( $param['w_allow_other'] == "yes" ) {
2377
  $is_other = FALSE;
2378
- $other_element = isset($_POST['wdform_' . $id1 . "_other_input" . $form_id]) ? esc_html($_POST['wdform_' . $id1 . "_other_input" . $form_id]) : NULL;
2379
  if ( isset($other_element) ) {
2380
  $is_other = TRUE;
2381
  }
@@ -2388,7 +2392,7 @@ class WDW_FM_Library {
2388
  array_push($req_fields, $id1);
2389
  }
2390
  if ( $is_other ) {
2391
- $onload_js .= 'show_other_input("wdform_' . $id1 . '","' . $form_id . '"); jQuery("#wdform_' . $id1 . '_other_input' . $form_id . '").val("' . (isset($_POST['wdform_' . $id1 . "_other_input" . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . "_other_input" . $form_id])) : '') . '");';
2392
  }
2393
  if ( $param['w_randomize'] == 'yes' ) {
2394
  $onload_js .= 'jQuery("#form' . $form_id . ' div[wdid=' . $id1 . '] .wdform-element-section> div").shuffle();';
@@ -2454,7 +2458,7 @@ class WDW_FM_Library {
2454
  }
2455
  foreach ( $params_names as $params_name ) {
2456
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2457
- $param[$params_name] = $temp[0];
2458
  $temp = $temp[1];
2459
  }
2460
 
@@ -2473,12 +2477,12 @@ class WDW_FM_Library {
2473
  }
2474
 
2475
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2476
- $post_value = isset($_POST["counter" . $form_id]) ? esc_html($_POST["counter" . $form_id]) : NULL;
2477
  $is_other = FALSE;
2478
  if ( isset($post_value) ) {
2479
  if ( $param['w_allow_other'] == "yes" ) {
2480
  $is_other = FALSE;
2481
- $other_element = isset($_POST['wdform_' . $id1 . "_other_input" . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . "_other_input" . $form_id])) : "";
2482
  if ( isset($other_element) ) {
2483
  $is_other = TRUE;
2484
  }
@@ -2492,7 +2496,7 @@ class WDW_FM_Library {
2492
  }
2493
  if ( $is_other ) {
2494
  $onload_js .= '
2495
- show_other_input("wdform_' . $id1 . '","' . $form_id . '"); jQuery("#wdform_' . $id1 . '_other_input' . $form_id . '").val("' . (isset($_POST['wdform_' . $id1 . "_other_input" . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . "_other_input" . $form_id])) : '') . '");';
2496
  }
2497
  if ( $param['w_randomize'] == 'yes' ) {
2498
  $onload_js .= '
@@ -2548,7 +2552,7 @@ class WDW_FM_Library {
2548
  }
2549
  foreach ( $params_names as $params_name ) {
2550
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2551
- $param[$params_name] = $temp[0];
2552
  $temp = $temp[1];
2553
  }
2554
 
@@ -2594,7 +2598,7 @@ class WDW_FM_Library {
2594
  }
2595
  foreach ( $params_names as $params_name ) {
2596
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2597
- $param[$params_name] = $temp[0];
2598
  $temp = $temp[1];
2599
  }
2600
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -2636,7 +2640,7 @@ class WDW_FM_Library {
2636
  }
2637
  foreach ( $params_names as $params_name ) {
2638
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2639
- $param[$params_name] = $temp[0];
2640
  $temp = $temp[1];
2641
  }
2642
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -2670,7 +2674,7 @@ class WDW_FM_Library {
2670
  }
2671
  foreach ( $params_names as $params_name ) {
2672
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2673
- $param[$params_name] = $temp[0];
2674
  $temp = $temp[1];
2675
  }
2676
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -2737,11 +2741,11 @@ class WDW_FM_Library {
2737
  }
2738
  foreach ( $params_names as $params_name ) {
2739
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2740
- $param[$params_name] = $temp[0];
2741
  $temp = $temp[1];
2742
  }
2743
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2744
- $default_date = (isset($_POST['wdform_' . $id1 . "_element" . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . "_element" . $form_id])) : $param['w_default_date']);
2745
  $w_show_week_days = explode('***', $param['w_show_days']);
2746
  $w_hide_sunday = $w_show_week_days[0] == 'yes' ? '' : ' && day != 0';
2747
  $w_hide_monday = $w_show_week_days[1] == 'yes' ? '' : ' && day != 1';
@@ -2865,7 +2869,7 @@ class WDW_FM_Library {
2865
  }
2866
  foreach ( $params_names as $params_name ) {
2867
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2868
- $param[$params_name] = $temp[0];
2869
  $temp = $temp[1];
2870
  }
2871
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -3036,7 +3040,7 @@ class WDW_FM_Library {
3036
  }
3037
  foreach ( $params_names as $params_name ) {
3038
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3039
- $param[$params_name] = $temp[0];
3040
  $temp = $temp[1];
3041
  }
3042
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -3081,7 +3085,7 @@ class WDW_FM_Library {
3081
  }
3082
  foreach ( $params_names as $params_name ) {
3083
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3084
- $param[$params_name] = $temp[0];
3085
  if ( isset($temp[1]) ) {
3086
  $temp = $temp[1];
3087
  }
@@ -3107,7 +3111,7 @@ class WDW_FM_Library {
3107
  }
3108
  foreach ( $params_names as $params_name ) {
3109
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3110
- $param[$params_name] = $temp[0];
3111
  $temp = $temp[1];
3112
  }
3113
  $onload_js .= '
@@ -3142,7 +3146,7 @@ class WDW_FM_Library {
3142
  }
3143
  foreach ( $params_names as $params_name ) {
3144
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3145
- $param[$params_name] = $temp[0];
3146
  $temp = $temp[1];
3147
  }
3148
  $onload_js .= '
@@ -3187,7 +3191,7 @@ class WDW_FM_Library {
3187
  }
3188
  foreach ( $params_names as $params_name ) {
3189
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3190
- $param[$params_name] = $temp[0];
3191
  $temp = $temp[1];
3192
  }
3193
  $onload_js .= '
@@ -3215,7 +3219,7 @@ class WDW_FM_Library {
3215
  $temp = $params;
3216
  foreach ( $params_names as $params_name ) {
3217
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3218
- $param[$params_name] = $temp[0];
3219
  $temp = $temp[1];
3220
  }
3221
  $param['w_long'] = explode('***', $param['w_long']);
@@ -3248,7 +3252,7 @@ class WDW_FM_Library {
3248
  $temp = $params;
3249
  foreach ( $params_names as $params_name ) {
3250
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3251
- $param[$params_name] = $temp[0];
3252
  $temp = $temp[1];
3253
  }
3254
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -3333,7 +3337,7 @@ class WDW_FM_Library {
3333
  }
3334
  foreach ( $params_names as $params_name ) {
3335
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3336
- $param[$params_name] = $temp[0];
3337
  $temp = $temp[1];
3338
  }
3339
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -3405,7 +3409,7 @@ class WDW_FM_Library {
3405
  }
3406
  foreach ( $params_names as $params_name ) {
3407
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3408
- $param[$params_name] = $temp[0];
3409
  $temp = $temp[1];
3410
  }
3411
 
@@ -3497,7 +3501,7 @@ class WDW_FM_Library {
3497
  }
3498
  foreach ( $params_names as $params_name ) {
3499
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3500
- $param[$params_name] = $temp[0];
3501
  $temp = $temp[1];
3502
  }
3503
 
@@ -3577,7 +3581,7 @@ class WDW_FM_Library {
3577
  }
3578
  foreach ( $params_names as $params_name ) {
3579
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3580
- $param[$params_name] = $temp[0];
3581
  $temp = $temp[1];
3582
  }
3583
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -3644,7 +3648,7 @@ class WDW_FM_Library {
3644
  }
3645
  foreach ( $params_names as $params_name ) {
3646
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3647
- $param[$params_name] = $temp[0];
3648
  $temp = $temp[1];
3649
  }
3650
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -3678,7 +3682,7 @@ class WDW_FM_Library {
3678
  }
3679
  foreach ( $params_names as $params_name ) {
3680
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3681
- $param[$params_name] = $temp[0];
3682
  $temp = $temp[1];
3683
  }
3684
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -3693,7 +3697,7 @@ class WDW_FM_Library {
3693
  if ( $required ) {
3694
  array_push($req_fields, $id1);
3695
  }
3696
- $post = isset($_POST['wdform_' . $id1 . '_selected_star_amount' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_selected_star_amount' . $form_id])) : NULL;
3697
  if ( isset($post) ) {
3698
  $onload_js .= '
3699
  select_star_rating(' . ($post - 1) . ',"wdform_' . $id1 . '", ' . $form_id . ',"' . $param['w_field_label_col'] . '", "' . $param['w_star_amount'] . '");';
@@ -3725,7 +3729,7 @@ class WDW_FM_Library {
3725
  }
3726
  foreach ( $params_names as $params_name ) {
3727
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3728
- $param[$params_name] = $temp[0];
3729
  $temp = $temp[1];
3730
  }
3731
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -3765,7 +3769,7 @@ class WDW_FM_Library {
3765
  }
3766
  foreach ( $params_names as $params_name ) {
3767
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3768
- $param[$params_name] = $temp[0];
3769
  $temp = $temp[1];
3770
  }
3771
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -3823,14 +3827,14 @@ class WDW_FM_Library {
3823
  }
3824
  foreach ( $params_names as $params_name ) {
3825
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3826
- $param[$params_name] = $temp[0];
3827
  $temp = $temp[1];
3828
  }
3829
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
3830
  $onload_js .= '
3831
  jQuery("#wdform_' . $id1 . '_element' . $form_id . '")[0].slide = null;
3832
  jQuery("#wdform_' . $id1 . '_element' . $form_id . '").slider({
3833
- step: parseInt(' . $param['w_field_step'] . '),
3834
  range: "min",
3835
  value: eval(' . $param['w_field_value'] . '),
3836
  min: eval(' . $param['w_field_min_value'] . '),
@@ -3874,7 +3878,7 @@ class WDW_FM_Library {
3874
  }
3875
  foreach ( $params_names as $params_name ) {
3876
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3877
- $param[$params_name] = $temp[0];
3878
  $temp = $temp[1];
3879
  }
3880
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -3915,7 +3919,7 @@ class WDW_FM_Library {
3915
  }
3916
  foreach ( $params_names as $params_name ) {
3917
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3918
- $param[$params_name] = $temp[0];
3919
  $temp = $temp[1];
3920
  }
3921
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -3973,7 +3977,7 @@ class WDW_FM_Library {
3973
  }
3974
  foreach ( $params_names as $params_name ) {
3975
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3976
- $param[$params_name] = $temp[0];
3977
  $temp = $temp[1];
3978
  }
3979
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
@@ -4186,6 +4190,22 @@ class WDW_FM_Library {
4186
  clearstatcache();
4187
  }
4188
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4189
  /**
4190
  * Get submissions to export.
4191
  *
@@ -4194,12 +4214,14 @@ class WDW_FM_Library {
4194
  public static function get_submissions_to_export() {
4195
  global $wpdb;
4196
  $params = array();
4197
- $form_id = (int) $_REQUEST['form_id'];
4198
- $limitstart = (int) $_REQUEST['limitstart'];
4199
- $page_num = (int) $_REQUEST['page_num'];
4200
- $search_labels = isset($_REQUEST['search_labels']) ? $_REQUEST['search_labels'] : '';
4201
- $groupids = !empty($_REQUEST['groupids']) ? explode(',', $_REQUEST['groupids']) : '';
4202
- $verified_emails = isset($_REQUEST['verified_emails']) ? json_decode(stripslashes($_REQUEST['verified_emails']), TRUE) : array();
 
 
4203
  $paypal_info_fields = array(
4204
  'currency' => 'Currency',
4205
  'ord_last_modified' => 'Last modified',
@@ -5042,16 +5064,19 @@ class WDW_FM_Library {
5042
  $sorted_label_names_original = array();
5043
  $where_labels = array();
5044
  $where2 = array();
5045
- $order_by = ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
5046
- $asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'asc') ? 'asc' : 'desc');
5047
-
5048
- $lists['hide_label_list'] = ((isset($_POST['hide_label_list'])) ? esc_html(stripslashes($_POST['hide_label_list'])) : '');
5049
- $lists['startdate'] = ((isset($_POST['startdate'])) ? esc_html(stripslashes($_POST['startdate'])) : '');
5050
- $lists['enddate'] = ((isset($_POST['enddate'])) ? esc_html(stripslashes($_POST['enddate'])) : '');
5051
- $lists['ip_search'] = ((isset($_POST['ip_search'])) ? esc_html(stripslashes($_POST['ip_search'])) : '');
5052
- $lists['username_search'] = ((isset($_POST['username_search'])) ? esc_html(stripslashes($_POST['username_search'])) : '');
5053
- $lists['useremail_search'] = ((isset($_POST['useremail_search'])) ? esc_html(stripslashes($_POST['useremail_search'])) : '');
5054
- $lists['id_search'] = ((isset($_POST['id_search'])) ? esc_html(stripslashes($_POST['id_search'])) : '');
 
 
 
5055
  if ( $lists['ip_search'] ) {
5056
  $where[] = 'ip LIKE "%' . $lists['ip_search'] . '%"';
5057
  }
@@ -5117,25 +5142,17 @@ class WDW_FM_Library {
5117
  array_push($sorted_label_names, $label_names[$key]);
5118
  array_push($sorted_label_types, $label_types[$key]);
5119
  array_push($sorted_label_names_original, $label_names_original[$key]);
5120
- if ( isset($_POST[$form_id . '_' . $label_id . '_search']) ) {
5121
- $search_temp = esc_html($_POST[$form_id . '_' . $label_id . '_search']);
5122
- }
5123
- else {
5124
- $search_temp = '';
5125
- }
5126
  $search_temp = strtolower($search_temp);
5127
  $lists[$form_id . '_' . $label_id . '_search'] = $search_temp;
5128
  if ( $search_temp ) {
5129
  $join_query[] = 'search';
5130
  $join_where[] = array( 'label' => $label_id, 'search' => $search_temp );
5131
  }
5132
- if ( isset($_POST[$form_id . '_' . $label_id . '_search_verified']) ) {
5133
- $search_verified = $_POST[$form_id . '_' . $label_id . '_search_verified'];
5134
  $lists[$form_id . '_' . $label_id . '_search_verified'] = $search_verified;
5135
  }
5136
- else {
5137
- $search_verified = '';
5138
- }
5139
  if ( $search_verified && isset($ver_emails_array[$label_id]) ) {
5140
  $join_query[] = 'search';
5141
  $join_where[] = NULL;
@@ -5664,4 +5681,4 @@ class WDW_FM_Library {
5664
  );
5665
  return $custom_fields;
5666
  }
5667
- }
369
  *
370
  * @return string|array
371
  */
372
+ public static function get($key, $default_value = '', $callback = 'sanitize_text_field') {
373
  if (isset($_GET[$key])) {
374
  $value = $_GET[$key];
375
  }
380
  $value = $_REQUEST[$key];
381
  }
382
  else {
383
+ if( $default_value === NULL ) {
384
+ return NULL;
385
+ } else {
386
+ $value = $default_value;
387
+ }
388
  }
389
  if (is_array($value)) {
390
  array_walk_recursive($value, array('self', 'validate_data'), $callback);
726
  ?>
727
  </span>
728
  </div>
729
+ <input type="hidden" id="page_number" name="page_number" value="<?php echo self::get( 'page_number', 1, 'intval' ); ?>" />
730
+ <input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo self::get( 'search_or_not', '', 'esc_html' ); ?>"/>
731
  <?php
732
  }
733
 
865
  ?>
866
  </span>
867
  </div>
868
+ <input type="hidden" id="page_number" name="page_number" value="<?php echo self::get( 'page_number', 1, 'intval' ); ?>" />
869
+ <input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo self::get( 'search_or_not', '', 'esc_html' ); ?>"/>
870
  <?php
871
  }
872
 
1822
  }
1823
  foreach ( $params_names as $params_name ) {
1824
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1825
+ $param[$params_name] = esc_html($temp[0]);
1826
  $temp = $temp[1];
1827
  }
1828
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
1897
  }
1898
  foreach ( $params_names as $params_name ) {
1899
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1900
+ $param[$params_name] = esc_html($temp[0]);
1901
  $temp = $temp[1];
1902
  }
1903
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
1929
  $temp = $params;
1930
  foreach ( $params_names as $params_name ) {
1931
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1932
+ $param[$params_name] = esc_html($temp[0]);
1933
  $temp = $temp[1];
1934
  }
1935
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
1974
  }
1975
  foreach ( $params_names as $params_name ) {
1976
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1977
+ $param[$params_name] = esc_html($temp[0]);
1978
  $temp = $temp[1];
1979
  }
1980
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2012
  }
2013
  foreach ( $params_names as $params_name ) {
2014
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2015
+ $param[$params_name] = esc_html($temp[0]);
2016
  $temp = $temp[1];
2017
  }
2018
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2050
  }
2051
  foreach ( $params_names as $params_name ) {
2052
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2053
+ $param[$params_name] = esc_html($temp[0]);
2054
  $temp = $temp[1];
2055
  }
2056
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2074
  $temp = $params;
2075
  foreach ( $params_names as $params_name ) {
2076
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2077
+ $param[$params_name] = esc_html($temp[0]);
2078
  $temp = $temp[1];
2079
  }
2080
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2154
  }
2155
  foreach ( $params_names as $params_name ) {
2156
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2157
+ $param[$params_name] = esc_html($temp[0]);
2158
  $temp = $temp[1];
2159
  }
2160
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2198
  }
2199
  foreach ( $params_names as $params_name ) {
2200
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2201
+ $param[$params_name] = esc_html($temp[0]);
2202
  $temp = $temp[1];
2203
  }
2204
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2205
  if ( $required ) {
2206
  array_push($req_fields, $id1);
2207
  }
2208
+ $post = self::get( 'wdform_' . ($id1 + 5) . '_country' . $form_id, NULL, 'esc_html');
2209
  if ( isset($post) ) {
2210
  $onload_js .= '
2211
+ jQuery("#wdform_' . $id1 . '_country' . $form_id . '").val("' . self::get( 'wdform_' . ($id1 + 5) . "_country" . $form_id, '', 'esc_html' ) . '");';
2212
  }
2213
  if ( isset($w_disabled_fields[6]) && $w_disabled_fields[6] == 'yes' ) {
2214
  $onload_js .= '
2223
  }
2224
  else {
2225
  if(jQuery("#wdform_' . $id1 . '_state' . $form_id . '").prop("tagName") == "SELECT") {
2226
+ jQuery("#wdform_' . $id1 . '_state' . $form_id . '").parent().append("<input type=\"text\" id=\"wdform_' . $id1 . '_state' . $form_id . '\" name=\"wdform_' . ($id1 + 3) . '_state' . $form_id . '\" value=\"' . self::get( 'wdform_' . ($id1 + 3) . '_state' . $form_id, "", 'esc_html' ) . '\" style=\"width: 100%;\" ' . $param['attributes'] . '><label class=\"mini_label\">' . $w_mini_labels[3] . '</label>");
2227
  jQuery("#wdform_' . $id1 . '_state' . $form_id . '").parent().children("select:first, label:first").remove();
2228
  }
2229
  }
2289
  }
2290
  foreach ( $params_names as $params_name ) {
2291
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2292
+ $param[$params_name] = esc_html($temp[0]);
2293
  $temp = $temp[1];
2294
  }
2295
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2355
 
2356
  foreach ( $params_names as $params_name ) {
2357
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2358
+ $param[$params_name] = esc_html($temp[0]);
2359
  $temp = $temp[1];
2360
  }
2361
 
2374
  }
2375
 
2376
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2377
+ $post_value = self::get( "counter" . $form_id, NULL, 'esc_html' );
2378
  $is_other = FALSE;
2379
  if ( isset($post_value) ) {
2380
  if ( $param['w_allow_other'] == "yes" ) {
2381
  $is_other = FALSE;
2382
+ $other_element = self::get( 'wdform_' . $id1 . "_other_input" . $form_id, NULL, 'esc_html' );
2383
  if ( isset($other_element) ) {
2384
  $is_other = TRUE;
2385
  }
2392
  array_push($req_fields, $id1);
2393
  }
2394
  if ( $is_other ) {
2395
+ $onload_js .= 'show_other_input("wdform_' . $id1 . '","' . $form_id . '"); jQuery("#wdform_' . $id1 . '_other_input' . $form_id . '").val("' . self::get( 'wdform_' . $id1 . "_other_input" . $form_id, '', 'esc_html' ) . '");';
2396
  }
2397
  if ( $param['w_randomize'] == 'yes' ) {
2398
  $onload_js .= 'jQuery("#form' . $form_id . ' div[wdid=' . $id1 . '] .wdform-element-section> div").shuffle();';
2458
  }
2459
  foreach ( $params_names as $params_name ) {
2460
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2461
+ $param[$params_name] = esc_html($temp[0]);
2462
  $temp = $temp[1];
2463
  }
2464
 
2477
  }
2478
 
2479
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2480
+ $post_value = self::get( "counter" . $form_id, NULL, 'esc_html' );
2481
  $is_other = FALSE;
2482
  if ( isset($post_value) ) {
2483
  if ( $param['w_allow_other'] == "yes" ) {
2484
  $is_other = FALSE;
2485
+ $other_element = self::get( 'wdform_' . $id1 . "_other_input" . $form_id, "", 'esc_html' );
2486
  if ( isset($other_element) ) {
2487
  $is_other = TRUE;
2488
  }
2496
  }
2497
  if ( $is_other ) {
2498
  $onload_js .= '
2499
+ show_other_input("wdform_' . $id1 . '","' . $form_id . '"); jQuery("#wdform_' . $id1 . '_other_input' . $form_id . '").val("' . self::get( 'wdform_' . $id1 . "_other_input" . $form_id, '', 'esc_html' ) . '");';
2500
  }
2501
  if ( $param['w_randomize'] == 'yes' ) {
2502
  $onload_js .= '
2552
  }
2553
  foreach ( $params_names as $params_name ) {
2554
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2555
+ $param[$params_name] = esc_html($temp[0]);
2556
  $temp = $temp[1];
2557
  }
2558
 
2598
  }
2599
  foreach ( $params_names as $params_name ) {
2600
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2601
+ $param[$params_name] = esc_html($temp[0]);
2602
  $temp = $temp[1];
2603
  }
2604
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2640
  }
2641
  foreach ( $params_names as $params_name ) {
2642
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2643
+ $param[$params_name] = esc_html($temp[0]);
2644
  $temp = $temp[1];
2645
  }
2646
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2674
  }
2675
  foreach ( $params_names as $params_name ) {
2676
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2677
+ $param[$params_name] = esc_html($temp[0]);
2678
  $temp = $temp[1];
2679
  }
2680
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2741
  }
2742
  foreach ( $params_names as $params_name ) {
2743
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2744
+ $param[$params_name] = esc_html($temp[0]);
2745
  $temp = $temp[1];
2746
  }
2747
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2748
+ $default_date = self::get( 'wdform_' . $id1 . "_element" . $form_id, $param['w_default_date'], 'esc_html');
2749
  $w_show_week_days = explode('***', $param['w_show_days']);
2750
  $w_hide_sunday = $w_show_week_days[0] == 'yes' ? '' : ' && day != 0';
2751
  $w_hide_monday = $w_show_week_days[1] == 'yes' ? '' : ' && day != 1';
2869
  }
2870
  foreach ( $params_names as $params_name ) {
2871
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2872
+ $param[$params_name] = esc_html($temp[0]);
2873
  $temp = $temp[1];
2874
  }
2875
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
3040
  }
3041
  foreach ( $params_names as $params_name ) {
3042
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3043
+ $param[$params_name] = esc_html($temp[0]);
3044
  $temp = $temp[1];
3045
  }
3046
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
3085
  }
3086
  foreach ( $params_names as $params_name ) {
3087
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3088
+ $param[$params_name] = esc_html($temp[0]);
3089
  if ( isset($temp[1]) ) {
3090
  $temp = $temp[1];
3091
  }
3111
  }
3112
  foreach ( $params_names as $params_name ) {
3113
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3114
+ $param[$params_name] = esc_html($temp[0]);
3115
  $temp = $temp[1];
3116
  }
3117
  $onload_js .= '
3146
  }
3147
  foreach ( $params_names as $params_name ) {
3148
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3149
+ $param[$params_name] = esc_html($temp[0]);
3150
  $temp = $temp[1];
3151
  }
3152
  $onload_js .= '
3191
  }
3192
  foreach ( $params_names as $params_name ) {
3193
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3194
+ $param[$params_name] = esc_html($temp[0]);
3195
  $temp = $temp[1];
3196
  }
3197
  $onload_js .= '
3219
  $temp = $params;
3220
  foreach ( $params_names as $params_name ) {
3221
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3222
+ $param[$params_name] = esc_html($temp[0]);
3223
  $temp = $temp[1];
3224
  }
3225
  $param['w_long'] = explode('***', $param['w_long']);
3252
  $temp = $params;
3253
  foreach ( $params_names as $params_name ) {
3254
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3255
+ $param[$params_name] = esc_html($temp[0]);
3256
  $temp = $temp[1];
3257
  }
3258
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
3337
  }
3338
  foreach ( $params_names as $params_name ) {
3339
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3340
+ $param[$params_name] = esc_html($temp[0]);
3341
  $temp = $temp[1];
3342
  }
3343
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
3409
  }
3410
  foreach ( $params_names as $params_name ) {
3411
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3412
+ $param[$params_name] = esc_html($temp[0]);
3413
  $temp = $temp[1];
3414
  }
3415
 
3501
  }
3502
  foreach ( $params_names as $params_name ) {
3503
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3504
+ $param[$params_name] = esc_html($temp[0]);
3505
  $temp = $temp[1];
3506
  }
3507
 
3581
  }
3582
  foreach ( $params_names as $params_name ) {
3583
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3584
+ $param[$params_name] = esc_html($temp[0]);
3585
  $temp = $temp[1];
3586
  }
3587
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
3648
  }
3649
  foreach ( $params_names as $params_name ) {
3650
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3651
+ $param[$params_name] = esc_html($temp[0]);
3652
  $temp = $temp[1];
3653
  }
3654
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
3682
  }
3683
  foreach ( $params_names as $params_name ) {
3684
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3685
+ $param[$params_name] = esc_html($temp[0]);
3686
  $temp = $temp[1];
3687
  }
3688
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
3697
  if ( $required ) {
3698
  array_push($req_fields, $id1);
3699
  }
3700
+ $post = self::get( 'wdform_' . $id1 . '_selected_star_amount' . $form_id, NULL, 'esc_html' );
3701
  if ( isset($post) ) {
3702
  $onload_js .= '
3703
  select_star_rating(' . ($post - 1) . ',"wdform_' . $id1 . '", ' . $form_id . ',"' . $param['w_field_label_col'] . '", "' . $param['w_star_amount'] . '");';
3729
  }
3730
  foreach ( $params_names as $params_name ) {
3731
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3732
+ $param[$params_name] = esc_html($temp[0]);
3733
  $temp = $temp[1];
3734
  }
3735
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
3769
  }
3770
  foreach ( $params_names as $params_name ) {
3771
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3772
+ $param[$params_name] = esc_html($temp[0]);
3773
  $temp = $temp[1];
3774
  }
3775
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
3827
  }
3828
  foreach ( $params_names as $params_name ) {
3829
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3830
+ $param[$params_name] = esc_html($temp[0]);
3831
  $temp = $temp[1];
3832
  }
3833
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
3834
  $onload_js .= '
3835
  jQuery("#wdform_' . $id1 . '_element' . $form_id . '")[0].slide = null;
3836
  jQuery("#wdform_' . $id1 . '_element' . $form_id . '").slider({
3837
+ step: parseFloat(' . $param['w_field_step'] . '),
3838
  range: "min",
3839
  value: eval(' . $param['w_field_value'] . '),
3840
  min: eval(' . $param['w_field_min_value'] . '),
3878
  }
3879
  foreach ( $params_names as $params_name ) {
3880
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3881
+ $param[$params_name] = esc_html($temp[0]);
3882
  $temp = $temp[1];
3883
  }
3884
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
3919
  }
3920
  foreach ( $params_names as $params_name ) {
3921
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3922
+ $param[$params_name] = esc_html($temp[0]);
3923
  $temp = $temp[1];
3924
  }
3925
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
3977
  }
3978
  foreach ( $params_names as $params_name ) {
3979
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3980
+ $param[$params_name] = esc_html($temp[0]);
3981
  $temp = $temp[1];
3982
  }
3983
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
4190
  clearstatcache();
4191
  }
4192
 
4193
+ /**
4194
+ * Sanitize array.
4195
+ *
4196
+ * @return array
4197
+ */
4198
+ public static function sanitize_array( $array, $callback = 'sanitize_text_field' ) {
4199
+ if (is_array($array)) {
4200
+ array_walk_recursive($array, array('self', 'validate_data'), $callback);
4201
+ }
4202
+ else {
4203
+ self::validate_data($value, 0, $callback);
4204
+ }
4205
+ return $value;
4206
+
4207
+ }
4208
+
4209
  /**
4210
  * Get submissions to export.
4211
  *
4214
  public static function get_submissions_to_export() {
4215
  global $wpdb;
4216
  $params = array();
4217
+ $form_id = self::get( 'form_id', 0, 'intval' );
4218
+ $limitstart = self::get( 'limitstart', 0, 'intval' );
4219
+ $page_num = self::get( 'page_num', 0, 'intval' );
4220
+ $search_labels = self::get( 'search_labels' );
4221
+ $groupids = !empty(self::get('groupids')) ? explode(',', self::get('groupids')) : ''; //TODO??//
4222
+
4223
+ $verified_emails = isset($_REQUEST['verified_emails']) ? self::sanitize_array(json_decode(stripslashes($_REQUEST['verified_emails']), TRUE)) : array();
4224
+
4225
  $paypal_info_fields = array(
4226
  'currency' => 'Currency',
4227
  'ord_last_modified' => 'Last modified',
5064
  $sorted_label_names_original = array();
5065
  $where_labels = array();
5066
  $where2 = array();
5067
+ $order_by = self::get( 'order_by', 'group_id' );
5068
+ if( $order_by == '' ) {
5069
+ $order_by = 'group_id';
5070
+ }
5071
+ $asc_or_desc = self::get( 'asc_or_desc' ) == 'asc' ? 'asc' : 'desc';
5072
+
5073
+ $lists['hide_label_list'] = self::get( 'hide_label_list' );
5074
+ $lists['startdate'] = self::get( 'startdate' );
5075
+ $lists['enddate'] = self::get( 'enddate' );
5076
+ $lists['ip_search'] = self::get( 'ip_search' );
5077
+ $lists['username_search'] = self::get( 'username_search' );
5078
+ $lists['useremail_search'] = self::get( 'useremail_search' );
5079
+ $lists['id_search'] = self::get( 'id_search' );
5080
  if ( $lists['ip_search'] ) {
5081
  $where[] = 'ip LIKE "%' . $lists['ip_search'] . '%"';
5082
  }
5142
  array_push($sorted_label_names, $label_names[$key]);
5143
  array_push($sorted_label_types, $label_types[$key]);
5144
  array_push($sorted_label_names_original, $label_names_original[$key]);
5145
+ $search_temp = self::get( $form_id . '_' . $label_id . '_search' );
 
 
 
 
 
5146
  $search_temp = strtolower($search_temp);
5147
  $lists[$form_id . '_' . $label_id . '_search'] = $search_temp;
5148
  if ( $search_temp ) {
5149
  $join_query[] = 'search';
5150
  $join_where[] = array( 'label' => $label_id, 'search' => $search_temp );
5151
  }
5152
+ $search_verified = self::get( $form_id . '_' . $label_id . '_search_verified' );
5153
+ if ( $search_verified != '' ) {
5154
  $lists[$form_id . '_' . $label_id . '_search_verified'] = $search_verified;
5155
  }
 
 
 
5156
  if ( $search_verified && isset($ver_emails_array[$label_id]) ) {
5157
  $join_query[] = 'search';
5158
  $join_where[] = NULL;
5681
  );
5682
  return $custom_fields;
5683
  }
5684
+ }
frontend/controllers/form_maker.php CHANGED
@@ -73,7 +73,6 @@ class FMControllerForm_maker {
73
  if ( !$result ) {
74
  return;
75
  }
76
- $result[0]->fm_ajax_submit = isset($fm_settings['fm_ajax_submit']) ? $fm_settings['fm_ajax_submit'] : 0;
77
  $this->model->savedata($result[0], $id);
78
 
79
  return $this->view->display($result, $fm_settings, $id, $type);
73
  if ( !$result ) {
74
  return;
75
  }
 
76
  $this->model->savedata($result[0], $id);
77
 
78
  return $this->view->display($result, $fm_settings, $id, $type);
frontend/models/form_maker.php CHANGED
@@ -35,7 +35,7 @@ class FMModelForm_maker {
35
  return FALSE;
36
  }
37
 
38
- $form_preview = (WDW_FM_Library(self::PLUGIN)->get( 'wdform_id', '' ) == $id) ? TRUE : FALSE;
39
  if ( !$form_preview && !$row->published ) {
40
  // If the form has been unpublished.
41
  if ( current_user_can( 'manage_options' ) ) {
@@ -44,7 +44,7 @@ class FMModelForm_maker {
44
  }
45
  return FALSE;
46
  }
47
- $theme_id = WDW_FM_Library(self::PLUGIN)->get( 'test_theme', '' );
48
 
49
  if ( $theme_id == '' ) {
50
  $theme_id = $row->theme;
@@ -1129,7 +1129,7 @@ class FMModelForm_maker {
1129
  * @return array|mixed
1130
  */
1131
  public function savedata( $form = 0, $id = 0 ) {
1132
- $this->fm_ajax_submit = $form->fm_ajax_submit;
1133
  if ( !isset( $_POST[ "save_or_submit" . $id ] ) || !isset( $_POST[ "counter" . $id ] ) ) {
1134
  // If removed special field.
1135
  return;
@@ -1168,7 +1168,7 @@ class FMModelForm_maker {
1168
  if ( $_POST["save_or_submit" . $id] == 'submit' || $save_progress ) {
1169
  WDW_FM_Library(self::PLUGIN)->start_session();
1170
  if ( isset($_POST["captcha_input"]) ) {
1171
- $captcha_input = esc_html($_POST["captcha_input"]);
1172
  $session_wd_captcha_code = isset($_SESSION[$id . '_wd_captcha_code']) ? $_SESSION[$id . '_wd_captcha_code'] : '-';
1173
  if ( md5($captcha_input) == $session_wd_captcha_code ) {
1174
  $success = TRUE;
@@ -1180,7 +1180,7 @@ class FMModelForm_maker {
1180
  }
1181
  }
1182
  elseif ( isset($_POST["arithmetic_captcha_input"]) ) {
1183
- $arithmetic_captcha_input = esc_html($_POST["arithmetic_captcha_input"]);
1184
  $session_wd_arithmetic_captcha_code = isset($_SESSION[$id . '_wd_arithmetic_captcha_code']) ? $_SESSION[$id . '_wd_arithmetic_captcha_code'] : '-';
1185
  if ( md5($arithmetic_captcha_input) == $session_wd_arithmetic_captcha_code ) {
1186
  $success = TRUE;
@@ -1217,7 +1217,7 @@ class FMModelForm_maker {
1217
  // Build POST request:
1218
  $recaptcha_url = 'https://www.google.com/recaptcha/api/siteverify';
1219
  $recaptcha_secret = isset($fm_settings['private_key']) ? $fm_settings['private_key'] : '';
1220
- $recaptcha_response = $_POST['recaptcha_response' . $id];
1221
  // Make and decode POST request:
1222
  $recaptcha = file_get_contents($recaptcha_url . '?secret=' . $recaptcha_secret . '&response=' . $recaptcha_response);
1223
  $recaptcha = json_decode($recaptcha, TRUE);
@@ -1330,6 +1330,7 @@ class FMModelForm_maker {
1330
  */
1331
  public function select_data_from_db_for_labels( $db_info = '', $label_column = '', $table = '', $where = '', $order_by = '' ) {
1332
  global $wpdb;
 
1333
  $query = "SELECT `" . $label_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
1334
  $db_info = trim($db_info, '[]');
1335
  if ( $db_info ) {
@@ -1454,7 +1455,7 @@ class FMModelForm_maker {
1454
  $label_id = array();
1455
  $label_label = array();
1456
  $label_type = array();
1457
- $disabled_fields = explode( ',', WDW_FM_Library(self::PLUGIN)->get('disabled_fields' . $id, ''));
1458
  $disabled_fields = array_slice( $disabled_fields, 0, count( $disabled_fields ) - 1 );
1459
  $label_all = explode( '#****#', $form->label_order_current );
1460
  $label_all = array_slice( $label_all, 0, count( $label_all ) - 1 );
@@ -1513,21 +1514,21 @@ class FMModelForm_maker {
1513
  case "type_textarea":
1514
  case "type_send_copy":
1515
  case "type_spinner": {
1516
- $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? trim( esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) : "";
1517
  if ( $required && $value === '' ) {
1518
  $missing_required_field = TRUE;
1519
  }
1520
  break;
1521
  }
1522
  case 'type_password': {
1523
- $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? md5 ( trim( esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) ) : "";
1524
  if ( $required && $value === '' ) {
1525
  $missing_required_field = TRUE;
1526
  }
1527
  break;
1528
  }
1529
  case "type_submitter_mail": {
1530
- $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? trim( esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) : "";
1531
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1532
  $missing_required_field = TRUE;
1533
  }
@@ -1537,8 +1538,8 @@ class FMModelForm_maker {
1537
  break;
1538
  }
1539
  case "type_date": {
1540
- $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "";
1541
- $date_format = isset( $_POST[ 'wdform_' . $i . "_date_format" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_date_format" . $id ] ) : "";
1542
  if ( $value ) {
1543
  if ( !$this->fm_validateDate( $value, $date_format ) ) {
1544
  return array( 'error' => true, 'group_id' => $group_id, 'message' => __( "This is not a valid date format.", WDFMInstance(self::PLUGIN)->prefix ) );
@@ -1550,8 +1551,8 @@ class FMModelForm_maker {
1550
  break;
1551
  }
1552
  case "type_date_range": {
1553
- $value0 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . "0" ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . "0" ] ) : "";
1554
- $value1 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] ) : "";
1555
  $value = ($value0) . ' - ' . ($value1);
1556
  if ( $required && ( !isset( $_POST[ 'wdform_' . $i . "_element" . $id . "0" ] ) || !isset( $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] ) ) ) {
1557
  $missing_required_field = TRUE;
@@ -1559,17 +1560,17 @@ class FMModelForm_maker {
1559
  break;
1560
  }
1561
  case "type_wdeditor": {
1562
- $value = isset( $_POST[ 'wdform_' . $i . '_wd_editor' . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . '_wd_editor' . $id ] ) : "";
1563
  break;
1564
  }
1565
  case "type_mark_map": {
1566
- $value = (isset( $_POST[ 'wdform_' . $i . "_long" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_long" . $id ] ) : "") . '***map***' . (isset( $_POST[ 'wdform_' . $i . "_lat" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_lat" . $id ] ) : "");
1567
  break;
1568
  }
1569
  case "type_date_fields": {
1570
- $value0 = isset( $_POST[ 'wdform_' . $i . "_day" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_day" . $id ] ) : "";
1571
- $value1 = isset( $_POST[ 'wdform_' . $i . "_month" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_month" . $id ] ) : "";
1572
- $value2 = isset( $_POST[ 'wdform_' . $i . "_year" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_year" . $id ] ) : "";
1573
  $value = ($value0) . '-' . ($value1) . '-' . ($value2);
1574
  if ( $required && ( !isset( $_POST[ 'wdform_' . $i . "_day" . $id ] ) || !isset( $_POST[ 'wdform_' . $i . "_month" . $id ] ) || !isset( $_POST[ 'wdform_' . $i . "_year" . $id ] ) ) ) {
1575
  $missing_required_field = TRUE;
@@ -1577,10 +1578,10 @@ class FMModelForm_maker {
1577
  break;
1578
  }
1579
  case "type_time": {
1580
- $value0 = isset( $_POST[ 'wdform_' . $i . "_hh" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hh" . $id ] ) : "";
1581
- $value1 = isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) : "";
1582
- $value2 = isset( $_POST[ 'wdform_' . $i . "_ss" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_ss" . $id ] ) : "";
1583
- $value3 = isset( $_POST[ 'wdform_' . $i . "_am_pm" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_am_pm" . $id ] ) : '';
1584
  if ( !$value0 && !$value1 && !$value2 ) {
1585
  $value = "";
1586
  }
@@ -1598,8 +1599,8 @@ class FMModelForm_maker {
1598
  break;
1599
  }
1600
  case "type_phone": {
1601
- $value0 = isset( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) : "";
1602
- $value1 = isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) : "";
1603
  $value = ($value0) . ' ' . ($value1);
1604
  if ( $required && ( !isset( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) || !isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ) ) {
1605
  $missing_required_field = TRUE;
@@ -1607,10 +1608,10 @@ class FMModelForm_maker {
1607
  break;
1608
  }
1609
  case "type_name": {
1610
- $value0 = isset( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) ? trim( esc_html( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) ) : "";
1611
- $value1 = isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? trim( esc_html( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ) : "";
1612
- $value2 = isset( $_POST[ 'wdform_' . $i . "_element_title" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_title" . $id ] ) : "";
1613
- $value3 = isset( $_POST[ 'wdform_' . $i . "_element_middle" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_middle" . $id ] ) : "";
1614
 
1615
  $value = $value0 . '@@@' . $value1;
1616
  if ( $value2 ) {
@@ -1629,9 +1630,9 @@ class FMModelForm_maker {
1629
  $value = __('This functionality is disabled in demo.', WDFMInstance(self::PLUGIN)->prefix );
1630
  } else {
1631
  if ( isset( $_POST[ 'wdform_' . $i . "_file_url" . $id . '_save' ] ) ) {
1632
- $file_url = isset( $_POST[ 'wdform_' . $i . "_file_url" . $id . '_save' ] ) ? stripslashes( $_POST[ 'wdform_' . $i . "_file_url" . $id . '_save' ] ) : NULL;
1633
  if ( isset( $file_url ) ) {
1634
- $all_files = isset( $_POST[ 'wdform_' . $i . "_all_files" . $id . '_save' ] ) ? json_decode( stripslashes( $_POST[ 'wdform_' . $i . "_all_files" . $id . '_save' ] ), TRUE ) : array();
1635
  $value = $file_url;
1636
  }
1637
  } else {
@@ -1806,7 +1807,7 @@ class FMModelForm_maker {
1806
  }
1807
  case 'type_address': {
1808
  $value = '*#*#*#';
1809
- $element = isset( $_POST[ 'wdform_' . $i . "_street1" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_street1" . $id ] ) : NULL;
1810
  if ( isset( $element ) ) {
1811
  $value = $element;
1812
  if ( $required && $value === '' ) {
@@ -1814,27 +1815,27 @@ class FMModelForm_maker {
1814
  }
1815
  break;
1816
  }
1817
- $element = isset( $_POST[ 'wdform_' . $i . "_street2" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_street2" . $id ] ) : NULL;
1818
  if ( isset( $element ) ) {
1819
  $value = $element;
1820
  break;
1821
  }
1822
- $element = isset( $_POST[ 'wdform_' . $i . "_city" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_city" . $id ] ) : NULL;
1823
  if ( isset( $element ) ) {
1824
  $value = $element;
1825
  break;
1826
  }
1827
- $element = isset( $_POST[ 'wdform_' . $i . "_state" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_state" . $id ] ) : NULL;
1828
  if ( isset( $element ) ) {
1829
  $value = $element;
1830
  break;
1831
  }
1832
- $element = isset( $_POST[ 'wdform_' . $i . "_postal" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_postal" . $id ] ) : NULL;
1833
  if ( isset( $element ) ) {
1834
  $value = $element;
1835
  break;
1836
  }
1837
- $element = isset( $_POST[ 'wdform_' . $i . "_country" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_country" . $id ] ) : NULL;
1838
  if ( isset( $element ) ) {
1839
  $value = $element;
1840
  break;
@@ -1842,16 +1843,16 @@ class FMModelForm_maker {
1842
  break;
1843
  }
1844
  case "type_hidden": {
1845
- $value = isset( $_POST[ $label_label[ $key ] ] ) ? esc_html( $_POST[ $label_label[ $key ] ] ) : "";
1846
  break;
1847
  }
1848
  case "type_radio": {
1849
- $element = isset( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) : NULL;
1850
  if ( isset( $element ) ) {
1851
  $value = $element;
1852
  break;
1853
  }
1854
- $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "";
1855
 
1856
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1857
  $missing_required_field = TRUE;
@@ -1862,25 +1863,25 @@ class FMModelForm_maker {
1862
  $start = -1;
1863
  $value = '';
1864
  for ( $j = 0; $j < 100; $j++ ) {
1865
- $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) : NULL;
1866
  if ( isset( $element ) ) {
1867
  $start = $j;
1868
  break;
1869
  }
1870
  }
1871
  $other_element_id = -1;
1872
- $is_other = isset( $_POST[ 'wdform_' . $i . "_allow_other" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_allow_other" . $id ] ) : "";
1873
  if ( $is_other == "yes" ) {
1874
- $other_element_id = isset( $_POST[ 'wdform_' . $i . "_allow_other_num" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_allow_other_num" . $id ] ) : "";
1875
  }
1876
  if ( $start != -1 ) {
1877
  for ( $j = $start; $j < 100; $j++ ) {
1878
- $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) : NULL;
1879
  if ( isset( $element ) ) {
1880
  if ( $j == $other_element_id ) {
1881
- $value = $value . (isset( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) : "") . '***br***';
1882
  } else {
1883
- $value = $value . (isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) : "") . '***br***';
1884
  }
1885
  }
1886
  }
@@ -1892,30 +1893,32 @@ class FMModelForm_maker {
1892
  break;
1893
  }
1894
  case "type_paypal_price": {
1895
- $value = isset( $_POST[ 'wdform_' . $i . "_element_dollars" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_dollars" . $id ] ) : 0;
1896
  $value = (int)preg_replace( '/\D/', '', $value );
1897
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element_dollars" . $id ] ) ) {
1898
  $missing_required_field = TRUE;
1899
  break;
1900
  }
1901
  if ( isset( $_POST[ 'wdform_' . $i . "_element_cents" . $id ] ) ) {
1902
- $value = $value . '.' . (preg_replace( '/\D/', '', esc_html( $_POST[ 'wdform_' . $i . "_element_cents" . $id ] ) ));
1903
  }
1904
  $total += (float)($value);
1905
  $paypal_option = array();
1906
  if ( $value != 0 ) {
1907
- $quantity = (isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) : 1);
1908
- array_push( $paypal[ 'item_name' ], $label_label[ $key ] );
1909
- array_push( $paypal[ 'quantity' ], $quantity );
1910
- array_push( $paypal[ 'amount' ], $value );
1911
- $is_amount = TRUE;
1912
- array_push( $paypal[ 'on_os' ], $paypal_option );
 
 
1913
  }
1914
  $value = $value . $form_currency;
1915
  break;
1916
  }
1917
  case "type_paypal_price_new": {
1918
- $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : 0;
1919
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1920
  $missing_required_field = TRUE;
1921
  break;
@@ -1923,12 +1926,14 @@ class FMModelForm_maker {
1923
  $total += (float)($value);
1924
  $paypal_option = array();
1925
  if ( $value != 0 ) {
1926
- $quantity = (isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) : 1);
1927
- array_push( $paypal[ 'item_name' ], $label_label[ $key ] );
1928
- array_push( $paypal[ 'quantity' ], $quantity );
1929
- array_push( $paypal[ 'amount' ], $value );
1930
- $is_amount = TRUE;
1931
- array_push( $paypal[ 'on_os' ], $paypal_option );
 
 
1932
  }
1933
  $value = $form_currency . $value;
1934
  break;
@@ -1936,33 +1941,33 @@ class FMModelForm_maker {
1936
  case "type_paypal_select": {
1937
  $value = '';
1938
  if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] != '' ) {
1939
- $value = esc_html( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) . ' : ' . $form_currency . (isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "");
1940
  }
1941
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1942
  $missing_required_field = TRUE;
1943
  break;
1944
  }
1945
- $quantity = ( isset($_POST['wdform_' . $i . "_element_quantity" . $id]) ) ? intval( esc_html( $_POST['wdform_' . $i . "_element_quantity" . $id] ) ) : 1;
1946
- $total += (float)(isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : 0) * $quantity;
1947
- array_push( $paypal[ 'item_name' ], $label_label[ $key ] . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_label" . $id ] : "") );
1948
  array_push( $paypal[ 'quantity' ], $quantity );
1949
- array_push( $paypal[ 'amount' ], (isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "") );
1950
- if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] != 0 ) {
1951
  $is_amount = TRUE;
1952
  }
1953
- $element_quantity = isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) : NULL;
1954
  if ( isset( $element_quantity ) && $value != '' ) {
1955
- $value .= '***br***' . (isset( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) : "") . ': ' . esc_html( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) . '***quantity***';
1956
  }
1957
  $paypal_option = array();
1958
  $paypal_option[ 'on' ] = array();
1959
  $paypal_option[ 'os' ] = array();
1960
  for ( $k = 0; $k < 50; $k++ ) {
1961
- $temp_val = isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) : NULL;
1962
  if ( isset( $temp_val ) && $value != '' ) {
1963
- array_push( $paypal_option[ 'on' ], (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) : "") );
1964
- array_push( $paypal_option[ 'os' ], (isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) : "") );
1965
- $value .= '***br***' . (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) : "") . ': ' . (isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) : "") . '***property***';
1966
  }
1967
  }
1968
  array_push( $paypal[ 'on_os' ], $paypal_option );
@@ -1970,120 +1975,123 @@ class FMModelForm_maker {
1970
  }
1971
  case "type_paypal_radio": {
1972
  $value = '';
1973
- $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] !== '' ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : NULL;
 
 
 
1974
  if ( isset($element) ) {
1975
- $value = (isset( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) : '') . ' : ' . $form_currency . $element;
1976
  }
1977
 
1978
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1979
  $missing_required_field = TRUE;
1980
  break;
1981
  }
1982
- $quantity = ( isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ]) ) ? intval( esc_html( $_POST['wdform_' . $i . "_element_quantity" . $id] ) ) : 1;
1983
- $total += (float)(isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : 0) * $quantity;
1984
- array_push( $paypal[ 'item_name' ], $label_label[ $key ] . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) : "") );
1985
  array_push( $paypal[ 'quantity' ], $quantity );
1986
- array_push( $paypal[ 'amount' ], (isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : 0) );
1987
- if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] != 0 ) {
1988
  $is_amount = TRUE;
1989
  }
1990
- $element_quantity = isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) : NULL;
1991
  if ( isset( $element_quantity ) && $value != '' ) {
1992
- $value .= '***br***' . (isset( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) : "") . ': ' . esc_html( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) . '***quantity***';
1993
  }
1994
  $paypal_option = array();
1995
  $paypal_option[ 'on' ] = array();
1996
  $paypal_option[ 'os' ] = array();
1997
  for ( $k = 0; $k < 50; $k++ ) {
1998
- $temp_val = isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) : NULL;
1999
  if ( isset( $temp_val ) && $value != '' ) {
2000
- array_push( $paypal_option[ 'on' ], (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) : "") );
2001
- array_push( $paypal_option[ 'os' ], esc_html( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) );
2002
- $value .= '***br***' . (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) : "") . ': ' . esc_html( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) . '***property***';
2003
  }
2004
  }
2005
  array_push( $paypal[ 'on_os' ], $paypal_option );
2006
  break;
2007
  }
2008
  case "type_paypal_shipping": {
2009
- $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] !== '' ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : '';
2010
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
2011
  $missing_required_field = TRUE;
2012
  break;
2013
  }
2014
  if ( $element ) {
2015
- $value = (isset( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) : '') . ' : ' . $form_currency . $element;
2016
  } else {
2017
  $value = '';
2018
  }
2019
- $paypal[ 'shipping' ] = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "";
2020
  break;
2021
  }
2022
  case "type_paypal_checkbox": {
2023
  $start = -1;
2024
  $value = '';
2025
  for ( $j = 0; $j < 100; $j++ ) {
2026
- $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) : NULL;
2027
  if ( isset( $element ) ) {
2028
  $start = $j;
2029
  break;
2030
  }
2031
  }
2032
  $other_element_id = -1;
2033
- $is_other = isset( $_POST[ 'wdform_' . $i . "_allow_other" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_allow_other" . $id ] ) : "";
2034
  if ( $is_other == "yes" ) {
2035
- $other_element_id = isset( $_POST[ 'wdform_' . $i . "_allow_other_num" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_allow_other_num" . $id ] ) : "";
2036
  }
2037
  if ( $start != -1 ) {
2038
  for ( $j = $start; $j < 100; $j++ ) {
2039
- $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) : NULL;
2040
  if ( isset( $element ) ) {
2041
  if ( $j == $other_element_id ) {
2042
- $value = $value . (isset( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) : "") . '***br***';
2043
  } else {
2044
- $element = (isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) && $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) : 0);
2045
- $value = $value . (isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j . "_label" ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . $j . "_label" ] ) : "") . ' - ' . $form_currency . $element . '***br***';
2046
- $quantity = ( isset($_POST[ 'wdform_' . $i . "_element_quantity" . $id]) ) ? intval( esc_html( $_POST['wdform_' . $i . "_element_quantity" . $id] ) ) : 1;
2047
- $total += (float)(isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . $j ] : 0) * (float)($quantity);
2048
- array_push( $paypal[ 'item_name' ], $label_label[ $key ] . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j . "_label" ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . $j . "_label" ] ) : "") );
2049
  array_push( $paypal[ 'quantity' ], $quantity );
2050
- array_push( $paypal[ 'amount' ], (isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? ($_POST[ 'wdform_' . $i . "_element" . $id . $j ] == '' ? '0' : esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] )) : "") );
2051
- if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) && $_POST[ 'wdform_' . $i . "_element" . $id . $j ] != 0 ) {
2052
  $is_amount = TRUE;
2053
  }
2054
  $paypal_option = array();
2055
  $paypal_option[ 'on' ] = array();
2056
  $paypal_option[ 'os' ] = array();
2057
  for ( $k = 0; $k < 50; $k++ ) {
2058
- $temp_val = isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) : NULL;
2059
  if ( isset( $temp_val ) ) {
2060
- array_push( $paypal_option[ 'on' ], isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) : "" );
2061
- array_push( $paypal_option[ 'os' ], esc_html( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) );
2062
  }
2063
  }
2064
  array_push( $paypal[ 'on_os' ], $paypal_option );
2065
  }
2066
  }
2067
  }
2068
- $element_quantity = isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) : NULL;
2069
  if ( isset( $element_quantity ) ) {
2070
- $value .= (isset( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) : "") . ': ' . esc_html( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) . '***quantity***';
2071
  }
2072
  for ( $k = 0; $k < 50; $k++ ) {
2073
- $temp_val = isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) : NULL;
2074
  if ( isset( $temp_val ) ) {
2075
- $value .= '***br***' . (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) : "") . ': ' . $_POST[ 'wdform_' . $i . "_property" . $id . $k ] . '***property***';
2076
  }
2077
  }
2078
  }
2079
- if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
2080
  $missing_required_field = TRUE;
2081
  }
2082
  break;
2083
  }
2084
  case "type_star_rating": {
2085
- $value0 = isset( $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] ) ? (int) $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] : 0;
2086
- $value1 = (isset( $_POST[ 'wdform_' . $i . "_star_amount" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_star_amount" . $id ] ) : "");
2087
  $value = $value0 . '/' . $value1;
2088
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] ) ) {
2089
  $missing_required_field = TRUE;
@@ -2091,8 +2099,8 @@ class FMModelForm_maker {
2091
  break;
2092
  }
2093
  case "type_scale_rating": {
2094
- $value0 = (isset( $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] ) : 0);
2095
- $value1 = (isset( $_POST[ 'wdform_' . $i . "_scale_amount" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_scale_amount" . $id ] ) : "");
2096
  $value = $value0 . '/' . $value1;
2097
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] ) ) {
2098
  $missing_required_field = TRUE;
@@ -2100,15 +2108,15 @@ class FMModelForm_maker {
2100
  break;
2101
  }
2102
  case "type_slider": {
2103
- $value = isset( $_POST[ 'wdform_' . $i . "_slider_value" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_slider_value" . $id ] ) : "";
2104
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_slider_value" . $id ] ) ) {
2105
  $missing_required_field = TRUE;
2106
  }
2107
  break;
2108
  }
2109
  case "type_range": {
2110
- $value0 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] ) : "";
2111
- $value1 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] ) : "";
2112
  $value = $value0 . '-' . $value1;
2113
  if ( $required && ( !isset( $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] ) || !isset( $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] ) ) ) {
2114
  $missing_required_field = TRUE;
@@ -2117,27 +2125,27 @@ class FMModelForm_maker {
2117
  }
2118
  case "type_grading": {
2119
  $value = "";
2120
- $items = explode( ":", isset( $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] ) : "" );
2121
  for ( $k = 0; $k < sizeof( $items ) - 1; $k++ ) {
2122
- $element = (isset( $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] ) : "");
2123
  $value .= $element . ':';
2124
  }
2125
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
2126
  $missing_required_field = TRUE;
2127
  }
2128
- $value .= (isset( $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] ) : "") . '***grading***';
2129
  break;
2130
  }
2131
  case "type_matrix": {
2132
- $rows_of_matrix = explode( "***", isset( $_POST[ 'wdform_' . $i . "_hidden_row" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_row" . $id ] ) : "" );
2133
  $rows_count = sizeof( $rows_of_matrix ) - 1;
2134
  $isset = FALSE;
2135
- $column_of_matrix = explode( "***", isset( $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] ) : "" );
2136
  $columns_count = sizeof( $column_of_matrix ) - 1;
2137
  if ( isset( $_POST[ 'wdform_' . $i . "_input_type" . $id ] ) && $_POST[ 'wdform_' . $i . "_input_type" . $id ] == "radio" ) {
2138
  $input_value = "";
2139
  for ( $k = 1; $k <= $rows_count; $k++ ) {
2140
- $element = (isset( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k ] ) : 0);
2141
  if ( $element ) {
2142
  $isset = TRUE;
2143
  }
@@ -2148,7 +2156,7 @@ class FMModelForm_maker {
2148
  $input_value = "";
2149
  for ( $k = 1; $k <= $rows_count; $k++ ) {
2150
  for ( $j = 1; $j <= $columns_count; $j++ ) {
2151
- $element = (isset( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j ] ) : 0);
2152
  if ( $element ) {
2153
  $isset = TRUE;
2154
  }
@@ -2160,7 +2168,7 @@ class FMModelForm_maker {
2160
  $input_value = "";
2161
  for ( $k = 1; $k <= $rows_count; $k++ ) {
2162
  for ( $j = 1; $j <= $columns_count; $j++ ) {
2163
- $element = (isset( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j ] ) : "");
2164
  if ( $element ) {
2165
  $isset = TRUE;
2166
  }
@@ -2172,7 +2180,7 @@ class FMModelForm_maker {
2172
  $input_value = "";
2173
  for ( $k = 1; $k <= $rows_count; $k++ ) {
2174
  for ( $j = 1; $j <= $columns_count; $j++ ) {
2175
- $element = (isset( $_POST[ 'wdform_' . $i . "_select_yes_no" . $id . $k . '_' . $j ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_select_yes_no" . $id . $k . '_' . $j ] ) : "");
2176
  if ( $element ) {
2177
  $isset = TRUE;
2178
  }
@@ -2183,7 +2191,7 @@ class FMModelForm_maker {
2183
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
2184
  $missing_required_field = TRUE;
2185
  }
2186
- $value = $rows_count . (isset( $_POST[ 'wdform_' . $i . "_hidden_row" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_row" . $id ] ) : "") . '***' . $columns_count . (isset( $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] ) : "") . '***' . (isset( $_POST[ 'wdform_' . $i . "_input_type" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_input_type" . $id ] ) : "") . '***' . $input_value . '***matrix***';
2187
  break;
2188
  }
2189
  }
@@ -2269,6 +2277,7 @@ class FMModelForm_maker {
2269
  $fvals[ '{' . $i . '}' ] = '';
2270
  }
2271
  }
 
2272
  $user_fields = array(
2273
  "subid" => $group_id,
2274
  "ip" => $ip,
@@ -2343,7 +2352,7 @@ class FMModelForm_maker {
2343
  if ( $is_amount ) {
2344
  $tax = $form->tax;
2345
  $currency = $form->payment_currency;
2346
- $business = $form->paypal_email;
2347
  $ip = $_SERVER[ 'REMOTE_ADDR' ];
2348
  $total2 = round( $total, 2 );
2349
 
@@ -2409,7 +2418,7 @@ class FMModelForm_maker {
2409
  }
2410
  $i = 0;
2411
  foreach ( $paypal[ 'item_name' ] as $pkey => $pitem_name ) {
2412
- if ( $paypal[ 'amount' ][ $pkey ] ) {
2413
  $i++;
2414
  $str = $str . "&item_name_" . $i . "=" . urlencode( $pitem_name );
2415
  $str = $str . "&amount_" . $i . "=" . $paypal[ 'amount' ][ $pkey ];
@@ -2498,7 +2507,7 @@ class FMModelForm_maker {
2498
  foreach ( $send_tos as $index => $send_to ) {
2499
  $send_to = str_replace( '*', '', $send_to );
2500
 
2501
- $recipient = isset( $_POST[ 'wdform_' . str_replace( '*', '', $send_to ) . "_element" . $id ] ) ? $_POST[ 'wdform_' . $send_to . "_element" . $id ] : NULL;
2502
  if ( $recipient ) {
2503
  $user_email = $recipient;
2504
  break;
@@ -2749,7 +2758,7 @@ class FMModelForm_maker {
2749
  array_push( $label_label, $label_order_each[0] );
2750
  array_push( $label_type, $label_order_each[1] );
2751
  }
2752
- $disabled_fields = explode( ',', WDW_FM_Library(self::PLUGIN)->get('disabled_fields' . $id, '') );
2753
  $disabled_fields = array_slice( $disabled_fields, 0, count( $disabled_fields ) - 1 );
2754
  $list = '<table cellpadding="3" cellspacing="0" style="width: 600px; border-bottom: 1px solid #CCC; border-right: 1px solid #CCC;">';
2755
  $list_text_mode = '';
@@ -2768,7 +2777,7 @@ class FMModelForm_maker {
2768
  case "type_country":
2769
  case "type_number":
2770
  case "type_phone_new": {
2771
- $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : NULL;
2772
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2773
  $list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . '>' . $element . '</td></tr>';
2774
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
@@ -2776,7 +2785,7 @@ class FMModelForm_maker {
2776
  break;
2777
  }
2778
  case 'type_password': {
2779
- $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : NULL;
2780
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2781
  $list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . '>' . __('Your chosen password.') . '</td></tr>';
2782
  $list_text_mode = $list_text_mode . $element_label . ' - ' . __('Your chosen password.') . "\r\n";
@@ -2784,8 +2793,8 @@ class FMModelForm_maker {
2784
  break;
2785
  }
2786
  case "type_date_range": {
2787
- $element0 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . "0" ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . "0" ] : NULL;
2788
- $element1 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] : NULL;
2789
  if ( isset( $element0 ) && $this->empty_field( $element0, $row->mail_emptyfields ) && $this->empty_field( $element1, $row->mail_emptyfields ) ) {
2790
  $element = $element0 . ' - ' . $element1;
2791
  $list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . '>' . $element . '</td></tr>';
@@ -2794,7 +2803,7 @@ class FMModelForm_maker {
2794
  break;
2795
  }
2796
  case 'type_textarea': {
2797
- $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? wpautop( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : NULL;
2798
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2799
  $list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . '>' . $element . '</td></tr>';
2800
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
@@ -2802,7 +2811,7 @@ class FMModelForm_maker {
2802
  break;
2803
  }
2804
  case "type_hidden": {
2805
- $element = isset( $_POST[ $element_label ] ) ? $_POST[ $element_label ] : NULL;
2806
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2807
  $list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . '>' . $element . '</td></tr>';
2808
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
@@ -2810,15 +2819,16 @@ class FMModelForm_maker {
2810
  break;
2811
  }
2812
  case "type_mark_map": {
2813
- $element = isset( $_POST[ 'wdform_' . $i . "_long" . $id ] ) ? $_POST[ 'wdform_' . $i . "_long" . $id ] : NULL;
2814
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2815
- $list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . '>Longitude:' . $element . '<br/>Latitude:' . (isset( $_POST[ 'wdform_' . $i . "_lat" . $id ] ) ? $_POST[ 'wdform_' . $i . "_lat" . $id ] : "") . '</td></tr>';
2816
- $list_text_mode = $list_text_mode . $element_label . ' - Longitude:' . $element . ' Latitude:' . (isset( $_POST[ 'wdform_' . $i . "_lat" . $id ] ) ? $_POST[ 'wdform_' . $i . "_lat" . $id ] : "") . "\r\n";
2817
  }
2818
  break;
2819
  }
2820
- case "type_submitter_mail": {
2821
- $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : NULL;
 
2822
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2823
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
2824
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
@@ -2826,17 +2836,17 @@ class FMModelForm_maker {
2826
  break;
2827
  }
2828
  case "type_time": {
2829
- $hh = isset( $_POST[ 'wdform_' . $i . "_hh" . $id ] ) ? $_POST[ 'wdform_' . $i . "_hh" . $id ] : NULL;
2830
- if ( isset( $hh ) && ($this->empty_field( $hh, $row->mail_emptyfields ) || $this->empty_field( $_POST[ 'wdform_' . $i . "_mm" . $id ], $row->mail_emptyfields ) || $this->empty_field( $_POST[ 'wdform_' . $i . "_ss" . $id ], $row->mail_emptyfields )) ) {
2831
- $ss = isset( $_POST[ 'wdform_' . $i . "_ss" . $id ] ) ? $_POST[ 'wdform_' . $i . "_ss" . $id ] : NULL;
2832
  if ( isset( $ss ) ) {
2833
- $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $hh . ':' . (isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_mm" . $id ] : "") . ':' . $ss;
2834
- $list_text_mode = $list_text_mode . $element_label . ' - ' . $hh . ':' . (isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_mm" . $id ] : "") . ':' . $ss;
2835
  } else {
2836
- $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $hh . ':' . (isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_mm" . $id ] : "");
2837
- $list_text_mode = $list_text_mode . $element_label . ' - ' . $hh . ':' . (isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_mm" . $id ] : "");
2838
  }
2839
- $am_pm = isset( $_POST[ 'wdform_' . $i . "_am_pm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_am_pm" . $id ] : NULL;
2840
  if ( isset( $am_pm ) ) {
2841
  $list = $list . ' ' . $am_pm . '</td></tr>';
2842
  $list_text_mode = $list_text_mode . $am_pm . "\r\n";
@@ -2848,62 +2858,62 @@ class FMModelForm_maker {
2848
  break;
2849
  }
2850
  case "type_phone": {
2851
- $element_first = isset( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_first" . $id ] : NULL;
2852
  if ( isset( $element_first ) && $this->empty_field( $element_first, $row->mail_emptyfields ) ) {
2853
- $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element_first . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_last" . $id ] : "") . '</td></tr>';
2854
- $list_text_mode = $list_text_mode . $element_label . ' - ' . $element_first . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_last" . $id ] : "") . "\r\n";
2855
  }
2856
  break;
2857
  }
2858
  case "type_name": {
2859
- $element_first = isset( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_first" . $id ] : NULL;
2860
  if ( isset( $element_first ) ) {
2861
- $element_title = isset( $_POST[ 'wdform_' . $i . "_element_title" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_title" . $id ] : NULL;
2862
- $element_middle = isset( $_POST[ 'wdform_' . $i . "_element_middle" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_middle" . $id ] ) : NULL;
2863
- if ( (isset( $element_title ) || isset( $element_middle )) && ($this->empty_field( $element_title, $row->mail_emptyfields ) || $this->empty_field( $element_first, $row->mail_emptyfields ) || $this->empty_field( $_POST[ 'wdform_' . $i . "_element_last" . $id ], $row->mail_emptyfields ) || $this->empty_field( $_POST[ 'wdform_' . $i . "_element_middle" . $id ], $row->mail_emptyfields )) ) {
2864
- $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . (isset( $_POST[ 'wdform_' . $i . "_element_title" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_title" . $id ] : '') . ' ' . $element_first . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_last" . $id ] : "") . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_middle" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_middle" . $id ] : "") . '</td></tr>';
2865
- $list_text_mode = $list_text_mode . $element_label . ' - ' . (isset( $_POST[ 'wdform_' . $i . "_element_title" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_title" . $id ] : '') . ' ' . $element_first . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_last" . $id ] : "") . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_middle" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_middle" . $id ] : "") . "\r\n";
2866
  } else {
2867
- if ( $this->empty_field( $element_first, $row->mail_emptyfields ) || $this->empty_field( $_POST[ 'wdform_' . $i . "_element_last" . $id ], $row->mail_emptyfields ) ) {
2868
- $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element_first . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_last" . $id ] : "") . '</td></tr>';
2869
- $list_text_mode = $list_text_mode . $element_label . ' - ' . $element_first . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_last" . $id ] : "") . "\r\n";
2870
  }
2871
  }
2872
  }
2873
  break;
2874
  }
2875
  case "type_address": {
2876
- $element = isset( $_POST[ 'wdform_' . $i . "_street1" . $id ] ) ? $_POST[ 'wdform_' . $i . "_street1" . $id ] : NULL;
2877
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2878
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $label_order_original[ $i ] . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
2879
  $list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
2880
  break;
2881
  }
2882
- $element = isset( $_POST[ 'wdform_' . $i . "_street2" . $id ] ) ? $_POST[ 'wdform_' . $i . "_street2" . $id ] : NULL;
2883
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2884
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $label_order_original[ $i ] . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
2885
  $list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
2886
  break;
2887
  }
2888
- $element = isset( $_POST[ 'wdform_' . $i . "_city" . $id ] ) ? $_POST[ 'wdform_' . $i . "_city" . $id ] : NULL;
2889
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2890
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $label_order_original[ $i ] . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
2891
  $list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
2892
  break;
2893
  }
2894
- $element = isset( $_POST[ 'wdform_' . $i . "_state" . $id ] ) ? $_POST[ 'wdform_' . $i . "_state" . $id ] : NULL;
2895
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2896
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $label_order_original[ $i ] . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
2897
  $list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
2898
  break;
2899
  }
2900
- $element = isset( $_POST[ 'wdform_' . $i . "_postal" . $id ] ) ? $_POST[ 'wdform_' . $i . "_postal" . $id ] : NULL;
2901
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2902
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $label_order_original[ $i ] . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
2903
  $list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
2904
  break;
2905
  }
2906
- $element = isset( $_POST[ 'wdform_' . $i . "_country" . $id ] ) ? $_POST[ 'wdform_' . $i . "_country" . $id ] : NULL;
2907
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2908
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $label_order_original[ $i ] . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
2909
  $list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
@@ -2912,9 +2922,9 @@ class FMModelForm_maker {
2912
  break;
2913
  }
2914
  case "type_date_fields": {
2915
- $day = isset( $_POST[ 'wdform_' . $i . "_day" . $id ] ) ? $_POST[ 'wdform_' . $i . "_day" . $id ] : NULL;
2916
- $month = isset( $_POST[ 'wdform_' . $i . "_month" . $id ] ) ? $_POST[ 'wdform_' . $i . "_month" . $id ] : "";
2917
- $year = isset( $_POST[ 'wdform_' . $i . "_year" . $id ] ) ? $_POST[ 'wdform_' . $i . "_year" . $id ] : "";
2918
  if ( isset( $day ) && $this->empty_field( $day, $row->mail_emptyfields ) ) {
2919
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . (($day || $month || $year) ? $day . '-' . $month . '-' . $year : '') . '</td></tr>';
2920
  $list_text_mode = $list_text_mode . $element_label . (($day || $month || $year) ? $day . '-' . $month . '-' . $year : '') . "\r\n";
@@ -2922,13 +2932,13 @@ class FMModelForm_maker {
2922
  break;
2923
  }
2924
  case "type_radio": {
2925
- $element = isset( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) ? $_POST[ 'wdform_' . $i . "_other_input" . $id ] : NULL;
2926
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2927
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
2928
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2929
  break;
2930
  }
2931
- $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : NULL;
2932
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2933
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
2934
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
@@ -2938,16 +2948,16 @@ class FMModelForm_maker {
2938
  case "type_checkbox": {
2939
  $start = -1;
2940
  for ( $j = 0; $j < 100; $j++ ) {
2941
- $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . $j ] : NULL;
2942
  if ( isset( $element ) ) {
2943
  $start = $j;
2944
  break;
2945
  }
2946
  }
2947
  $other_element_id = -1;
2948
- $is_other = isset( $_POST[ 'wdform_' . $i . "_allow_other" . $id ] ) ? $_POST[ 'wdform_' . $i . "_allow_other" . $id ] : "";
2949
  if ( $is_other == "yes" ) {
2950
- $other_element_id = isset( $_POST[ 'wdform_' . $i . "_allow_other_num" . $id ] ) ? $_POST[ 'wdform_' . $i . "_allow_other_num" . $id ] : "";
2951
  }
2952
  if ( $start != -1 || ($start == -1 && $row->mail_emptyfields) ) {
2953
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >';
@@ -2955,14 +2965,14 @@ class FMModelForm_maker {
2955
  }
2956
  if ( $start != -1 ) {
2957
  for ( $j = $start; $j < 100; $j++ ) {
2958
- $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . $j ] : NULL;
2959
  if ( isset( $element ) ) {
2960
  if ( $j == $other_element_id ) {
2961
- $list = $list . '<p>' . (isset( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) ? $_POST[ 'wdform_' . $i . "_other_input" . $id ] : "") . '</p>';
2962
- $list_text_mode = $list_text_mode . (isset( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) ? $_POST[ 'wdform_' . $i . "_other_input" . $id ] : "") . ', ';
2963
  } else {
2964
- $list = $list . '<p>' . (isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . $j ] : "") . '</p>';
2965
- $list_text_mode = $list_text_mode . (isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . $j ] : "") . ', ';
2966
  }
2967
  }
2968
  }
@@ -2974,12 +2984,9 @@ class FMModelForm_maker {
2974
  break;
2975
  }
2976
  case "type_paypal_price": {
2977
- $value = 0;
2978
- if ( isset( $_POST[ 'wdform_' . $i . "_element_dollars" . $id ] ) ) {
2979
- $value = $_POST[ 'wdform_' . $i . "_element_dollars" . $id ];
2980
- }
2981
  if ( isset( $_POST[ 'wdform_' . $i . "_element_cents" . $id ] ) && $_POST[ 'wdform_' . $i . "_element_cents" . $id ] ) {
2982
- $value = $value . '.' . $_POST[ 'wdform_' . $i . "_element_cents" . $id ];
2983
  }
2984
  if ( $this->empty_field( $value, $row->mail_emptyfields ) && $value != '.' ) {
2985
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $value . $form_currency . '</td></tr>';
@@ -2988,10 +2995,7 @@ class FMModelForm_maker {
2988
  break;
2989
  }
2990
  case "type_paypal_price_new": {
2991
- $value = 0;
2992
- if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
2993
- $value = $_POST[ 'wdform_' . $i . "_element" . $id ];
2994
- }
2995
  if ( $this->empty_field( $value, $row->mail_emptyfields ) && $value != '.' ) {
2996
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . ($value == '' ? '' : $form_currency) . $value . '</td></tr>';
2997
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $value . $form_currency . "\r\n";
@@ -3001,19 +3005,19 @@ class FMModelForm_maker {
3001
  case "type_paypal_select": {
3002
  $value = '';
3003
  if ( isset( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] != '' ) {
3004
- $value = $_POST[ 'wdform_' . $i . "_element_label" . $id ] . ' : ' . $form_currency . $_POST[ 'wdform_' . $i . "_element" . $id ];
3005
  }
3006
  $is_element_quantity = isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? TRUE : FALSE;
3007
- $element_quantity_label = (isset( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) && $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ]) ? $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] : NULL;
3008
- $element_quantity = (isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $i . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] : NULL;
3009
  if ( $value != '' ) {
3010
  if ( $is_element_quantity ) {
3011
- $value .= '<br/>' . $element_quantity_label . ': ' . (($element_quantity == NULL) ? 0 : $element_quantity);
3012
  }
3013
  for ( $k = 0; $k < 50; $k++ ) {
3014
- $temp_val = isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_property" . $id . $k ] : NULL;
3015
  if ( isset( $temp_val ) ) {
3016
- $value .= '<br/>' . (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] : "") . ': ' . $temp_val;
3017
  }
3018
  }
3019
  }
@@ -3025,18 +3029,18 @@ class FMModelForm_maker {
3025
  }
3026
  case "type_paypal_radio": {
3027
  $value = '';
3028
- if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
3029
- $value = $_POST[ 'wdform_' . $i . "_element_label" . $id ] . ' : ' . $form_currency . (isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : "");
3030
  $is_element_quantity = isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? TRUE : FALSE;
3031
- $element_quantity_label = isset( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] : NULL;
3032
- $element_quantity = (isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $i . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] : NULL;
3033
  if ( !empty($is_element_quantity) ) {
3034
- $value .= '<br/>' . $element_quantity_label . ': ' . (($element_quantity == NULL) ? 0 : $element_quantity);
3035
  }
3036
  for ( $k = 0; $k < 50; $k++ ) {
3037
- $temp_val = isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_property" . $id . $k ] : NULL;
3038
  if ( isset( $temp_val ) ) {
3039
- $value .= '<br/>' . (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] : "") . ': ' . $temp_val;
3040
  }
3041
  }
3042
  }
@@ -3047,8 +3051,8 @@ class FMModelForm_maker {
3047
  break;
3048
  }
3049
  case "type_paypal_shipping": {
3050
- if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
3051
- $value = $_POST[ 'wdform_' . $i . "_element_label" . $id ] . ' : ' . $form_currency . (isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : "");
3052
  if ( $this->empty_field( $value, $row->mail_emptyfields ) ) {
3053
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $value . '</td></tr>';
3054
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $value . "\r\n";
@@ -3061,7 +3065,7 @@ class FMModelForm_maker {
3061
  case "type_paypal_checkbox": {
3062
  $start = -1;
3063
  for ( $j = 0; $j < 300; $j++ ) {
3064
- $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . $j ] : NULL;
3065
  if ( isset( $element ) ) {
3066
  $start = $j;
3067
  break;
@@ -3073,28 +3077,28 @@ class FMModelForm_maker {
3073
  }
3074
  if ( $start != -1 ) {
3075
  for ( $j = $start; $j < 300; $j++ ) {
3076
- $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . $j ] : NULL;
3077
  if ( isset( $element ) ) {
3078
- $list = $list . '<p>' . (isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j . "_label" ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . $j . "_label" ] : "") . ' - ' . $form_currency . ($element == '' ? '0' : $element) . '</p>';
3079
- $list_text_mode = $list_text_mode . (isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j . "_label" ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . $j . "_label" ] : "") . ' - ' . ($element == '' ? '0' . $form_currency : $element) . $form_currency . ', ';
3080
  }
3081
  }
3082
  }
3083
  if ( $start != -1 ) {
3084
  $is_element_quantity = isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? TRUE : FALSE;
3085
- $element_quantity_label = isset( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] : NULL;
3086
- $element_quantity = (isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $i . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] : NULL;
3087
  if ( $is_element_quantity ) {
3088
- $list = $list . $element_quantity_label . ': ' . (($element_quantity == NULL) ? 0 : $element_quantity);
3089
- $list_text_mode = $list_text_mode . $element_quantity_label . ': ' . (($element_quantity == NULL) ? 0 : $element_quantity) . ', ';
3090
  }
3091
  }
3092
  if ( $start != -1 ) {
3093
  for ( $k = 0; $k < 50; $k++ ) {
3094
- $temp_val = isset( $_POST[ 'wdform_' . $i . "_element_property_value" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_element_property_value" . $id . $k ] : NULL;
3095
  if ( isset( $temp_val ) ) {
3096
- $list = $list . '<p>' . (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] : "") . ': ' . $temp_val . '</p>';
3097
- $list_text_mode = $list_text_mode . (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] : "") . ': ' . $temp_val . ', ';
3098
  }
3099
  }
3100
  }
@@ -3105,7 +3109,7 @@ class FMModelForm_maker {
3105
  break;
3106
  }
3107
  case "type_paypal_total": {
3108
- $element = isset( $_POST[ 'wdform_' . $i . "_paypal_total" . $id ] ) ? $_POST[ 'wdform_' . $i . "_paypal_total" . $id ] : "";
3109
  if ( $this->empty_field( $element, $row->mail_emptyfields ) ) {
3110
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
3111
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
@@ -3113,8 +3117,8 @@ class FMModelForm_maker {
3113
  break;
3114
  }
3115
  case "type_star_rating": {
3116
- $element = isset( $_POST[ 'wdform_' . $i . "_star_amount" . $id ] ) ? $_POST[ 'wdform_' . $i . "_star_amount" . $id ] : NULL;
3117
- $selected = isset( $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] ) ? $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] : 0;
3118
  if ( isset( $element ) && $this->empty_field( $selected, $row->mail_emptyfields ) ) {
3119
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $selected . '/' . $element . '</td></tr>';
3120
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $selected . '/' . $element . "\r\n";
@@ -3122,24 +3126,16 @@ class FMModelForm_maker {
3122
  break;
3123
  }
3124
  case "type_scale_rating": {
3125
- $element = isset( $_POST[ 'wdform_' . $i . "_scale_amount" . $id ] ) ? $_POST[ 'wdform_' . $i . "_scale_amount" . $id ] : NULL;
3126
- $selected = isset( $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] ) ? $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] : 0;
3127
  if ( isset( $element ) && $this->empty_field( $selected, $row->mail_emptyfields ) ) {
3128
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $selected . '/' . $element . '</td></tr>';
3129
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $selected . '/' . $element . "\r\n";
3130
  }
3131
  break;
3132
  }
3133
- case "type_spinner": {
3134
- $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : NULL;
3135
- if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
3136
- $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
3137
- $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
3138
- }
3139
- break;
3140
- }
3141
  case "type_slider": {
3142
- $element = isset( $_POST[ 'wdform_' . $i . "_slider_value" . $id ] ) ? $_POST[ 'wdform_' . $i . "_slider_value" . $id ] : NULL;
3143
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
3144
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
3145
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
@@ -3147,8 +3143,8 @@ class FMModelForm_maker {
3147
  break;
3148
  }
3149
  case "type_range": {
3150
- $element0 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] : NULL;
3151
- $element1 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] : NULL;
3152
  if ( (isset( $element0 ) && $this->empty_field( $element0, $row->mail_emptyfields )) || (isset( $element1 ) && $this->empty_field( $element1, $row->mail_emptyfields )) ) {
3153
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >From: ' . $element0 . '<span style="margin-left:6px"> To </span>:' . $element1 . '</td></tr>';
3154
  $list_text_mode = $list_text_mode . $element_label . ' - From: ' . $element0 . ' To: ' . $element1 . "\r\n";
@@ -3156,15 +3152,15 @@ class FMModelForm_maker {
3156
  break;
3157
  }
3158
  case "type_grading": {
3159
- $element = isset( $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] ) ? $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] : "";
3160
  $grading = explode( ":", $element );
3161
  $items_count = sizeof( $grading ) - 1;
3162
  $element = "";
3163
  $total = 0;
3164
  $form_empty_field = 0;
3165
  for ( $k = 0; $k < $items_count; $k++ ) {
3166
- $element .= $grading[ $k ] . ": " . (isset( $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] : "") . " ";
3167
- $total += (isset( $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] ) ? (float) $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] : 0);
3168
  if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] ) ) {
3169
  $form_empty_field = 1;
3170
  }
@@ -3178,10 +3174,10 @@ class FMModelForm_maker {
3178
  }
3179
  case "type_matrix": {
3180
  $form_empty_field = 0;
3181
- $input_type = isset( $_POST[ 'wdform_' . $i . "_input_type" . $id ] ) ? $_POST[ 'wdform_' . $i . "_input_type" . $id ] : "";
3182
- $mat_rows = explode( "***", isset( $_POST[ 'wdform_' . $i . "_hidden_row" . $id ] ) ? $_POST[ 'wdform_' . $i . "_hidden_row" . $id ] : "" );
3183
  $rows_count = sizeof( $mat_rows ) - 1;
3184
- $mat_columns = explode( "***", isset( $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] ) ? $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] : "" );
3185
  $columns_count = sizeof( $mat_columns ) - 1;
3186
  $matrix = '<table cellpadding="3" cellspacing="0" style="width: 100%; border-bottom: 1px solid #CCC; border-right: 1px solid #CCC;">';
3187
  $matrix .= '<tr><td ' . $td_style . '></td>';
@@ -3193,7 +3189,7 @@ class FMModelForm_maker {
3193
  for ( $k = 1; $k <= $rows_count; $k++ ) {
3194
  $matrix .= '<tr><td style="border-top: 1px solid #CCC; border-left: 1px solid #CCC; padding: 10px; color: #3D3D3D; background-color: #EEEEEE; padding: 5px;">' . $mat_rows[ $k ] . '</td>';
3195
  if ( $input_type == "radio" ) {
3196
- $mat_radio = isset( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_input_element" . $id . $k ] : 0;
3197
  if ( $mat_radio == 0 ) {
3198
  $checked = "";
3199
  $aaa[ 1 ] = "";
@@ -3213,7 +3209,7 @@ class FMModelForm_maker {
3213
  } else {
3214
  if ( $input_type == "checkbox" ) {
3215
  for ( $j = 1; $j <= $columns_count; $j++ ) {
3216
- $checked = isset( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j ] ) ? $_POST[ 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j ] : "";
3217
  if ( $checked == 1 ) {
3218
  $form_empty_field = 1;
3219
  $checked = "checked";
@@ -3226,7 +3222,7 @@ class FMModelForm_maker {
3226
  } else {
3227
  if ( $input_type == "text" ) {
3228
  for ( $j = 1; $j <= $columns_count; $j++ ) {
3229
- $checked = isset( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j ] ) : "";
3230
  if ( $checked ) {
3231
  $form_empty_field = 1;
3232
  }
@@ -3234,7 +3230,7 @@ class FMModelForm_maker {
3234
  }
3235
  } else {
3236
  for ( $j = 1; $j <= $columns_count; $j++ ) {
3237
- $checked = isset( $_POST[ 'wdform_' . $i . "_select_yes_no" . $id . $k . '_' . $j ] ) ? $_POST[ 'wdform_' . $i . "_select_yes_no" . $id . $k . '_' . $j ] : "";
3238
  if ( $checked ) {
3239
  $form_empty_field = 1;
3240
  }
@@ -3357,7 +3353,7 @@ class FMModelForm_maker {
3357
  if ( $row->sendemail && $row->send_to || (has_action('fm_set_params_frontend_init') && WDFMInstance(self::PLUGIN)->is_free != 2) ) {
3358
  $body = $new_script;
3359
  $send_tos = explode( '**', $row->send_to );
3360
- $send_copy = isset( $_POST[ "wdform_send_copy_" . $id ] ) ? $_POST[ "wdform_send_copy_" . $id ] : NULL;
3361
  if ( isset( $send_copy ) ) {
3362
  $send = TRUE;
3363
  }
@@ -3393,7 +3389,7 @@ class FMModelForm_maker {
3393
  $body = str_replace(array('%Verification link%', '{verificationlink}'), $ver_link, $new_script);
3394
  }
3395
 
3396
- $recipient = isset($_POST['wdform_' . str_replace('*', '', $send_to) . "_element" . $id]) ? $_POST['wdform_' . $send_to . "_element" . $id] : NULL;
3397
  if ($recipient) {
3398
  if ($row->mail_attachment_user) {
3399
  $remove_parrent_array_user = new RecursiveIteratorIterator(new RecursiveArrayIterator($attachment_user));
@@ -3503,12 +3499,12 @@ class FMModelForm_maker {
3503
  $fromname = get_bloginfo('name');
3504
  }
3505
  if ( $row->from_mail ) {
3506
- $header_arr[ 'from' ] = isset( $_POST['wdform_' . $row->from_mail . "_element" . $id] ) ? $_POST['wdform_' . $row->from_mail . "_element" . $id] : $from_mail;
3507
  }
3508
  $header_arr['from_name'] = $fromname;
3509
  $header_arr['content_type'] = $content_type;
3510
  $header_arr['charset'] = 'UTF-8';
3511
- $header_arr['reply_to'] = isset( $_POST['wdform_' . $row->reply_to . "_element" . $id] ) ? $_POST['wdform_' . $row->reply_to . "_element" . $id] : $row->reply_to;
3512
  $header_arr['cc'] = $row->mail_cc;
3513
  $header_arr['bcc'] = $row->mail_bcc;
3514
  $admin_body = $new_script;
@@ -3637,7 +3633,7 @@ class FMModelForm_maker {
3637
  case "type_own_select":
3638
  case "type_country":
3639
  case "type_number": {
3640
- $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id ] : NULL;
3641
  if ( isset( $element ) ) {
3642
  if ( 'type_textarea' == $type ) {
3643
  $element = nl2br($element);
@@ -3647,8 +3643,8 @@ class FMModelForm_maker {
3647
  break;
3648
  }
3649
  case 'type_date_range' : {
3650
- $element0 = isset( $_POST[ 'wdform_' . $key . "_element" . $id . "0" ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . "0" ] : NULL;
3651
- $element1 = isset( $_POST[ 'wdform_' . $key . "_element" . $id . "1" ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . "1" ] : NULL;
3652
  $element = $element0 . ' - ' . $element1;
3653
  $new_value = $element;
3654
  }
@@ -3695,36 +3691,36 @@ class FMModelForm_maker {
3695
  break;
3696
  }
3697
  case "type_hidden": {
3698
- $element = isset( $_POST[ $key ] ) ? $_POST[ $key ] : NULL;
3699
  if ( isset( $element ) ) {
3700
  $new_value = $element;
3701
  }
3702
  break;
3703
  }
3704
  case "type_mark_map": {
3705
- $element = isset( $_POST[ 'wdform_' . $key . "_long" . $id ] ) ? $_POST[ 'wdform_' . $key . "_long" . $id ] : NULL;
3706
  if ( isset( $element ) ) {
3707
- $new_value = 'Longitude:' . $element . '<br/>Latitude:' . (isset( $_POST[ 'wdform_' . $key . "_lat" . $id ] ) ? $_POST[ 'wdform_' . $key . "_lat" . $id ] : "");
3708
  }
3709
  break;
3710
  }
3711
  case "type_submitter_mail": {
3712
- $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id ] : NULL;
3713
  if ( isset( $element ) ) {
3714
  $new_value = $element;
3715
  }
3716
  break;
3717
  }
3718
  case "type_time": {
3719
- $hh = isset( $_POST[ 'wdform_' . $key . "_hh" . $id ] ) ? $_POST[ 'wdform_' . $key . "_hh" . $id ] : NULL;
3720
  if ( isset( $hh ) ) {
3721
- $ss = isset( $_POST[ 'wdform_' . $key . "_ss" . $id ] ) ? $_POST[ 'wdform_' . $key . "_ss" . $id ] : NULL;
3722
  if ( isset( $ss ) ) {
3723
- $new_value = $hh . ':' . (isset( $_POST[ 'wdform_' . $key . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $key . "_mm" . $id ] : "") . ':' . $ss;
3724
  } else {
3725
- $new_value = $hh . ':' . (isset( $_POST[ 'wdform_' . $key . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $key . "_mm" . $id ] : "");
3726
  }
3727
- $am_pm = isset( $_POST[ 'wdform_' . $key . "_am_pm" . $id ] ) ? $_POST[ 'wdform_' . $key . "_am_pm" . $id ] : NULL;
3728
  if ( isset( $am_pm ) ) {
3729
  $new_value = $new_value . ' ' . $am_pm;
3730
  }
@@ -3732,51 +3728,51 @@ class FMModelForm_maker {
3732
  break;
3733
  }
3734
  case "type_phone": {
3735
- $element_first = isset( $_POST[ 'wdform_' . $key . "_element_first" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_first" . $id ] : NULL;
3736
  if ( isset( $element_first ) ) {
3737
- $new_value = $element_first . ' ' . (isset( $_POST[ 'wdform_' . $key . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_last" . $id ] : "");
3738
  }
3739
  break;
3740
  }
3741
  case "type_name": {
3742
- $element_first = isset( $_POST[ 'wdform_' . $key . "_element_first" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_first" . $id ] : NULL;
3743
  if ( isset( $element_first ) ) {
3744
- $element_title = isset( $_POST[ 'wdform_' . $key . "_element_title" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_title" . $id ] : NULL;
3745
  if ( isset( $element_title ) ) {
3746
- $new_value = $element_title . ' ' . $element_first . ' ' . (isset( $_POST[ 'wdform_' . $key . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_last" . $id ] : "") . ' ' . (isset( $_POST[ 'wdform_' . $key . "_element_middle" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_middle" . $id ] : "");
3747
  } else {
3748
- $new_value = $element_first . ' ' . (isset( $_POST[ 'wdform_' . $key . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_last" . $id ] : "");
3749
  }
3750
  }
3751
  break;
3752
  }
3753
  case "type_address": {
3754
- $street1 = isset( $_POST[ 'wdform_' . $key . "_street1" . $id ] ) ? $_POST[ 'wdform_' . $key . "_street1" . $id ] : NULL;
3755
  if ( isset( $street1 ) ) {
3756
  $new_value = $street1;
3757
  break;
3758
  }
3759
- $street2 = isset( $_POST[ 'wdform_' . $key . "_street2" . $id ] ) ? $_POST[ 'wdform_' . $key . "_street2" . $id ] : NULL;
3760
  if ( isset( $street2 ) ) {
3761
  $new_value = $street2;
3762
  break;
3763
  }
3764
- $city = isset( $_POST[ 'wdform_' . $key . "_city" . $id ] ) ? $_POST[ 'wdform_' . $key . "_city" . $id ] : NULL;
3765
  if ( isset( $city ) ) {
3766
  $new_value = $city;
3767
  break;
3768
  }
3769
- $state = isset( $_POST[ 'wdform_' . $key . "_state" . $id ] ) ? $_POST[ 'wdform_' . $key . "_state" . $id ] : NULL;
3770
  if ( isset( $state ) ) {
3771
  $new_value = $state;
3772
  break;
3773
  }
3774
- $postal = isset( $_POST[ 'wdform_' . $key . "_postal" . $id ] ) ? $_POST[ 'wdform_' . $key . "_postal" . $id ] : NULL;
3775
  if ( isset( $postal ) ) {
3776
  $new_value = $postal;
3777
  break;
3778
  }
3779
- $country = isset( $_POST[ 'wdform_' . $key . "_country" . $id ] ) ? $_POST[ 'wdform_' . $key . "_country" . $id ] : NULL;
3780
  if ( isset( $country ) ) {
3781
  $new_value = $country;
3782
  break;
@@ -3784,19 +3780,19 @@ class FMModelForm_maker {
3784
  break;
3785
  }
3786
  case "type_date_fields": {
3787
- $day = isset( $_POST[ 'wdform_' . $key . "_day" . $id ] ) ? $_POST[ 'wdform_' . $key . "_day" . $id ] : NULL;
3788
  if ( isset( $day ) ) {
3789
- $new_value = $day . '-' . (isset( $_POST[ 'wdform_' . $key . "_month" . $id ] ) ? $_POST[ 'wdform_' . $key . "_month" . $id ] : "") . '-' . (isset( $_POST[ 'wdform_' . $key . "_year" . $id ] ) ? $_POST[ 'wdform_' . $key . "_year" . $id ] : "");
3790
  }
3791
  break;
3792
  }
3793
  case "type_radio": {
3794
- $element = isset( $_POST[ 'wdform_' . $key . "_other_input" . $id ] ) ? $_POST[ 'wdform_' . $key . "_other_input" . $id ] : NULL;
3795
  if ( isset( $element ) ) {
3796
  $new_value = $element;
3797
  break;
3798
  }
3799
- $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id ] : NULL;
3800
  if ( isset( $element ) ) {
3801
  $new_value = $element;
3802
  }
@@ -3805,23 +3801,23 @@ class FMModelForm_maker {
3805
  case "type_checkbox": {
3806
  $start = -1;
3807
  for ( $j = 0; $j < 100; $j++ ) {
3808
- $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . $j ] : NULL;
3809
  if ( isset( $element ) ) {
3810
  $start = $j;
3811
  break;
3812
  }
3813
  }
3814
  $other_element_id = -1;
3815
- $is_other = isset( $_POST[ 'wdform_' . $key . "_allow_other" . $id ] ) ? $_POST[ 'wdform_' . $key . "_allow_other" . $id ] : "";
3816
  if ( $is_other == "yes" ) {
3817
- $other_element_id = isset( $_POST[ 'wdform_' . $key . "_allow_other_num" . $id ] ) ? $_POST[ 'wdform_' . $key . "_allow_other_num" . $id ] : "";
3818
  }
3819
  if ( $start != -1 ) {
3820
  for ( $j = $start; $j < 100; $j++ ) {
3821
- $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . $j ] : NULL;
3822
  if ( isset( $element ) ) {
3823
  if ( $j == $other_element_id ) {
3824
- $new_value = $new_value . ($mail_mode == 1 ? '<p>' : '') . (isset( $_POST[ 'wdform_' . $key . "_other_input" . $id ] ) ? $_POST[ 'wdform_' . $key . "_other_input" . $id ] : "") . ($mail_mode == 1 ? '</p>' : ', ');
3825
  } else {
3826
  $new_value = $new_value . ($mail_mode == 1 ? '<p>' : '') . $element . ($mail_mode == 1 ? '</p>' : ', ');
3827
  }
@@ -3831,12 +3827,9 @@ class FMModelForm_maker {
3831
  break;
3832
  }
3833
  case "type_paypal_price": {
3834
- $new_value = 0;
3835
- if ( isset( $_POST[ 'wdform_' . $key . "_element_dollars" . $id ] ) ) {
3836
- $new_value = $_POST[ 'wdform_' . $key . "_element_dollars" . $id ];
3837
- }
3838
  if ( isset( $_POST[ 'wdform_' . $key . "_element_cents" . $id ] ) ) {
3839
- $new_value = $new_value . '.' . $_POST[ 'wdform_' . $key . "_element_cents" . $id ];
3840
  }
3841
  $new_value = $new_value . $form_currency;
3842
  break;
@@ -3844,54 +3837,57 @@ class FMModelForm_maker {
3844
  case "type_paypal_price_new": {
3845
  $new_value = '';
3846
  if ( isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) && $_POST[ 'wdform_' . $key . "_element" . $id ] ) {
3847
- $new_value = $form_currency . $_POST[ 'wdform_' . $key . "_element" . $id ];
3848
  }
3849
  $new_value = $new_value;
3850
  break;
3851
  }
3852
  case "type_paypal_select": {
3853
- $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) && $_POST[ 'wdform_' . $key . "_element" . $id ] ? $_POST[ 'wdform_' . $key . "_element" . $id ] : '';
3854
  if ( $element ) {
3855
- $new_value = (isset( $_POST[ 'wdform_' . $key . "_element_label" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_label" . $id ] : "") . ' : ' . $form_currency . $element;
3856
  $is_element_quantity = isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) ? TRUE : FALSE;
3857
- $element_quantity_label = isset( $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] : NULL;
3858
- $element_quantity = (isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $key . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] : NULL;
 
 
 
3859
  if ( $is_element_quantity ) {
3860
  $new_value .= '<br/>' . $element_quantity_label . ': ' . ( !(empty($element_quantity)) ? $element_quantity : 0);
3861
  }
3862
  for ( $k = 0; $k < 50; $k++ ) {
3863
- $temp_val = isset( $_POST[ 'wdform_' . $key . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_property" . $id . $k ] : NULL;
3864
  if ( isset( $temp_val ) ) {
3865
- $new_value .= '<br/>' . (isset( $_POST[ 'wdform_' . $key . "_element_property_label" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_element_property_label" . $id . $k ] : "") . ': ' . $temp_val;
3866
  }
3867
  }
3868
  }
3869
  break;
3870
  }
3871
  case "type_paypal_radio": {
3872
- $new_value = (isset( $_POST[ 'wdform_' . $key . "_element_label" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_label" . $id ] : "") . (isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) && $_POST[ 'wdform_' . $key . "_element" . $id ] ? ' - ' . $form_currency . $_POST[ 'wdform_' . $key . "_element" . $id ] : "");
3873
  $is_element_quantity = isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) ? TRUE : FALSE;
3874
- $element_quantity_label = isset( $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] : NULL;
3875
- $element_quantity = ( isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $key . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] : NULL;
3876
  if ( $is_element_quantity ) {
3877
- $new_value .= '<br/>'. $element_quantity_label . ': ' . ( (!empty($element_quantity)) ? $element_quantity : 0 );
3878
  }
3879
  for ( $k = 0; $k < 50; $k++ ) {
3880
- $temp_val = isset( $_POST[ 'wdform_' . $key . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_property" . $id . $k ] : NULL;
3881
  if ( isset( $temp_val ) ) {
3882
- $new_value .= '<br/>' . (isset( $_POST[ 'wdform_' . $key . "_element_property_label" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_element_property_label" . $id . $k ] : "") . ': ' . $temp_val;
3883
  }
3884
  }
3885
  break;
3886
  }
3887
  case "type_paypal_shipping": {
3888
- $new_value = (isset( $_POST[ 'wdform_' . $key . "_element_label" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_label" . $id ] : "") . (isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) && $_POST[ 'wdform_' . $key . "_element" . $id ] ? ' : ' . $form_currency . $_POST[ 'wdform_' . $key . "_element" . $id ] : "");
3889
  break;
3890
  }
3891
  case "type_paypal_checkbox": {
3892
  $start = -1;
3893
  for ( $j = 0; $j < 100; $j++ ) {
3894
- $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . $j ] : NULL;
3895
  if ( isset( $element ) ) {
3896
  $start = $j;
3897
  break;
@@ -3899,78 +3895,78 @@ class FMModelForm_maker {
3899
  }
3900
  if ( $start != -1 ) {
3901
  for ( $j = $start; $j < 100; $j++ ) {
3902
- $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . $j ] : NULL;
3903
  if ( isset( $element ) ) {
3904
- $new_value = $new_value . ($mail_mode == 1 ? '<p>' : '') . (isset( $_POST[ 'wdform_' . $key . "_element" . $id . $j . "_label" ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . $j . "_label" ] : "") . ' - ' . (isset( $element ) ? $form_currency . ($element == '' ? '0' : $element) : "") . ($mail_mode == 1 ? '</p>' : ', ');
3905
  }
3906
  }
3907
  }
3908
  $is_element_quantity = isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) ? TRUE : FALSE;
3909
- $element_quantity_label = isset( $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] : NULL;
3910
- $element_quantity = (isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $key . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] : NULL;
3911
  if ( $is_element_quantity ) {
3912
- $new_value .= ($mail_mode == 1 ? '<p>' : '') . $element_quantity_label . ': ' . ( (!empty($element_quantity)) ? $element_quantity : 0 ) . ($mail_mode == 1 ? '</p>' : ', ');
3913
  }
3914
  for ( $k = 0; $k < 50; $k++ ) {
3915
- $temp_val = isset( $_POST[ 'wdform_' . $key . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_property" . $id . $k ] : NULL;
3916
  if ( isset( $temp_val ) ) {
3917
- $new_value .= ($mail_mode == 1 ? '<p>' : '') . (isset( $_POST[ 'wdform_' . $key . "_element_property_label" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_element_property_label" . $id . $k ] : "") . ': ' . $temp_val . ($mail_mode == 1 ? '</p>' : ', ');
3918
  }
3919
  }
3920
  break;
3921
  }
3922
  case "type_paypal_total": {
3923
- $element = isset( $_POST[ 'wdform_' . $key . "_paypal_total" . $id ] ) ? $_POST[ 'wdform_' . $key . "_paypal_total" . $id ] : "";
3924
  $new_value = $new_value . $element;
3925
  break;
3926
  }
3927
  case "type_star_rating": {
3928
- $element = isset( $_POST[ 'wdform_' . $key . "_star_amount" . $id ] ) ? $_POST[ 'wdform_' . $key . "_star_amount" . $id ] : NULL;
3929
- $selected = isset( $_POST[ 'wdform_' . $key . "_selected_star_amount" . $id ] ) ? $_POST[ 'wdform_' . $key . "_selected_star_amount" . $id ] : 0;
3930
  if ( isset( $element ) ) {
3931
  $new_value = $new_value . $selected . '/' . $element;
3932
  }
3933
  break;
3934
  }
3935
  case "type_scale_rating": {
3936
- $element = isset( $_POST[ 'wdform_' . $key . "_scale_amount" . $id ] ) ? $_POST[ 'wdform_' . $key . "_scale_amount" . $id ] : NULL;
3937
- $selected = isset( $_POST[ 'wdform_' . $key . "_scale_radio" . $id ] ) ? $_POST[ 'wdform_' . $key . "_scale_radio" . $id ] : 0;
3938
  if ( isset( $element ) ) {
3939
  $new_value = $new_value . $selected . '/' . $element;
3940
  }
3941
  break;
3942
  }
3943
  case "type_spinner": {
3944
- $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id ] : NULL;
3945
  if ( isset( $element ) ) {
3946
  $new_value = $new_value . $element;
3947
  }
3948
  break;
3949
  }
3950
  case "type_slider": {
3951
- $element = isset( $_POST[ 'wdform_' . $key . "_slider_value" . $id ] ) ? $_POST[ 'wdform_' . $key . "_slider_value" . $id ] : NULL;
3952
  if ( isset( $element ) ) {
3953
  $new_value = $new_value . $element;
3954
  }
3955
  break;
3956
  }
3957
  case "type_range": {
3958
- $element0 = isset( $_POST[ 'wdform_' . $key . "_element" . $id . '0' ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . '0' ] : NULL;
3959
- $element1 = isset( $_POST[ 'wdform_' . $key . "_element" . $id . '1' ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . '1' ] : NULL;
3960
  if ( isset( $element0 ) || isset( $element1 ) ) {
3961
  $new_value = $new_value . $element0 . '-' . $element1;
3962
  }
3963
  break;
3964
  }
3965
  case "type_grading": {
3966
- $element = isset( $_POST[ 'wdform_' . $key . "_hidden_item" . $id ] ) ? $_POST[ 'wdform_' . $key . "_hidden_item" . $id ] : "";
3967
  $grading = explode( ":", $element );
3968
  $items_count = sizeof( $grading ) - 1;
3969
  $element = "";
3970
  $total = 0;
3971
  for ( $k = 0; $k < $items_count; $k++ ) {
3972
- $element .= $grading[ $k ] . ":" . (isset( $_POST[ 'wdform_' . $key . "_element" . $id . '_' . $k ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . '_' . $k ] : "") . " ";
3973
- $total += (isset( $_POST[ 'wdform_' . $key . "_element" . $id . '_' . $k ] ) ? (float) $_POST[ 'wdform_' . $key . "_element" . $id . '_' . $k ] : 0);
3974
  }
3975
  $element .= "Total: " . $total;
3976
  if ( isset( $element ) ) {
@@ -3979,10 +3975,10 @@ class FMModelForm_maker {
3979
  break;
3980
  }
3981
  case "type_matrix": {
3982
- $input_type = isset( $_POST[ 'wdform_' . $key . "_input_type" . $id ] ) ? $_POST[ 'wdform_' . $key . "_input_type" . $id ] : "";
3983
- $mat_rows = explode( "***", isset( $_POST[ 'wdform_' . $key . "_hidden_row" . $id ] ) ? $_POST[ 'wdform_' . $key . "_hidden_row" . $id ] : "" );
3984
  $rows_count = sizeof( $mat_rows ) - 1;
3985
- $mat_columns = explode( "***", isset( $_POST[ 'wdform_' . $key . "_hidden_column" . $id ] ) ? $_POST[ 'wdform_' . $key . "_hidden_column" . $id ] : "" );
3986
  $columns_count = sizeof( $mat_columns ) - 1;
3987
  $matrix = "<table>";
3988
  $matrix .= '<tr><td></td>';
@@ -3994,7 +3990,7 @@ class FMModelForm_maker {
3994
  for ( $k = 1; $k <= $rows_count; $k++ ) {
3995
  $matrix .= '<tr><td style="background-color:#BBBBBB; padding:5px;">' . $mat_rows[ $k ] . '</td>';
3996
  if ( $input_type == "radio" ) {
3997
- $mat_radio = isset( $_POST[ 'wdform_' . $key . "_input_element" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_input_element" . $id . $k ] : 0;
3998
  if ( $mat_radio == 0 ) {
3999
  $checked = "";
4000
  $aaa[ 1 ] = "";
@@ -4012,7 +4008,7 @@ class FMModelForm_maker {
4012
  } else {
4013
  if ( $input_type == "checkbox" ) {
4014
  for ( $j = 1; $j <= $columns_count; $j++ ) {
4015
- $checked = isset( $_POST[ 'wdform_' . $key . "_input_element" . $id . $k . '_' . $j ] ) ? $_POST[ 'wdform_' . $key . "_input_element" . $id . $k . '_' . $j ] : 0;
4016
  if ( $checked == 1 ) {
4017
  $checked = "&#10004;";
4018
  } else {
@@ -4023,12 +4019,12 @@ class FMModelForm_maker {
4023
  } else {
4024
  if ( $input_type == "text" ) {
4025
  for ( $j = 1; $j <= $columns_count; $j++ ) {
4026
- $checked = isset( $_POST[ 'wdform_' . $key . "_input_element" . $id . $k . '_' . $j ] ) ? esc_html( $_POST[ 'wdform_' . $key . "_input_element" . $id . $k . '_' . $j ] ) : "";
4027
  $matrix .= '<td style="text-align:center">' . $checked . '</td>';
4028
  }
4029
  } else {
4030
  for ( $j = 1; $j <= $columns_count; $j++ ) {
4031
- $checked = isset( $_POST[ 'wdform_' . $key . "_select_yes_no" . $id . $k . '_' . $j ] ) ? $_POST[ 'wdform_' . $key . "_select_yes_no" . $id . $k . '_' . $j ] : "";
4032
  $matrix .= '<td style="text-align:center">' . $checked . '</td>';
4033
  }
4034
  }
@@ -4100,7 +4096,7 @@ class FMModelForm_maker {
4100
  private function fm_empty_field_validation( $form_id ) {
4101
  WDW_FM_Library(self::PLUGIN)->start_session();
4102
  $hash = $_SESSION['fm_empty_field_validation' . $form_id];
4103
- $value = WDW_FM_Library(self::PLUGIN)->get('fm_empty_field_validation' . $form_id, '');
4104
  if ( !empty($value) && $value === $hash ) {
4105
  return TRUE;
4106
  }
@@ -4131,4 +4127,4 @@ class FMModelForm_maker {
4131
  }
4132
  }
4133
  }
4134
- }
35
  return FALSE;
36
  }
37
 
38
+ $form_preview = (WDW_FM_Library(self::PLUGIN)->get( 'wdform_id') == $id) ? TRUE : FALSE;
39
  if ( !$form_preview && !$row->published ) {
40
  // If the form has been unpublished.
41
  if ( current_user_can( 'manage_options' ) ) {
44
  }
45
  return FALSE;
46
  }
47
+ $theme_id = WDW_FM_Library(self::PLUGIN)->get( 'test_theme');
48
 
49
  if ( $theme_id == '' ) {
50
  $theme_id = $row->theme;
1129
  * @return array|mixed
1130
  */
1131
  public function savedata( $form = 0, $id = 0 ) {
1132
+ $this->fm_ajax_submit = WDFMInstance(self::PLUGIN)->fm_settings['fm_ajax_submit'];
1133
  if ( !isset( $_POST[ "save_or_submit" . $id ] ) || !isset( $_POST[ "counter" . $id ] ) ) {
1134
  // If removed special field.
1135
  return;
1168
  if ( $_POST["save_or_submit" . $id] == 'submit' || $save_progress ) {
1169
  WDW_FM_Library(self::PLUGIN)->start_session();
1170
  if ( isset($_POST["captcha_input"]) ) {
1171
+ $captcha_input = WDW_FM_Library(self::PLUGIN)->get('captcha_input');
1172
  $session_wd_captcha_code = isset($_SESSION[$id . '_wd_captcha_code']) ? $_SESSION[$id . '_wd_captcha_code'] : '-';
1173
  if ( md5($captcha_input) == $session_wd_captcha_code ) {
1174
  $success = TRUE;
1180
  }
1181
  }
1182
  elseif ( isset($_POST["arithmetic_captcha_input"]) ) {
1183
+ $arithmetic_captcha_input = WDW_FM_Library(self::PLUGIN)->get('arithmetic_captcha_input');
1184
  $session_wd_arithmetic_captcha_code = isset($_SESSION[$id . '_wd_arithmetic_captcha_code']) ? $_SESSION[$id . '_wd_arithmetic_captcha_code'] : '-';
1185
  if ( md5($arithmetic_captcha_input) == $session_wd_arithmetic_captcha_code ) {
1186
  $success = TRUE;
1217
  // Build POST request:
1218
  $recaptcha_url = 'https://www.google.com/recaptcha/api/siteverify';
1219
  $recaptcha_secret = isset($fm_settings['private_key']) ? $fm_settings['private_key'] : '';
1220
+ $recaptcha_response = WDW_FM_Library(self::PLUGIN)->get('recaptcha_response' . $id);
1221
  // Make and decode POST request:
1222
  $recaptcha = file_get_contents($recaptcha_url . '?secret=' . $recaptcha_secret . '&response=' . $recaptcha_response);
1223
  $recaptcha = json_decode($recaptcha, TRUE);
1330
  */
1331
  public function select_data_from_db_for_labels( $db_info = '', $label_column = '', $table = '', $where = '', $order_by = '' ) {
1332
  global $wpdb;
1333
+ $where = html_entity_decode($where, ENT_QUOTES);
1334
  $query = "SELECT `" . $label_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
1335
  $db_info = trim($db_info, '[]');
1336
  if ( $db_info ) {
1455
  $label_id = array();
1456
  $label_label = array();
1457
  $label_type = array();
1458
+ $disabled_fields = explode( ',', WDW_FM_Library(self::PLUGIN)->get('disabled_fields' . $id));
1459
  $disabled_fields = array_slice( $disabled_fields, 0, count( $disabled_fields ) - 1 );
1460
  $label_all = explode( '#****#', $form->label_order_current );
1461
  $label_all = array_slice( $label_all, 0, count( $label_all ) - 1 );
1514
  case "type_textarea":
1515
  case "type_send_copy":
1516
  case "type_spinner": {
1517
+ $value = trim( WDW_FM_Library(self::PLUGIN)->get('wdform_' . $i . "_element" . $id ) );
1518
  if ( $required && $value === '' ) {
1519
  $missing_required_field = TRUE;
1520
  }
1521
  break;
1522
  }
1523
  case 'type_password': {
1524
+ $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? md5 ( trim( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id ) ) ) : "";
1525
  if ( $required && $value === '' ) {
1526
  $missing_required_field = TRUE;
1527
  }
1528
  break;
1529
  }
1530
  case "type_submitter_mail": {
1531
+ $value = trim( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id ) );
1532
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1533
  $missing_required_field = TRUE;
1534
  }
1538
  break;
1539
  }
1540
  case "type_date": {
1541
+ $value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id );
1542
+ $date_format = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_date_format" . $id );
1543
  if ( $value ) {
1544
  if ( !$this->fm_validateDate( $value, $date_format ) ) {
1545
  return array( 'error' => true, 'group_id' => $group_id, 'message' => __( "This is not a valid date format.", WDFMInstance(self::PLUGIN)->prefix ) );
1551
  break;
1552
  }
1553
  case "type_date_range": {
1554
+ $value0 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_date_format" . $id . "0" );
1555
+ $value1 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_date_format" . $id . "1" );
1556
  $value = ($value0) . ' - ' . ($value1);
1557
  if ( $required && ( !isset( $_POST[ 'wdform_' . $i . "_element" . $id . "0" ] ) || !isset( $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] ) ) ) {
1558
  $missing_required_field = TRUE;
1560
  break;
1561
  }
1562
  case "type_wdeditor": {
1563
+ $value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_wd_editor" . $id );
1564
  break;
1565
  }
1566
  case "type_mark_map": {
1567
+ $value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_long" . $id ) . '***map***' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_lat" . $id );
1568
  break;
1569
  }
1570
  case "type_date_fields": {
1571
+ $value0 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_day" . $id );
1572
+ $value1 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_month" . $id );
1573
+ $value2 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_year" . $id );
1574
  $value = ($value0) . '-' . ($value1) . '-' . ($value2);
1575
  if ( $required && ( !isset( $_POST[ 'wdform_' . $i . "_day" . $id ] ) || !isset( $_POST[ 'wdform_' . $i . "_month" . $id ] ) || !isset( $_POST[ 'wdform_' . $i . "_year" . $id ] ) ) ) {
1576
  $missing_required_field = TRUE;
1578
  break;
1579
  }
1580
  case "type_time": {
1581
+ $value0 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_hh" . $id );
1582
+ $value1 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_mm" . $id );
1583
+ $value2 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_ss" . $id );
1584
+ $value3 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_am_pm" . $id );
1585
  if ( !$value0 && !$value1 && !$value2 ) {
1586
  $value = "";
1587
  }
1599
  break;
1600
  }
1601
  case "type_phone": {
1602
+ $value0 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_first" . $id );
1603
+ $value1 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_last" . $id );
1604
  $value = ($value0) . ' ' . ($value1);
1605
  if ( $required && ( !isset( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) || !isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ) ) {
1606
  $missing_required_field = TRUE;
1608
  break;
1609
  }
1610
  case "type_name": {
1611
+ $value0 = trim( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_first" . $id ) );
1612
+ $value1 = trim( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_last" . $id ) );
1613
+ $value2 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_title" . $id );
1614
+ $value3 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_middle" . $id );
1615
 
1616
  $value = $value0 . '@@@' . $value1;
1617
  if ( $value2 ) {
1630
  $value = __('This functionality is disabled in demo.', WDFMInstance(self::PLUGIN)->prefix );
1631
  } else {
1632
  if ( isset( $_POST[ 'wdform_' . $i . "_file_url" . $id . '_save' ] ) ) {
1633
+ $file_url = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_file_url" . $id . '_save', NULL, 'esc_url_raw' ) ); /*TODO*/
1634
  if ( isset( $file_url ) ) {
1635
+ $all_files = json_decode( stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_all_files" . $id . '_save', array(), 'esc_url_raw' ) ), TRUE );/*TODO*/
1636
  $value = $file_url;
1637
  }
1638
  } else {
1807
  }
1808
  case 'type_address': {
1809
  $value = '*#*#*#';
1810
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_street1" . $id, NULL );
1811
  if ( isset( $element ) ) {
1812
  $value = $element;
1813
  if ( $required && $value === '' ) {
1815
  }
1816
  break;
1817
  }
1818
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_street2" . $id, NULL );
1819
  if ( isset( $element ) ) {
1820
  $value = $element;
1821
  break;
1822
  }
1823
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_city" . $id, NULL );
1824
  if ( isset( $element ) ) {
1825
  $value = $element;
1826
  break;
1827
  }
1828
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_state" . $id, NULL );
1829
  if ( isset( $element ) ) {
1830
  $value = $element;
1831
  break;
1832
  }
1833
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_postal" . $id, NULL );
1834
  if ( isset( $element ) ) {
1835
  $value = $element;
1836
  break;
1837
  }
1838
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_country" . $id, NULL );
1839
  if ( isset( $element ) ) {
1840
  $value = $element;
1841
  break;
1843
  break;
1844
  }
1845
  case "type_hidden": {
1846
+ $value = WDW_FM_Library(self::PLUGIN)->get( $label_label[ $key ] );
1847
  break;
1848
  }
1849
  case "type_radio": {
1850
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_other_input" . $id, NULL );
1851
  if ( isset( $element ) ) {
1852
  $value = $element;
1853
  break;
1854
  }
1855
+ $value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id );
1856
 
1857
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1858
  $missing_required_field = TRUE;
1863
  $start = -1;
1864
  $value = '';
1865
  for ( $j = 0; $j < 100; $j++ ) {
1866
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . $j, NULL );
1867
  if ( isset( $element ) ) {
1868
  $start = $j;
1869
  break;
1870
  }
1871
  }
1872
  $other_element_id = -1;
1873
+ $is_other = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_allow_other" . $id );
1874
  if ( $is_other == "yes" ) {
1875
+ $other_element_id = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_allow_other_num" . $id);
1876
  }
1877
  if ( $start != -1 ) {
1878
  for ( $j = $start; $j < 100; $j++ ) {
1879
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . $j, NULL );
1880
  if ( isset( $element ) ) {
1881
  if ( $j == $other_element_id ) {
1882
+ $value = $value . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_other_input" . $id ) . '***br***';
1883
  } else {
1884
+ $value = $value . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . $j ) . '***br***';
1885
  }
1886
  }
1887
  }
1893
  break;
1894
  }
1895
  case "type_paypal_price": {
1896
+ $value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_dollars" . $id, 0, 'floatval' );
1897
  $value = (int)preg_replace( '/\D/', '', $value );
1898
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element_dollars" . $id ] ) ) {
1899
  $missing_required_field = TRUE;
1900
  break;
1901
  }
1902
  if ( isset( $_POST[ 'wdform_' . $i . "_element_cents" . $id ] ) ) {
1903
+ $value = $value . '.' . (preg_replace( '/\D/', '', WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_cents" . $id, '', 'floatval' ) ));
1904
  }
1905
  $total += (float)($value);
1906
  $paypal_option = array();
1907
  if ( $value != 0 ) {
1908
+ $quantity = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity" . $id, 1, 'floatval' );
1909
+ if ( $quantity != 0 ) {
1910
+ array_push($paypal['item_name'], $label_label[$key]);
1911
+ array_push($paypal['quantity'], $quantity);
1912
+ array_push($paypal['amount'], $value);
1913
+ $is_amount = TRUE;
1914
+ array_push($paypal['on_os'], $paypal_option);
1915
+ }
1916
  }
1917
  $value = $value . $form_currency;
1918
  break;
1919
  }
1920
  case "type_paypal_price_new": {
1921
+ $value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id, 0, 'floatval' );
1922
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1923
  $missing_required_field = TRUE;
1924
  break;
1926
  $total += (float)($value);
1927
  $paypal_option = array();
1928
  if ( $value != 0 ) {
1929
+ $quantity = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity" . $id, 1, 'floatval' );
1930
+ if ( $quantity != 0 ) {
1931
+ array_push($paypal['item_name'], $label_label[$key]);
1932
+ array_push($paypal['quantity'], $quantity);
1933
+ array_push($paypal['amount'], $value);
1934
+ $is_amount = TRUE;
1935
+ array_push($paypal['on_os'], $paypal_option);
1936
+ }
1937
  }
1938
  $value = $form_currency . $value;
1939
  break;
1941
  case "type_paypal_select": {
1942
  $value = '';
1943
  if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] != '' ) {
1944
+ $value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_label" . $id ) . ' : ' . $form_currency . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id );
1945
  }
1946
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1947
  $missing_required_field = TRUE;
1948
  break;
1949
  }
1950
+ $quantity = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity" . $id, 1, 'intval' );
1951
+ $total += (WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id, 0, 'floatval' ) ) * $quantity;
1952
+ array_push( $paypal[ 'item_name' ], $label_label[ $key ] . ' ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_label" . $id ) );
1953
  array_push( $paypal[ 'quantity' ], $quantity );
1954
+ array_push( $paypal[ 'amount' ], WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id ) );
1955
+ if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] != 0 && $quantity != 0 ) {
1956
  $is_amount = TRUE;
1957
  }
1958
+ $element_quantity = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity" . $id, NULL );
1959
  if ( isset( $element_quantity ) && $value != '' ) {
1960
+ $value .= '***br***' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity_label" . $id ) . ': ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity" . $id ) . '***quantity***';
1961
  }
1962
  $paypal_option = array();
1963
  $paypal_option[ 'on' ] = array();
1964
  $paypal_option[ 'os' ] = array();
1965
  for ( $k = 0; $k < 50; $k++ ) {
1966
+ $temp_val = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_property" . $id . $k, NULL );
1967
  if ( isset( $temp_val ) && $value != '' ) {
1968
+ array_push( $paypal_option[ 'on' ], WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_property_label" . $id . $k ) );
1969
+ array_push( $paypal_option[ 'os' ], WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_property" . $id . $k ) );
1970
+ $value .= '***br***' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_property_label" . $id . $k ) . ': ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_property" . $id . $k ) . '***property***';
1971
  }
1972
  }
1973
  array_push( $paypal[ 'on_os' ], $paypal_option );
1975
  }
1976
  case "type_paypal_radio": {
1977
  $value = '';
1978
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id );
1979
+ if( $element == '' ) {
1980
+ $element = NULL;
1981
+ }
1982
  if ( isset($element) ) {
1983
+ $value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_label" . $id ) . ' : ' . $form_currency . $element;
1984
  }
1985
 
1986
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1987
  $missing_required_field = TRUE;
1988
  break;
1989
  }
1990
+ $quantity = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity" . $id, 1, 'intval' );
1991
+ $total += (WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id, 0, 'floatval') * $quantity);
1992
+ array_push( $paypal[ 'item_name' ], $label_label[ $key ] . ' ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_label" . $id ) );
1993
  array_push( $paypal[ 'quantity' ], $quantity );
1994
+ array_push( $paypal[ 'amount' ], WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id, 0 ) );
1995
+ if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] != 0 && $quantity != 0 ) {
1996
  $is_amount = TRUE;
1997
  }
1998
+ $element_quantity = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity" . $id, NULL );
1999
  if ( isset( $element_quantity ) && $value != '' ) {
2000
+ $value .= '***br***' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity_label" . $id ) . ': ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity" . $id ) . '***quantity***';
2001
  }
2002
  $paypal_option = array();
2003
  $paypal_option[ 'on' ] = array();
2004
  $paypal_option[ 'os' ] = array();
2005
  for ( $k = 0; $k < 50; $k++ ) {
2006
+ $temp_val = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_property" . $id . $k, NULL );
2007
  if ( isset( $temp_val ) && $value != '' ) {
2008
+ array_push( $paypal_option[ 'on' ], WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_property_label" . $id . $k ) );
2009
+ array_push( $paypal_option[ 'os' ], WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_property" . $id . $k ) );
2010
+ $value .= '***br***' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_property_label" . $id . $k ) . ': ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_property" . $id . $k ) . '***property***';
2011
  }
2012
  }
2013
  array_push( $paypal[ 'on_os' ], $paypal_option );
2014
  break;
2015
  }
2016
  case "type_paypal_shipping": {
2017
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id );
2018
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
2019
  $missing_required_field = TRUE;
2020
  break;
2021
  }
2022
  if ( $element ) {
2023
+ $value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_label" . $id ) . ' : ' . $form_currency . $element;
2024
  } else {
2025
  $value = '';
2026
  }
2027
+ $paypal[ 'shipping' ] = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id );
2028
  break;
2029
  }
2030
  case "type_paypal_checkbox": {
2031
  $start = -1;
2032
  $value = '';
2033
  for ( $j = 0; $j < 100; $j++ ) {
2034
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . $j, NULL );
2035
  if ( isset( $element ) ) {
2036
  $start = $j;
2037
  break;
2038
  }
2039
  }
2040
  $other_element_id = -1;
2041
+ $is_other = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_allow_other" . $id );
2042
  if ( $is_other == "yes" ) {
2043
+ $other_element_id = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_allow_other_num" . $id );
2044
  }
2045
  if ( $start != -1 ) {
2046
  for ( $j = $start; $j < 100; $j++ ) {
2047
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . $j, NULL );
2048
  if ( isset( $element ) ) {
2049
  if ( $j == $other_element_id ) {
2050
+ $value = $value . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_other_input" . $id ) . '***br***';
2051
  } else {
2052
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . $j, 0);
2053
+ $value = $value . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . $j . "_label" ) . ' - ' . $form_currency . $element . '***br***';
2054
+ $quantity = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity" . $id, 1, 'intval' );
2055
+ $total += WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . $j, 0, 'float') * (float)($quantity);
2056
+ array_push( $paypal[ 'item_name' ], $label_label[ $key ] . ' ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . $j . "_label" ) );
2057
  array_push( $paypal[ 'quantity' ], $quantity );
2058
+ array_push( $paypal[ 'amount' ], WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . $j, 0, 'float' ) );
2059
+ if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) && $_POST[ 'wdform_' . $i . "_element" . $id . $j ] != 0 && $quantity != 0 ) {
2060
  $is_amount = TRUE;
2061
  }
2062
  $paypal_option = array();
2063
  $paypal_option[ 'on' ] = array();
2064
  $paypal_option[ 'os' ] = array();
2065
  for ( $k = 0; $k < 50; $k++ ) {
2066
+ $temp_val = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_property" . $id . $k, NULL );
2067
  if ( isset( $temp_val ) ) {
2068
+ array_push( $paypal_option[ 'on' ], WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_property_label" . $id . $k ) );
2069
+ array_push( $paypal_option[ 'os' ], WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_property" . $id . $k ) );
2070
  }
2071
  }
2072
  array_push( $paypal[ 'on_os' ], $paypal_option );
2073
  }
2074
  }
2075
  }
2076
+ $element_quantity = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity" . $id, NULL );
2077
  if ( isset( $element_quantity ) ) {
2078
+ $value .= WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity_label" . $id ) . ': ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity" . $id ) . '***quantity***';
2079
  }
2080
  for ( $k = 0; $k < 50; $k++ ) {
2081
+ $temp_val = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_property" . $id . $k, NULL );
2082
  if ( isset( $temp_val ) ) {
2083
+ $value .= '***br***' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_property_label" . $id . $k ) . ': ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_property" . $id . $k ) . '***property***';
2084
  }
2085
  }
2086
  }
2087
+ if ( $required && !isset( $_POST['wdform_' . $i . "_element" . $id ] ) ) {
2088
  $missing_required_field = TRUE;
2089
  }
2090
  break;
2091
  }
2092
  case "type_star_rating": {
2093
+ $value0 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_selected_star_amount" . $id, 0, 'intval' );
2094
+ $value1 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_star_amount" . $id );
2095
  $value = $value0 . '/' . $value1;
2096
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] ) ) {
2097
  $missing_required_field = TRUE;
2099
  break;
2100
  }
2101
  case "type_scale_rating": {
2102
+ $value0 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_scale_radio" . $id, 0, 'intval');
2103
+ $value1 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_scale_amount" . $id );
2104
  $value = $value0 . '/' . $value1;
2105
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] ) ) {
2106
  $missing_required_field = TRUE;
2108
  break;
2109
  }
2110
  case "type_slider": {
2111
+ $value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_slider_value" . $id );
2112
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_slider_value" . $id ] ) ) {
2113
  $missing_required_field = TRUE;
2114
  }
2115
  break;
2116
  }
2117
  case "type_range": {
2118
+ $value0 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . '0' );
2119
+ $value1 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . '1' );
2120
  $value = $value0 . '-' . $value1;
2121
  if ( $required && ( !isset( $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] ) || !isset( $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] ) ) ) {
2122
  $missing_required_field = TRUE;
2125
  }
2126
  case "type_grading": {
2127
  $value = "";
2128
+ $items = explode( ":", WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_hidden_item" . $id ) );
2129
  for ( $k = 0; $k < sizeof( $items ) - 1; $k++ ) {
2130
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . '_' . $k );
2131
  $value .= $element . ':';
2132
  }
2133
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
2134
  $missing_required_field = TRUE;
2135
  }
2136
+ $value .= WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_hidden_item" . $id ) . '***grading***';
2137
  break;
2138
  }
2139
  case "type_matrix": {
2140
+ $rows_of_matrix = explode( "***", WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_hidden_row" . $id ) );
2141
  $rows_count = sizeof( $rows_of_matrix ) - 1;
2142
  $isset = FALSE;
2143
+ $column_of_matrix = explode( "***", WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_hidden_column" . $id ) );
2144
  $columns_count = sizeof( $column_of_matrix ) - 1;
2145
  if ( isset( $_POST[ 'wdform_' . $i . "_input_type" . $id ] ) && $_POST[ 'wdform_' . $i . "_input_type" . $id ] == "radio" ) {
2146
  $input_value = "";
2147
  for ( $k = 1; $k <= $rows_count; $k++ ) {
2148
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_input_element" . $id . $k, 0 );
2149
  if ( $element ) {
2150
  $isset = TRUE;
2151
  }
2156
  $input_value = "";
2157
  for ( $k = 1; $k <= $rows_count; $k++ ) {
2158
  for ( $j = 1; $j <= $columns_count; $j++ ) {
2159
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j, 0 );
2160
  if ( $element ) {
2161
  $isset = TRUE;
2162
  }
2168
  $input_value = "";
2169
  for ( $k = 1; $k <= $rows_count; $k++ ) {
2170
  for ( $j = 1; $j <= $columns_count; $j++ ) {
2171
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j );
2172
  if ( $element ) {
2173
  $isset = TRUE;
2174
  }
2180
  $input_value = "";
2181
  for ( $k = 1; $k <= $rows_count; $k++ ) {
2182
  for ( $j = 1; $j <= $columns_count; $j++ ) {
2183
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_select_yes_no" . $id . $k . '_' . $j );
2184
  if ( $element ) {
2185
  $isset = TRUE;
2186
  }
2191
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
2192
  $missing_required_field = TRUE;
2193
  }
2194
+ $value = $rows_count . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_hidden_row" . $id ) . '***' . $columns_count . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_hidden_column" . $id ) . '***' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_input_type" . $id ) . '***' . $input_value . '***matrix***';
2195
  break;
2196
  }
2197
  }
2277
  $fvals[ '{' . $i . '}' ] = '';
2278
  }
2279
  }
2280
+
2281
  $user_fields = array(
2282
  "subid" => $group_id,
2283
  "ip" => $ip,
2352
  if ( $is_amount ) {
2353
  $tax = $form->tax;
2354
  $currency = $form->payment_currency;
2355
+ $business = trim($form->paypal_email);
2356
  $ip = $_SERVER[ 'REMOTE_ADDR' ];
2357
  $total2 = round( $total, 2 );
2358
 
2418
  }
2419
  $i = 0;
2420
  foreach ( $paypal[ 'item_name' ] as $pkey => $pitem_name ) {
2421
+ if ( $paypal[ 'amount' ][ $pkey ] && $paypal[ 'quantity' ][ $pkey ] ) {
2422
  $i++;
2423
  $str = $str . "&item_name_" . $i . "=" . urlencode( $pitem_name );
2424
  $str = $str . "&amount_" . $i . "=" . $paypal[ 'amount' ][ $pkey ];
2507
  foreach ( $send_tos as $index => $send_to ) {
2508
  $send_to = str_replace( '*', '', $send_to );
2509
 
2510
+ $recipient = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $send_to . "_element" . $id, NULL );
2511
  if ( $recipient ) {
2512
  $user_email = $recipient;
2513
  break;
2758
  array_push( $label_label, $label_order_each[0] );
2759
  array_push( $label_type, $label_order_each[1] );
2760
  }
2761
+ $disabled_fields = explode( ',', WDW_FM_Library(self::PLUGIN)->get('disabled_fields' . $id) );
2762
  $disabled_fields = array_slice( $disabled_fields, 0, count( $disabled_fields ) - 1 );
2763
  $list = '<table cellpadding="3" cellspacing="0" style="width: 600px; border-bottom: 1px solid #CCC; border-right: 1px solid #CCC;">';
2764
  $list_text_mode = '';
2777
  case "type_country":
2778
  case "type_number":
2779
  case "type_phone_new": {
2780
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id, NULL, 'esc_html' );
2781
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2782
  $list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . '>' . $element . '</td></tr>';
2783
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2785
  break;
2786
  }
2787
  case 'type_password': {
2788
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id, NULL, 'esc_html' );
2789
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2790
  $list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . '>' . __('Your chosen password.') . '</td></tr>';
2791
  $list_text_mode = $list_text_mode . $element_label . ' - ' . __('Your chosen password.') . "\r\n";
2793
  break;
2794
  }
2795
  case "type_date_range": {
2796
+ $element0 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . "0", NULL, 'esc_html' );
2797
+ $element1 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . "1", NULL, 'esc_html' );
2798
  if ( isset( $element0 ) && $this->empty_field( $element0, $row->mail_emptyfields ) && $this->empty_field( $element1, $row->mail_emptyfields ) ) {
2799
  $element = $element0 . ' - ' . $element1;
2800
  $list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . '>' . $element . '</td></tr>';
2803
  break;
2804
  }
2805
  case 'type_textarea': {
2806
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id, NULL, 'wpautop' );
2807
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2808
  $list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . '>' . $element . '</td></tr>';
2809
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2811
  break;
2812
  }
2813
  case "type_hidden": {
2814
+ $element = WDW_FM_Library(self::PLUGIN)->get( $element_label, NULL, 'esc_html' );
2815
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2816
  $list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . '>' . $element . '</td></tr>';
2817
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2819
  break;
2820
  }
2821
  case "type_mark_map": {
2822
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_long" . $id, NULL, 'esc_html' );
2823
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2824
+ $list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . '>Longitude:' . $element . '<br/>Latitude:' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_lat" . $id, "", 'esc_html') . '</td></tr>';
2825
+ $list_text_mode = $list_text_mode . $element_label . ' - Longitude:' . $element . ' Latitude:' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_lat" . $id, "", 'esc_html') . "\r\n";
2826
  }
2827
  break;
2828
  }
2829
+ case "type_submitter_mail":
2830
+ case "type_spinner": {
2831
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id, NULL, 'esc_html' );
2832
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2833
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
2834
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2836
  break;
2837
  }
2838
  case "type_time": {
2839
+ $hh = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_hh" . $id, NULL, 'esc_html' );
2840
+ if ( isset( $hh ) && ($this->empty_field( $hh, $row->mail_emptyfields ) || $this->empty_field( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_mm" . $id ), $row->mail_emptyfields ) || $this->empty_field( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_ss" . $id ), $row->mail_emptyfields )) ) {
2841
+ $ss = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_ss" . $id, NULL, 'esc_html' );
2842
  if ( isset( $ss ) ) {
2843
+ $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $hh . ':' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_mm" . $id, '', 'esc_html' ) . ':' . $ss;
2844
+ $list_text_mode = $list_text_mode . $element_label . ' - ' . $hh . ':' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_mm" . $id, "", 'esc_html' ) . ':' . $ss;
2845
  } else {
2846
+ $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $hh . ':' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_mm" . $id, "", 'esc_html' );
2847
+ $list_text_mode = $list_text_mode . $element_label . ' - ' . $hh . ':' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_mm" . $id, "", 'esc_html' );
2848
  }
2849
+ $am_pm = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_am_pm" . $id, NULL, 'esc_html' );
2850
  if ( isset( $am_pm ) ) {
2851
  $list = $list . ' ' . $am_pm . '</td></tr>';
2852
  $list_text_mode = $list_text_mode . $am_pm . "\r\n";
2858
  break;
2859
  }
2860
  case "type_phone": {
2861
+ $element_first = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_first" . $id, NULL, 'esc_html' );
2862
  if ( isset( $element_first ) && $this->empty_field( $element_first, $row->mail_emptyfields ) ) {
2863
+ $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element_first . ' ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_last" . $id, "", 'esc_html' ) . '</td></tr>';
2864
+ $list_text_mode = $list_text_mode . $element_label . ' - ' . $element_first . ' ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_last" . $id, "", 'esc_html' ) . "\r\n";
2865
  }
2866
  break;
2867
  }
2868
  case "type_name": {
2869
+ $element_first = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_first" . $id, NULL, 'esc_html' );
2870
  if ( isset( $element_first ) ) {
2871
+ $element_title = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_title" . $id, NULL, 'esc_html' );
2872
+ $element_middle = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_middle" . $id, NULL, 'esc_html' );
2873
+ if ( (isset( $element_title ) || isset( $element_middle )) && ($this->empty_field( $element_title, $row->mail_emptyfields ) || $this->empty_field( $element_first, $row->mail_emptyfields ) || $this->empty_field( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_last" . $id ), $row->mail_emptyfields ) || $this->empty_field( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_middle" . $id ), $row->mail_emptyfields )) ) {
2874
+ $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_title" . $id, '', 'esc_html' ) . ' ' . $element_first . ' ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_last" . $id, "", 'esc_html') . ' ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_middle" . $id, "", 'esc_html' ) . '</td></tr>';
2875
+ $list_text_mode = $list_text_mode . $element_label . ' - ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_title" . $id, '', 'esc_html' ) . ' ' . $element_first . ' ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_last" . $id, "", 'esc_html' ) . ' ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_middle" . $id, "", 'esc_html' ) . "\r\n";
2876
  } else {
2877
+ if ( $this->empty_field( $element_first, $row->mail_emptyfields ) || $this->empty_field( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_last" . $id ), $row->mail_emptyfields ) ) {
2878
+ $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element_first . ' ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_last" . $id, "", 'esc_html' ) . '</td></tr>';
2879
+ $list_text_mode = $list_text_mode . $element_label . ' - ' . $element_first . ' ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_last" . $id, "", 'esc_html' ) . "\r\n";
2880
  }
2881
  }
2882
  }
2883
  break;
2884
  }
2885
  case "type_address": {
2886
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_street1" . $id, NULL, 'esc_html' );
2887
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2888
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $label_order_original[ $i ] . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
2889
  $list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
2890
  break;
2891
  }
2892
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_street2" . $id, NULL, 'esc_html' );
2893
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2894
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $label_order_original[ $i ] . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
2895
  $list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
2896
  break;
2897
  }
2898
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_city" . $id, NULL, 'esc_html' );
2899
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2900
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $label_order_original[ $i ] . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
2901
  $list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
2902
  break;
2903
  }
2904
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_state" . $id, NULL, 'esc_html' );
2905
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2906
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $label_order_original[ $i ] . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
2907
  $list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
2908
  break;
2909
  }
2910
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_postal" . $id, NULL, 'esc_html' );
2911
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2912
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $label_order_original[ $i ] . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
2913
  $list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
2914
  break;
2915
  }
2916
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_country" . $id, NULL, 'esc_html' );
2917
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2918
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $label_order_original[ $i ] . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
2919
  $list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
2922
  break;
2923
  }
2924
  case "type_date_fields": {
2925
+ $day = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_day" . $id, NULL, 'esc_html' );
2926
+ $month = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_month" . $id, NULL, 'esc_html' );
2927
+ $year = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_year" . $id, NULL, 'esc_html' );
2928
  if ( isset( $day ) && $this->empty_field( $day, $row->mail_emptyfields ) ) {
2929
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . (($day || $month || $year) ? $day . '-' . $month . '-' . $year : '') . '</td></tr>';
2930
  $list_text_mode = $list_text_mode . $element_label . (($day || $month || $year) ? $day . '-' . $month . '-' . $year : '') . "\r\n";
2932
  break;
2933
  }
2934
  case "type_radio": {
2935
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_other_input" . $id, NULL, 'esc_html' );
2936
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2937
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
2938
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2939
  break;
2940
  }
2941
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id, NULL, 'esc_html' );
2942
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2943
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
2944
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2948
  case "type_checkbox": {
2949
  $start = -1;
2950
  for ( $j = 0; $j < 100; $j++ ) {
2951
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . $j, NULL, 'esc_html' );
2952
  if ( isset( $element ) ) {
2953
  $start = $j;
2954
  break;
2955
  }
2956
  }
2957
  $other_element_id = -1;
2958
+ $is_other = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_allow_other" . $id, "", 'esc_html' );
2959
  if ( $is_other == "yes" ) {
2960
+ $other_element_id = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_allow_other_num" . $id, "", 'esc_html' );
2961
  }
2962
  if ( $start != -1 || ($start == -1 && $row->mail_emptyfields) ) {
2963
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >';
2965
  }
2966
  if ( $start != -1 ) {
2967
  for ( $j = $start; $j < 100; $j++ ) {
2968
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . $j, NULL, 'esc_html' );
2969
  if ( isset( $element ) ) {
2970
  if ( $j == $other_element_id ) {
2971
+ $list = $list . '<p>' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_other_input" . $id, "", 'esc_html' ) . '</p>';
2972
+ $list_text_mode = $list_text_mode . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_other_input" . $id, "", 'esc_html' ) . ', ';
2973
  } else {
2974
+ $list = $list . '<p>' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . $j, "", 'esc_html' ) . '</p>';
2975
+ $list_text_mode = $list_text_mode . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . $j, "", 'esc_html' ) . ', ';
2976
  }
2977
  }
2978
  }
2984
  break;
2985
  }
2986
  case "type_paypal_price": {
2987
+ $value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_dollars" . $id, '0', 'esc_html' );
 
 
 
2988
  if ( isset( $_POST[ 'wdform_' . $i . "_element_cents" . $id ] ) && $_POST[ 'wdform_' . $i . "_element_cents" . $id ] ) {
2989
+ $value = $value . '.' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_cents" . $id, 0, 'esc_html' );
2990
  }
2991
  if ( $this->empty_field( $value, $row->mail_emptyfields ) && $value != '.' ) {
2992
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $value . $form_currency . '</td></tr>';
2995
  break;
2996
  }
2997
  case "type_paypal_price_new": {
2998
+ $value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id, '0', 'esc_html' );
 
 
 
2999
  if ( $this->empty_field( $value, $row->mail_emptyfields ) && $value != '.' ) {
3000
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . ($value == '' ? '' : $form_currency) . $value . '</td></tr>';
3001
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $value . $form_currency . "\r\n";
3005
  case "type_paypal_select": {
3006
  $value = '';
3007
  if ( isset( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] != '' ) {
3008
+ $value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_label" . $id, '', 'esc_html' ) . ' : ' . $form_currency . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id, '', 'esc_html');
3009
  }
3010
  $is_element_quantity = isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? TRUE : FALSE;
3011
+ $element_quantity_label = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity_label" . $id, NULL, 'esc_html' );
3012
+ $element_quantity = (isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) && WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity" . $id )) ? WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity" . $id ) : NULL;
3013
  if ( $value != '' ) {
3014
  if ( $is_element_quantity ) {
3015
+ $value .= '<br/>' . ( !empty($element_quantity_label) ? $element_quantity_label : NULL ) . ': ' . (($element_quantity == NULL) ? 0 : $element_quantity);
3016
  }
3017
  for ( $k = 0; $k < 50; $k++ ) {
3018
+ $temp_val = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_property" . $id . $k, NULL, 'esc_html' );
3019
  if ( isset( $temp_val ) ) {
3020
+ $value .= '<br/>' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_property_label" . $id . $k, "", 'esc_html' ) . ': ' . $temp_val;
3021
  }
3022
  }
3023
  }
3029
  }
3030
  case "type_paypal_radio": {
3031
  $value = '';
3032
+ if ( isset( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] != '' ) {
3033
+ $value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_label" . $id, '', 'esc_html' ) . ' : ' . $form_currency . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id, "", 'esc_html' );
3034
  $is_element_quantity = isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? TRUE : FALSE;
3035
+ $element_quantity_label = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity_label" . $id, NULL, 'esc_html' );
3036
+ $element_quantity = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity" . $id, 0, 'esc_html' );
3037
  if ( !empty($is_element_quantity) ) {
3038
+ $value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
3039
  }
3040
  for ( $k = 0; $k < 50; $k++ ) {
3041
+ $temp_val = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_property" . $id . $k, NULL, 'esc_html' );
3042
  if ( isset( $temp_val ) ) {
3043
+ $value .= '<br/>' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_property_label" . $id . $k, "", 'esc_html' ) . ': ' . $temp_val;
3044
  }
3045
  }
3046
  }
3051
  break;
3052
  }
3053
  case "type_paypal_shipping": {
3054
+ if ( isset( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] != '' ) {
3055
+ $value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_label" . $id, '', 'esc_html' ) . ' : ' . $form_currency . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id, "", 'esc_html' );
3056
  if ( $this->empty_field( $value, $row->mail_emptyfields ) ) {
3057
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $value . '</td></tr>';
3058
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $value . "\r\n";
3065
  case "type_paypal_checkbox": {
3066
  $start = -1;
3067
  for ( $j = 0; $j < 300; $j++ ) {
3068
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . $j, NULL, 'esc_html' );
3069
  if ( isset( $element ) ) {
3070
  $start = $j;
3071
  break;
3077
  }
3078
  if ( $start != -1 ) {
3079
  for ( $j = $start; $j < 300; $j++ ) {
3080
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . $j, NULL, 'esc_html' );
3081
  if ( isset( $element ) ) {
3082
+ $list = $list . '<p>' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . $j . "_label", "", 'esc_html' ) . ' - ' . $form_currency . ($element == '' ? '0' : $element) . '</p>';
3083
+ $list_text_mode = $list_text_mode . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . $j . "_label", "", 'esc_html' ) . ' - ' . ($element == '' ? '0' . $form_currency : $element) . $form_currency . ', ';
3084
  }
3085
  }
3086
  }
3087
  if ( $start != -1 ) {
3088
  $is_element_quantity = isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? TRUE : FALSE;
3089
+ $element_quantity_label = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity_label" . $id, NULL, 'esc_html' );
3090
+ $element_quantity = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_quantity" . $id, 0, 'esc_html' );
3091
  if ( $is_element_quantity ) {
3092
+ $list = $list . $element_quantity_label . ': ' . $element_quantity;
3093
+ $list_text_mode = $list_text_mode . $element_quantity_label . ': ' . $element_quantity . ', ';
3094
  }
3095
  }
3096
  if ( $start != -1 ) {
3097
  for ( $k = 0; $k < 50; $k++ ) {
3098
+ $temp_val = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_property_value" . $id . $k, NULL, 'esc_html' );
3099
  if ( isset( $temp_val ) ) {
3100
+ $list = $list . '<p>' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_property_label" . $id . $k, "", 'esc_html' ) . ': ' . $temp_val . '</p>';
3101
+ $list_text_mode = $list_text_mode . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element_property_label" . $id . $k, "", 'esc_html' ) . ': ' . $temp_val . ', ';
3102
  }
3103
  }
3104
  }
3109
  break;
3110
  }
3111
  case "type_paypal_total": {
3112
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_paypal_total" . $id, "", 'esc_html' );
3113
  if ( $this->empty_field( $element, $row->mail_emptyfields ) ) {
3114
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
3115
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
3117
  break;
3118
  }
3119
  case "type_star_rating": {
3120
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_star_amount" . $id, NULL, 'esc_html' );
3121
+ $selected = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_selected_star_amount" . $id, 0, 'esc_html' );
3122
  if ( isset( $element ) && $this->empty_field( $selected, $row->mail_emptyfields ) ) {
3123
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $selected . '/' . $element . '</td></tr>';
3124
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $selected . '/' . $element . "\r\n";
3126
  break;
3127
  }
3128
  case "type_scale_rating": {
3129
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_scale_amount" . $id, NULL, 'esc_html' );
3130
+ $selected = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_scale_radio" . $id, 0, 'esc_html' );
3131
  if ( isset( $element ) && $this->empty_field( $selected, $row->mail_emptyfields ) ) {
3132
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $selected . '/' . $element . '</td></tr>';
3133
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $selected . '/' . $element . "\r\n";
3134
  }
3135
  break;
3136
  }
 
 
 
 
 
 
 
 
3137
  case "type_slider": {
3138
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_slider_value" . $id, NULL, 'esc_html' );
3139
  if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
3140
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
3141
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
3143
  break;
3144
  }
3145
  case "type_range": {
3146
+ $element0 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . '0', NULL, 'esc_html' );
3147
+ $element1 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . '1', NULL, 'esc_html' );
3148
  if ( (isset( $element0 ) && $this->empty_field( $element0, $row->mail_emptyfields )) || (isset( $element1 ) && $this->empty_field( $element1, $row->mail_emptyfields )) ) {
3149
  $list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >From: ' . $element0 . '<span style="margin-left:6px"> To </span>:' . $element1 . '</td></tr>';
3150
  $list_text_mode = $list_text_mode . $element_label . ' - From: ' . $element0 . ' To: ' . $element1 . "\r\n";
3152
  break;
3153
  }
3154
  case "type_grading": {
3155
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_hidden_item" . $id, "", 'esc_html' );
3156
  $grading = explode( ":", $element );
3157
  $items_count = sizeof( $grading ) - 1;
3158
  $element = "";
3159
  $total = 0;
3160
  $form_empty_field = 0;
3161
  for ( $k = 0; $k < $items_count; $k++ ) {
3162
+ $element .= $grading[ $k ] . ": " . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . '_' . $k, "", 'esc_html' ) . " ";
3163
+ $total += WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_element" . $id . '_' . $k, 0, 'floatval');
3164
  if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] ) ) {
3165
  $form_empty_field = 1;
3166
  }
3174
  }
3175
  case "type_matrix": {
3176
  $form_empty_field = 0;
3177
+ $input_type = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_input_type" . $id, "", 'esc_html' );
3178
+ $mat_rows = explode( "***", WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_hidden_row" . $id, "", 'esc_html' ) );
3179
  $rows_count = sizeof( $mat_rows ) - 1;
3180
+ $mat_columns = explode( "***", WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_hidden_column" . $id, "", 'esc_html' ) );
3181
  $columns_count = sizeof( $mat_columns ) - 1;
3182
  $matrix = '<table cellpadding="3" cellspacing="0" style="width: 100%; border-bottom: 1px solid #CCC; border-right: 1px solid #CCC;">';
3183
  $matrix .= '<tr><td ' . $td_style . '></td>';
3189
  for ( $k = 1; $k <= $rows_count; $k++ ) {
3190
  $matrix .= '<tr><td style="border-top: 1px solid #CCC; border-left: 1px solid #CCC; padding: 10px; color: #3D3D3D; background-color: #EEEEEE; padding: 5px;">' . $mat_rows[ $k ] . '</td>';
3191
  if ( $input_type == "radio" ) {
3192
+ $mat_radio = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_input_element" . $id . $k, 0, 'esc_html' );
3193
  if ( $mat_radio == 0 ) {
3194
  $checked = "";
3195
  $aaa[ 1 ] = "";
3209
  } else {
3210
  if ( $input_type == "checkbox" ) {
3211
  for ( $j = 1; $j <= $columns_count; $j++ ) {
3212
+ $checked = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j, "", 'esc_html' );
3213
  if ( $checked == 1 ) {
3214
  $form_empty_field = 1;
3215
  $checked = "checked";
3222
  } else {
3223
  if ( $input_type == "text" ) {
3224
  for ( $j = 1; $j <= $columns_count; $j++ ) {
3225
+ $checked = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j, "", 'esc_html' );
3226
  if ( $checked ) {
3227
  $form_empty_field = 1;
3228
  }
3230
  }
3231
  } else {
3232
  for ( $j = 1; $j <= $columns_count; $j++ ) {
3233
+ $checked = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $i . "_select_yes_no" . $id . $k . '_' . $j, "", 'esc_html' );
3234
  if ( $checked ) {
3235
  $form_empty_field = 1;
3236
  }
3353
  if ( $row->sendemail && $row->send_to || (has_action('fm_set_params_frontend_init') && WDFMInstance(self::PLUGIN)->is_free != 2) ) {
3354
  $body = $new_script;
3355
  $send_tos = explode( '**', $row->send_to );
3356
+ $send_copy = WDW_FM_Library(self::PLUGIN)->get( "wdform_send_copy_" . $id, NULL, 'esc_html' );
3357
  if ( isset( $send_copy ) ) {
3358
  $send = TRUE;
3359
  }
3389
  $body = str_replace(array('%Verification link%', '{verificationlink}'), $ver_link, $new_script);
3390
  }
3391
 
3392
+ $recipient = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $send_to . "_element" . $id, NULL, 'esc_html' );
3393
  if ($recipient) {
3394
  if ($row->mail_attachment_user) {
3395
  $remove_parrent_array_user = new RecursiveIteratorIterator(new RecursiveArrayIterator($attachment_user));
3499
  $fromname = get_bloginfo('name');
3500
  }
3501
  if ( $row->from_mail ) {
3502
+ $header_arr[ 'from' ] = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $row->from_mail . "_element" . $id, $from_mail, 'esc_html' );
3503
  }
3504
  $header_arr['from_name'] = $fromname;
3505
  $header_arr['content_type'] = $content_type;
3506
  $header_arr['charset'] = 'UTF-8';
3507
+ $header_arr['reply_to'] = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $row->reply_to . "_element" . $id, $row->reply_to, 'esc_html' );
3508
  $header_arr['cc'] = $row->mail_cc;
3509
  $header_arr['bcc'] = $row->mail_bcc;
3510
  $admin_body = $new_script;
3633
  case "type_own_select":
3634
  case "type_country":
3635
  case "type_number": {
3636
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id, NULL, 'esc_html' );
3637
  if ( isset( $element ) ) {
3638
  if ( 'type_textarea' == $type ) {
3639
  $element = nl2br($element);
3643
  break;
3644
  }
3645
  case 'type_date_range' : {
3646
+ $element0 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id . "0", NULL, 'esc_html' );
3647
+ $element1 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id . "1", NULL, 'esc_html' );
3648
  $element = $element0 . ' - ' . $element1;
3649
  $new_value = $element;
3650
  }
3691
  break;
3692
  }
3693
  case "type_hidden": {
3694
+ $element = WDW_FM_Library(self::PLUGIN)->get( $key, NULL, 'esc_html' );
3695
  if ( isset( $element ) ) {
3696
  $new_value = $element;
3697
  }
3698
  break;
3699
  }
3700
  case "type_mark_map": {
3701
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_long" . $id, NULL, 'esc_html' );
3702
  if ( isset( $element ) ) {
3703
+ $new_value = 'Longitude:' . $element . '<br/>Latitude:' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_lat" . $id, "", 'esc_html' );
3704
  }
3705
  break;
3706
  }
3707
  case "type_submitter_mail": {
3708
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id, NULL, 'esc_html' );
3709
  if ( isset( $element ) ) {
3710
  $new_value = $element;
3711
  }
3712
  break;
3713
  }
3714
  case "type_time": {
3715
+ $hh = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_hh" . $id, NULL, 'esc_html' );
3716
  if ( isset( $hh ) ) {
3717
+ $ss = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_ss" . $id, NULL, 'esc_html' );
3718
  if ( isset( $ss ) ) {
3719
+ $new_value = $hh . ':' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_mm" . $id, "", 'esc_html' ) . ':' . $ss;
3720
  } else {
3721
+ $new_value = $hh . ':' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_mm" . $id, "", 'esc_html' );
3722
  }
3723
+ $am_pm = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_am_pm" . $id, NULL, 'esc_html' );
3724
  if ( isset( $am_pm ) ) {
3725
  $new_value = $new_value . ' ' . $am_pm;
3726
  }
3728
  break;
3729
  }
3730
  case "type_phone": {
3731
+ $element_first = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_first" . $id, NULL, 'esc_html' );
3732
  if ( isset( $element_first ) ) {
3733
+ $new_value = $element_first . ' ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_last" . $id, "", 'esc_html' );
3734
  }
3735
  break;
3736
  }
3737
  case "type_name": {
3738
+ $element_first = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_first" . $id, NULL, 'esc_html' );
3739
  if ( isset( $element_first ) ) {
3740
+ $element_title = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_title" . $id, NULL, 'esc_html' );
3741
  if ( isset( $element_title ) ) {
3742
+ $new_value = $element_title . ' ' . $element_first . ' ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_last" . $id, "", 'esc_html' ) . ' ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_middle" . $id, "", 'esc_html' );
3743
  } else {
3744
+ $new_value = $element_first . ' ' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_last" . $id, "", 'esc_html' );
3745
  }
3746
  }
3747
  break;
3748
  }
3749
  case "type_address": {
3750
+ $street1 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_street1" . $id, NULL, 'esc_html' );
3751
  if ( isset( $street1 ) ) {
3752
  $new_value = $street1;
3753
  break;
3754
  }
3755
+ $street2 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_street2" . $id, NULL, 'esc_html' );
3756
  if ( isset( $street2 ) ) {
3757
  $new_value = $street2;
3758
  break;
3759
  }
3760
+ $city = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_city" . $id, NULL, 'esc_html' );
3761
  if ( isset( $city ) ) {
3762
  $new_value = $city;
3763
  break;
3764
  }
3765
+ $state = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_state" . $id, NULL, 'esc_html' );
3766
  if ( isset( $state ) ) {
3767
  $new_value = $state;
3768
  break;
3769
  }
3770
+ $postal = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_postal" . $id, NULL, 'esc_html' );
3771
  if ( isset( $postal ) ) {
3772
  $new_value = $postal;
3773
  break;
3774
  }
3775
+ $country = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_country" . $id, NULL, 'esc_html' );
3776
  if ( isset( $country ) ) {
3777
  $new_value = $country;
3778
  break;
3780
  break;
3781
  }
3782
  case "type_date_fields": {
3783
+ $day = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_day" . $id, NULL, 'esc_html' );
3784
  if ( isset( $day ) ) {
3785
+ $new_value = $day . '-' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_month" . $id, "", 'esc_html' ) . '-' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_year" . $id, "", 'esc_html' );
3786
  }
3787
  break;
3788
  }
3789
  case "type_radio": {
3790
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_other_input" . $id, NULL, 'esc_html' );
3791
  if ( isset( $element ) ) {
3792
  $new_value = $element;
3793
  break;
3794
  }
3795
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id, NULL, 'esc_html' );
3796
  if ( isset( $element ) ) {
3797
  $new_value = $element;
3798
  }
3801
  case "type_checkbox": {
3802
  $start = -1;
3803
  for ( $j = 0; $j < 100; $j++ ) {
3804
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id . $j, NULL, 'esc_html' );
3805
  if ( isset( $element ) ) {
3806
  $start = $j;
3807
  break;
3808
  }
3809
  }
3810
  $other_element_id = -1;
3811
+ $is_other = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_allow_other" . $id, "", 'esc_html' );
3812
  if ( $is_other == "yes" ) {
3813
+ $other_element_id = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_allow_other_num" . $id, "", 'esc_html' );
3814
  }
3815
  if ( $start != -1 ) {
3816
  for ( $j = $start; $j < 100; $j++ ) {
3817
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id . $j, NULL, 'esc_html' );
3818
  if ( isset( $element ) ) {
3819
  if ( $j == $other_element_id ) {
3820
+ $new_value = $new_value . ($mail_mode == 1 ? '<p>' : '') . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_other_input" . $id, "", 'esc_html' ) . ($mail_mode == 1 ? '</p>' : ', ');
3821
  } else {
3822
  $new_value = $new_value . ($mail_mode == 1 ? '<p>' : '') . $element . ($mail_mode == 1 ? '</p>' : ', ');
3823
  }
3827
  break;
3828
  }
3829
  case "type_paypal_price": {
3830
+ $new_value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_dollars" . $id, 0, 'esc_html' );
 
 
 
3831
  if ( isset( $_POST[ 'wdform_' . $key . "_element_cents" . $id ] ) ) {
3832
+ $new_value = $new_value . '.' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_cents" . $id, '', 'esc_html' );
3833
  }
3834
  $new_value = $new_value . $form_currency;
3835
  break;
3837
  case "type_paypal_price_new": {
3838
  $new_value = '';
3839
  if ( isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) && $_POST[ 'wdform_' . $key . "_element" . $id ] ) {
3840
+ $new_value = $form_currency . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id, '', 'esc_html' );
3841
  }
3842
  $new_value = $new_value;
3843
  break;
3844
  }
3845
  case "type_paypal_select": {
3846
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id, '', 'esc_html' );
3847
  if ( $element ) {
3848
+ $new_value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_label" . $id, "", 'esc_html') . ' : ' . $form_currency . $element;
3849
  $is_element_quantity = isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) ? TRUE : FALSE;
3850
+ $element_quantity_label = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_quantity_label" . $id, NULL, 'esc_html' );
3851
+ $element_quantity = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_quantity" . $id, NULL, 'esc_html' );
3852
+ if(empty($element_quantity)){
3853
+ $element_quantity = NULL;
3854
+ }
3855
  if ( $is_element_quantity ) {
3856
  $new_value .= '<br/>' . $element_quantity_label . ': ' . ( !(empty($element_quantity)) ? $element_quantity : 0);
3857
  }
3858
  for ( $k = 0; $k < 50; $k++ ) {
3859
+ $temp_val = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_property" . $id . $k, NULL, 'esc_html' );
3860
  if ( isset( $temp_val ) ) {
3861
+ $new_value .= '<br/>' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_property_label" . $id . $k, "", 'esc_html' ) . ': ' . $temp_val;
3862
  }
3863
  }
3864
  }
3865
  break;
3866
  }
3867
  case "type_paypal_radio": {
3868
+ $new_value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_label" . $id, "", 'esc_html' ) . (isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) && $_POST[ 'wdform_' . $key . "_element" . $id ] ? ' - ' . $form_currency . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id, '', 'esc_html' ) : ""); /*TODO*/
3869
  $is_element_quantity = isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) ? TRUE : FALSE;
3870
+ $element_quantity_label = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_quantity_label" . $id, NULL, 'esc_html' );
3871
+ $element_quantity = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_quantity" . $id, 0, 'esc_html' );
3872
  if ( $is_element_quantity ) {
3873
+ $new_value .= '<br/>'. $element_quantity_label . ': ' . $element_quantity;
3874
  }
3875
  for ( $k = 0; $k < 50; $k++ ) {
3876
+ $temp_val = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_property" . $id . $k, NULL, 'esc_html' );
3877
  if ( isset( $temp_val ) ) {
3878
+ $new_value .= '<br/>' . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_property_label" . $id . $k, "", 'esc_html' ) . ': ' . $temp_val;
3879
  }
3880
  }
3881
  break;
3882
  }
3883
  case "type_paypal_shipping": {
3884
+ $new_value = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_label" . $id, "", 'esc_html' ) . (isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) && $_POST[ 'wdform_' . $key . "_element" . $id ] ? ' : ' . $form_currency . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id, '', 'esc_html' ) : "");
3885
  break;
3886
  }
3887
  case "type_paypal_checkbox": {
3888
  $start = -1;
3889
  for ( $j = 0; $j < 100; $j++ ) {
3890
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id . $j, NULL, 'esc_html' );
3891
  if ( isset( $element ) ) {
3892
  $start = $j;
3893
  break;
3895
  }
3896
  if ( $start != -1 ) {
3897
  for ( $j = $start; $j < 100; $j++ ) {
3898
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id . $j, NULL, 'esc_html' );
3899
  if ( isset( $element ) ) {
3900
+ $new_value = $new_value . ($mail_mode == 1 ? '<p>' : '') . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id . $j . "_label", "", 'esc_html' ) . ' - ' . (isset( $element ) ? $form_currency . ($element == '' ? '0' : $element) : "") . ($mail_mode == 1 ? '</p>' : ', ');
3901
  }
3902
  }
3903
  }
3904
  $is_element_quantity = isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) ? TRUE : FALSE;
3905
+ $element_quantity_label = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_quantity_label" . $id, NULL, 'esc_html' );
3906
+ $element_quantity = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_quantity" . $id, 0, 'esc_html' );
3907
  if ( $is_element_quantity ) {
3908
+ $new_value .= ($mail_mode == 1 ? '<p>' : '') . $element_quantity_label . ': ' . $element_quantity . ($mail_mode == 1 ? '</p>' : ', ');
3909
  }
3910
  for ( $k = 0; $k < 50; $k++ ) {
3911
+ $temp_val = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_property" . $id . $k, NULL, 'esc_html' );
3912
  if ( isset( $temp_val ) ) {
3913
+ $new_value .= ($mail_mode == 1 ? '<p>' : '') . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element_property_label" . $id . $k, "", 'esc_html') . ': ' . $temp_val . ($mail_mode == 1 ? '</p>' : ', ');
3914
  }
3915
  }
3916
  break;
3917
  }
3918
  case "type_paypal_total": {
3919
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_paypal_total" . $id, "", 'esc_html' );
3920
  $new_value = $new_value . $element;
3921
  break;
3922
  }
3923
  case "type_star_rating": {
3924
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_star_amount" . $id, NULL, 'esc_html' );
3925
+ $selected = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_selected_star_amount" . $id, 0, 'esc_html' );
3926
  if ( isset( $element ) ) {
3927
  $new_value = $new_value . $selected . '/' . $element;
3928
  }
3929
  break;
3930
  }
3931
  case "type_scale_rating": {
3932
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_scale_amount" . $id, NULL, 'esc_html' );
3933
+ $selected = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_scale_radio" . $id, 0, 'esc_html' );
3934
  if ( isset( $element ) ) {
3935
  $new_value = $new_value . $selected . '/' . $element;
3936
  }
3937
  break;
3938
  }
3939
  case "type_spinner": {
3940
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id, NULL, 'esc_html' );
3941
  if ( isset( $element ) ) {
3942
  $new_value = $new_value . $element;
3943
  }
3944
  break;
3945
  }
3946
  case "type_slider": {
3947
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_slider_value" . $id, NULL, 'esc_html' );
3948
  if ( isset( $element ) ) {
3949
  $new_value = $new_value . $element;
3950
  }
3951
  break;
3952
  }
3953
  case "type_range": {
3954
+ $element0 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id . '0', NULL, 'esc_html' );
3955
+ $element1 = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id . '1', NULL, 'esc_html' );
3956
  if ( isset( $element0 ) || isset( $element1 ) ) {
3957
  $new_value = $new_value . $element0 . '-' . $element1;
3958
  }
3959
  break;
3960
  }
3961
  case "type_grading": {
3962
+ $element = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_hidden_item" . $id, "", 'esc_html' );
3963
  $grading = explode( ":", $element );
3964
  $items_count = sizeof( $grading ) - 1;
3965
  $element = "";
3966
  $total = 0;
3967
  for ( $k = 0; $k < $items_count; $k++ ) {
3968
+ $element .= $grading[ $k ] . ":" . WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id . '_' . $k, "", 'esc_html' ) . " ";
3969
+ $total += WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_element" . $id . '_' . $k, 0, 'floatval');
3970
  }
3971
  $element .= "Total: " . $total;
3972
  if ( isset( $element ) ) {
3975
  break;
3976
  }
3977
  case "type_matrix": {
3978
+ $input_type = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_input_type" . $id, "", 'esc_html' );
3979
+ $mat_rows = explode( "***", WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_hidden_row" . $id, "", 'esc_html' ) );
3980
  $rows_count = sizeof( $mat_rows ) - 1;
3981
+ $mat_columns = explode( "***", WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_hidden_column" . $id, "", 'esc_html' ) );
3982
  $columns_count = sizeof( $mat_columns ) - 1;
3983
  $matrix = "<table>";
3984
  $matrix .= '<tr><td></td>';
3990
  for ( $k = 1; $k <= $rows_count; $k++ ) {
3991
  $matrix .= '<tr><td style="background-color:#BBBBBB; padding:5px;">' . $mat_rows[ $k ] . '</td>';
3992
  if ( $input_type == "radio" ) {
3993
+ $mat_radio = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_input_element" . $id . $k, 0, 'esc_html' );
3994
  if ( $mat_radio == 0 ) {
3995
  $checked = "";
3996
  $aaa[ 1 ] = "";
4008
  } else {
4009
  if ( $input_type == "checkbox" ) {
4010
  for ( $j = 1; $j <= $columns_count; $j++ ) {
4011
+ $checked = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_input_element" . $id . $k . '_' . $j, 0, 'esc_html' );
4012
  if ( $checked == 1 ) {
4013
  $checked = "&#10004;";
4014
  } else {
4019
  } else {
4020
  if ( $input_type == "text" ) {
4021
  for ( $j = 1; $j <= $columns_count; $j++ ) {
4022
+ $checked = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_input_element" . $id . $k . '_' . $j, "", 'esc_html' );
4023
  $matrix .= '<td style="text-align:center">' . $checked . '</td>';
4024
  }
4025
  } else {
4026
  for ( $j = 1; $j <= $columns_count; $j++ ) {
4027
+ $checked = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $key . "_select_yes_no" . $id . $k . '_' . $j, "", 'esc_html' );
4028
  $matrix .= '<td style="text-align:center">' . $checked . '</td>';
4029
  }
4030
  }
4096
  private function fm_empty_field_validation( $form_id ) {
4097
  WDW_FM_Library(self::PLUGIN)->start_session();
4098
  $hash = $_SESSION['fm_empty_field_validation' . $form_id];
4099
+ $value = WDW_FM_Library(self::PLUGIN)->get('fm_empty_field_validation' . $form_id);
4100
  if ( !empty($value) && $value === $hash ) {
4101
  return TRUE;
4102
  }
4127
  }
4128
  }
4129
  }
4130
+ }
frontend/views/form_maker.php CHANGED
@@ -272,7 +272,7 @@ class FMViewForm_maker {
272
  $temp = $params;
273
  foreach ( $params_names as $params_name ) {
274
  $temp = explode('*:*' . $params_name . '*:*', $temp);
275
- $param[$params_name] = $temp[0];
276
  $temp = $temp[1];
277
  }
278
  $rep = '<div type="type_section_break" class="wdform-field-section-break"><div class="wdform_section_break">' . html_entity_decode($param['w_editor']) . '</div></div>';
@@ -283,7 +283,7 @@ class FMViewForm_maker {
283
  $temp = $params;
284
  foreach ( $params_names as $params_name ) {
285
  $temp = explode('*:*' . $params_name . '*:*', $temp);
286
- $param[$params_name] = $temp[0];
287
  $temp = $temp[1];
288
  }
289
  $rep = '<div type="type_editor" class="wdform-field">' . html_entity_decode(do_shortcode($param['w_editor'])) . '</div>';
@@ -303,7 +303,7 @@ class FMViewForm_maker {
303
  }
304
  foreach ( $params_names as $params_name ) {
305
  $temp = explode('*:*' . $params_name . '*:*', $temp);
306
- $param[$params_name] = $temp[0];
307
  $temp = $temp[1];
308
  }
309
  if ( $temp ) {
@@ -423,7 +423,7 @@ class FMViewForm_maker {
423
  }
424
  foreach ( $params_names as $params_name ) {
425
  $temp = explode('*:*' . $params_name . '*:*', $temp);
426
- $param[$params_name] = $temp[0];
427
  $temp = $temp[1];
428
  }
429
  if ( $temp ) {
@@ -433,7 +433,7 @@ class FMViewForm_maker {
433
  $param['attributes'] = $param['attributes'] . ' ' . $attr;
434
  }
435
  }
436
- $param['w_first_val'] = (isset($_POST['wdform_' . $id1 . '_element' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element' . $form_id])) : $param['w_first_val']);
437
  $param['w_regExp_status'] = (isset($param['w_regExp_status']) ? $param['w_regExp_status'] : "no");
438
  $readonly = (isset($param['w_readonly']) && $param['w_readonly'] == "yes" ? "readonly='readonly'" : '');
439
  $param['w_class'] = (isset($param['w_class']) ? $param['w_class'] : "");
@@ -448,9 +448,9 @@ class FMViewForm_maker {
448
  class="wd-width-100"
449
  id="wdform_' . $id1 . '_element' . $form_id . '"
450
  name="wdform_' . $id1 . '_element' . $form_id . '"
451
- value="' . htmlentities($param['w_first_val'], ENT_COMPAT) . '"
452
- title="' . htmlentities($param['w_title'], ENT_COMPAT) . '"
453
- placeholder="' . htmlentities($param['w_title'], ENT_COMPAT) . '"
454
  ' . $readonly . '
455
  ' . $param['attributes'] . ' />';
456
  if ( isset($symbol_end[$id1]) ) {
@@ -476,7 +476,7 @@ class FMViewForm_maker {
476
  $temp = $params;
477
  foreach ( $params_names as $params_name ) {
478
  $temp = explode('*:*' . $params_name . '*:*', $temp);
479
- $param[$params_name] = $temp[0];
480
  $temp = $temp[1];
481
  }
482
  if ( $temp ) {
@@ -486,7 +486,7 @@ class FMViewForm_maker {
486
  $param['attributes'] = $param['attributes'] . ' ' . $attr;
487
  }
488
  }
489
- $param['w_first_val'] = (isset($_POST['wdform_' . $id1 . '_element' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element' . $form_id])) : $param['w_first_val']);
490
  $wdformfieldsize = ($param['w_field_label_pos'] == "left" ? $param['w_field_label_size'] + $param['w_size'] + 10 : max($param['w_field_label_size'], $param['w_size']));
491
  $param['id'] = $id1;
492
 
@@ -507,8 +507,8 @@ class FMViewForm_maker {
507
  class="wd-width-100"
508
  id="wdform_' . $id1 . '_element' . $form_id . '"
509
  name="wdform_' . $id1 . '_element' . $form_id . '"
510
- value="' . htmlentities($param['w_first_val'], ENT_COMPAT) . '"
511
- title="' . htmlentities($param['w_title'], ENT_COMPAT) . '"
512
  ' . $param['attributes'] . '>
513
  </div>';
514
  $rep .= '</div>';
@@ -550,7 +550,7 @@ class FMViewForm_maker {
550
  }
551
  foreach ( $params_names as $params_name ) {
552
  $temp = explode('*:*' . $params_name . '*:*', $temp);
553
- $param[$params_name] = $temp[0];
554
  $temp = $temp[1];
555
  }
556
  if ( $temp ) {
@@ -618,7 +618,7 @@ class FMViewForm_maker {
618
  }
619
  foreach ( $params_names as $params_name ) {
620
  $temp = explode('*:*' . $params_name . '*:*', $temp);
621
- $param[$params_name] = $temp[0];
622
  $temp = $temp[1];
623
  }
624
  if ( $temp ) {
@@ -628,7 +628,7 @@ class FMViewForm_maker {
628
  $param['attributes'] = $param['attributes'] . ' ' . $attr;
629
  }
630
  }
631
- $param['w_first_val'] = (isset($_POST['wdform_' . $id1 . '_element' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element' . $form_id])) : $param['w_first_val']);
632
  $textarea_value = str_replace(array( "\r\n", "\n\r", "\n", "\r" ), "&#13;", $param['w_first_val']);
633
 
634
  $param['id'] = $id1;
@@ -637,7 +637,7 @@ class FMViewForm_maker {
637
  $html = '<textarea class="wd-width-100"
638
  id="wdform_' . $id1 . '_element' . $form_id . '"
639
  name="wdform_' . $id1 . '_element' . $form_id . '"
640
- placeholder="' . htmlentities($param['w_title'], ENT_COMPAT) . '"
641
  style="height: ' . $param['w_size_h'] . 'px;"
642
  ' . $param['attributes'] . '>' . $textarea_value . '</textarea>';
643
 
@@ -675,7 +675,7 @@ class FMViewForm_maker {
675
  }
676
  foreach ( $params_names as $params_name ) {
677
  $temp = explode('*:*' . $params_name . '*:*', $temp);
678
- $param[$params_name] = $temp[0];
679
  $temp = $temp[1];
680
  }
681
  if ( $temp ) {
@@ -687,7 +687,7 @@ class FMViewForm_maker {
687
  }
688
  $w_first_val = explode('***', $param['w_first_val']);
689
  $w_title = explode('***', $param['w_title']);
690
- $param['w_first_val'] = (isset($_POST['wdform_' . $id1 . '_element_first' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element_first' . $form_id])) : $w_first_val[0]) . '***' . (isset($_POST['wdform_' . $id1 . '_element_last' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element_last' . $form_id])) : $w_first_val[1]);
691
  $w_first_val = explode('***', $param['w_first_val']);
692
  $w_mini_labels = explode('***', $param['w_mini_labels']);
693
 
@@ -695,14 +695,14 @@ class FMViewForm_maker {
695
  $param['w_class'] .= ' wd-flex-row';
696
 
697
  $html = '<div class="wd-flex wd-flex-column wd-width-20">
698
- <input type="text" class="wd-phone-first" id="wdform_' . $id1 . '_element_first' . $form_id . '" name="wdform_' . $id1 . '_element_first' . $form_id . '" value="' . htmlentities($w_first_val[0], ENT_COMPAT) . '" title="' . htmlentities($w_title[0], ENT_COMPAT) . '" placeholder="' . htmlentities($w_title[0], ENT_COMPAT) . '" ' . $param['attributes'] . '>
699
  <label for="wdform_' . $id1 . '_element_first' . $form_id . '" class="mini_label wd-flex-column">' . $w_mini_labels[0] . '</label>
700
  </div>
701
  <div>
702
  <div class="wd-flex wd-flex-column ">&nbsp;-&nbsp;</div>
703
  </div>
704
  <div class="wd-flex wd-flex-column wd-width-80">
705
- <input type="text" class="wd-flex-column wd-width-100" id="wdform_' . $id1 . '_element_last' . $form_id . '" name="wdform_' . $id1 . '_element_last' . $form_id . '" value="' . htmlentities($w_first_val[1], ENT_COMPAT) . '" title="' . htmlentities($w_title[1], ENT_COMPAT) . '" placeholder="' . htmlentities($w_title[1], ENT_COMPAT) . '" ' . $param['attributes'] . ' />
706
  <label for="wdform_' . $id1 . '_element_last' . $form_id . '" class="wd-flex-column mini_label">' . $w_mini_labels[1] . '</label>
707
  </div>';
708
 
@@ -730,7 +730,7 @@ class FMViewForm_maker {
730
  $temp = $params;
731
  foreach ( $params_names as $params_name ) {
732
  $temp = explode('*:*' . $params_name . '*:*', $temp);
733
- $param[$params_name] = $temp[0];
734
  $temp = $temp[1];
735
  }
736
  if ( $temp ) {
@@ -740,15 +740,15 @@ class FMViewForm_maker {
740
  $param['attributes'] = $param['attributes'] . ' ' . $attr;
741
  }
742
  }
743
- $param['w_first_val'] = (isset($_POST['wdform_' . $id1 . '_element' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element' . $form_id])) : $param['w_first_val']);
744
  $param['id'] = $id1;
745
 
746
  $html = '<input type="text"
747
  class="wd-width-100"
748
  id="wdform_' . $id1 . '_element' . $form_id . '"
749
  name="wdform_' . $id1 . '_element' . $form_id . '"
750
- value="' . htmlentities($param['w_first_val'], ENT_COMPAT) . '"
751
- placeholder="" ' . htmlentities($param['attributes'], ENT_COMPAT) . ' />';
752
 
753
  // Generate field.
754
  $rep = $this->wdform_field($type, $param, $row, $html);
@@ -819,7 +819,7 @@ class FMViewForm_maker {
819
  }
820
  foreach ( $params_names as $params_name ) {
821
  $temp = explode('*:*' . $params_name . '*:*', $temp);
822
- $param[$params_name] = $temp[0];
823
  $temp = $temp[1];
824
  }
825
  if ( $temp ) {
@@ -835,15 +835,15 @@ class FMViewForm_maker {
835
  $param['w_name_fields'] = isset($param['w_name_fields']) ? $param['w_name_fields'] : ($param['w_name_format'] == 'normal' ? 'no***no' : 'yes***yes');
836
  $w_name_fields = explode('***', $param['w_name_fields']);
837
  $param['w_autofill'] = isset($param['w_autofill']) ? $param['w_autofill'] : 'no';
838
- $element_title = isset($_POST['wdform_' . $id1 . '_element_title' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element_title' . $form_id])) : NULL;
839
- $element_middle = isset($_POST['wdform_' . $id1 . '_element_middle' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element_middle' . $form_id])) : NULL;
840
- $element_first = isset($_POST['wdform_' . $id1 . '_element_first' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element_first' . $form_id])) : NULL;
841
  if ( isset($element_title) || isset($element_middle) ) {
842
- $param['w_first_val'] = (isset($_POST['wdform_' . $id1 . '_element_first' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element_first' . $form_id])) : $w_first_val[0]) . '***' . (isset($_POST['wdform_' . $id1 . '_element_last' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element_last' . $form_id])) : $w_first_val[1]) . '***' . (isset($_POST['wdform_' . $id1 . '_element_title' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element_title' . $form_id])) : $w_first_val[2]) . '***' . (isset($_POST['wdform_' . $id1 . '_element_middle' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element_middle' . $form_id])) : $w_first_val[3]);
843
  }
844
  else {
845
  if ( isset($element_first) ) {
846
- $param['w_first_val'] = (isset($_POST['wdform_' . $id1 . '_element_first' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element_first' . $form_id])) : $w_first_val[0]) . '***' . (isset($_POST['wdform_' . $id1 . '_element_last' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element_last' . $form_id])) : $w_first_val[1]);
847
  }
848
  }
849
  $w_first_val = explode('***', $param['w_first_val']);
@@ -858,25 +858,25 @@ class FMViewForm_maker {
858
  if ( $w_name_fields[0] == 'yes' ) {
859
  $first_field_id = 'wdform_' . $id1 . '_element_title' . $form_id;
860
  $html .= '<div class="wd-flex wd-flex-column wd-width-10">';
861
- $html .= '<input type="text" id="wdform_' . $id1 . '_element_title' . $form_id . '" name="wdform_' . $id1 . '_element_title' . $form_id . '" value="' . htmlentities($w_first_val[2], ENT_COMPAT) . '" title="' . htmlentities($w_title[2], ENT_COMPAT) . '" placeholder="' . htmlentities($w_title[2], ENT_COMPAT) . '" />';
862
  $html .= '<label class="mini_label" for="wdform_' . $id1 . '_element_title' . $form_id . '">' . $w_mini_labels[0] . '</label>';
863
  $html .= '</div>';
864
  $html .= '<div class="wd-flex wd-flex-column wd-name-separator"></div>';
865
  }
866
  $html .= '<div class="wd-flex wd-flex-column wd-width-50">';
867
- $html .= '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_element_first' . $form_id . '" name="wdform_' . $id1 . '_element_first' . $form_id . '" value="' . htmlentities($w_first_val[0], ENT_COMPAT) . '" title="' . htmlentities($w_title[0], ENT_COMPAT) . '" placeholder="' . htmlentities($w_title[0], ENT_COMPAT) . '" ' . $param['attributes'] . ' />';
868
  $html .= '<label class="mini_label" for="wdform_' . $id1 . '_element_first' . $form_id . '">' . $w_mini_labels[1] . '</label>';
869
  $html .= '</div>';
870
  $html .= '<div class="wd-flex wd-flex-column wd-name-separator"></div>';
871
  $html .= '<div class="wd-flex wd-flex-column wd-width-50">';
872
- $html .= '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_element_last' . $form_id . '" name="wdform_' . $id1 . '_element_last' . $form_id . '" value="' . htmlentities($w_first_val[1], ENT_COMPAT) . '" title="' . htmlentities($w_title[1], ENT_COMPAT) . '" placeholder="' . htmlentities($w_title[1], ENT_COMPAT) . '" ' . $param['attributes'] . ' />';
873
  $html .= '<label class="mini_label" for="wdform_' . $id1 . '_element_last' . $form_id . '">' . $w_mini_labels[2] . '</label>';
874
  $html .= '</div>';
875
 
876
  if ( $w_name_fields[1] == 'yes' ) {
877
  $html .= '<div class="wd-flex wd-flex-column wd-name-separator"></div>';
878
  $html .= '<div class="wd-flex wd-flex-column wd-width-50">';
879
- $html .= '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_element_middle' . $form_id . '" name="wdform_' . $id1 . '_element_middle' . $form_id . '" value="' . htmlentities($w_first_val[3], ENT_COMPAT) . '" title="' . htmlentities($w_title[3], ENT_COMPAT) . '" placeholder="' . htmlentities($w_title[3], ENT_COMPAT) . '" />';
880
  $html .= '<label class="mini_label" for="wdform_' . $id1 . '_element_middle' . $form_id . '">' . $w_mini_labels[3] . '</label>';
881
  $html .= '</div>';
882
  }
@@ -914,7 +914,7 @@ class FMViewForm_maker {
914
  }
915
  foreach ( $params_names as $params_name ) {
916
  $temp = explode('*:*' . $params_name . '*:*', $temp);
917
- $param[$params_name] = $temp[0];
918
  $temp = $temp[1];
919
  }
920
  if ( $temp ) {
@@ -933,28 +933,28 @@ class FMViewForm_maker {
933
  $html = '';
934
  if ( isset($w_disabled_fields[0]) && $w_disabled_fields[0] == 'no' ) {
935
  $html .= '<span class="wd-width-100 wd-address">
936
- <input class="wd-width-100" type="text" id="wdform_' . $id1 . '_street1' . $form_id . '" name="wdform_' . $id1 . '_street1' . $form_id . '" value="' . (isset($_POST['wdform_' . $id1 . '_street1' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_street1' . $form_id])) : "") . '" ' . $param['attributes'] . ' />
937
  <label for="wdform_' . $id1 . '_street1' . $form_id . '" class="mini_label">' . $w_mini_labels[0] . '</label></span>';
938
  }
939
  if ( isset($w_disabled_fields[1]) && $w_disabled_fields[1] == 'no' ) {
940
  $html .= '<span class="wd-width-100 wd-address">
941
- <input class="wd-width-100" type="text" id="wdform_' . $id1 . '_street2' . $form_id . '" name="wdform_' . ($id1 + 1) . '_street2' . $form_id . '" value="' . (isset($_POST['wdform_' . ($id1 + 1) . '_street2' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . ($id1 + 1) . '_street2' . $form_id])) : "") . '" ' . $param['attributes'] . ' />
942
  <label for="wdform_' . $id1 . '_street2' . $form_id . '" class="mini_label">' . $w_mini_labels[1] . '</label></span>';
943
  }
944
  $html .= '<span class="wd-width-100 wd-flex wd-flex-row wd-flex-wrap wd-justify-content">';
945
  if ( isset($w_disabled_fields[2]) && $w_disabled_fields[2] == 'no' ) {
946
  $html .= '<span class="wd-width-49 wd-address">
947
- <input class="wd-width-100" type="text" id="wdform_' . $id1 . '_city' . $form_id . '" name="wdform_' . ($id1 + 2) . '_city' . $form_id . '" value="' . (isset($_POST['wdform_' . ($id1 + 2) . '_city' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . ($id1 + 2) . '_city' . $form_id])) : "") . '" ' . $param['attributes'] . ' />
948
  <label for="wdform_' . $id1 . '_city' . $form_id . '" class="mini_label">' . $w_mini_labels[2] . '</label></span>';
949
  }
950
- $post_country = isset($_POST['wdform_' . ($id1 + 5) . '_country' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . ($id1 + 5) . '_country' . $form_id])) : "";
951
  if ( isset($w_disabled_fields[3]) && $w_disabled_fields[3] == 'no' ) {
952
  if ( isset($w_disabled_fields[5]) && $w_disabled_fields[5] == 'no'
953
  && isset($w_disabled_fields[6]) && $w_disabled_fields[6] == 'yes'
954
  && $post_country == 'United States' ) {
955
  $w_states = WDW_FM_Library(self::PLUGIN)->get_states();
956
  $w_state_options = '';
957
- $post_state = isset($_POST['wdform_' . ($id1 + 3) . '_state' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . ($id1 + 3) . '_state' . $form_id])) : "";
958
  foreach ( $w_states as $w_state_key => $w_state ) {
959
  $selected = (($w_state_key == $post_state) ? 'selected="selected"' : '');
960
  $w_state_options .= '<option value="' . $w_state_key . '" ' . $selected . '>' . $w_state . '</option>';
@@ -968,7 +968,7 @@ class FMViewForm_maker {
968
  && $post_country == 'Canada' ) {
969
  $w_states = WDW_FM_Library(self::PLUGIN)->get_provinces_canada();
970
  $w_state_options = '';
971
- $post_state = isset($_POST['wdform_' . ($id1 + 3) . '_state' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . ($id1 + 3) . '_state' . $form_id])) : "";
972
  foreach ( $w_states as $w_state_key => $w_state ) {
973
  $selected = (($w_state_key == $post_state) ? 'selected="selected"' : '');
974
  $w_state_options .= '<option value="' . $w_state_key . '" ' . $selected . '>' . $w_state . '</option>';
@@ -979,13 +979,13 @@ class FMViewForm_maker {
979
  }
980
  else {
981
  $html .= '<span class="wd-width-49 wd-address">
982
- <input class="wd-width-100" type="text" id="wdform_' . $id1 . '_state' . $form_id . '" name="wdform_' . ($id1 + 3) . '_state' . $form_id . '" value="' . (isset($_POST['wdform_' . ($id1 + 3) . '_state' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . ($id1 + 3) . '_state' . $form_id])) : "") . '" ' . $param['attributes'] . ' />
983
  <label for="wdform_' . $id1 . '_state' . $form_id . '" class="mini_label">' . $w_mini_labels[3] . '</label></span>';
984
  }
985
  }
986
  if ( isset($w_disabled_fields[4]) && $w_disabled_fields[4] == 'no' ) {
987
  $html .= '<span class="wd-width-49 wd-address">
988
- <input class="wd-width-100" type="text" id="wdform_' . $id1 . '_postal' . $form_id . '" name="wdform_' . ($id1 + 4) . '_postal' . $form_id . '" value="' . (isset($_POST['wdform_' . ($id1 + 4) . '_postal' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . ($id1 + 4) . '_postal' . $form_id])) : "") . '" ' . $param['attributes'] . ' />
989
  <label for="wdform_' . $id1 . '_postal' . $form_id . '" class="mini_label">' . $w_mini_labels[4] . '</label></span>';
990
  }
991
  if ( isset($w_disabled_fields[5]) && $w_disabled_fields[5] == 'no' ) {
@@ -1074,7 +1074,7 @@ class FMViewForm_maker {
1074
  }
1075
  foreach ( $params_names as $params_name ) {
1076
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1077
- $param[$params_name] = $temp[0];
1078
  $temp = $temp[1];
1079
  }
1080
  if ( $temp ) {
@@ -1087,10 +1087,10 @@ class FMViewForm_maker {
1087
 
1088
  $param['w_autofill'] = isset($param['w_autofill']) ? $param['w_autofill'] : 'no';
1089
  if ( $param['w_autofill'] == 'yes' && $wp_useremail ) {
1090
- $param['w_first_val'] = (isset($_POST['wdform_' . $id1 . '_element' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element' . $form_id])) : $wp_useremail);
1091
  }
1092
  else {
1093
- $param['w_first_val'] = (isset($_POST['wdform_' . $id1 . '_element' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element' . $form_id])) : $param['w_first_val']);
1094
  }
1095
 
1096
  $param['id'] = $id1;
@@ -1100,17 +1100,17 @@ class FMViewForm_maker {
1100
  $message_check_email = addslashes(__('This is not a valid email address.', WDFMInstance(self::PLUGIN)->prefix));
1101
  $onchange = (isset($param['w_verification']) && $param['w_verification'] == "yes") ? '; wd_check_confirmation_email(\'' . $id1 . '\', \'' . $form_id . '\', \'' . $message_confirm . '\')' : '';
1102
 
1103
- $html = '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_element' . $form_id . '" name="wdform_' . $id1 . '_element' . $form_id . '" value="' . htmlentities($param['w_first_val'], ENT_COMPAT) . '" title="' . htmlentities($param['w_title'], ENT_COMPAT) . '" placeholder="' . htmlentities($param['w_title'], ENT_COMPAT) . '" ' . $param['attributes'] . ' onchange="wd_check_email(\'' . $id1 . '\', \'' . $form_id . '\', \'' . $message_check_email . '\')' . $onchange . '" />';
1104
 
1105
  // Generate field.
1106
  $rep = $this->wdform_field($type, $param, $row, $html);
1107
 
1108
  if ( isset($param['w_verification']) && $param['w_verification'] == "yes" ) {
1109
- $param['w_verification_placeholder'] = (isset($_POST['wdform_' . $id1 . '_1_element' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_1_element' . $form_id])) : $param['w_verification_placeholder']);
1110
  $param['label'] = $param['w_verification_label'];
1111
  $param['id'] = 'wdform_' . $id1 . '_1_element' . $form_id;
1112
 
1113
- $html = '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_1_element' . $form_id . '" name="wdform_' . $id1 . '_1_element' . $form_id . '" placeholder="' . htmlentities($param['w_verification_placeholder'], ENT_COMPAT) . '" title="' . htmlentities($param['w_verification_placeholder'], ENT_COMPAT) . '" ' . $param['attributes'] . 'onchange="wd_check_confirmation_email(\'' . $id1 . '\', \'' . $form_id . '\', \'' . $message_confirm . '\')" />';
1114
 
1115
  // Generate field.
1116
  $rep .= $this->wdform_field($type, $param, $row, $html);
@@ -1170,7 +1170,7 @@ class FMViewForm_maker {
1170
  }
1171
  foreach ( $params_names as $params_name ) {
1172
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1173
- $param[$params_name] = $temp[0];
1174
  $temp = $temp[1];
1175
  }
1176
  if ( $temp ) {
@@ -1181,7 +1181,7 @@ class FMViewForm_maker {
1181
  }
1182
  }
1183
  $param['w_disable_past_days'] = isset($param['w_disable_past_days']) ? $param['w_disable_past_days'] : 'no';
1184
- $param['w_date'] = (isset($_POST['wdform_' . $id1 . "_element" . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . "_element" . $form_id])) : $param['w_date']);
1185
 
1186
  $rep = '<div type="type_date" class="wdform-field">';
1187
 
@@ -1223,7 +1223,7 @@ class FMViewForm_maker {
1223
  }
1224
  foreach ( $params_names as $params_name ) {
1225
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1226
- $param[$params_name] = $temp[0];
1227
  $temp = $temp[1];
1228
  }
1229
  if ( $temp ) {
@@ -1239,7 +1239,7 @@ class FMViewForm_maker {
1239
 
1240
  $html = '<img type="captcha"
1241
  digit="' . $param['w_digit'] . '"
1242
- src=" ' . add_query_arg(array('action' => 'formmakerwdcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix, 'nonce' => $this->fm_nonce, 'digit' => $param['w_digit'], 'i' => $form_id), admin_url('admin-ajax.php')) . '"
1243
  id="wd_captcha' . $form_id . '"
1244
  class="captcha_img wd-hidden"
1245
  ' . $param['attributes'] . ' />';
@@ -1284,7 +1284,7 @@ class FMViewForm_maker {
1284
  }
1285
  foreach ( $params_names as $params_name ) {
1286
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1287
- $param[$params_name] = $temp[0];
1288
  $temp = $temp[1];
1289
  }
1290
  if ( $temp ) {
@@ -1305,7 +1305,7 @@ class FMViewForm_maker {
1305
  $html = '<img type="captcha"
1306
  operations_count="' . $param['w_count'] . '"
1307
  operations="' . $param['w_operations'] . '"
1308
- src="' . add_query_arg(array('action' => 'formmakerwdmathcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix, 'nonce' => $this->fm_nonce, 'operations_count' => $param['w_count'], 'operations' => urlencode($param['w_operations']), 'i' => $form_id), admin_url('admin-ajax.php')) . '"
1309
  id="wd_arithmetic_captcha' . $form_id . '"
1310
  class="arithmetic_captcha_img"
1311
  ' . $param['attributes'] . ' />';
@@ -1357,7 +1357,7 @@ class FMViewForm_maker {
1357
  }
1358
  foreach ( $params_names as $params_name ) {
1359
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1360
- $param[$params_name] = $temp[0];
1361
  $temp = $temp[1];
1362
  }
1363
  $invisible = isset($param['w_type']) && $param['w_type'] == 'invisible' ? 1 : 0;
@@ -1403,7 +1403,7 @@ class FMViewForm_maker {
1403
  $temp = $params;
1404
  foreach ( $params_names as $params_name ) {
1405
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1406
- $param[$params_name] = $temp[0];
1407
  $temp = $temp[1];
1408
  }
1409
  if ( $temp ) {
@@ -1464,7 +1464,7 @@ class FMViewForm_maker {
1464
  }
1465
  foreach ( $params_names as $params_name ) {
1466
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1467
- $param[$params_name] = $temp[0];
1468
  $temp = $temp[1];
1469
  }
1470
  if ( $temp ) {
@@ -1508,7 +1508,7 @@ class FMViewForm_maker {
1508
  $temp = $params;
1509
  foreach ( $params_names as $params_name ) {
1510
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1511
- $param[$params_name] = $temp[0];
1512
  $temp = $temp[1];
1513
  }
1514
  if ( $temp ) {
@@ -1519,7 +1519,7 @@ class FMViewForm_maker {
1519
  }
1520
  }
1521
  $w_first_val = explode('***', $param['w_first_val']);
1522
- $param['w_first_val'] = (isset($_POST['wdform_' . $id1 . '_element_dollars' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element_dollars' . $form_id])) : $w_first_val[0]) . '***' . (isset($_POST['wdform_' . $id1 . '_element_cents' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element_cents' . $form_id])) : $w_first_val[1]);
1523
  $hide_cents = ($param['w_hide_cents'] == "yes" ? "wd-hidden" : "wd-table-cell");
1524
  $w_first_val = explode('***', $param['w_first_val']);
1525
  $w_title = explode('***', $param['w_title']);
@@ -1547,13 +1547,13 @@ class FMViewForm_maker {
1547
  $rep .= '<span class="wdform_colon wd-vertical-middle">&nbsp;' . $form_currency . '&nbsp;</span>';
1548
  $rep .= '</div>';
1549
  $rep .= '<div id="wdform_' . $id1 . '_td_name_dollars" class="wd-table-cell">';
1550
- $rep .= '<input type="text" id="wdform_' . $id1 . '_element_dollars' . $form_id . '" name="wdform_' . $id1 . '_element_dollars' . $form_id . '" value="' . htmlentities($w_first_val[0], ENT_COMPAT) . '" title="' . $w_title[0] . '" onkeypress="return check_isnum(event)" style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' />';
1551
  $rep .= '</div>';
1552
  $rep .= '<div id="wdform_' . $id1 . '_td_name_divider" class="' . $hide_cents . '">';
1553
  $rep .= '<span class="wdform_colon wd-vertical-middle">&nbsp;.&nbsp;</span>';
1554
  $rep .= '</div>';
1555
  $rep .= '<div id="wdform_' . $id1 . '_td_name_cents" class="' . $hide_cents . '">';
1556
- $rep .= '<input type="text" class="wd-paypal-cent" id="wdform_' . $id1 . '_element_cents' . $form_id . '" name="wdform_' . $id1 . '_element_cents' . $form_id . '" value="' . htmlentities($w_first_val[1], ENT_COMPAT) . '" title="' . $w_title[1] . '" ' . $param['attributes'] . ' />';
1557
  $rep .= '</div></div>';
1558
  $rep .= '<div id="wdform_' . $id1 . '_tr_price2" class="wd-table-row">';
1559
  $rep .= '<div class="wd-table-cell"><label class="mini_label"></label></div>';
@@ -1588,7 +1588,7 @@ class FMViewForm_maker {
1588
  $temp = $params;
1589
  foreach ( $params_names as $params_name ) {
1590
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1591
- $param[$params_name] = $temp[0];
1592
  $temp = $temp[1];
1593
  }
1594
  if ( $temp ) {
@@ -1649,7 +1649,7 @@ class FMViewForm_maker {
1649
  $temp = $params;
1650
  foreach ( $params_names as $params_name ) {
1651
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1652
- $param[$params_name] = $temp[0];
1653
  $temp = $temp[1];
1654
  }
1655
  if ( $temp ) {
@@ -1784,9 +1784,8 @@ class FMViewForm_maker {
1784
  wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-script-' . $form_id);
1785
  }
1786
  }
1787
-
1788
- $_GET['addon_view'] = 'frontend';
1789
- $_GET['form_id'] = $form_id;
1790
  if (WDFMInstance(self::PLUGIN)->is_free != 2) {
1791
  $save_progress_params = array();
1792
  $save_progress_params['form'] = $row;
@@ -2235,7 +2234,7 @@ class FMViewForm_maker {
2235
  }
2236
  foreach ( $params_names as $params_name ) {
2237
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2238
- $param[$params_name] = $temp[0];
2239
  $temp = $temp[1];
2240
  }
2241
  if ( $temp ) {
@@ -2257,7 +2256,7 @@ class FMViewForm_maker {
2257
  $param['w_choices_value'] = explode('***', $param['w_choices_value']);
2258
  $param['w_choices_params'] = explode('***', $param['w_choices_params']);
2259
  }
2260
- $post_value = isset($_POST["counter" . $form_id]) ? esc_html($_POST["counter" . $form_id]) : NULL;
2261
  $param['id'] = '';
2262
  $param['w_class'] .= ' wd-flex-wrap' . ($param['w_flow'] != 'hor' ? ' wd-flex-column' : ' wd-flex-row');
2263
  $html = '<div class="wd-flex ' . ($param['w_flow'] == 'hor' ? ($param['w_rowcol'] > 1 ? 'wd-flex-column' : 'wd-flex-row') : ($param['w_rowcol'] > 1 ? 'wd-flex-row' : 'wd-flex-column')) . '">';
@@ -2407,7 +2406,7 @@ class FMViewForm_maker {
2407
  }
2408
  foreach ( $params_names as $params_name ) {
2409
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2410
- $param[$params_name] = $temp[0];
2411
  $temp = $temp[1];
2412
  }
2413
  if ( $temp ) {
@@ -2430,7 +2429,7 @@ class FMViewForm_maker {
2430
  $param['w_choices_value'] = explode('***', $param['w_choices_value']);
2431
  $param['w_choices_params'] = explode('***', $param['w_choices_params']);
2432
  }
2433
- $post_value = isset($_POST["counter" . $form_id]) ? esc_html($_POST["counter" . $form_id]) : NULL;
2434
  $param['id'] = '';
2435
  $param['w_class'] .= ' wd-flex-wrap' . ($param['w_flow'] != 'hor' ? ' wd-flex-column' : ' wd-flex-row');
2436
 
@@ -2497,7 +2496,7 @@ class FMViewForm_maker {
2497
  $param['w_choices_checked'][$key] = ($param['w_choices_checked'][$key] == 'true' ? 'checked="checked"' : '');
2498
  }
2499
  else {
2500
- $param['w_choices_checked'][$key] = (htmlspecialchars($choice) == htmlspecialchars(isset($_POST['wdform_' . $id1 . "_element" . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . "_element" . $form_id])) : "") ? 'checked="checked"' : '');
2501
  }
2502
  $choice_value = isset($param['w_choices_value']) ? $param['w_choices_value'][$key] : $choice;
2503
  $html .= '<div class="radio-div wd-choice wd-flex ' . (($param['w_field_option_pos'] == "right") ? 'wd-flex-row' : 'wd-flex-row-reverse wd-justify-content' ) . '">';
@@ -2577,7 +2576,7 @@ class FMViewForm_maker {
2577
  }
2578
  foreach ( $params_names as $params_name ) {
2579
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2580
- $param[$params_name] = $temp[0];
2581
  $temp = $temp[1];
2582
  }
2583
  if ( $temp ) {
@@ -2597,7 +2596,7 @@ class FMViewForm_maker {
2597
  if ( !isset($param['w_value_disabled']) ) {
2598
  $param['w_value_disabled'] = 'no';
2599
  }
2600
- $post_value = isset($_POST["counter" . $form_id]) ? esc_html($_POST["counter" . $form_id]) : NULL;
2601
  $param['id'] = $id1;
2602
  $param['w_class'] .= ' wd-flex-row';
2603
  $html = '<select class="wd-width-100" id="wdform_' . $id1 . '_element' . $form_id . '" name="wdform_' . $id1 . '_element' . $form_id . '" ' . $param['attributes'] . '>';
@@ -2721,7 +2720,7 @@ class FMViewForm_maker {
2721
  }
2722
  foreach ( $params_names as $params_name ) {
2723
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2724
- $param[$params_name] = $temp[0];
2725
  $temp = $temp[1];
2726
  }
2727
  if ( $temp ) {
@@ -2731,7 +2730,7 @@ class FMViewForm_maker {
2731
  $param['attributes'] = $param['attributes'] . ' ' . $attr;
2732
  }
2733
  }
2734
- $default_date = (isset($_POST['wdform_' . $id1 . "_element" . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . "_element" . $form_id])) : $param['w_default_date']);
2735
 
2736
  $param['id'] = $id1;
2737
  $param['w_class'] .= ' wd-flex-row';
@@ -2805,7 +2804,7 @@ class FMViewForm_maker {
2805
  }
2806
  foreach ( $params_names as $params_name ) {
2807
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2808
- $param[$params_name] = $temp[0];
2809
  $temp = $temp[1];
2810
  }
2811
  if ( $temp ) {
@@ -2815,9 +2814,9 @@ class FMViewForm_maker {
2815
  $param['attributes'] = $param['attributes'] . ' ' . $attr;
2816
  }
2817
  }
2818
- $param['w_day'] = (isset($_POST['wdform_' . $id1 . "_day" . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . "_day" . $form_id])) : $param['w_day']);
2819
- $param['w_month'] = (isset($_POST['wdform_' . $id1 . "_month" . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . "_month" . $form_id])) : $param['w_month']);
2820
- $param['w_year'] = (isset($_POST['wdform_' . $id1 . "_year" . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . "_year" . $form_id])) : $param['w_year']);
2821
 
2822
  if ( $param['w_day_type'] == "SELECT" ) {
2823
  $w_day_type = '<select id="wdform_' . $id1 . '_day' . $form_id . '" name="wdform_' . $id1 . '_day' . $form_id . '" style="width: ' . $param['w_day_size'] . 'px;" ' . $param['attributes'] . '><option value=""></option>';
@@ -2999,7 +2998,7 @@ class FMViewForm_maker {
2999
  }
3000
  foreach ( $params_names as $params_name ) {
3001
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3002
- $param[$params_name] = $temp[0];
3003
  $temp = $temp[1];
3004
  }
3005
  if ( $temp ) {
@@ -3072,7 +3071,7 @@ class FMViewForm_maker {
3072
  }
3073
  foreach ( $params_names as $params_name ) {
3074
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3075
- $param[$params_name] = $temp[0];
3076
  $temp = $temp[1];
3077
  }
3078
  if ( $temp ) {
@@ -3097,7 +3096,7 @@ class FMViewForm_maker {
3097
  data-valid-type="' . ($param['w_time_type'] == '12' ? 'hour12' : 'hour24') . '"
3098
  data-form-id="' . $form_id . '"
3099
  data-wdid="' . $id1 . '"
3100
- value="' . (isset($_POST['wdform_' . $id1 . "_hh" . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . "_hh" . $form_id])) : $param['w_hh']) . '"
3101
  ' . $param['attributes'] . ' />';
3102
  $html .= '<label for="wdform_' . $id1 . '_hh' . $form_id . '" class="mini_label">' . $w_mini_labels[0] . '</label>';
3103
  $html .= '</div>';
@@ -3112,7 +3111,7 @@ class FMViewForm_maker {
3112
  data-valid-type="minute"
3113
  data-form-id="' . $form_id . '"
3114
  data-wdid="' . $id1 . '"
3115
- value="' . (isset($_POST['wdform_' . $id1 . "_mm" . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . "_mm" . $form_id])) : $param['w_mm']) . '"
3116
  ' . $param['attributes'] . ' />';
3117
  $html .= '<label for="wdform_' . $id1 . '_mm' . $form_id . '" class="mini_label">' . $w_mini_labels[1] . '</label>';
3118
  $html .= '</div>';
@@ -3128,13 +3127,13 @@ class FMViewForm_maker {
3128
  data-valid-type="second"
3129
  data-form-id="' . $form_id . '"
3130
  data-wdid="' . $id1 . '"
3131
- value="' . (isset($_POST['wdform_' . $id1 . "_ss" . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . "_ss" . $form_id])) : $param['w_ss']) . '"
3132
  ' . $param['attributes'] . ' />';
3133
  $html .= '<label for="wdform_' . $id1 . '_ss' . $form_id . '" class="mini_label">' . $w_mini_labels[2] . '</label>';
3134
  $html .= '</div>';
3135
  }
3136
  if ( $param['w_time_type'] == '12' ) {
3137
- if ( (isset($_POST['wdform_' . $id1 . "_am_pm" . $form_id]) ? esc_html($_POST['wdform_' . $id1 . "_am_pm" . $form_id]) : $param['w_am_pm']) == 'am' ) {
3138
  $am_ = "selected=\"selected\"";
3139
  $pm_ = "";
3140
  }
@@ -3191,7 +3190,7 @@ class FMViewForm_maker {
3191
  }
3192
  foreach ( $params_names as $params_name ) {
3193
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3194
- $param[$params_name] = $temp[0];
3195
  $temp = $temp[1];
3196
  }
3197
  if ( $temp ) {
@@ -3202,7 +3201,7 @@ class FMViewForm_maker {
3202
  }
3203
  }
3204
  $param['w_countries'] = explode('***', $param['w_countries']);
3205
- $post_value = isset($_POST["counter" . $form_id]) ? esc_html($_POST["counter" . $form_id]) : NULL;
3206
  $param['id'] = $id1;
3207
  $param['w_class'] .= ' wd-flex-row';
3208
 
@@ -3211,7 +3210,7 @@ class FMViewForm_maker {
3211
  $html = '<select class="wd-width-100" id="wdform_' . $id1 . '_element' . $form_id . '" name="wdform_' . $id1 . '_element' . $form_id . '" ' . $param['attributes'] . '>';
3212
  foreach ( $param['w_countries'] as $key => $choice ) {
3213
  if ( isset($post_value) ) {
3214
- $selected = (htmlspecialchars($choice) == htmlspecialchars(isset($_POST['wdform_' . $id1 . "_element" . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . "_element" . $form_id])) : "") ? 'selected="selected"' : '');
3215
  }
3216
  $choice_value = $choice;
3217
  $html .= '<option value="' . $choice_value . '" ' . $selected . '>' . $choice . '</option>';
@@ -3265,7 +3264,7 @@ class FMViewForm_maker {
3265
  }
3266
  foreach ( $params_names as $params_name ) {
3267
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3268
- $param[$params_name] = $temp[0];
3269
  $temp = $temp[1];
3270
  }
3271
  if ( $temp ) {
@@ -3275,7 +3274,7 @@ class FMViewForm_maker {
3275
  $param['attributes'] = $param['attributes'] . ' ' . $attr;
3276
  }
3277
  }
3278
- $param['w_field_value'] = (isset($_POST['wdform_' . $id1 . '_element' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element' . $form_id])) : $param['w_field_value']);
3279
 
3280
  $param['id'] = $id1;
3281
  $param['w_class'] .= ' wd-flex-row';
@@ -3331,7 +3330,7 @@ class FMViewForm_maker {
3331
  }
3332
  foreach ( $params_names as $params_name ) {
3333
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3334
- $param[$params_name] = $temp[0];
3335
  $temp = $temp[1];
3336
  }
3337
  if ( $temp ) {
@@ -3395,7 +3394,7 @@ class FMViewForm_maker {
3395
  }
3396
  foreach ( $params_names as $params_name ) {
3397
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3398
- $param[$params_name] = $temp[0];
3399
  $temp = $temp[1];
3400
  }
3401
  if ( $temp ) {
@@ -3409,7 +3408,7 @@ class FMViewForm_maker {
3409
  $numbers = '';
3410
  $radio_buttons = '';
3411
  $to_check = 0;
3412
- $post_value = isset($_POST['wdform_' . $id1 . '_scale_radio' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_scale_radio' . $form_id])) : NULL;
3413
  if ( isset($post_value) ) {
3414
  $to_check = $post_value;
3415
  }
@@ -3494,7 +3493,7 @@ class FMViewForm_maker {
3494
  }
3495
  foreach ( $params_names as $params_name ) {
3496
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3497
- $param[$params_name] = $temp[0];
3498
  $temp = $temp[1];
3499
  }
3500
  if ( $temp ) {
@@ -3504,7 +3503,7 @@ class FMViewForm_maker {
3504
  $param['attributes'] = $param['attributes'] . ' ' . $attr;
3505
  }
3506
  }
3507
- $param['w_field_value'] = (isset($_POST['wdform_' . $id1 . '_slider_value' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_slider_value' . $form_id])) : $param['w_field_value']);
3508
 
3509
  $param['id'] = '';
3510
  $param['w_class'] .= ' wd-flex-column';
@@ -3570,7 +3569,7 @@ class FMViewForm_maker {
3570
  }
3571
  foreach ( $params_names as $params_name ) {
3572
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3573
- $param[$params_name] = $temp[0];
3574
  $temp = $temp[1];
3575
  }
3576
  if ( $temp ) {
@@ -3580,8 +3579,8 @@ class FMViewForm_maker {
3580
  $param['attributes'] = $param['attributes'] . ' ' . $attr;
3581
  }
3582
  }
3583
- $param['w_field_value1'] = (isset($_POST['wdform_' . $id1 . '_element' . $form_id . '0']) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element' . $form_id . '0'])) : $param['w_field_value1']);
3584
- $param['w_field_value2'] = (isset($_POST['wdform_' . $id1 . '_element' . $form_id . '1']) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element' . $form_id . '1'])) : $param['w_field_value2']);
3585
  $w_mini_labels = explode('***', $param['w_mini_labels']);
3586
 
3587
  $param['id'] = 'wdform_' . $id1 . '_element' . $form_id . '0';
@@ -3638,7 +3637,7 @@ class FMViewForm_maker {
3638
  }
3639
  foreach ( $params_names as $params_name ) {
3640
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3641
- $param[$params_name] = $temp[0];
3642
  $temp = $temp[1];
3643
  }
3644
  if ( $temp ) {
@@ -3657,7 +3656,7 @@ class FMViewForm_maker {
3657
  $html .= '<div id="wdform_' . $id1 . '_element' . $form_id . '">';
3658
  $html .= '<input type="hidden" name="wdform_' . $id1 . '_element' . $form_id . '" value="" />';
3659
  for ( $i = 0; $i < count($w_items); $i++ ) {
3660
- $value = (isset($_POST['wdform_' . $id1 . '_element' . $form_id . '_' . $i]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_element' . $form_id . '_' . $i])) : '');
3661
  $html .= '<div class="wdform_grading">';
3662
  $html .= '<input type="text" id="wdform_' . $id1 . '_element' . $form_id . '_' . $i . '" name="wdform_' . $id1 . '_element' . $form_id . '_' . $i . '" value="' . $value . '" ' . $param['attributes'] . ' />';
3663
  $html .= '<label class="wdform-ch-rad-label" for="wdform_' . $id1 . '_element' . $form_id . '_' . $i . '">' . $w_items[$i] . '</label>';
@@ -3715,7 +3714,7 @@ class FMViewForm_maker {
3715
  }
3716
  foreach ( $params_names as $params_name ) {
3717
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3718
- $param[$params_name] = $temp[0];
3719
  $temp = $temp[1];
3720
  }
3721
  if ( $temp ) {
@@ -3739,7 +3738,7 @@ class FMViewForm_maker {
3739
  $rows_columns .= '<div class="wdform-matrix-cell">';
3740
  if ( $param['w_field_input_type'] == 'radio' ) {
3741
  $to_check = 0;
3742
- $post_value = isset($_POST['wdform_' . $id1 . '_input_element' . $form_id . '' . $i]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_input_element' . $form_id . '' . $i])) : NULL;
3743
  if ( isset($post_value) ) {
3744
  $to_check = $post_value;
3745
  }
@@ -3748,7 +3747,7 @@ class FMViewForm_maker {
3748
  else {
3749
  if ( $param['w_field_input_type'] == 'checkbox' ) {
3750
  $to_check = 0;
3751
- $post_value = isset($_POST['wdform_' . $id1 . '_input_element' . $form_id . '' . $i . '_' . $k]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_input_element' . $form_id . '' . $i . '_' . $k])) : NULL;
3752
  if ( isset($post_value) ) {
3753
  $to_check = $post_value;
3754
  }
@@ -3756,7 +3755,7 @@ class FMViewForm_maker {
3756
  }
3757
  else {
3758
  if ( $param['w_field_input_type'] == 'text' ) {
3759
- $rows_columns .= '<input id="wdform_' . $id1 . '_input_element' . $form_id . '' . $i . '_' . $k . '" type="text" name="wdform_' . $id1 . '_input_element' . $form_id . '' . $i . '_' . $k . '" value="' . (isset($_POST['wdform_' . $id1 . '_input_element' . $form_id . '' . $i . '_' . $k]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . '_input_element' . $form_id . '' . $i . '_' . $k])) : "") . '" style="width:' . $param['w_textbox_size'] . 'px">';
3760
  }
3761
  else {
3762
  if ( $param['w_field_input_type'] == 'select' ) {
272
  $temp = $params;
273
  foreach ( $params_names as $params_name ) {
274
  $temp = explode('*:*' . $params_name . '*:*', $temp);
275
+ $param[$params_name] = esc_html($temp[0]);
276
  $temp = $temp[1];
277
  }
278
  $rep = '<div type="type_section_break" class="wdform-field-section-break"><div class="wdform_section_break">' . html_entity_decode($param['w_editor']) . '</div></div>';
283
  $temp = $params;
284
  foreach ( $params_names as $params_name ) {
285
  $temp = explode('*:*' . $params_name . '*:*', $temp);
286
+ $param[$params_name] = esc_html($temp[0]);
287
  $temp = $temp[1];
288
  }
289
  $rep = '<div type="type_editor" class="wdform-field">' . html_entity_decode(do_shortcode($param['w_editor'])) . '</div>';
303
  }
304
  foreach ( $params_names as $params_name ) {
305
  $temp = explode('*:*' . $params_name . '*:*', $temp);
306
+ $param[$params_name] = esc_html($temp[0]);
307
  $temp = $temp[1];
308
  }
309
  if ( $temp ) {
423
  }
424
  foreach ( $params_names as $params_name ) {
425
  $temp = explode('*:*' . $params_name . '*:*', $temp);
426
+ $param[$params_name] = esc_html($temp[0]);
427
  $temp = $temp[1];
428
  }
429
  if ( $temp ) {
433
  $param['attributes'] = $param['attributes'] . ' ' . $attr;
434
  }
435
  }
436
+ $param['w_first_val'] = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element' . $form_id, $param['w_first_val'], 'esc_html' );
437
  $param['w_regExp_status'] = (isset($param['w_regExp_status']) ? $param['w_regExp_status'] : "no");
438
  $readonly = (isset($param['w_readonly']) && $param['w_readonly'] == "yes" ? "readonly='readonly'" : '');
439
  $param['w_class'] = (isset($param['w_class']) ? $param['w_class'] : "");
448
  class="wd-width-100"
449
  id="wdform_' . $id1 . '_element' . $form_id . '"
450
  name="wdform_' . $id1 . '_element' . $form_id . '"
451
+ value="' . $param['w_first_val'] . '"
452
+ title="' . $param['w_title'] . '"
453
+ placeholder="' . $param['w_title'] . '"
454
  ' . $readonly . '
455
  ' . $param['attributes'] . ' />';
456
  if ( isset($symbol_end[$id1]) ) {
476
  $temp = $params;
477
  foreach ( $params_names as $params_name ) {
478
  $temp = explode('*:*' . $params_name . '*:*', $temp);
479
+ $param[$params_name] = esc_html( $temp[0] );
480
  $temp = $temp[1];
481
  }
482
  if ( $temp ) {
486
  $param['attributes'] = $param['attributes'] . ' ' . $attr;
487
  }
488
  }
489
+ $param['w_first_val'] = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element' . $form_id, $param['w_first_val'], 'esc_html' );
490
  $wdformfieldsize = ($param['w_field_label_pos'] == "left" ? $param['w_field_label_size'] + $param['w_size'] + 10 : max($param['w_field_label_size'], $param['w_size']));
491
  $param['id'] = $id1;
492
 
507
  class="wd-width-100"
508
  id="wdform_' . $id1 . '_element' . $form_id . '"
509
  name="wdform_' . $id1 . '_element' . $form_id . '"
510
+ value="' . $param['w_first_val'] . '"
511
+ title="' . $param['w_title'] . '"
512
  ' . $param['attributes'] . '>
513
  </div>';
514
  $rep .= '</div>';
550
  }
551
  foreach ( $params_names as $params_name ) {
552
  $temp = explode('*:*' . $params_name . '*:*', $temp);
553
+ $param[$params_name] = esc_html($temp[0]);
554
  $temp = $temp[1];
555
  }
556
  if ( $temp ) {
618
  }
619
  foreach ( $params_names as $params_name ) {
620
  $temp = explode('*:*' . $params_name . '*:*', $temp);
621
+ $param[$params_name] = esc_html( $temp[0] );
622
  $temp = $temp[1];
623
  }
624
  if ( $temp ) {
628
  $param['attributes'] = $param['attributes'] . ' ' . $attr;
629
  }
630
  }
631
+ $param['w_first_val'] = WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element' . $form_id, $param['w_first_val'], 'esc_html' );
632
  $textarea_value = str_replace(array( "\r\n", "\n\r", "\n", "\r" ), "&#13;", $param['w_first_val']);
633
 
634
  $param['id'] = $id1;
637
  $html = '<textarea class="wd-width-100"
638
  id="wdform_' . $id1 . '_element' . $form_id . '"
639
  name="wdform_' . $id1 . '_element' . $form_id . '"
640
+ placeholder="' . $param['w_title']. '"
641
  style="height: ' . $param['w_size_h'] . 'px;"
642
  ' . $param['attributes'] . '>' . $textarea_value . '</textarea>';
643
 
675
  }
676
  foreach ( $params_names as $params_name ) {
677
  $temp = explode('*:*' . $params_name . '*:*', $temp);
678
+ $param[$params_name] = esc_html( $temp[0] );
679
  $temp = $temp[1];
680
  }
681
  if ( $temp ) {
687
  }
688
  $w_first_val = explode('***', $param['w_first_val']);
689
  $w_title = explode('***', $param['w_title']);
690
+ $param['w_first_val'] = stripslashes(WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element_first' . $form_id, $w_first_val[0], 'esc_html' ) ) . '***' . stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element_last' . $form_id, $w_first_val[1], 'esc_html' ) );
691
  $w_first_val = explode('***', $param['w_first_val']);
692
  $w_mini_labels = explode('***', $param['w_mini_labels']);
693
 
695
  $param['w_class'] .= ' wd-flex-row';
696
 
697
  $html = '<div class="wd-flex wd-flex-column wd-width-20">
698
+ <input type="text" class="wd-phone-first" id="wdform_' . $id1 . '_element_first' . $form_id . '" name="wdform_' . $id1 . '_element_first' . $form_id . '" value="' . $w_first_val[0] . '" title="' . $w_title[0] . '" placeholder="' . $w_title[0] . '" ' . $param['attributes'] . '>
699
  <label for="wdform_' . $id1 . '_element_first' . $form_id . '" class="mini_label wd-flex-column">' . $w_mini_labels[0] . '</label>
700
  </div>
701
  <div>
702
  <div class="wd-flex wd-flex-column ">&nbsp;-&nbsp;</div>
703
  </div>
704
  <div class="wd-flex wd-flex-column wd-width-80">
705
+ <input type="text" class="wd-flex-column wd-width-100" id="wdform_' . $id1 . '_element_last' . $form_id . '" name="wdform_' . $id1 . '_element_last' . $form_id . '" value="' . $w_first_val[1] . '" title="' . $w_title[1] . '" placeholder="' . $w_title[1] . '" ' . $param['attributes'] . ' />
706
  <label for="wdform_' . $id1 . '_element_last' . $form_id . '" class="wd-flex-column mini_label">' . $w_mini_labels[1] . '</label>
707
  </div>';
708
 
730
  $temp = $params;
731
  foreach ( $params_names as $params_name ) {
732
  $temp = explode('*:*' . $params_name . '*:*', $temp);
733
+ $param[$params_name] = esc_html( $temp[0] );
734
  $temp = $temp[1];
735
  }
736
  if ( $temp ) {
740
  $param['attributes'] = $param['attributes'] . ' ' . $attr;
741
  }
742
  }
743
+ $param['w_first_val'] = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element' . $form_id, $param['w_first_val'], 'esc_html' ) );
744
  $param['id'] = $id1;
745
 
746
  $html = '<input type="text"
747
  class="wd-width-100"
748
  id="wdform_' . $id1 . '_element' . $form_id . '"
749
  name="wdform_' . $id1 . '_element' . $form_id . '"
750
+ value="' . $param['w_first_val'] . '"
751
+ placeholder="" ' . $param['attributes'] . ' />';
752
 
753
  // Generate field.
754
  $rep = $this->wdform_field($type, $param, $row, $html);
819
  }
820
  foreach ( $params_names as $params_name ) {
821
  $temp = explode('*:*' . $params_name . '*:*', $temp);
822
+ $param[$params_name] = esc_html( $temp[0] );
823
  $temp = $temp[1];
824
  }
825
  if ( $temp ) {
835
  $param['w_name_fields'] = isset($param['w_name_fields']) ? $param['w_name_fields'] : ($param['w_name_format'] == 'normal' ? 'no***no' : 'yes***yes');
836
  $w_name_fields = explode('***', $param['w_name_fields']);
837
  $param['w_autofill'] = isset($param['w_autofill']) ? $param['w_autofill'] : 'no';
838
+ $element_title = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element_title' . $form_id, NULL, 'esc_html' ) );
839
+ $element_middle = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element_middle' . $form_id, NULL, 'esc_html' ) );
840
+ $element_first = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element_first' . $form_id, NULL, 'esc_html' ) );
841
  if ( isset($element_title) || isset($element_middle) ) {
842
+ $param['w_first_val'] = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element_first' . $form_id, $w_first_val[0], 'esc_html' ) ) . '***' . stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element_last' . $form_id, $w_first_val[1], 'esc_html' ) ) . '***' . stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element_title' . $form_id, $w_first_val[2], 'esc_html' ) ) . '***' . stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element_middle' . $form_id, $w_first_val[3], 'esc_html' ) );
843
  }
844
  else {
845
  if ( isset($element_first) ) {
846
+ $param['w_first_val'] = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element_first' . $form_id, $w_first_val[0], 'esc_html' ) ) . '***' . stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element_last' . $form_id, $w_first_val[1], 'esc_html' ) );
847
  }
848
  }
849
  $w_first_val = explode('***', $param['w_first_val']);
858
  if ( $w_name_fields[0] == 'yes' ) {
859
  $first_field_id = 'wdform_' . $id1 . '_element_title' . $form_id;
860
  $html .= '<div class="wd-flex wd-flex-column wd-width-10">';
861
+ $html .= '<input type="text" id="wdform_' . $id1 . '_element_title' . $form_id . '" name="wdform_' . $id1 . '_element_title' . $form_id . '" value="' . $w_first_val[2]. '" title="' . $w_title[2] . '" placeholder="' . $w_title[2] . '" />';
862
  $html .= '<label class="mini_label" for="wdform_' . $id1 . '_element_title' . $form_id . '">' . $w_mini_labels[0] . '</label>';
863
  $html .= '</div>';
864
  $html .= '<div class="wd-flex wd-flex-column wd-name-separator"></div>';
865
  }
866
  $html .= '<div class="wd-flex wd-flex-column wd-width-50">';
867
+ $html .= '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_element_first' . $form_id . '" name="wdform_' . $id1 . '_element_first' . $form_id . '" value="' . $w_first_val[0] . '" title="' . $w_title[0] . '" placeholder="' . $w_title[0] . '" ' . $param['attributes'] . ' />';
868
  $html .= '<label class="mini_label" for="wdform_' . $id1 . '_element_first' . $form_id . '">' . $w_mini_labels[1] . '</label>';
869
  $html .= '</div>';
870
  $html .= '<div class="wd-flex wd-flex-column wd-name-separator"></div>';
871
  $html .= '<div class="wd-flex wd-flex-column wd-width-50">';
872
+ $html .= '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_element_last' . $form_id . '" name="wdform_' . $id1 . '_element_last' . $form_id . '" value="' . $w_first_val[1] . '" title="' . $w_title[1] . '" placeholder="' . $w_title[1] . '" ' . $param['attributes'] . ' />';
873
  $html .= '<label class="mini_label" for="wdform_' . $id1 . '_element_last' . $form_id . '">' . $w_mini_labels[2] . '</label>';
874
  $html .= '</div>';
875
 
876
  if ( $w_name_fields[1] == 'yes' ) {
877
  $html .= '<div class="wd-flex wd-flex-column wd-name-separator"></div>';
878
  $html .= '<div class="wd-flex wd-flex-column wd-width-50">';
879
+ $html .= '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_element_middle' . $form_id . '" name="wdform_' . $id1 . '_element_middle' . $form_id . '" value="' . $w_first_val[3] . '" title="' . $w_title[3] . '" placeholder="' . $w_title[3] . '" />';
880
  $html .= '<label class="mini_label" for="wdform_' . $id1 . '_element_middle' . $form_id . '">' . $w_mini_labels[3] . '</label>';
881
  $html .= '</div>';
882
  }
914
  }
915
  foreach ( $params_names as $params_name ) {
916
  $temp = explode('*:*' . $params_name . '*:*', $temp);
917
+ $param[$params_name] = esc_html($temp[0]);
918
  $temp = $temp[1];
919
  }
920
  if ( $temp ) {
933
  $html = '';
934
  if ( isset($w_disabled_fields[0]) && $w_disabled_fields[0] == 'no' ) {
935
  $html .= '<span class="wd-width-100 wd-address">
936
+ <input class="wd-width-100" type="text" id="wdform_' . $id1 . '_street1' . $form_id . '" name="wdform_' . $id1 . '_street1' . $form_id . '" value="' . stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_street1' . $form_id, "", 'esc_html' ) ). '" ' . $param['attributes'] . ' />
937
  <label for="wdform_' . $id1 . '_street1' . $form_id . '" class="mini_label">' . $w_mini_labels[0] . '</label></span>';
938
  }
939
  if ( isset($w_disabled_fields[1]) && $w_disabled_fields[1] == 'no' ) {
940
  $html .= '<span class="wd-width-100 wd-address">
941
+ <input class="wd-width-100" type="text" id="wdform_' . $id1 . '_street2' . $form_id . '" name="wdform_' . ($id1 + 1) . '_street2' . $form_id . '" value="' . stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . ($id1 + 1) . '_street2' . $form_id, "", 'esc_html' ) ) . '" ' . $param['attributes'] . ' />
942
  <label for="wdform_' . $id1 . '_street2' . $form_id . '" class="mini_label">' . $w_mini_labels[1] . '</label></span>';
943
  }
944
  $html .= '<span class="wd-width-100 wd-flex wd-flex-row wd-flex-wrap wd-justify-content">';
945
  if ( isset($w_disabled_fields[2]) && $w_disabled_fields[2] == 'no' ) {
946
  $html .= '<span class="wd-width-49 wd-address">
947
+ <input class="wd-width-100" type="text" id="wdform_' . $id1 . '_city' . $form_id . '" name="wdform_' . ($id1 + 2) . '_city' . $form_id . '" value="' . stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . ($id1 + 2) . '_city' . $form_id, "", 'esc_html' ) ) . '" ' . $param['attributes'] . ' />
948
  <label for="wdform_' . $id1 . '_city' . $form_id . '" class="mini_label">' . $w_mini_labels[2] . '</label></span>';
949
  }
950
+ $post_country = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . ($id1 + 5) . '_country' . $form_id, "", 'esc_html' ) );
951
  if ( isset($w_disabled_fields[3]) && $w_disabled_fields[3] == 'no' ) {
952
  if ( isset($w_disabled_fields[5]) && $w_disabled_fields[5] == 'no'
953
  && isset($w_disabled_fields[6]) && $w_disabled_fields[6] == 'yes'
954
  && $post_country == 'United States' ) {
955
  $w_states = WDW_FM_Library(self::PLUGIN)->get_states();
956
  $w_state_options = '';
957
+ $post_state = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . ($id1 + 3) . '_state' . $form_id, "", 'esc-html' ) );
958
  foreach ( $w_states as $w_state_key => $w_state ) {
959
  $selected = (($w_state_key == $post_state) ? 'selected="selected"' : '');
960
  $w_state_options .= '<option value="' . $w_state_key . '" ' . $selected . '>' . $w_state . '</option>';
968
  && $post_country == 'Canada' ) {
969
  $w_states = WDW_FM_Library(self::PLUGIN)->get_provinces_canada();
970
  $w_state_options = '';
971
+ $post_state = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . ($id1 + 3) . '_state' . $form_id, "", 'esc_html' ) );
972
  foreach ( $w_states as $w_state_key => $w_state ) {
973
  $selected = (($w_state_key == $post_state) ? 'selected="selected"' : '');
974
  $w_state_options .= '<option value="' . $w_state_key . '" ' . $selected . '>' . $w_state . '</option>';
979
  }
980
  else {
981
  $html .= '<span class="wd-width-49 wd-address">
982
+ <input class="wd-width-100" type="text" id="wdform_' . $id1 . '_state' . $form_id . '" name="wdform_' . ($id1 + 3) . '_state' . $form_id . '" value="' . stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . ($id1 + 3) . '_state' . $form_id, "", 'esc_html' ) ) . '" ' . $param['attributes'] . ' />
983
  <label for="wdform_' . $id1 . '_state' . $form_id . '" class="mini_label">' . $w_mini_labels[3] . '</label></span>';
984
  }
985
  }
986
  if ( isset($w_disabled_fields[4]) && $w_disabled_fields[4] == 'no' ) {
987
  $html .= '<span class="wd-width-49 wd-address">
988
+ <input class="wd-width-100" type="text" id="wdform_' . $id1 . '_postal' . $form_id . '" name="wdform_' . ($id1 + 4) . '_postal' . $form_id . '" value="' . stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . ($id1 + 4) . '_postal' . $form_id, "", 'esc_html' ) ) . '" ' . $param['attributes'] . ' />
989
  <label for="wdform_' . $id1 . '_postal' . $form_id . '" class="mini_label">' . $w_mini_labels[4] . '</label></span>';
990
  }
991
  if ( isset($w_disabled_fields[5]) && $w_disabled_fields[5] == 'no' ) {
1074
  }
1075
  foreach ( $params_names as $params_name ) {
1076
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1077
+ $param[$params_name] = esc_html( $temp[0] );
1078
  $temp = $temp[1];
1079
  }
1080
  if ( $temp ) {
1087
 
1088
  $param['w_autofill'] = isset($param['w_autofill']) ? $param['w_autofill'] : 'no';
1089
  if ( $param['w_autofill'] == 'yes' && $wp_useremail ) {
1090
+ $param['w_first_val'] = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element' . $form_id, $wp_useremail, 'esc_html' ) );
1091
  }
1092
  else {
1093
+ $param['w_first_val'] = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element' . $form_id, $param['w_first_val'], 'esc_html' ) );
1094
  }
1095
 
1096
  $param['id'] = $id1;
1100
  $message_check_email = addslashes(__('This is not a valid email address.', WDFMInstance(self::PLUGIN)->prefix));
1101
  $onchange = (isset($param['w_verification']) && $param['w_verification'] == "yes") ? '; wd_check_confirmation_email(\'' . $id1 . '\', \'' . $form_id . '\', \'' . $message_confirm . '\')' : '';
1102
 
1103
+ $html = '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_element' . $form_id . '" name="wdform_' . $id1 . '_element' . $form_id . '" value="' . $param['w_first_val'] . '" title="' . $param['w_title'] . '" placeholder="' . $param['w_title'] . '" ' . $param['attributes'] . ' onchange="wd_check_email(\'' . $id1 . '\', \'' . $form_id . '\', \'' . $message_check_email . '\')' . $onchange . '" />';
1104
 
1105
  // Generate field.
1106
  $rep = $this->wdform_field($type, $param, $row, $html);
1107
 
1108
  if ( isset($param['w_verification']) && $param['w_verification'] == "yes" ) {
1109
+ $param['w_verification_placeholder'] = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_1_element' . $form_id, $param['w_verification_placeholder'], 'esc_html' ) );
1110
  $param['label'] = $param['w_verification_label'];
1111
  $param['id'] = 'wdform_' . $id1 . '_1_element' . $form_id;
1112
 
1113
+ $html = '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_1_element' . $form_id . '" name="wdform_' . $id1 . '_1_element' . $form_id . '" placeholder="' . $param['w_verification_placeholder'] . '" title="' . $param['w_verification_placeholder'] . '" ' . $param['attributes'] . 'onchange="wd_check_confirmation_email(\'' . $id1 . '\', \'' . $form_id . '\', \'' . $message_confirm . '\')" />';
1114
 
1115
  // Generate field.
1116
  $rep .= $this->wdform_field($type, $param, $row, $html);
1170
  }
1171
  foreach ( $params_names as $params_name ) {
1172
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1173
+ $param[$params_name] = esc_html($temp[0]);
1174
  $temp = $temp[1];
1175
  }
1176
  if ( $temp ) {
1181
  }
1182
  }
1183
  $param['w_disable_past_days'] = isset($param['w_disable_past_days']) ? $param['w_disable_past_days'] : 'no';
1184
+ $param['w_date'] = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . "_element" . $form_id, $param['w_date'], 'esc_html' ) );
1185
 
1186
  $rep = '<div type="type_date" class="wdform-field">';
1187
 
1223
  }
1224
  foreach ( $params_names as $params_name ) {
1225
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1226
+ $param[$params_name] = esc_html($temp[0]);
1227
  $temp = $temp[1];
1228
  }
1229
  if ( $temp ) {
1239
 
1240
  $html = '<img type="captcha"
1241
  digit="' . $param['w_digit'] . '"
1242
+ src=" ' . add_query_arg(array('action' => 'formmakerwdcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix, 'digit' => $param['w_digit'], 'i' => $form_id), admin_url('admin-ajax.php')) . '"
1243
  id="wd_captcha' . $form_id . '"
1244
  class="captcha_img wd-hidden"
1245
  ' . $param['attributes'] . ' />';
1284
  }
1285
  foreach ( $params_names as $params_name ) {
1286
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1287
+ $param[$params_name] = esc_html($temp[0]);
1288
  $temp = $temp[1];
1289
  }
1290
  if ( $temp ) {
1305
  $html = '<img type="captcha"
1306
  operations_count="' . $param['w_count'] . '"
1307
  operations="' . $param['w_operations'] . '"
1308
+ src="' . add_query_arg(array('action' => 'formmakerwdmathcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix, 'operations_count' => $param['w_count'], 'operations' => urlencode($param['w_operations']), 'i' => $form_id), admin_url('admin-ajax.php')) . '"
1309
  id="wd_arithmetic_captcha' . $form_id . '"
1310
  class="arithmetic_captcha_img"
1311
  ' . $param['attributes'] . ' />';
1357
  }
1358
  foreach ( $params_names as $params_name ) {
1359
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1360
+ $param[$params_name] = esc_html($temp[0]);
1361
  $temp = $temp[1];
1362
  }
1363
  $invisible = isset($param['w_type']) && $param['w_type'] == 'invisible' ? 1 : 0;
1403
  $temp = $params;
1404
  foreach ( $params_names as $params_name ) {
1405
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1406
+ $param[$params_name] = esc_html($temp[0]);
1407
  $temp = $temp[1];
1408
  }
1409
  if ( $temp ) {
1464
  }
1465
  foreach ( $params_names as $params_name ) {
1466
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1467
+ $param[$params_name] = esc_html($temp[0]);
1468
  $temp = $temp[1];
1469
  }
1470
  if ( $temp ) {
1508
  $temp = $params;
1509
  foreach ( $params_names as $params_name ) {
1510
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1511
+ $param[$params_name] = esc_html( $temp[0] );
1512
  $temp = $temp[1];
1513
  }
1514
  if ( $temp ) {
1519
  }
1520
  }
1521
  $w_first_val = explode('***', $param['w_first_val']);
1522
+ $param['w_first_val'] = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element_dollars' . $form_id, $w_first_val[0], 'esc_html' ) ) . '***' . stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element_cents' . $form_id, $w_first_val[1], 'esc_html' ) );
1523
  $hide_cents = ($param['w_hide_cents'] == "yes" ? "wd-hidden" : "wd-table-cell");
1524
  $w_first_val = explode('***', $param['w_first_val']);
1525
  $w_title = explode('***', $param['w_title']);
1547
  $rep .= '<span class="wdform_colon wd-vertical-middle">&nbsp;' . $form_currency . '&nbsp;</span>';
1548
  $rep .= '</div>';
1549
  $rep .= '<div id="wdform_' . $id1 . '_td_name_dollars" class="wd-table-cell">';
1550
+ $rep .= '<input type="text" id="wdform_' . $id1 . '_element_dollars' . $form_id . '" name="wdform_' . $id1 . '_element_dollars' . $form_id . '" value="' . $w_first_val[0] . '" title="' . $w_title[0] . '" onkeypress="return check_isnum(event)" style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' />';
1551
  $rep .= '</div>';
1552
  $rep .= '<div id="wdform_' . $id1 . '_td_name_divider" class="' . $hide_cents . '">';
1553
  $rep .= '<span class="wdform_colon wd-vertical-middle">&nbsp;.&nbsp;</span>';
1554
  $rep .= '</div>';
1555
  $rep .= '<div id="wdform_' . $id1 . '_td_name_cents" class="' . $hide_cents . '">';
1556
+ $rep .= '<input type="text" class="wd-paypal-cent" id="wdform_' . $id1 . '_element_cents' . $form_id . '" name="wdform_' . $id1 . '_element_cents' . $form_id . '" value="' . $w_first_val[1] . '" title="' . $w_title[1] . '" ' . $param['attributes'] . ' />';
1557
  $rep .= '</div></div>';
1558
  $rep .= '<div id="wdform_' . $id1 . '_tr_price2" class="wd-table-row">';
1559
  $rep .= '<div class="wd-table-cell"><label class="mini_label"></label></div>';
1588
  $temp = $params;
1589
  foreach ( $params_names as $params_name ) {
1590
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1591
+ $param[$params_name] = esc_html($temp[0]);
1592
  $temp = $temp[1];
1593
  }
1594
  if ( $temp ) {
1649
  $temp = $params;
1650
  foreach ( $params_names as $params_name ) {
1651
  $temp = explode('*:*' . $params_name . '*:*', $temp);
1652
+ $param[$params_name] = esc_html($temp[0]);
1653
  $temp = $temp[1];
1654
  }
1655
  if ( $temp ) {
1784
  wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-script-' . $form_id);
1785
  }
1786
  }
1787
+ $_GET['addon_view'] = 'frontend';
1788
+ $_GET['form_id'] = $form_id;
 
1789
  if (WDFMInstance(self::PLUGIN)->is_free != 2) {
1790
  $save_progress_params = array();
1791
  $save_progress_params['form'] = $row;
2234
  }
2235
  foreach ( $params_names as $params_name ) {
2236
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2237
+ $param[$params_name] = esc_html($temp[0]);
2238
  $temp = $temp[1];
2239
  }
2240
  if ( $temp ) {
2256
  $param['w_choices_value'] = explode('***', $param['w_choices_value']);
2257
  $param['w_choices_params'] = explode('***', $param['w_choices_params']);
2258
  }
2259
+ $post_value = WDW_FM_Library(self::PLUGIN)->get( "counter" . $form_id, NULL, 'esc_html' );
2260
  $param['id'] = '';
2261
  $param['w_class'] .= ' wd-flex-wrap' . ($param['w_flow'] != 'hor' ? ' wd-flex-column' : ' wd-flex-row');
2262
  $html = '<div class="wd-flex ' . ($param['w_flow'] == 'hor' ? ($param['w_rowcol'] > 1 ? 'wd-flex-column' : 'wd-flex-row') : ($param['w_rowcol'] > 1 ? 'wd-flex-row' : 'wd-flex-column')) . '">';
2406
  }
2407
  foreach ( $params_names as $params_name ) {
2408
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2409
+ $param[$params_name] = esc_html($temp[0]);
2410
  $temp = $temp[1];
2411
  }
2412
  if ( $temp ) {
2429
  $param['w_choices_value'] = explode('***', $param['w_choices_value']);
2430
  $param['w_choices_params'] = explode('***', $param['w_choices_params']);
2431
  }
2432
+ $post_value = WDW_FM_Library(self::PLUGIN)->get( "counter" . $form_id, NULL, 'esc_html' );
2433
  $param['id'] = '';
2434
  $param['w_class'] .= ' wd-flex-wrap' . ($param['w_flow'] != 'hor' ? ' wd-flex-column' : ' wd-flex-row');
2435
 
2496
  $param['w_choices_checked'][$key] = ($param['w_choices_checked'][$key] == 'true' ? 'checked="checked"' : '');
2497
  }
2498
  else {
2499
+ $param['w_choices_checked'][$key] = (htmlspecialchars($choice) == htmlspecialchars(stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . "_element" . $form_id, "", 'esc_html' ) ) ) ? 'checked="checked"' : '');
2500
  }
2501
  $choice_value = isset($param['w_choices_value']) ? $param['w_choices_value'][$key] : $choice;
2502
  $html .= '<div class="radio-div wd-choice wd-flex ' . (($param['w_field_option_pos'] == "right") ? 'wd-flex-row' : 'wd-flex-row-reverse wd-justify-content' ) . '">';
2576
  }
2577
  foreach ( $params_names as $params_name ) {
2578
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2579
+ $param[$params_name] = esc_html($temp[0]);
2580
  $temp = $temp[1];
2581
  }
2582
  if ( $temp ) {
2596
  if ( !isset($param['w_value_disabled']) ) {
2597
  $param['w_value_disabled'] = 'no';
2598
  }
2599
+ $post_value = WDW_FM_Library(self::PLUGIN)->get( "counter" . $form_id, NULL, 'esc_html' );
2600
  $param['id'] = $id1;
2601
  $param['w_class'] .= ' wd-flex-row';
2602
  $html = '<select class="wd-width-100" id="wdform_' . $id1 . '_element' . $form_id . '" name="wdform_' . $id1 . '_element' . $form_id . '" ' . $param['attributes'] . '>';
2720
  }
2721
  foreach ( $params_names as $params_name ) {
2722
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2723
+ $param[$params_name] = esc_html($temp[0]);
2724
  $temp = $temp[1];
2725
  }
2726
  if ( $temp ) {
2730
  $param['attributes'] = $param['attributes'] . ' ' . $attr;
2731
  }
2732
  }
2733
+ $default_date = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . "_element" . $form_id, $param['w_default_date'], 'esc_html' ) );
2734
 
2735
  $param['id'] = $id1;
2736
  $param['w_class'] .= ' wd-flex-row';
2804
  }
2805
  foreach ( $params_names as $params_name ) {
2806
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2807
+ $param[$params_name] = esc_html($temp[0]);
2808
  $temp = $temp[1];
2809
  }
2810
  if ( $temp ) {
2814
  $param['attributes'] = $param['attributes'] . ' ' . $attr;
2815
  }
2816
  }
2817
+ $param['w_day'] = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . "_day" . $form_id, $param['w_day'], 'esc_html' ) );
2818
+ $param['w_month'] = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . "_month" . $form_id, $param['w_month'], 'esc_html' ) );
2819
+ $param['w_year'] = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . "_year" . $form_id, $param['w_year'], 'esc_html' ) );
2820
 
2821
  if ( $param['w_day_type'] == "SELECT" ) {
2822
  $w_day_type = '<select id="wdform_' . $id1 . '_day' . $form_id . '" name="wdform_' . $id1 . '_day' . $form_id . '" style="width: ' . $param['w_day_size'] . 'px;" ' . $param['attributes'] . '><option value=""></option>';
2998
  }
2999
  foreach ( $params_names as $params_name ) {
3000
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3001
+ $param[$params_name] = esc_html($temp[0]);
3002
  $temp = $temp[1];
3003
  }
3004
  if ( $temp ) {
3071
  }
3072
  foreach ( $params_names as $params_name ) {
3073
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3074
+ $param[$params_name] = esc_html($temp[0]);
3075
  $temp = $temp[1];
3076
  }
3077
  if ( $temp ) {
3096
  data-valid-type="' . ($param['w_time_type'] == '12' ? 'hour12' : 'hour24') . '"
3097
  data-form-id="' . $form_id . '"
3098
  data-wdid="' . $id1 . '"
3099
+ value="' . stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . "_hh" . $form_id, $param['w_hh'], 'esc_html' ) ) . '"
3100
  ' . $param['attributes'] . ' />';
3101
  $html .= '<label for="wdform_' . $id1 . '_hh' . $form_id . '" class="mini_label">' . $w_mini_labels[0] . '</label>';
3102
  $html .= '</div>';
3111
  data-valid-type="minute"
3112
  data-form-id="' . $form_id . '"
3113
  data-wdid="' . $id1 . '"
3114
+ value="' . stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . "_mm" . $form_id, $param['w_mm'], 'esc_html' ) ) . '"
3115
  ' . $param['attributes'] . ' />';
3116
  $html .= '<label for="wdform_' . $id1 . '_mm' . $form_id . '" class="mini_label">' . $w_mini_labels[1] . '</label>';
3117
  $html .= '</div>';
3127
  data-valid-type="second"
3128
  data-form-id="' . $form_id . '"
3129
  data-wdid="' . $id1 . '"
3130
+ value="' . stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . "_ss" . $form_id, $param['w_ss'], 'esc_html' ) ) . '"
3131
  ' . $param['attributes'] . ' />';
3132
  $html .= '<label for="wdform_' . $id1 . '_ss' . $form_id . '" class="mini_label">' . $w_mini_labels[2] . '</label>';
3133
  $html .= '</div>';
3134
  }
3135
  if ( $param['w_time_type'] == '12' ) {
3136
+ if ( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . "_am_pm" . $form_id, $param['w_am_pm'], 'esc_html') == 'am' ) {
3137
  $am_ = "selected=\"selected\"";
3138
  $pm_ = "";
3139
  }
3190
  }
3191
  foreach ( $params_names as $params_name ) {
3192
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3193
+ $param[$params_name] = esc_html($temp[0]);
3194
  $temp = $temp[1];
3195
  }
3196
  if ( $temp ) {
3201
  }
3202
  }
3203
  $param['w_countries'] = explode('***', $param['w_countries']);
3204
+ $post_value = WDW_FM_Library(self::PLUGIN)->get( "counter" . $form_id, NULL, 'esc_html' );
3205
  $param['id'] = $id1;
3206
  $param['w_class'] .= ' wd-flex-row';
3207
 
3210
  $html = '<select class="wd-width-100" id="wdform_' . $id1 . '_element' . $form_id . '" name="wdform_' . $id1 . '_element' . $form_id . '" ' . $param['attributes'] . '>';
3211
  foreach ( $param['w_countries'] as $key => $choice ) {
3212
  if ( isset($post_value) ) {
3213
+ $selected = (htmlspecialchars($choice) == htmlspecialchars(stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . "_element" . $form_id, "", 'esc_html' ) ) ) ? 'selected="selected"' : '');
3214
  }
3215
  $choice_value = $choice;
3216
  $html .= '<option value="' . $choice_value . '" ' . $selected . '>' . $choice . '</option>';
3264
  }
3265
  foreach ( $params_names as $params_name ) {
3266
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3267
+ $param[$params_name] = esc_html($temp[0]);
3268
  $temp = $temp[1];
3269
  }
3270
  if ( $temp ) {
3274
  $param['attributes'] = $param['attributes'] . ' ' . $attr;
3275
  }
3276
  }
3277
+ $param['w_field_value'] = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element' . $form_id, $param['w_field_value'], 'esc_html' ) );
3278
 
3279
  $param['id'] = $id1;
3280
  $param['w_class'] .= ' wd-flex-row';
3330
  }
3331
  foreach ( $params_names as $params_name ) {
3332
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3333
+ $param[$params_name] = esc_html($temp[0]);
3334
  $temp = $temp[1];
3335
  }
3336
  if ( $temp ) {
3394
  }
3395
  foreach ( $params_names as $params_name ) {
3396
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3397
+ $param[$params_name] = esc_html($temp[0]);
3398
  $temp = $temp[1];
3399
  }
3400
  if ( $temp ) {
3408
  $numbers = '';
3409
  $radio_buttons = '';
3410
  $to_check = 0;
3411
+ $post_value = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_scale_radio' . $form_id, NULL, 'esc_html' ) );
3412
  if ( isset($post_value) ) {
3413
  $to_check = $post_value;
3414
  }
3493
  }
3494
  foreach ( $params_names as $params_name ) {
3495
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3496
+ $param[$params_name] = esc_html($temp[0]);
3497
  $temp = $temp[1];
3498
  }
3499
  if ( $temp ) {
3503
  $param['attributes'] = $param['attributes'] . ' ' . $attr;
3504
  }
3505
  }
3506
+ $param['w_field_value'] = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_slider_value' . $form_id, $param['w_field_value'], 'esc_html' ) );
3507
 
3508
  $param['id'] = '';
3509
  $param['w_class'] .= ' wd-flex-column';
3569
  }
3570
  foreach ( $params_names as $params_name ) {
3571
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3572
+ $param[$params_name] = esc_html($temp[0]);
3573
  $temp = $temp[1];
3574
  }
3575
  if ( $temp ) {
3579
  $param['attributes'] = $param['attributes'] . ' ' . $attr;
3580
  }
3581
  }
3582
+ $param['w_field_value1'] = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element' . $form_id . '0', $param['w_field_value1'], 'esc_html' ) );
3583
+ $param['w_field_value2'] = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element' . $form_id . '1', $param['w_field_value2'], 'esc_html' ) );
3584
  $w_mini_labels = explode('***', $param['w_mini_labels']);
3585
 
3586
  $param['id'] = 'wdform_' . $id1 . '_element' . $form_id . '0';
3637
  }
3638
  foreach ( $params_names as $params_name ) {
3639
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3640
+ $param[$params_name] = esc_html($temp[0]);
3641
  $temp = $temp[1];
3642
  }
3643
  if ( $temp ) {
3656
  $html .= '<div id="wdform_' . $id1 . '_element' . $form_id . '">';
3657
  $html .= '<input type="hidden" name="wdform_' . $id1 . '_element' . $form_id . '" value="" />';
3658
  for ( $i = 0; $i < count($w_items); $i++ ) {
3659
+ $value = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_element' . $form_id . '_' . $i, '', 'esc_html' ) );
3660
  $html .= '<div class="wdform_grading">';
3661
  $html .= '<input type="text" id="wdform_' . $id1 . '_element' . $form_id . '_' . $i . '" name="wdform_' . $id1 . '_element' . $form_id . '_' . $i . '" value="' . $value . '" ' . $param['attributes'] . ' />';
3662
  $html .= '<label class="wdform-ch-rad-label" for="wdform_' . $id1 . '_element' . $form_id . '_' . $i . '">' . $w_items[$i] . '</label>';
3714
  }
3715
  foreach ( $params_names as $params_name ) {
3716
  $temp = explode('*:*' . $params_name . '*:*', $temp);
3717
+ $param[$params_name] = esc_html($temp[0]);
3718
  $temp = $temp[1];
3719
  }
3720
  if ( $temp ) {
3738
  $rows_columns .= '<div class="wdform-matrix-cell">';
3739
  if ( $param['w_field_input_type'] == 'radio' ) {
3740
  $to_check = 0;
3741
+ $post_value = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_input_element' . $form_id . '' . $i, NULL, 'esc_html' ) );
3742
  if ( isset($post_value) ) {
3743
  $to_check = $post_value;
3744
  }
3747
  else {
3748
  if ( $param['w_field_input_type'] == 'checkbox' ) {
3749
  $to_check = 0;
3750
+ $post_value = stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_input_element' . $form_id . '' . $i . '_' . $k, NULL, 'esc_html' ) );
3751
  if ( isset($post_value) ) {
3752
  $to_check = $post_value;
3753
  }
3755
  }
3756
  else {
3757
  if ( $param['w_field_input_type'] == 'text' ) {
3758
+ $rows_columns .= '<input id="wdform_' . $id1 . '_input_element' . $form_id . '' . $i . '_' . $k . '" type="text" name="wdform_' . $id1 . '_input_element' . $form_id . '' . $i . '_' . $k . '" value="' . stripslashes( WDW_FM_Library(self::PLUGIN)->get( 'wdform_' . $id1 . '_input_element' . $form_id . '' . $i . '_' . $k, "", 'esc_html' ) ) . '" style="width:' . $param['w_textbox_size'] . 'px">';
3759
  }
3760
  else {
3761
  if ( $param['w_field_input_type'] == 'select' ) {
js/add_field.js CHANGED
@@ -12797,7 +12797,7 @@ function type_captcha(i,w_field_label, w_field_label_size, w_field_label_pos, w_
12797
  var adding = document.createElement(element);
12798
  adding.setAttribute("type", type);
12799
  adding.setAttribute("digit", w_digit);
12800
- adding.setAttribute("src", url_for_ajax + "?action=formmakerwdcaptcha&nonce=" + fm_ajax.ajaxnonce + "&digit=" + w_digit + "&i=form_id_temp");
12801
  adding.setAttribute("id", "_wd_captchaform_id_temp");
12802
  adding.setAttribute("class", "captcha_img");
12803
  adding.setAttribute("onClick", "captcha_refresh('_wd_captcha','form_id_temp')");
@@ -12995,7 +12995,7 @@ function type_arithmetic_captcha(i,w_field_label, w_field_label_size, w_field_la
12995
  adding.setAttribute("operations_count", w_count);
12996
  adding.setAttribute("operations", w_operations);
12997
  adding.setAttribute("input_size", w_input_size);
12998
- adding.setAttribute("src", url_for_ajax + "?action=formmakerwdmathcaptcha&operations_count=" + w_count + "&nonce=" + fm_ajax.ajaxnonce + "&operations=" + w_operations.replace("+", "@") + "&i=form_id_temp");
12999
  adding.setAttribute("id", "_wd_arithmetic_captchaform_id_temp");
13000
  adding.setAttribute("class", "arithmetic_captcha_img");
13001
  adding.setAttribute("onClick", "captcha_refresh('_wd_arithmetic_captcha','form_id_temp')");
12797
  var adding = document.createElement(element);
12798
  adding.setAttribute("type", type);
12799
  adding.setAttribute("digit", w_digit);
12800
+ adding.setAttribute("src", url_for_ajax + "?action=formmakerwdcaptcha&digit=" + w_digit + "&i=form_id_temp");
12801
  adding.setAttribute("id", "_wd_captchaform_id_temp");
12802
  adding.setAttribute("class", "captcha_img");
12803
  adding.setAttribute("onClick", "captcha_refresh('_wd_captcha','form_id_temp')");
12995
  adding.setAttribute("operations_count", w_count);
12996
  adding.setAttribute("operations", w_operations);
12997
  adding.setAttribute("input_size", w_input_size);
12998
+ adding.setAttribute("src", url_for_ajax + "?action=formmakerwdmathcaptcha&operations_count=" + w_count + "&operations=" + w_operations.replace("+", "@") + "&i=form_id_temp");
12999
  adding.setAttribute("id", "_wd_arithmetic_captchaform_id_temp");
13000
  adding.setAttribute("class", "arithmetic_captcha_img");
13001
  adding.setAttribute("onClick", "captcha_refresh('_wd_arithmetic_captcha','form_id_temp')");
js/form_maker_manage_edit.js CHANGED
@@ -151,7 +151,10 @@ function FormManageSubmitButton(check_for_changes) {
151
  l_id_removed[l_id_array[x]] = true;
152
  }
153
 
154
- for (t = 1; t <= form_view_max; t++) {
 
 
 
155
  if (document.getElementById('form_id_tempform_view' + t)) {
156
  wdform_page = document.getElementById('form_id_tempform_view' + t);
157
  remove_whitespace(wdform_page);
@@ -292,7 +295,7 @@ function FormManageSubmitButton(check_for_changes) {
292
  }
293
  }
294
  }
295
- }
296
  if (!check_for_changes) {
297
  document.getElementById('label_order_current').value = fm_base64EncodeUnicode(fm_htmlentities(tox));
298
  }
151
  l_id_removed[l_id_array[x]] = true;
152
  }
153
 
154
+ jQuery(".wdform_page[id^='form_id_tempform_view']").each(function() {
155
+ var idstring = jQuery(this).attr('id');
156
+ var t = idstring.replace('form_id_tempform_view', '');
157
+
158
  if (document.getElementById('form_id_tempform_view' + t)) {
159
  wdform_page = document.getElementById('form_id_tempform_view' + t);
160
  remove_whitespace(wdform_page);
295
  }
296
  }
297
  }
298
+ });
299
  if (!check_for_changes) {
300
  document.getElementById('label_order_current').value = fm_base64EncodeUnicode(fm_htmlentities(tox));
301
  }
js/formmaker_div.js CHANGED
@@ -126,12 +126,12 @@ function change_captcha_digit(digit) {
126
  captcha=document.getElementById('_wd_captchaform_id_temp');
127
  if (document.getElementById('captcha_digit').value) {
128
  captcha.setAttribute("digit", digit);
129
- captcha.setAttribute("src", url_for_ajax + "?action=formmakerwdcaptcha&digit="+digit+"&nonce=" + fm_ajax.ajaxnonce + "&i=form_id_temp");
130
  document.getElementById('_wd_captcha_inputform_id_temp').style.width=(document.getElementById('captcha_digit').value*10+15)+"px";
131
  }
132
  else {
133
  captcha.setAttribute("digit", "6");
134
- captcha.setAttribute("src", url_for_ajax+"?action=formmakerwdcaptcha&digit=6&nonce=" + fm_ajax.ajaxnonce + "&i=form_id_temp");
135
  document.getElementById('_wd_captcha_inputform_id_temp').style.width=(6*10+15)+"px";
136
  }
137
  }
126
  captcha=document.getElementById('_wd_captchaform_id_temp');
127
  if (document.getElementById('captcha_digit').value) {
128
  captcha.setAttribute("digit", digit);
129
+ captcha.setAttribute("src", url_for_ajax + "?action=formmakerwdcaptcha&digit="+digit+"&i=form_id_temp");
130
  document.getElementById('_wd_captcha_inputform_id_temp').style.width=(document.getElementById('captcha_digit').value*10+15)+"px";
131
  }
132
  else {
133
  captcha.setAttribute("digit", "6");
134
+ captcha.setAttribute("src", url_for_ajax+"?action=formmakerwdcaptcha&digit=6&i=form_id_temp");
135
  document.getElementById('_wd_captcha_inputform_id_temp').style.width=(6*10+15)+"px";
136
  }
137
  }
js/manage-edit-scripts.min.js CHANGED
@@ -1 +1 @@
1
- function fm_admin_ready(){jQuery(".wd-header a").on("click",function(){jQuery("input[name='task']").val("add"),jQuery(this).parents("form").submit()}),set_no_items(),jQuery(".wd-datepicker").each(function(){jQuery(this).datepicker(),jQuery(this).datepicker("option","dateFormat",jQuery(this).data("format"))}),jQuery(".hndle:not(.readonly), .handlediv").each(function(){jQuery(this).off("click").on("click",function(){fm_toggle_postbox(this)})}),jQuery(".wd-has-placeholder .dashicons.dashicons-list-view, .wd-editor-placeholder .dashicons.dashicons-list-view").each(function(){jQuery(this).attr("title",form_maker.add_placeholder)}),jQuery(document).on("click",".wd-has-placeholder .dashicons.dashicons-list-view, .wd-editor-placeholder .dashicons.dashicons-list-view",function(){fm_placeholders_popup(jQuery(this).data("id"))}),fm_disabled_uninstall_btn(),jQuery(".fm-uninstall-form #check_yes").on("click",function(){fm_disabled_uninstall_btn()}),void 0!==jQuery(document).tooltip&&jQuery(document).tooltip({show:null,items:".wd-info",content:function(){if(jQuery(this).is(".wd-info"))return jQuery("#"+jQuery(this).data("id")).html()},open:function(e,t){if(void 0===e.originalEvent)return!1;var i=jQuery(t.tooltip).attr("id");jQuery("div.ui-tooltip").not("#"+i).remove()},close:function(e,t){t.tooltip.hover(function(){jQuery(this).stop(!0).fadeTo(400,1)},function(){jQuery(this).fadeOut("400",function(){jQuery(this).remove()})})},position:{my:"center top+30",at:"center top",using:function(e,t){jQuery(this).css(e),jQuery("<div>").addClass("tooltip-arrow").addClass(t.vertical).addClass(t.horizontal).appendTo(this)}}})}function wd_insert_placeholder(e,t){var i=document.getElementById(e);if("undefined"==typeof tinyMCE||(tinyMCE.get(e)&&tinyMCE.get(e).focus(),"none"!=i.style.display))if(i.focus(),document.selection)sel=document.selection.createRange(),sel.text=t;else if(i.selectionStart||"0"==i.selectionStart){var a=i.selectionStart,n=i.selectionEnd;i.value=i.value.substring(0,a)+"{"+t+"}"+i.value.substring(n,i.value.length)}else i.value+="{"+t+"}";else tinyMCE.execCommand("mceInsertContent",!1,"{"+t+"}")}function fm_toggle_postbox(e){jQuery(e).parent(".postbox").toggleClass("closed")}function fm_option_tabs_mail_validation(){return!0}function fm_clear_input_value(e){jQuery("#"+e).val("")}function set_no_items(){jQuery(".colspanchange").attr("colspan",jQuery(".wd-form table.adminlist>thead>tr>th:visible").length+jQuery(".wd-form table.adminlist>thead>tr>td:visible").length)}function search(e){var t=jQuery(e).parents("form");t.attr("action",window.location+"&paged=1&s="+jQuery("input[name='s']").val()),t.submit()}function input_search(e,t){return 13==(e.keyCode?e.keyCode:e.which)&&search(t),!0}function input_pagination(e,t){if(13==(e.keyCode?e.keyCode:e.which)){var i=jQuery(t).parents("form"),a=jQuery(t).val();if(a<=jQuery(t).parents(".pagination-links").data("pages-count")&&0<a){var n=new RegExp("&nonce_fm="+nonce_fm,"g"),l=i.attr("action").replace(n,"").replace(/&paged=(\d+)/,"")+"&paged="+a;i.attr("action",l),location.href=l}}return!0}function fm_select_value(e){e.focus(),e.select()}function fm_doNothing(e){13==(e.keyCode?e.keyCode:e.which?e.which:e.charCode)&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}function wd_bulk_action(e){var t=jQuery("select[name='bulk_action']").val();if(-1!=t){if(!jQuery("input[name^='check']").is(":checked"))return void alert(form_maker.select_at_least_one_item);if("delete"==t&&!confirm(form_maker.delete_confirmation))return!1;jQuery("input[name='task']").val(t),jQuery(e).parents("form").submit()}}function fm_ajax_save(e){var t=jQuery("#"+e).action,i=jQuery("#search_value").val(),a=jQuery("#current_id").val(),n=jQuery("#page_number").val(),l=(jQuery("#search_or_not").val(),jQuery("#ids_string").val()),d=jQuery("#image_order_by").val(),_=jQuery("#asc_or_desc").val(),r=jQuery("#ajax_task").val(),o=jQuery("#image_current_id").val();return ids_array=l.split(","),jQuery.ajax({type:"POST",url:t,data:{search_value:i,current_id:a,page_number:n,image_order_by:d,asc_or_desc:_,ids_string:l,task:"ajax_search",ajax_task:r,image_current_id:o,nonce:fm_ajax.ajaxnonce},success:function(e){var t=jQuery(e).find("#images_table").html();jQuery("#images_table").html(t);t=jQuery(e).find("#tablenav-pages").html();jQuery("#tablenav-pages").html(t),jQuery("#show_hide_weights").val("Hide order column"),fm_show_hide_weights(),fm_run_checkbox()}}),!1}function fm_run_checkbox(){jQuery("tbody").children().children(".check-column").find(":checkbox").click(function(e){if("undefined"==e.shiftKey)return!0;if(e.shiftKey){if(!i)return!0;d=jQuery(i).closest("form").find(":checkbox"),f=d.index(i),j=d.index(this),h=jQuery(this).prop("checked"),0<f&&0<j&&f!=j&&d.slice(f,j).prop("checked",function(){return!!jQuery(this).closest("tr").is(":visible")&&h})}i=this;var t=jQuery(this).closest("tbody").find(":checkbox").filter(":visible").not(":checked");return jQuery(this).closest("table").children("thead, tfoot").find(":checkbox").prop("checked",function(){return 0==t.length}),!0}),jQuery("thead, tfoot").find(".check-column :checkbox").click(function(e){var t=jQuery(this).prop("checked"),i="undefined"!=typeof toggleWithKeyboard&&toggleWithKeyboard,a=e.shiftKey||i;jQuery(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return!jQuery(this).is(":hidden")&&(a?jQuery(this).prop("checked"):!!t)}),jQuery(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return!a&&!!t})})}function fm_set_input_value(e,t){document.getElementById(e)&&(document.getElementById(e).value=t)}function fm_form_submit(e,t,i,a){document.getElementById(t)&&document.getElementById(t).submit(),e.preventDefault?e.preventDefault():e.returnValue=!1}function fm_check_required(e,t){return""==jQuery("#"+e).val()&&(alert(t+" field is required."),jQuery("#"+e).attr("style","border-color: #FF0000; border-style: solid; border-width: 1px;"),jQuery("#"+e).focus(),jQuery("html, body").animate({scrollTop:jQuery("#"+e).offset().top-200},500),!0)}function fm_show_hide_weights(){var a;"Show order column"==jQuery("#show_hide_weights").val()?(jQuery(".connectedSortable").css("cursor","default"),jQuery("#tbody_arr").find(".handle").hide(0),jQuery("#th_order").show(0),jQuery("#tbody_arr").find(".fm_order").show(0),jQuery("#show_hide_weights").val("Hide order column"),jQuery("#tbody_arr").sortable()&&jQuery("#tbody_arr").sortable("disable")):(jQuery(".connectedSortable").css("cursor","move"),a=jQuery("#page_number")&&""!=jQuery("#page_number").val()&&1!=jQuery("#page_number").val()?20*(jQuery("#page_number").val()-1)+1:1,jQuery("#tbody_arr").sortable({handle:".connectedSortable",connectWith:".connectedSortable",update:function(e,t){jQuery("#draganddrop").attr("style",""),jQuery("#draganddrop").html("<strong><p>Changes made in this table should be saved.</p></strong>");var i=a;jQuery(".fm_order").each(function(e){jQuery(this).find("input").val()&&jQuery(this).find("input").val(i++)})}}),jQuery("#tbody_arr").sortable("enable"),jQuery("#tbody_arr").find(".handle").show(0),jQuery("#tbody_arr").find(".handle").attr("class","handle connectedSortable"),jQuery("#th_order").hide(0),jQuery("#tbody_arr").find(".fm_order").hide(0),jQuery("#show_hide_weights").val("Show order column"))}function fm_popup(e){if(void 0===e)e="";var a,l,d;(a=function(){var e,t,i=jQuery("#TB_window"),a=jQuery(window).height(),n=jQuery(window).width();e=l&&l<n-90?l:n-40,t=d&&d<a-60?d:a-40,i.size()&&(i.width(e).height(t),jQuery("#TB_iframeContent").width(e).height(t-27),i.css({"margin-left":"-"+parseInt(e/2,10)+"px"}),void 0!==document.body.style.maxWidth&&i.css({top:(a-t)/2,"margin-top":"0"}))})(),jQuery(window).resize(function(){a()}),jQuery("a.thickbox-preview"+e).click(function(){tb_click.call(this);var e=jQuery(this).parents(".available-theme").find(".activatelink"),t="",i=jQuery(this).attr("href");return l=(l=i.match(/&width=[0-9]+/))?parseInt(l[0].replace(/[^0-9]+/g,""),10):jQuery(window).width()-120,d=(d=i.match(/&height=[0-9]+/))?parseInt(d[0].replace(/[^0-9]+/g,""),10):jQuery(window).height()-120,t=e.length?'&nbsp; <a href="'+(e.attr("href")||"")+'" target="_top" class="tb-theme-preview-link">'+(e.attr("title")||"")+"</a>":'&nbsp; <span class="tb-theme-preview-link">'+(jQuery(this).attr("title")||"")+"</span>",jQuery("#TB_title").css({"background-color":"#222",color:"#dfdfdf"}),jQuery("#TB_closeAjaxWindow").css({float:"right"}),jQuery("#TB_ajaxWindowTitle").css({float:"left"}).html(t),jQuery("#TB_iframeContent").width("100%"),a(),!1}),jQuery(".theme-detail").click(function(){return jQuery(this).siblings(".themedetaildiv").toggle(),!1})}function bwg_inputs(){jQuery(".fm_int_input").keypress(function(e){var t=e.which||e.paramlist_keyCode;return!(31<t&&(t<48||57<t)&&46!=t&&45!=t)})}function fm_check_isnum(e){var t=e.which||e.paramlist_keyCode;return!(31<t&&(t<48||58<t)&&46!=t&&45!=t&&(t<65||70<t)&&(t<97||102<t))}function fm_change_payment_method(e){switch(e){case"paypal":jQuery(".fm_payment_option").show(),jQuery(".fm_paypal_option").show(),jQuery(".fm_payment_option_stripe").hide();break;case"stripe":jQuery(".fm_payment_option").hide(),jQuery(".fm_paypal_option").hide(),jQuery(".fm_payment_option_stripe").show();break;default:jQuery(".fm_payment_option").hide(),jQuery(".fm_paypal_option").hide(),jQuery(".fm_payment_option_stripe").hide()}}function stopRKey(e){var t=(e=e||(event||null)).target?e.target:e.srcElement?e.srcElement:null;if(13==e.keyCode&&("text"==t.type||"search"==t.type))return!1}function fmRemoveHeaderImage(e,t){jQuery("#header_image_url").val(""),jQuery("#header_image").css("background-image",""),jQuery("#header_image").addClass("fm-hide")}function fmOpenMediaUploader(e,t){void 0===t&&(t=!1),e.preventDefault();var i=wp.media({title:"Upload",button:{text:"Add Image"},multiple:!1}).on("select",function(){var e=i.state().get("selection").first().toJSON();jQuery("#header_image_url").val(e.url),jQuery("#header_image").css("background-image",'url("'+e.url+'")'),jQuery("#header_image").css("background-position","center"),jQuery("#header_image").removeClass("fm-hide")}).open();return!1}function fm_toggle_posts(e){jQuery(e).prop("checked")?jQuery(".fm-posts-show, .fm-cat-show").removeClass("fm-hide").addClass("fm-show"):jQuery(".fm-posts-show, .fm-cat-show").removeClass("fm-show").addClass("fm-hide")}function fm_toggle_pages(e){jQuery(e).prop("checked")?jQuery(".fm-pages-show").removeClass("fm-hide").addClass("fm-show"):jQuery(".fm-pages-show").removeClass("fm-show").addClass("fm-hide")}function fm_apply_options(e){fm_set_input_value("task",e),document.getElementById("manage_form").submit()}function pp_live_search(e,t,i){var a=e,n=a.val(),l=a.data("post_type");setTimeout(function(){n===a.val()&&jQuery.ajax({type:"POST",url:ajaxurl,data:{action:"manage_fm",task:"fm_live_search",nonce:fm_ajax.ajaxnonce,pp_live_search:n,pp_post_type:l,pp_full_content:i},beforeSend:function(e){a.css("width","95%"),a.parent().find(".fm-loading").css("display","inline-block")},success:function(e){a.css("width","100%"),a.parent().find(".fm-loading").css("display","none"),a.closest(".fm-pp").find(".pp_search_results").replaceWith(e)},error:function(e){console.log(e)}})},t)}function fm_toggle(e){jQuery(e).parent().next().toggleClass("hide")}function change_tab(e){jQuery(".fm-subscriber-header .fm-button").removeClass("active-button"),jQuery(".fm-subscriber-header ."+e).addClass("active-button"),jQuery(".fm-subscriber-content").hide(),jQuery("."+e+"-tab").show()}function change_form_type(e){jQuery("#fieldset_id").val(e),jQuery(".fm-form-types span").removeClass("active"),jQuery(".fm-form-types").find(".fm-"+e).addClass("active"),jQuery("#type_settings_fieldset .wd-group").removeClass("fm-show").addClass("fm-hide")}function change_hide_show(e){jQuery("."+e+".fm-hide").removeClass("fm-hide").addClass("fm-temporary"),jQuery("."+e+".fm-show").removeClass("fm-show").addClass("fm-hide"),jQuery("."+e+".fm-show-table").removeClass("fm-show-table").addClass("fm-hide"),jQuery("."+e+".fm-temporary").removeClass("fm-temporary").addClass("fm-show"),"fm-embedded"!=e&&(fm_toggle_posts(jQuery(".pp_display_on #pt3")),fm_toggle_pages(jQuery(".pp_display_on #pt4")))}function fm_change_radio_checkbox_text(e){var t=[];t.stripemode=["Test","Live"],t.checkout_mode=["Testmode","Production"],t.mail_mode=["Text","HTML"],t.mail_mode_user=["Text","HTML"],t.value=["1","0"],t.popover_show_on=["Page Exit","Page Load"],t.topbar_position=["Bottom","Top"],t.scrollbox_position=["Left","Right"],jQuery(e).val(t.value[jQuery(e).val()]),jQuery(e).next().val(jQuery(e).val());var i=t[jQuery(e).attr("name")];jQuery(e).find("label").html(i[jQuery(e).val()]),jQuery(e).hasClass("fm-text-yes")?(jQuery(e).removeClass("fm-text-yes").addClass("fm-text-no"),jQuery(e).find("span").animate({right:parseInt(jQuery(e).css("width"))-14+"px"},400,function(){})):(jQuery(e).removeClass("fm-text-no").addClass("fm-text-yes"),jQuery(e).find("span").animate({right:0},400,function(){}))}function fm_show_hide(e){jQuery("."+e).hasClass("fm-hide")?jQuery("."+e).removeClass("fm-hide").addClass("fm-show"):jQuery("."+e).removeClass("fm-show").addClass("fm-hide")}function fm_delete_ip(e){jQuery("#td_ip_"+e+" .loading").css("display","initial");var i=jQuery("#blocked_ips").attr("action");jQuery.ajax({type:"POST",url:i,data:{current_id:e,nonce_fm:jQuery("#nonce_fm").val(),task:"delete_blocked_ip"},success:function(e){var t=parseInt(jQuery(e).find("#total_for_paging").html());isNaN(t)||(i=i.replace(/(paged=)[^\&]+/,"$1"+t)),jQuery("#blocked_ips").parent(".wrap").load(i+" #blocked_ips",function(){window.history.pushState(null,null,i),0!=jQuery(".updated").length?jQuery(" .updated p strong").html("Items Successfully Deleted"):jQuery("<div class='updated below-h2'><p><strong>Items Successfully Deleted.</strong></p></div>").insertBefore("#blocked_ips"),set_no_items()})}})}function fm_save_ip(t){var i=jQuery("#ip"+t).val();url=jQuery("#blocked_ips").attr("action"),jQuery.ajax({type:"POST",url:url,data:{ip:i,nonce_fm:jQuery("#nonce_fm").val(),task:"insert_blocked_ip"},success:function(e){jQuery("#td_ip_"+t).html('<a id="ip'+t+'" class="pointer" title="Edit" onclick="fm_edit_ip('+t+')">'+i+"</a>"),jQuery(".insert, .error").hide(),jQuery("#fm_blocked_ips_message").html("<div class='updated'><strong><p>Items Successfully Inserted.</p></strong></div>"),jQuery("#fm_blocked_ips_message").show()}})}function fm_insert_blocked_ip(){jQuery("#tr .loading").css("display","initial");var e=jQuery("#fm_ip").val(),t=window.location.href;jQuery.ajax({type:"POST",url:t,data:{ip:e,nonce_fm:jQuery("#nonce_fm").val(),task:"insert_blocked_ip",last_id:1},success:function(e){jQuery("#blocked_ips").parent(".wrap").load(t+" #blocked_ips",function(){window.history.pushState(null,null,t),0!=jQuery(".updated").length?jQuery(".updated p strong").html("Items Successfully Saved"):jQuery("<div class='updated below-h2'><p><strong>Items Successfully Saved.</strong></p></div>").insertBefore("#blocked_ips")})}})}function fm_edit_ip(e){var t='<input id="ip'+e+'" class="input_th'+e+' ip_input" type="text" onkeypress="if(event.keyCode == 13){ if (fm_check_required(\'ip'+e+"', 'IP')) {return false;} fm_update_blocked_ip("+e+'); } return fm_check_isnum(event); " value="'+jQuery("#ip"+e).html()+'" name="ip'+e+'"/>';t+='<input type="button" class="button ip_save" style="margin-left: 5px" onclick="if (fm_check_required(\'ip'+e+"', 'IP')) {return false;} fm_update_blocked_ip("+e+'); return false;" value="Save"><div class="loading">',t+="<img src="+plugin_url+"/images/loading.gif></div>",jQuery("#td_ip_"+e).html(t)}function fm_enter_ip(e){if(13==e.which){if(fm_check_required("fm_ip","IP"))return!1;e.preventDefault(),fm_insert_blocked_ip()}}function fm_update_blocked_ip(e){jQuery("#td_ip_"+e+" .loading").css("display","initial");var t=jQuery("#ip"+e).val(),i=window.location.href;jQuery.ajax({type:"POST",url:i,data:{ip:t,current_id:e,nonce_fm:jQuery("#nonce_fm").val(),task:"update_blocked_ip"},success:function(e){jQuery("#fm-form-admin").load(i+" #blocked_ips",function(){0!=jQuery(".updated").length?(window.history.pushState(null,null,i),jQuery(".updated p strong").html("Items Successfully Updated")):jQuery("<div class='updated below-h2'><p><strong>Items Successfully Updated.</strong></p></div>").insertBefore("#blocked_ips")})}})}function onEnableChange(e,t,i){var a=jQuery("#"+e+" #"+t);"1"==i?a.removeClass("hidden"):a.addClass("hidden")}function show_stats(){var e=jQuery(".fm-statistics .fm_error_sorted_label_key");""!=jQuery("#sorted_label_key").val()?(e.hide(),jQuery(".fm-div_stats-loading").addClass("is-active"),jQuery.ajax({dataType:"json",type:"POST",url:show_stats_url,data:{sorted_label_key:jQuery("#sorted_label_key").val(),startdate:jQuery("#startstats").val(),enddate:jQuery("#endstats").val(),nonce:fm_ajax.ajaxnonce},beforeSend:function(e){},error:function(e){},success:function(e){jQuery(".fm-div_stats-loading").removeClass("is-active"),e.html&&jQuery("#div_stats").html(e.html)}})):e.show()}function fm_loading_show(){jQuery("#fm_loading").show()}function fm_loading_hide(){jQuery("#fm_loading").hide(),"function"==typeof add_scroll_width&&add_scroll_width(),set_no_items()}function getFormLocalStorage(){var e={};formId=getAllUrlParams().current_id;var t=localStorage.getItem("fm_form"+formId);return null!=t&&(e=jQuery.parseJSON(t)),e}function getAllUrlParams(e){var t=e?e.split("?")[1]:window.location.search.slice(1),i={};if(t)for(var a=(t=t.split("#")[0]).split("&"),n=0;n<a.length;n++){var l=a[n].split("="),d=void 0,_=l[0].replace(/\[\d*\]/,function(e){return d=e.slice(1,-1),""}),r=void 0===l[1]||l[1];_=_.toLowerCase(),r=r.toLowerCase(),i[_]?("string"==typeof i[_]&&(i[_]=[i[_]]),void 0===d?i[_].push(r):i[_][d]=r):i[_]=r}return i}function fm_disabled_uninstall_btn(){jQuery(".fm-uninstall-form .fm-uninstall-btn").prop("disabled",!0),jQuery(".fm-uninstall-form #check_yes").is(":checked")&&jQuery(".fm-uninstall-form .fm-uninstall-btn").prop("disabled",!1)}function remove_whitespace(e){var t;for(t=0;t<e.childNodes.length;t++)e.childNodes[t]&&"3"==e.childNodes[t].nodeType&&!/\S/.test(e.childNodes[t].nodeValue)?(e.removeChild(e.childNodes[t]),t--):e.childNodes[t].childNodes.length&&remove_whitespace(e.childNodes[t])}function fm_row_handle(e){var t=jQuery(e);t.find(".wdform_row_handle").remove();var i=jQuery('<div class="wdform_row_handle"><span class="fm-ico-draggable"></span><span title="Remove the column" class="page_toolbar fm-ico-delete" onclick="fm_remove_row_popup(this);"></span>'+"<span class=\"add-new-field\" onclick=\"jQuery('#cur_column').removeAttr('id');jQuery(this).parent().parent().attr('id', 'cur_column').val(1);popup_ready(); Enable(); return false;\">"+form_maker_manage.add_new_field+'</span><div class="fm-divider"></div></div>');t.prepend(i),i.after('<div class="fm-section-overlay"></div>')}function sortable_columns(){jQuery("#take").sortable({cursor:"move",placeholder:"highlight",tolerance:"pointer",handle:".form_id_tempform_view_img .fm-ico-draggable",items:"> .wdform-page-and-images",axis:"y",update:function(e,t){refresh_page_numbers()}}),jQuery(".wdform_page").sortable({connectWith:".wdform_page",cursor:"move",placeholder:"highlight",tolerance:"pointer",handle:".wdform_row_handle",cancel:".add-new-field, .page_toolbar",items:"> .wdform_section",create:function(e,t){jQuery(e.target).find(".wdform_section").each(function(){fm_row_handle(this)})},start:function(e,t){jQuery(".wdform_row_empty").hide()},stop:function(e,t){fm_rows_refresh(),jQuery(".wdform_row_empty").show()}}),jQuery(".wdform_column").sortable({connectWith:".wdform_column",cursor:"move",placeholder:"highlight",tolerance:"pointer",cancel:".wdform_section_handle",items:"> .wdform_row, #add_field",start:function(e,t){jQuery(".add-new-button").off("click"),jQuery(".wdform_column").removeClass("fm-hidden"),jQuery("#cur_column").removeAttr("id")},stop:function(e,t){return"add_field_cont"!=t.item.parent().attr("id")&&("add_field"==t.item.attr("id")&&"add_field_cont"!=t.item.parent().attr("id")?(fm_check_something_really_important()||(nextID=jQuery("#add_field").next(".wdform_row").attr("wdid"),jQuery("#add_field").parent().attr("id","cur_column"),popup_ready(),Enable(),jQuery(".add-new-button").removeAttr("onclick")),!1):(jQuery(".wdform_column:not(#add_field_cont):empty").addClass("fm-hidden"),void fm_columns_refresh()))}})}function all_sortable_events(){fm_rows_refresh(),fm_columns_refresh(),jQuery(".wdform_row, .wdform_tr_section_break").off("hover, touchstart").on("hover, touchstart",function(e){if(!jQuery(this).find(".wdform_arrows").is(":visible"))return jQuery(".wdform_arrows").hide(),jQuery(this).find(".wdform_arrows").show(),e.preventDefault(),!1}).off("mouseleave").on("mouseleave",function(){jQuery(this).find(".wdform_arrows").hide()}),jQuery(".wdform_section_handle, .wdform_row_handle").off("hover, touchstart").on("hover, touchstart",function(e){jQuery(this).parent().addClass("fm-hover")}).off("mouseleave").on("mouseleave",function(){jQuery(this).parent().removeClass("fm-hover")})}function fm_change_radio(e){jQuery(e).hasClass("fm-yes")?(jQuery(e).val("0"),jQuery(e).next().val("0"),jQuery(e).removeClass("fm-yes").addClass("fm-no"),jQuery(e).find("span").animate({right:parseInt(jQuery(e).css("width"))-14+"px"},400,function(){})):(jQuery(e).val("1"),jQuery(e).next().val("1"),jQuery(e).find("span").animate({right:0},400,function(){jQuery(e).removeClass("fm-no").addClass("fm-yes")})),"mail_verify"==jQuery(e).next().attr("name")&&show_verify_options(1==jQuery(e).val())}function enable_drag(){jQuery(".wdform_column").sortable("enable"),jQuery(".wdform_arrows_advanced").hide(),jQuery(".wdform_field").css("cursor",""),jQuery("#add_field .wdform_field").css("cursor",""),all_sortable_events()}function refresh_(){document.getElementById("counter").value=gen,jQuery(".wdform-page-and-images").each(function(){var e=jQuery(this);e.find("[id^=page_next_]").removeAttr("src"),e.find("[id^=page_previous_]").removeAttr("src"),e.find(".form_id_tempform_view_img").remove()}),jQuery("#take div").removeClass("ui-sortable ui-sortable-disabled ui-sortable-handle"),jQuery("#add_field_cont").remove(),document.getElementById("form_front").value=fm_base64EncodeUnicode(fm_htmlentities(document.getElementById("take").innerHTML))}function fm_base64EncodeUnicode(e){return utf8Bytes=encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}),btoa(utf8Bytes)}function fm_htmlentities(e){var t=document.createElement("div"),i=document.createTextNode(e);return t.style.cssText="display:none",t.appendChild(i),t.innerHTML}function fm_add_submission_email(e,t,i,a){var n=jQuery("#"+t).val();if(n){var l=jQuery("<p>").attr("class","fm_mail_input").prependTo("#"+i);jQuery("<span>").attr("class","mail_name").text(n).appendTo(l),jQuery("<span>").attr("class","dashicons dashicons-trash").attr("onclick","fm_delete_mail(this, '"+n+"')").attr("title","Delete Email").appendTo(l),jQuery("#"+t).val(""),jQuery("#"+e).val(jQuery("#"+e).val()+n+",")}}function fm_delete_mail(e,t){jQuery(e).parent().remove(),jQuery("#mail").val(jQuery("#mail").val().replace(t+",",""))}function form_maker_options_tabs(e){return jQuery("#fieldset_id").val(e),jQuery(".fm_fieldset_active").removeClass("fm_fieldset_active").addClass("fm_fieldset_deactive"),jQuery("#"+e+"_fieldset").removeClass("fm_fieldset_deactive").addClass("fm_fieldset_active"),jQuery(".fm_fieldset_tab").removeClass("active"),jQuery("#"+e).addClass("active"),!1}function set_type(e){switch(e){case"post":document.getElementById("post").removeAttribute("style"),document.getElementById("page").setAttribute("style","display:none"),document.getElementById("custom_text").setAttribute("style","display:none"),document.getElementById("url").setAttribute("style","display:none");break;case"page":document.getElementById("page").removeAttribute("style"),document.getElementById("post").setAttribute("style","display:none"),document.getElementById("custom_text").setAttribute("style","display:none"),document.getElementById("url").setAttribute("style","display:none");break;case"custom_text":document.getElementById("page").setAttribute("style","display:none"),document.getElementById("post").setAttribute("style","display:none"),document.getElementById("custom_text").removeAttribute("style"),document.getElementById("url").setAttribute("style","display:none");break;case"url":document.getElementById("page").setAttribute("style","display:none"),document.getElementById("post").setAttribute("style","display:none"),document.getElementById("custom_text").setAttribute("style","display:none"),document.getElementById("url").removeAttribute("style");break;case"none":document.getElementById("page").setAttribute("style","display:none"),document.getElementById("post").setAttribute("style","display:none"),document.getElementById("custom_text").setAttribute("style","display:none"),document.getElementById("url").setAttribute("style","display:none")}}function check_isnum(e){var t=e.which||e.keyCode;return!(31<t&&(t<48||57<t)&&46!=t&&45!=t&&(t<35||40<t))}function fm_check_email(e){if(document.getElementById(e)&&""!=jQuery("#"+e).val()){for(var t=jQuery("#"+e).val().split(","),i=/^[\u0400-\u04FFa-zA-Z0-9.+_-]+@[\u0400-\u04FFa-zA-Z0-9.-]+\.[\u0400-\u04FFa-zA-Z]{2,61}$/,a=0;a<t.length;a++){var n=t[a].replace(/^\s+|\s+$/g,"");if(n&&!i.test(n)&&-1===n.indexOf("{")){if(alert("This is not a valid email address."),jQuery("#submenu li a").hasClass("active")){var l=jQuery("#submenu .active").attr("id");if(void 0!==(_=jQuery("#"+e).closest(".fm_fieldset_deactive").attr("id")))if(l!=(r=_.split("_fieldset")[0])){var d=l+"_fieldset";jQuery("#"+d).removeClass("fm_fieldset_active"),jQuery("#"+d).removeClass("fm_fieldset_deactive"),jQuery("#"+_).addClass("fm_fieldset_active"),jQuery("#submenu .active").removeClass("active"),jQuery("#"+r).addClass("active")}}else{var _;if(void 0!==(_=jQuery("#"+e).closest(".fm_fieldset_deactive").attr("id"))){var r=_.split("_fieldset");r=r[0],jQuery("#"+_).removeClass("fm_fieldset_deactive"),jQuery("#"+_).addClass("fm_fieldset_active"),jQuery("#"+r).addClass("active")}}return jQuery("#"+e).css("border","1px solid #FF0000"),jQuery("#"+e).focus(),jQuery("html, body").animate({scrollTop:jQuery("#"+e).offset().top-200},500),!0}}jQuery("#"+e).css("border","1px solid #ddd")}return!1}function wdhide(e){document.getElementById(e).style.display="none"}function wdshow(e){document.getElementById(e).style.display="block"}function delete_field_condition(e){var t=e.split("_");document.getElementById("condition"+t[0]).removeChild(document.getElementById("condition_div"+e))}function change_choices(e,t,i,a){switch(e=e.split("_"),global_index=e[0],id=e[1],index=e[2],ids_array=t.split("@@**@@"),types_array=i.split("@@**@@"),params_array=a.split("@@**@@"),types_array[id]){case"type_text":case"type_password":case"type_textarea":case"type_name":case"type_submitter_mail":case"type_number":case"type_phone":case"type_paypal_price":case"type_paypal_price_new":case"type_spinner":case"type_date_new":case"type_phone_new":if("type_number"==types_array[id]||"type_phone"==types_array[id])var n="return check_isnum_space(event)";else if("type_paypal_price"==types_array[id]||"type_paypal_price_new"==types_array[id])n="return check_isnum_point(event)";else n="";if("SELECT"==document.getElementById("field_value"+global_index+"_"+index).tagName){document.getElementById("condition_div"+global_index+"_"+index).removeChild(document.getElementById("field_value"+global_index+"_"+index));var l=document.createElement("input");l.setAttribute("id","field_value"+global_index+"_"+index),l.setAttribute("type","text"),l.setAttribute("value",""),l.setAttribute("class","fm_condition_field_input_value"),l.setAttribute("onKeyPress",n),document.getElementById("condition_div"+global_index+"_"+index).insertBefore(l,document.getElementById("delete_condition"+global_index+"_"+index)),document.getElementById("condition_div"+global_index+"_"+index).insertBefore(document.createTextNode(" "),document.getElementById("delete_condition"+global_index+"_"+index))}else document.getElementById("field_value"+global_index+"_"+index).value="",document.getElementById("field_value"+global_index+"_"+index).setAttribute("onKeyPress",n);break;case"type_own_select":case"type_radio":case"type_checkbox":for("type_own_select"==types_array[id]?w_size=params_array[id].split("*:*w_size*:*"):w_size=params_array[id].split("*:*w_flow*:*"),w_choices=w_size[1].split("*:*w_choices*:*"),w_choices_array=w_choices[0].split("***"),-1!==w_size[1].indexOf("*:*w_value_disabled*:*")?(w_value_disabled=w_size[1].split("*:*w_value_disabled*:*"),w_choices_value=w_value_disabled[1].split("*:*w_choices_value*:*"),w_choices_value_array=w_choices_value[0].split("***")):w_choices_value_array=w_choices_array,(_=document.createElement("select")).setAttribute("id","field_value"+global_index+"_"+index),_.setAttribute("class","fm_condition_field_select_value"),"type_checkbox"==types_array[id]&&(_.setAttribute("multiple","multiple"),_.setAttribute("class","multiple_select")),k=0;k<w_choices_array.length;k++){(d=document.createElement("option")).setAttribute("id","choise_"+global_index+"_"+k),d.setAttribute("value",w_choices_value_array[k]),d.innerHTML=w_choices_array[k],-1===w_choices_array[k].indexOf("[")&&-1===w_choices_array[k].indexOf("]")&&_.appendChild(d)}document.getElementById("condition_div"+global_index+"_"+index).removeChild(document.getElementById("field_value"+global_index+"_"+index)),document.getElementById("condition_div"+global_index+"_"+index).insertBefore(_,document.getElementById("delete_condition"+global_index+"_"+index)),document.getElementById("condition_div"+global_index+"_"+index).insertBefore(document.createTextNode(" "),document.getElementById("delete_condition"+global_index+"_"+index));break;case"type_paypal_select":case"type_paypal_radio":case"type_paypal_checkbox":case"type_paypal_shipping":for("type_paypal_select"==types_array[id]?w_size=params_array[id].split("*:*w_size*:*"):w_size=params_array[id].split("*:*w_flow*:*"),w_choices=w_size[1].split("*:*w_choices*:*"),w_choices_array=w_choices[0].split("***"),w_choices_price=w_choices[1].split("*:*w_choices_price*:*"),w_choices_price_array=w_choices_price[0].split("***"),(_=document.createElement("select")).setAttribute("id","field_value"+global_index+"_"+index),_.setAttribute("class","fm_condition_field_select_value"),"type_paypal_checkbox"==types_array[id]&&(_.setAttribute("multiple","multiple"),_.setAttribute("class","multiple_select")),k=0;k<w_choices_array.length;k++){var d;(d=document.createElement("option")).setAttribute("id","choise_"+global_index+"_"+k),d.setAttribute("value",w_choices_array[k]+"*:*value*:*"+w_choices_price_array[k]),d.innerHTML=w_choices_array[k],-1===w_choices_array[k].indexOf("[")&&-1===w_choices_array[k].indexOf("]")&&_.appendChild(d)}document.getElementById("condition_div"+global_index+"_"+index).removeChild(document.getElementById("field_value"+global_index+"_"+index)),document.getElementById("condition_div"+global_index+"_"+index).insertBefore(_,document.getElementById("delete_condition"+global_index+"_"+index)),document.getElementById("condition_div"+global_index+"_"+index).insertBefore(document.createTextNode(" "),document.getElementById("delete_condition"+global_index+"_"+index));break;case"type_address":var _;countries=form_maker.countries,(_=document.createElement("select")).setAttribute("id","field_value"+global_index+"_"+m),_.setAttribute("class","fm_condition_field_select_value"),jQuery.each(countries,function(e,t){var i=document.createElement("option");_.setAttribute("id","field_value"+global_index+"_"+index),i.setAttribute("value",t),i.innerHTML=t,_.appendChild(i)}),document.getElementById("condition_div"+global_index+"_"+index).removeChild(document.getElementById("field_value"+global_index+"_"+index)),document.getElementById("condition_div"+global_index+"_"+index).insertBefore(_,document.getElementById("delete_condition"+global_index+"_"+index)),document.getElementById("condition_div"+global_index+"_"+index).insertBefore(document.createTextNode(" "),document.getElementById("delete_condition"+global_index+"_"+index))}}function add_condition_fields(a,e,t,n,l){for(ids=e.split("@@**@@"),labels=t.split("@@**@@"),types=n.split("@@**@@"),params=l.split("@@**@@"),i=500;0<=i&&!document.getElementById("condition_div"+a+"_"+i);i--);m=i+1;var d=document.createElement("div");d.setAttribute("id","condition_div"+a+"_"+m);var _=document.createElement("select");for(_.setAttribute("id","field_labels"+a+"_"+m),_.setAttribute("onchange","change_choices(options[selectedIndex].id+'_"+m+"','"+e+"','"+n+"','"+l.replace(/\'/g,"\\'")+"')"),_.setAttribute("class","fm_condition_field_labels"),k=0;k<labels.length;k++)if(ids[k]!=document.getElementById("fields"+a).value){var r=document.createElement("option");r.setAttribute("id",a+"_"+k),r.setAttribute("value",ids[k]),r.innerHTML=labels[k],_.appendChild(r)}d.appendChild(_),d.appendChild(document.createTextNode(" "));var o=document.createElement("select");o.setAttribute("id","is_select"+a+"_"+m),o.setAttribute("class","fm_condition_is_select");var s=document.createElement("option");s.setAttribute("id","is"),s.setAttribute("value","=="),s.innerHTML="is";var u=document.createElement("option");u.setAttribute("id","is_not"),u.setAttribute("value","!="),u.innerHTML="is not";var c=document.createElement("option");c.setAttribute("id","like"),c.setAttribute("value","%"),c.innerHTML="like";var p=document.createElement("option");p.setAttribute("id","not_like"),p.setAttribute("value","!%"),p.innerHTML="not like";var f=document.createElement("option");f.setAttribute("id","empty"),f.setAttribute("value","="),f.innerHTML="empty";var y=document.createElement("option");if(y.setAttribute("id","not_empty"),y.setAttribute("value","!"),y.innerHTML="not empty",o.appendChild(s),o.appendChild(u),o.appendChild(c),o.appendChild(p),o.appendChild(f),o.appendChild(y),d.appendChild(o),d.appendChild(document.createTextNode(" ")),ids[0]!=document.getElementById("fields"+a).value)var h=0;else h=1;switch(types[h]){case"type_text":case"type_star_rating":case"type_password":case"type_textarea":case"type_name":case"type_submitter_mail":case"type_phone":case"type_number":case"type_paypal_price":case"type_paypal_price_new":case"type_spinner":case"type_date_new":case"type_phone_new":if("type_number"==types[h]||"type_phone"==types[h])var b="return check_isnum_space(event)";else if("type_paypal_price"==types[h]||"type_paypal_price_new"==types[h])b="return check_isnum_point(event)";else b="";var v=document.createElement("input");v.setAttribute("id","field_value"+a+"_"+m),v.setAttribute("type","text"),v.setAttribute("value",""),v.setAttribute("class","fm_condition_field_input_value"),v.setAttribute("onKeyPress",b),d.appendChild(v);break;case"type_checkbox":case"type_radio":case"type_own_select":for("type_own_select"==types[h]?w_size=params[h].split("*:*w_size*:*"):w_size=params[h].split("*:*w_flow*:*"),w_choices=w_size[1].split("*:*w_choices*:*"),w_choices_array=w_choices[0].split("***"),-1!==w_size[1].indexOf("*:*w_value_disabled*:*")?(w_value_disabled=w_size[1].split("*:*w_value_disabled*:*"),w_choices_value=w_value_disabled[1].split("*:*w_choices_value*:*"),w_choices_value_array=w_choices_value[0].split("***")):w_choices_value_array=w_choices_array,(g=document.createElement("select")).setAttribute("id","field_value"+a+"_"+m),g.style.cssText="vertical-align: top; width:200px;","type_checkbox"==types[h]&&(g.setAttribute("multiple","multiple"),g.setAttribute("class","multiple_select")),k=0;k<w_choices_array.length;k++){(w=document.createElement("option")).setAttribute("id","choise_"+a+"_"+k),w.setAttribute("value",w_choices_value_array[k]),w.innerHTML=w_choices_array[k],-1===w_choices_array[k].indexOf("[")&&-1===w_choices_array[k].indexOf("]")&&g.appendChild(w)}d.appendChild(g);break;case"type_paypal_select":case"type_paypal_checkbox":case"type_paypal_radio":case"type_paypal_shipping":for("type_paypal_select"==types[h]?w_size=params[h].split("*:*w_size*:*"):w_size=params[h].split("*:*w_flow*:*"),w_choices=w_size[1].split("*:*w_choices*:*"),w_choices_array=w_choices[0].split("***"),w_choices_price=w_choices[1].split("*:*w_choices_price*:*"),w_choices_price_array=w_choices_price[0].split("***"),(g=document.createElement("select")).setAttribute("id","field_value"+a+"_"+m),g.style.cssText="vertical-align: top; width:200px;","type_paypal_checkbox"==types[h]&&(g.setAttribute("multiple","multiple"),g.setAttribute("class","multiple_select")),k=0;k<w_choices_array.length;k++){var w;(w=document.createElement("option")).setAttribute("id","choise_"+a+"_"+k),w.setAttribute("value",w_choices_array[k]+"*:*value*:*"+w_choices_price_array[k]),w.innerHTML=w_choices_array[k],-1===w_choices_array[k].indexOf("[")&&-1===w_choices_array[k].indexOf("]")&&g.appendChild(w)}d.appendChild(g);break;case"type_address":var g;countries=form_maker.countries,(g=document.createElement("select")).setAttribute("id","field_value"+a+"_"+m),g.setAttribute("class","fm_condition_field_select_value"),jQuery.each(countries,function(e,t){var i=document.createElement("option");i.setAttribute("id","choise_"+a+"_"+k),i.setAttribute("value",t),i.innerHTML=t,g.appendChild(i)}),d.appendChild(g)}d.appendChild(document.createTextNode(" "));var E=document.createElement("span");E.setAttribute("class","dashicons dashicons-trash"),E.setAttribute("id","delete_condition"+a+"_"+m),E.setAttribute("onClick",'delete_field_condition("'+a+"_"+m+'")'),E.style.cssText="vertical-align: middle",d.appendChild(E),document.getElementById("condition"+a).appendChild(d)}function add_condition(e,t,a,n,l,d){for(i=500;0<=i&&!document.getElementById("condition"+i);i--);num=i+1,ids=l.split("@@**@@"),labels=d.split("@@**@@");var _=document.createElement("div");_.setAttribute("id","condition"+num),_.setAttribute("class","fm_condition");var r=document.createElement("div");r.setAttribute("id","conditional_fileds"+num);var o=document.createElement("select");o.setAttribute("id","show_hide"+num),o.setAttribute("name","show_hide"+num),o.setAttribute("class","fm_condition_show_hide");var m=document.createElement("option");m.setAttribute("value","1"),m.innerHTML="show";var s=document.createElement("option");s.setAttribute("value","0"),s.innerHTML="hide",o.appendChild(m),o.appendChild(s);var u=document.createElement("select");for(u.setAttribute("id","fields"+num),u.setAttribute("name","fields"+num),u.setAttribute("class","fm_condition_fields"),k=0;k<labels.length;k++){var c=document.createElement("option");c.setAttribute("value",ids[k]),c.innerHTML=labels[k],u.appendChild(c)}var p=document.createElement("span");p.innerHTML="if";var f=document.createElement("select");f.setAttribute("id","all_any"+num),f.setAttribute("name","all_any"+num),f.setAttribute("class","fm_condition_all_any");var y=document.createElement("option");y.setAttribute("value","and"),y.innerHTML="all";var h=document.createElement("option");h.setAttribute("value","or"),h.innerHTML="any",f.appendChild(y),f.appendChild(h);var b=document.createElement("span");b.style.maxWidth="235px",b.style.width="100%",b.style.display="inline-block",b.innerHTML="of the following match:";var v=document.createElement("span");v.setAttribute("class","dashicons dashicons-plus-alt"),v.setAttribute("onClick",'add_condition_fields("'+num+'", "'+e+'", "'+t.replace(/\'/g,"\\'").replace(/\"/g,"&quot;")+'", "'+a.replace(/\'/g,"\\'").replace(/\"/g,"&quot;")+'", "'+n.replace(/\'/g,"\\'").replace(/\"/g,"&quot;")+'")');var w=document.createElement("span");w.setAttribute("class","dashicons dashicons-trash"),w.setAttribute("onClick",'delete_condition("'+num+'")'),r.appendChild(o),r.appendChild(document.createTextNode(" ")),r.appendChild(u),r.appendChild(document.createTextNode(" ")),r.appendChild(p),r.appendChild(document.createTextNode(" ")),r.appendChild(f),r.appendChild(document.createTextNode(" ")),r.appendChild(b),r.appendChild(document.createTextNode(" ")),r.appendChild(w),r.appendChild(document.createTextNode(" ")),r.appendChild(v),_.appendChild(r),document.getElementById("conditions_fieldset_wrap").appendChild(_)}function delete_condition(e){document.getElementById("conditions_fieldset_wrap").removeChild(document.getElementById("condition"+e))}function acces_level(e){var t="";for(i=0;i<=parseInt(e);i++)document.getElementById("user_"+i).checked&&(t=t+document.getElementById("user_"+i).value+",");document.getElementById("user_id_wd").value=t}function check_isnum_space(e){var t=e.which||e.keyCode;return 32==t||!(31<t&&(t<48||57<t))}function check_isnum_point(e){var t=e.which||e.keyCode;return 46==t||!(31<t&&(t<48||57<t))}function check_stripe_required_fields(){if(jQuery("#paypal_mode2").prop("checked"))for("1"==jQuery("#stripemode").val()?(fields=["live_sec","live_pub"],fields_titles=["Live secret key","Live publishable key"]):(fields=["test_sec","test_pub"],fields_titles=["Test secret key","Test publishable key"]),i=0;i<fields.length;i++)if(!jQuery("#"+fields[i]).val())return jQuery("#"+fields[i]).focus(),alert(fields_titles[i]+" is required."),!0;return!1}function check_calculator_required_fields(){var i=0;return jQuery(jQuery("#wd_calculated_field_table").find('[id^="wdc_equation_"]')).each(function(){if(""==jQuery(this).val()){var e=jQuery(this).attr("id").replace("wdc_equation_",""),t=jQuery(jQuery("#wd_calculated_field_table").find("[data-field='"+e+"']")).html();i=1,jQuery(this).focus(),alert("Set equation for the field "+t)}if(1==i)return!1}),1==i}function set_theme(){theme_id="0"==jQuery("#theme").val()?default_theme:jQuery("#theme").val(),jQuery("#edit_css").attr("onclick","window.open('"+theme_edit_url+"&current_id="+theme_id+"'); return false;"),1==jQuery("#theme option:selected").attr("data-version")?jQuery("#old_theme_notice").show():jQuery("#old_theme_notice").hide()}jQuery(document).on("ready fm_tab_loaded, ready fm_tab_email_loaded",function(){fm_admin_ready()}),jQuery(window).on("load",function(){jQuery("#fm_loading").hide(),jQuery("#fm_admin_container").show(),"function"==typeof add_scroll_width&&add_scroll_width(),set_no_items(),jQuery("#fm_ask_question").parent().attr("target","_blank")}),document.onkeypress=stopRKey,jQuery(document).ready(function(){jQuery(".pp_display_on #pt0").click(function(){var e=jQuery(this).prop("checked");jQuery('.pp_display_on input[type="checkbox"]').prop("checked",e),e?jQuery(".fm-posts-show, .fm-pages-show, .fm-cat-show").removeClass("fm-hide").addClass("fm-show"):jQuery(".fm-posts-show, .fm-pages-show, .fm-cat-show").removeClass("fm-show").addClass("fm-hide")}),jQuery('.pp_display_on input[type="checkbox"]:not("#pt0")').click(function(){var e=jQuery(this).prop("checked");jQuery(".pp_display_on #pt0").prop("checked")&&!e&&jQuery(".pp_display_on #pt0").prop("checked",!1)}),jQuery(".pp_display_on #pt4").click(function(){fm_toggle_pages(this)}),jQuery(".pp_display_on #pt3").click(function(){fm_toggle_posts(this)}),jQuery("body").on("focusin",".pp_search_posts",function(){var e=jQuery(this);e.closest("ul").find(".pp_live_search").removeClass("fm-hide"),e.hasClass("already_triggered")||(e.addClass("already_triggered"),pp_live_search(e,500,!0))}),jQuery(document).click(function(){jQuery(".pp_live_search").addClass("fm-hide")}),jQuery("body").on("click",".fm-pp",function(){return!1}),jQuery("body").on("input",".pp_search_posts",function(){pp_live_search(jQuery(this),500,!0)}),jQuery("body").on("click",".pp_search_results li",function(){var e=jQuery(this);if(!e.hasClass("pp_no_res")){var t=e.text(),i=e.data("post_id"),a=e.closest(".fm-pp"),n=a.find(".pp_selected"),l=a.find(".pp_exclude"),d='<span data-post_id="'+i+'">'+t+'<span class="pp_selected_remove">x</span></span>';-1===n.html().indexOf('data-post_id="'+i+'"')&&(n.append(d),""===l.val()?l.val(i):l.val(function(e,t){return t+","+i}))}return!1}),jQuery("body").on("click",".pp_selected span.pp_selected_remove",function(){var e=jQuery(this).parent(),t=e.closest(".fm-pp").find(".pp_exclude"),i=t.val(),a=e.data("post_id");if(-1!==i.indexOf(a)){var n,l=-1!==i.indexOf(","+a)?","+a:a+",";l=-1!==i.indexOf(",")?l:a;n=i.replace(l,""),t.val(n)}return e.remove(),!1}),jQuery("body").on("click",'.pp_display_on_categories input[name="display_on_categories[]"]',function(){var e=jQuery('.pp_display_on_categories input[name="display_on_categories[]"]'),t=jQuery(".fm-display-all-categories");if("select_all_categories"==jQuery(this).val())jQuery(this).is(":checked")?e.prop("checked",!0):e.prop("checked",!1);else{var i=jQuery('input[name="display_on_categories[]"]:checked').length,a=parseInt(t.attr("data-categories-count"));jQuery(this).prop("checked")||(i-=1),t.prop("checked",!1),i==a&&t.prop("checked",!0)}})}),function(_){_.fn.serializeObject=function(){var n=this,l={},t={},d={validate:/^[a-zA-Z][a-zA-Z0-9_]*(?:\[(?:\d*|[a-zA-Z0-9_]+)\])*$/,key:/[a-zA-Z0-9_]+|(?=\[\])/g,push:/^$/,fixed:/^\d+$/,named:/^[a-zA-Z0-9_]+$/};return this.build=function(e,t,i){return e[t]=i,e},this.push_counter=function(e){return void 0===t[e]&&(t[e]=0),t[e]++},_.each(_(this).serializeArray(),function(){if(d.validate.test(this.name)){for(var e,t=this.name.match(d.key),i=this.value,a=this.name;void 0!==(e=t.pop());)a=a.replace(new RegExp("\\["+e+"\\]$"),""),e.match(d.push)?i=n.build([],n.push_counter(a),i):e.match(d.fixed)?i=n.build([],e,i):e.match(d.named)&&(i=n.build({},e,i));l=_.extend(!0,l,i)}}),l}}(jQuery),jQuery(document).on("dblclick",".wdform_row, .wdform_tr_section_break",function(){edit(jQuery(this).attr("wdid"))}),function(t){function i(e,t){if(!(1<e.originalEvent.touches.length)){e.preventDefault();var i=e.originalEvent.changedTouches[0],a=document.createEvent("MouseEvents");a.initMouseEvent(t,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(a)}}if(t.support.touch="ontouchend"in document,t.support.touch){var a,e=t.ui.mouse.prototype,n=e._mouseInit,l=e._mouseDestroy;e._touchStart=function(e){!a&&this._mouseCapture(e.originalEvent.changedTouches[0])&&(a=!0,this._touchMoved=!1,i(e,"mouseover"),i(e,"mousemove"),i(e,"mousedown"))},e._touchMove=function(e){a&&(this._touchMoved=!0,i(e,"mousemove"))},e._touchEnd=function(e){a&&(i(e,"mouseup"),i(e,"mouseout"),this._touchMoved||i(e,"click"),a=!1)},e._mouseInit=function(){var e=this;e.element.bind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),n.call(e)},e._mouseDestroy=function(){var e=this;e.element.unbind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),l.call(e)}}}(jQuery);var gmapdata=new Array,gmapmarker=new Array,c;function if_gmap_init(e){map=document.getElementById(e+"_elementform_id_temp");var t=parseInt(map.getAttribute("zoom")),i=map.getAttribute("center_x"),a=map.getAttribute("center_y"),n=new google.maps.LatLng(a,i);return gmapdata[e]=new google.maps.Map(document.getElementById(e+"_elementform_id_temp"),{center:n,zoom:t,mapTypeId:"roadmap"}),google.maps.event.addListener(gmapdata[e],"zoom_changed",function(){document.getElementById(e+"_elementform_id_temp").setAttribute("zoom",gmapdata[e].getZoom())}),gmapmarker[e]=new Array,!1}function update_position(e,i){var t=document.getElementById("longval"+i).value,a=document.getElementById("latval"+i).value;0<t.length?1==isNaN(parseFloat(t))&&(t=2.294254):t=2.294254,0<a.length?1==isNaN(parseFloat(a))&&(a=48.858334):a=48.858334;var n=new google.maps.LatLng(a,t);gmapmarker[e][i].setPosition(n),gmapdata[e].setCenter(n),cur_zoom=gmapdata[e].getZoom(),gmapdata[e].setZoom(cur_zoom),geocoder=new google.maps.Geocoder,geocoder.geocode({latLng:gmapmarker[e][i].getPosition()},function(e,t){t==google.maps.GeocoderStatus.OK&&e[0]&&document.getElementById("addrval"+i)&&(document.getElementById("addrval"+i).value=e[0].formatted_address)});var l=document.getElementById(e+"_elementform_id_temp");return l.setAttribute("long"+i,t),l.setAttribute("lat"+i,a),!1}function remove_marker(e,t){gmapmarker[e][t].setMap(null)}function add_marker_on_map(t,i,e,a,n,l){if(map=document.getElementById(t+"_elementform_id_temp"),null==e){var d=gmapdata[t].getCenter();a=gmapdata[t].getCenter().lat(),e=gmapdata[t].getCenter().lng()}else d=new google.maps.LatLng(a,e);return geocoder=new google.maps.Geocoder,gmapmarker[t][i]=new google.maps.Marker({map:gmapdata[t],position:d,draggable:l}),gmapmarker[t][i].setDraggable(l),infoW=new google.maps.InfoWindow,google.maps.event.addListener(gmapdata[t],"mouseover",function(e){document.getElementById("longval"+i)||gmapmarker[t][i].setDraggable(!1)}),google.maps.event.addListener(gmapmarker[t][i],"drag",function(){document.getElementById("longval"+i)&&(geocoder.geocode({latLng:gmapmarker[t][i].getPosition()},function(e,t){t==google.maps.GeocoderStatus.OK&&e[0]&&document.getElementById("addrval"+i)&&(document.getElementById("addrval"+i).value=e[0].formatted_address)}),map.setAttribute("long"+i,gmapmarker[t][i].getPosition().lng().toFixed(6)),map.setAttribute("lat"+i,gmapmarker[t][i].getPosition().lat().toFixed(6)),document.getElementById("latval"+i).value=gmapmarker[t][i].getPosition().lat().toFixed(6),document.getElementById("longval"+i).value=gmapmarker[t][i].getPosition().lng().toFixed(6))}),google.maps.event.addListener(gmapmarker[t][i],"click",function(){infoW.setContent('<div style="overflow: hidden;">'+document.getElementById(t+"_elementform_id_temp").getAttribute("info"+i)+"</div>");infoW.setOptions({maxWidth:"300"}),infoW.open(this.getMap(),this)}),document.getElementById("longval"+i)&&(document.getElementById("longval"+i).value=e,document.getElementById("latval"+i).value=a,geocoder.geocode({latLng:gmapmarker[t][i].getPosition()},function(e,t){t==google.maps.GeocoderStatus.OK&&e[0]&&document.getElementById("addrval"+i)&&(document.getElementById("addrval"+i).value=e[0].formatted_address)}),map.setAttribute("long"+i,e),map.setAttribute("lat"+i,a)),!1}function changeAddress(i,a){var e=document.getElementById("addrval"+a).value;geocoder.geocode({address:e},function(e,t){t==google.maps.GeocoderStatus.OK&&(gmapdata[i].setCenter(e[0].geometry.location),gmapmarker[i][a].setPosition(e[0].geometry.location),document.getElementById("latval"+a).value=gmapmarker[i][a].getPosition().lat().toFixed(6),document.getElementById("longval"+a).value=gmapmarker[i][a].getPosition().lng().toFixed(6),map.setAttribute("long"+a,gmapmarker[i][a].getPosition().lng().toFixed(6)),map.setAttribute("lat"+a,gmapmarker[i][a].getPosition().lat().toFixed(6)))})}function change_info(e,t,i){map=document.getElementById(t+"_elementform_id_temp"),map.setAttribute("info"+i,e)}function if_gmap_updateMap(e){map=document.getElementById(e+"_elementform_id_temp"),w_long=gmapdata[e].getCenter().lng(),w_lat=gmapdata[e].getCenter().lat(),map.setAttribute("center_x",w_long),map.setAttribute("center_y",w_lat)}!function(t){"function"==typeof define&&define.amd?define(["jquery"],function(e){t(e,window,document)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window,document):t(jQuery,window,document)}(function(r,_,e,l){"use strict";var d="intlTelInput",i=1,a={allowDropdown:!0,autoHideDialCode:!0,autoPlaceholder:"polite",customPlaceholder:null,dropdownContainer:"",excludeCountries:[],formatOnDisplay:!0,geoIpLookup:null,initialCountry:"",nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",preferredCountries:["us","gb"],separateDialCode:!1,utilsScript:""},o=38,m=40,s=13,u=27,t=43,c=65,p=90,f=32,n=9,y=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"];function h(e,t){this.telInput=r(e),this.options=r.extend({},a,t),this.ns="."+d+i++,this.isGoodBrowser=Boolean(e.setSelectionRange),this.hadInitialPlaceholder=Boolean(r(e).attr("placeholder"))}r(_).on("load",function(){r.fn[d].windowLoaded=!0}),h.prototype={_init:function(){return this.options.nationalMode&&(this.options.autoHideDialCode=!1),this.options.separateDialCode&&(this.options.autoHideDialCode=this.options.nationalMode=!1),this.isMobile=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),this.isMobile&&(r("body").addClass("iti-mobile"),this.options.dropdownContainer||(this.options.dropdownContainer="body")),this.autoCountryDeferred=new r.Deferred,this.utilsScriptDeferred=new r.Deferred,this._processCountryData(),this._generateMarkup(),this._setInitialState(),this._initListeners(),this._initRequests(),[this.autoCountryDeferred,this.utilsScriptDeferred]},_processCountryData:function(){this._processAllCountries(),this._processCountryCodes(),this._processPreferredCountries()},_addCountryCode:function(e,t,i){t in this.countryCodes||(this.countryCodes[t]=[]);var a=i||0;this.countryCodes[t][a]=e},_filterCountries:function(e,t){var i;for(i=0;i<e.length;i++)e[i]=e[i].toLowerCase();for(this.countries=[],i=0;i<b.length;i++)t(r.inArray(b[i].iso2,e))&&this.countries.push(b[i])},_processAllCountries:function(){this.options.onlyCountries.length?this._filterCountries(this.options.onlyCountries,function(e){return-1<e}):this.options.excludeCountries.length?this._filterCountries(this.options.excludeCountries,function(e){return-1==e}):this.countries=b},_processCountryCodes:function(){this.countryCodes={};for(var e=0;e<this.countries.length;e++){var t=this.countries[e];if(this._addCountryCode(t.iso2,t.dialCode,t.priority),t.areaCodes)for(var i=0;i<t.areaCodes.length;i++)this._addCountryCode(t.iso2,t.dialCode+t.areaCodes[i])}},_processPreferredCountries:function(){this.preferredCountries=[];for(var e=0;e<this.options.preferredCountries.length;e++){var t=this.options.preferredCountries[e].toLowerCase(),i=this._getCountryData(t,!1,!0);i&&this.preferredCountries.push(i)}},_generateMarkup:function(){this.telInput.attr("autocomplete","off");var e="intl-tel-input";this.options.allowDropdown&&(e+=" allow-dropdown"),this.options.separateDialCode&&(e+=" separate-dial-code"),this.telInput.wrap(r("<div>",{class:e})),this.flagsContainer=r("<div>",{class:"flag-container"}).insertBefore(this.telInput);var t=r("<div>",{class:"selected-flag"});t.appendTo(this.flagsContainer),this.selectedFlagInner=r("<div>",{class:"iti-flag"}).appendTo(t),this.options.separateDialCode&&(this.selectedDialCode=r("<div>",{class:"selected-dial-code"}).appendTo(t)),this.options.allowDropdown?(t.attr("tabindex","0"),r("<div>",{class:"iti-arrow"}).appendTo(t),this.countryList=r("<ul>",{class:"country-list hide"}),this.preferredCountries.length&&(this._appendListItems(this.preferredCountries,"preferred"),r("<li>",{class:"divider"}).appendTo(this.countryList)),this._appendListItems(this.countries,""),this.countryListItems=this.countryList.children(".country"),this.options.dropdownContainer?this.dropdown=r("<div>",{class:"intl-tel-input iti-container"}).append(this.countryList):this.countryList.appendTo(this.flagsContainer)):this.countryListItems=r()},_appendListItems:function(e,t){for(var i="",a=0;a<e.length;a++){var n=e[a];i+="<li class='country "+t+"' data-dial-code='"+n.dialCode+"' data-country-code='"+n.iso2+"'>",i+="<div class='flag-box'><div class='iti-flag "+n.iso2+"'></div></div>",i+="<span class='country-name'>"+n.name+"</span>",i+="<span class='dial-code'>+"+n.dialCode+"</span>",i+="</li>"}this.countryList.append(i)},_setInitialState:function(){var e=this.telInput.val();this._getDialCode(e)&&!this._isRegionlessNanp(e)?this._updateFlagFromNumber(e):"auto"!==this.options.initialCountry&&(this.options.initialCountry?this._setFlag(this.options.initialCountry.toLowerCase()):(this.defaultCountry=this.preferredCountries.length?this.preferredCountries[0].iso2:this.countries[0].iso2,e||this._setFlag(this.defaultCountry)),e||this.options.nationalMode||this.options.autoHideDialCode||this.options.separateDialCode||this.telInput.val("+"+this.selectedCountryData.dialCode)),e&&this._updateValFromNumber(e)},_initListeners:function(){this._initKeyListeners(),this.options.autoHideDialCode&&this._initFocusListeners(),this.options.allowDropdown&&this._initDropdownListeners()},_initDropdownListeners:function(){var t=this,e=this.telInput.closest("label");e.length&&e.on("click"+this.ns,function(e){t.countryList.hasClass("hide")?t.telInput.focus():e.preventDefault()}),this.selectedFlagInner.parent().on("click"+this.ns,function(e){!t.countryList.hasClass("hide")||t.telInput.prop("disabled")||t.telInput.prop("readonly")||t._showDropdown()}),this.flagsContainer.on("keydown"+t.ns,function(e){!t.countryList.hasClass("hide")||e.which!=o&&e.which!=m&&e.which!=f&&e.which!=s||(e.preventDefault(),e.stopPropagation(),t._showDropdown()),e.which==n&&t._closeDropdown()})},_initRequests:function(){var e=this;this.options.utilsScript?r.fn[d].windowLoaded?r.fn[d].loadUtils(this.options.utilsScript,this.utilsScriptDeferred):r(_).on("load",function(){r.fn[d].loadUtils(e.options.utilsScript,e.utilsScriptDeferred)}):this.utilsScriptDeferred.resolve(),"auto"===this.options.initialCountry?this._loadAutoCountry():this.autoCountryDeferred.resolve()},_loadAutoCountry:function(){r.fn[d].autoCountry?this.handleAutoCountry():r.fn[d].startedLoadingAutoCountry||(r.fn[d].startedLoadingAutoCountry=!0,"function"==typeof this.options.geoIpLookup&&this.options.geoIpLookup(function(e){r.fn[d].autoCountry=e.toLowerCase(),setTimeout(function(){r(".intl-tel-input input").intlTelInput("handleAutoCountry")})}))},_initKeyListeners:function(){var e=this;this.telInput.on("keyup"+this.ns,function(){e._updateFlagFromNumber(e.telInput.val())&&e._triggerCountryChange()}),this.telInput.on("cut"+this.ns+" paste"+this.ns,function(){setTimeout(function(){e._updateFlagFromNumber(e.telInput.val())&&e._triggerCountryChange()})})},_cap:function(e){var t=this.telInput.attr("maxlength");return t&&e.length>t?e.substr(0,t):e},_initFocusListeners:function(){var i=this;this.telInput.on("mousedown"+this.ns,function(e){i.telInput.is(":focus")||i.telInput.val()||(e.preventDefault(),i.telInput.focus())}),this.telInput.on("focus"+this.ns,function(e){i.telInput.val()||i.telInput.prop("readonly")||!i.selectedCountryData.dialCode||(i.telInput.val("+"+i.selectedCountryData.dialCode),i.telInput.one("keypress.plus"+i.ns,function(e){e.which==t&&i.telInput.val("")}),setTimeout(function(){var e=i.telInput[0];if(i.isGoodBrowser){var t=i.telInput.val().length;e.setSelectionRange(t,t)}}))});var e=this.telInput.prop("form");e&&r(e).on("submit"+this.ns,function(){i._removeEmptyDialCode()}),this.telInput.on("blur"+this.ns,function(){i._removeEmptyDialCode()})},_removeEmptyDialCode:function(){var e=this.telInput.val();if("+"==e.charAt(0)){var t=this._getNumeric(e);t&&this.selectedCountryData.dialCode!=t||this.telInput.val("")}this.telInput.off("keypress.plus"+this.ns)},_getNumeric:function(e){return e.replace(/\D/g,"")},_showDropdown:function(){this._setDropdownPosition();var e=this.countryList.children(".active");e.length&&(this._highlightListItem(e),this._scrollTo(e)),this._bindDropdownListeners(),this.selectedFlagInner.children(".iti-arrow").addClass("up")},_setDropdownPosition:function(){var e=this;if(this.options.dropdownContainer&&this.dropdown.appendTo(this.options.dropdownContainer),this.dropdownHeight=this.countryList.removeClass("hide").outerHeight(),!this.isMobile){var t=this.telInput.offset(),i=t.top,a=r(_).scrollTop(),n=i+this.telInput.outerHeight()+this.dropdownHeight<a+r(_).height(),l=i-this.dropdownHeight>a;if(this.countryList.toggleClass("dropup",!n&&l),this.options.dropdownContainer){var d=!n&&l?0:this.telInput.innerHeight();this.dropdown.css({top:i+d,left:t.left}),r(_).on("scroll"+this.ns,function(){e._closeDropdown()})}}},_bindDropdownListeners:function(){var t=this;this.countryList.on("mouseover"+this.ns,".country",function(e){t._highlightListItem(r(this))}),this.countryList.on("click"+this.ns,".country",function(e){t._selectListItem(r(this))});var i=!0;r("html").on("click"+this.ns,function(e){i||t._closeDropdown(),i=!1});var a="",n=null;r(e).on("keydown"+this.ns,function(e){e.preventDefault(),e.which==o||e.which==m?t._handleUpDownKey(e.which):e.which==s?t._handleEnterKey():e.which==u?t._closeDropdown():(e.which>=c&&e.which<=p||e.which==f)&&(n&&clearTimeout(n),a+=String.fromCharCode(e.which),t._searchForCountry(a),n=setTimeout(function(){a=""},1e3))})},_handleUpDownKey:function(e){var t=this.countryList.children(".highlight").first(),i=e==o?t.prev():t.next();i.length&&(i.hasClass("divider")&&(i=e==o?i.prev():i.next()),this._highlightListItem(i),this._scrollTo(i))},_handleEnterKey:function(){var e=this.countryList.children(".highlight").first();e.length&&this._selectListItem(e)},_searchForCountry:function(e){for(var t=0;t<this.countries.length;t++)if(this._startsWith(this.countries[t].name,e)){var i=this.countryList.children("[data-country-code="+this.countries[t].iso2+"]").not(".preferred");this._highlightListItem(i),this._scrollTo(i,!0);break}},_startsWith:function(e,t){return e.substr(0,t.length).toUpperCase()==t},_updateValFromNumber:function(e){if(this.options.formatOnDisplay&&_.intlTelInputUtils&&this.selectedCountryData){var t=this.options.separateDialCode||!this.options.nationalMode&&"+"==e.charAt(0)?intlTelInputUtils.numberFormat.INTERNATIONAL:intlTelInputUtils.numberFormat.NATIONAL;e=intlTelInputUtils.formatNumber(e,this.selectedCountryData.iso2,t)}e=this._beforeSetNumber(e),this.telInput.val(e)},_updateFlagFromNumber:function(e){e&&this.options.nationalMode&&this.selectedCountryData&&"1"==this.selectedCountryData.dialCode&&"+"!=e.charAt(0)&&("1"!=e.charAt(0)&&(e="1"+e),e="+"+e);var t=this._getDialCode(e),i=null,a=this._getNumeric(e);if(t){var n=this.countryCodes[this._getNumeric(t)],l=this.selectedCountryData&&-1<r.inArray(this.selectedCountryData.iso2,n),d="+1"==t&&4<=a.length;if((!(this.selectedCountryData&&"1"==this.selectedCountryData.dialCode)||!this._isRegionlessNanp(a))&&(!l||d))for(var _=0;_<n.length;_++)if(n[_]){i=n[_];break}}else"+"==e.charAt(0)&&a.length?i="":e&&"+"!=e||(i=this.defaultCountry);return null!==i&&this._setFlag(i)},_isRegionlessNanp:function(e){var t=this._getNumeric(e);if("1"!=t.charAt(0))return!1;var i=t.substr(1,3);return-1<r.inArray(i,y)},_highlightListItem:function(e){this.countryListItems.removeClass("highlight"),e.addClass("highlight")},_getCountryData:function(e,t,i){for(var a=t?b:this.countries,n=0;n<a.length;n++)if(a[n].iso2==e)return a[n];if(i)return null;throw new Error("No country data for '"+e+"'")},_setFlag:function(e){var t=this.selectedCountryData&&this.selectedCountryData.iso2?this.selectedCountryData:{};this.selectedCountryData=e?this._getCountryData(e,!1,!1):{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),this.selectedFlagInner.attr("class","iti-flag "+e);var i=e?this.selectedCountryData.name+": +"+this.selectedCountryData.dialCode:"Unknown";if(this.selectedFlagInner.parent().attr("title",i),this.options.separateDialCode){var a=this.selectedCountryData.dialCode?"+"+this.selectedCountryData.dialCode:"",n=this.telInput.parent();t.dialCode&&n.removeClass("iti-sdc-"+(t.dialCode.length+1)),a&&n.addClass("iti-sdc-"+a.length),this.selectedDialCode.text(a)}return this._updatePlaceholder(),this.countryListItems.removeClass("active"),e&&this.countryListItems.find(".iti-flag."+e).first().closest(".country").addClass("active"),t.iso2!==e},_updatePlaceholder:function(){var e="aggressive"===this.options.autoPlaceholder||!this.hadInitialPlaceholder&&(!0===this.options.autoPlaceholder||"polite"===this.options.autoPlaceholder);if(_.intlTelInputUtils&&e&&this.selectedCountryData){var t=intlTelInputUtils.numberType[this.options.placeholderNumberType],i=this.selectedCountryData.iso2?intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2,this.options.nationalMode,t):"";i=this._beforeSetNumber(i),"function"==typeof this.options.customPlaceholder&&(i=this.options.customPlaceholder(i,this.selectedCountryData)),this.telInput.attr("placeholder",i)}},_selectListItem:function(e){var t=this._setFlag(e.attr("data-country-code"));if(this._closeDropdown(),this._updateDialCode(e.attr("data-dial-code"),!0),this.telInput.focus(),this.isGoodBrowser){var i=this.telInput.val().length;this.telInput[0].setSelectionRange(i,i)}t&&this._triggerCountryChange()},_closeDropdown:function(){this.countryList.addClass("hide"),this.selectedFlagInner.children(".iti-arrow").removeClass("up"),r(e).off(this.ns),r("html").off(this.ns),this.countryList.off(this.ns),this.options.dropdownContainer&&(this.isMobile||r(_).off("scroll"+this.ns),this.dropdown.detach())},_scrollTo:function(e,t){var i=this.countryList,a=i.height(),n=i.offset().top,l=n+a,d=e.outerHeight(),_=e.offset().top,r=_+d,o=_-n+i.scrollTop(),m=a/2-d/2;if(_<n)t&&(o-=m),i.scrollTop(o);else if(l<r){t&&(o+=m);var s=a-d;i.scrollTop(o-s)}},_updateDialCode:function(e,t){var i,a=this.telInput.val();if(e="+"+e,"+"==a.charAt(0)){var n=this._getDialCode(a);i=n?a.replace(n,e):e}else{if(this.options.nationalMode||this.options.separateDialCode)return;if(a)i=e+a;else{if(!t&&this.options.autoHideDialCode)return;i=e}}this.telInput.val(i)},_getDialCode:function(e){var t="";if("+"==e.charAt(0))for(var i="",a=0;a<e.length;a++){var n=e.charAt(a);if(r.isNumeric(n)&&(i+=n,this.countryCodes[i]&&(t=e.substr(0,a+1)),4==i.length))break}return t},_getFullNumber:function(){var e=r.trim(this.telInput.val()),t=this.selectedCountryData.dialCode,i=this._getNumeric(e),a="1"==i.charAt(0)?i:"1"+i;return(this.options.separateDialCode?"+"+t:"+"!=e.charAt(0)&&"1"!=e.charAt(0)&&t&&"1"==t.charAt(0)&&4==t.length&&t!=a.substr(0,4)?t.substr(1):"")+e},_beforeSetNumber:function(e){if(this.options.separateDialCode){var t=this._getDialCode(e);if(t){null!==this.selectedCountryData.areaCodes&&(t="+"+this.selectedCountryData.dialCode);var i=" "===e[t.length]||"-"===e[t.length]?t.length+1:t.length;e=e.substr(i)}}return this._cap(e)},_triggerCountryChange:function(){this.telInput.trigger("countrychange",this.selectedCountryData)},handleAutoCountry:function(){"auto"===this.options.initialCountry&&(this.defaultCountry=r.fn[d].autoCountry,this.telInput.val()||this.setCountry(this.defaultCountry),this.autoCountryDeferred.resolve())},handleUtils:function(){_.intlTelInputUtils&&(this.telInput.val()&&this._updateValFromNumber(this.telInput.val()),this._updatePlaceholder()),this.utilsScriptDeferred.resolve()},destroy:function(){if(this.allowDropdown&&(this._closeDropdown(),this.selectedFlagInner.parent().off(this.ns),this.telInput.closest("label").off(this.ns)),this.options.autoHideDialCode){var e=this.telInput.prop("form");e&&r(e).off(this.ns)}this.telInput.off(this.ns),this.telInput.parent().before(this.telInput).remove()},getExtension:function(){return _.intlTelInputUtils?intlTelInputUtils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""},getNumber:function(e){return _.intlTelInputUtils?intlTelInputUtils.formatNumber(this._getFullNumber(),this.selectedCountryData.iso2,e):""},getNumberType:function(){return _.intlTelInputUtils?intlTelInputUtils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):-99},getSelectedCountryData:function(){return this.selectedCountryData||{}},getValidationError:function(){return _.intlTelInputUtils?intlTelInputUtils.getValidationError(this._getFullNumber(),this.selectedCountryData.iso2):-99},isValidNumber:function(){var e=r.trim(this._getFullNumber()),t=this.options.nationalMode?this.selectedCountryData.iso2:"";return _.intlTelInputUtils?intlTelInputUtils.isValidNumber(e,t):null},setCountry:function(e){e=e.toLowerCase(),this.selectedFlagInner.hasClass(e)||(this._setFlag(e),this._updateDialCode(this.selectedCountryData.dialCode,!1),this._triggerCountryChange())},setNumber:function(e){var t=this._updateFlagFromNumber(e);this._updateValFromNumber(e),t&&this._triggerCountryChange()}},r.fn[d]=function(i){var t,a=arguments;if(i===l||"object"==typeof i){var n=[];return this.each(function(){if(!r.data(this,"plugin_"+d)){var e=new h(this,i),t=e._init();n.push(t[0]),n.push(t[1]),r.data(this,"plugin_"+d,e)}}),r.when.apply(null,n)}if("string"==typeof i&&"_"!==i[0])return this.each(function(){var e=r.data(this,"plugin_"+d);e instanceof h&&"function"==typeof e[i]&&(t=e[i].apply(e,Array.prototype.slice.call(a,1))),"destroy"===i&&r.data(this,"plugin_"+d,null)}),t!==l?t:this},r.fn[d].getCountryData=function(){return b},r.fn[d].loadUtils=function(e,t){r.fn[d].loadedUtilsScript?t&&t.resolve():(r.fn[d].loadedUtilsScript=!0,r.ajax({type:"GET",url:e,complete:function(){r(".intl-tel-input input").intlTelInput("handleUtils")},dataType:"script",cache:!0}))},r.fn[d].version="11.0.0",r.fn[d].defaults=a;for(var b=[["Afghanistan","af","93"],["Albania","al","355"],["Algeria","dz","213"],["American Samoa","as","1684"],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1264"],["Antigua and Barbuda","ag","1268"],["Argentina","ar","54"],["Armenia","am","374"],["Aruba","aw","297"],["Australia","au","61",0],["Austria","at","43"],["Azerbaijan","az","994"],["Bahamas","bs","1242"],["Bahrain","bh","973"],["Bangladesh","bd","880"],["Barbados","bb","1246"],["Belarus","by","375"],["Belgium","be","32"],["Belize","bz","501"],["Benin","bj","229"],["Bermuda","bm","1441"],["Bhutan","bt","975"],["Bolivia","bo","591"],["Bosnia and Herzegovina","ba","387"],["Botswana","bw","267"],["Brazil","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1284"],["Brunei","bn","673"],["Bulgaria","bg","359"],["Burkina Faso","bf","226"],["Burundi","bi","257"],["Cambodia","kh","855"],["Cameroon","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde","cv","238"],["Caribbean Netherlands","bq","599",1],["Cayman Islands","ky","1345"],["Central African Republic","cf","236"],["Chad","td","235"],["Chile","cl","56"],["China","cn","86"],["Christmas Island","cx","61",2],["Cocos (Keeling) Islands","cc","61",1],["Colombia","co","57"],["Comoros","km","269"],["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)","cd","243"],["Congo (Republic) (Congo-Brazzaville)","cg","242"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Cote d'Ivoire","ci","225"],["Croatia","hr","385"],["Cuba","cu","53"],["Curacao","cw","599",0],["Cyprus","cy","357"],["Czech Republic","cz","420"],["Denmark","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1767"],["Dominican Republic","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea","gq","240"],["Eritrea","er","291"],["Estonia","ee","372"],["Ethiopia","et","251"],["Falkland Islands","fk","500"],["Faroe Islands","fo","298"],["Fiji","fj","679"],["Finland","fi","358",0],["France","fr","33"],["French Guiana","gf","594"],["French Polynesia","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia","ge","995"],["Germany","de","49"],["Ghana","gh","233"],["Gibraltar","gi","350"],["Greece","gr","30"],["Greenland","gl","299"],["Grenada","gd","1473"],["Guadeloupe","gp","590",0],["Guam","gu","1671"],["Guatemala","gt","502"],["Guernsey","gg","44",1],["Guinea","gn","224"],["Guinea-Bissau","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong","hk","852"],["Hungary","hu","36"],["Iceland","is","354"],["India","in","91"],["Indonesia","id","62"],["Iran","ir","98"],["Iraq","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2],["Israel","il","972"],["Italy","it","39",0],["Jamaica","jm","1876"],["Japan","jp","81"],["Jersey","je","44",3],["Jordan","jo","962"],["Kazakhstan","kz","7",1],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait","kw","965"],["Kyrgyzstan","kg","996"],["Laos","la","856"],["Latvia","lv","371"],["Lebanon","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya","ly","218"],["Liechtenstein","li","423"],["Lithuania","lt","370"],["Luxembourg","lu","352"],["Macau","mo","853"],["Macedonia","mk","389"],["Madagascar","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania","mr","222"],["Mauritius","mu","230"],["Mayotte","yt","262",1],["Mexico","mx","52"],["Micronesia","fm","691"],["Moldova","md","373"],["Monaco","mc","377"],["Mongolia","mn","976"],["Montenegro","me","382"],["Montserrat","ms","1664"],["Morocco","ma","212",0],["Mozambique","mz","258"],["Myanmar (Burma)","mm","95"],["Namibia","na","264"],["Nauru","nr","674"],["Nepal","np","977"],["Netherlands (Nederland)","nl","31"],["New Caledonia","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea","kp","850"],["Northern Mariana Islands","mp","1670"],["Norway (Norge)","no","47",0],["Oman","om","968"],["Pakistan","pk","92"],["Palau","pw","680"],["Palestine","ps","970"],["Panama","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru","pe","51"],["Philippines","ph","63"],["Poland","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar","qa","974"],["Reunion","re","262",0],["Romania","ro","40"],["Russia","ru","7",0],["Rwanda","rw","250"],["Saint Barthelemy","bl","590",1],["Saint Helena","sh","290"],["Saint Kitts and Nevis","kn","1869"],["Saint Lucia","lc","1758"],["Saint Martin","mf","590",2],["Saint Pierre and Miquelon","pm","508"],["Saint Vincent and the Grenadines","vc","1784"],["Samoa","ws","685"],["San Marino","sm","378"],["Sao Tome and Principe","st","239"],["Saudi Arabia","sa","966"],["Senegal","sn","221"],["Serbia","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1721"],["Slovakia","sk","421"],["Slovenia","si","386"],["Solomon Islands","sb","677"],["Somalia","so","252"],["South Africa","za","27"],["South Korea","kr","82"],["South Sudan","ss","211"],["Spain","es","34"],["Sri Lanka","lk","94"],["Sudan","sd","249"],["Suriname","sr","597"],["Svalbard and Jan Mayen","sj","47",1],["Swaziland","sz","268"],["Sweden (Sverige)","se","46"],["Switzerland","ch","41"],["Syria","sy","963"],["Taiwan","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad and Tobago","tt","1868"],["Tunisia","tn","216"],["Turkey","tr","90"],["Turkmenistan","tm","993"],["Turks and Caicos Islands","tc","1649"],["Tuvalu","tv","688"],["U.S. Virgin Islands","vi","1340"],["Uganda","ug","256"],["Ukraine","ua","380"],["United Arab Emirates","ae","971"],["United Kingdom","gb","44",0],["United States","us","1",0],["Uruguay","uy","598"],["Uzbekistan","uz","998"],["Vanuatu","vu","678"],["Vatican City","va","39",1],["Venezuela","ve","58"],["Vietnam","vn","84"],["Wallis and Futuna","wf","681"],["Western Sahara","eh","212",1],["Yemen","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Aland Islands","ax","358",1]],v=0;v<b.length;v++){var w=b[v];b[v]={name:w[0],iso2:w[1],dialCode:w[2],priority:w[3]||0,areaCodes:w[4]||null}}}),j=2;var need_enable=!0,a=new Array,is_addon_stripe_active,is_addon_calculator_active,nextID;if(-1!=ajaxurl.indexOf("://"))var url_for_ajax=ajaxurl;else var url_for_ajax=location.protocol+"//"+location.host+ajaxurl;function isNumber(e){return!isNaN(parseFloat(e))&&isFinite(e)}function disable_past_days(e,t){document.getElementById(t+"_buttonform_id_temp").setAttribute("format",e)}function set_send(e){"yes"==document.getElementById(e).value?document.getElementById(e).setAttribute("value","no"):document.getElementById(e).setAttribute("value","yes")}function show_datepicker(e){jQuery("#"+e).datepicker("show")}function hide_time(e){"no"==document.getElementById(e+"form_id_temp").value?document.getElementById(e+"form_id_temp").value="yes":document.getElementById(e+"form_id_temp").value="no"}function show_week_days(id,week_day){week_day&&(1==document.getElementById("el_show_"+week_day).checked?document.getElementById(id+"_show_week_days").setAttribute(week_day,"yes"):document.getElementById(id+"_show_week_days").setAttribute(week_day,"no")),jQuery("input[name^="+id+"_elementform_id_temp]").datepicker("option","beforeShowDay",function(date){for(var w_hide_sunday="yes"==jQuery("#"+id+"_show_week_days").attr("sunday")?"true":"day != 0",w_hide_monday="yes"==jQuery("#"+id+"_show_week_days").attr("monday")?"true":"day != 1",w_hide_tuesday="yes"==jQuery("#"+id+"_show_week_days").attr("tuesday")?"true":"day != 2",w_hide_wednesday="yes"==jQuery("#"+id+"_show_week_days").attr("wednesday")?"true":"day != 3",w_hide_thursday="yes"==jQuery("#"+id+"_show_week_days").attr("thursday")?"true":"day != 4",w_hide_friday="yes"==jQuery("#"+id+"_show_week_days").attr("friday")?"true":"day != 5",w_hide_saturday="yes"==jQuery("#"+id+"_show_week_days").attr("saturday")?"true":"day != 6",invalid_dates=jQuery("#"+id+"_invalid_dates_id_temp").val(),invalid_dates_finish=[],invalid_dates_start=invalid_dates.split(","),invalid_date_range=[],i=0;i<invalid_dates_start.length;i++)if(invalid_dates_start[i]=invalid_dates_start[i].trim(),invalid_dates_start[i].length<11)invalid_dates_finish.push(invalid_dates_start[i]);else if(4<invalid_dates_start[i].indexOf("-"))invalid_date_range.push(invalid_dates_start[i].split("-"));else{var invalid_date_array=invalid_dates_start[i].split("-"),start_invalid_day=invalid_date_array[0]+"-"+invalid_date_array[1]+"-"+invalid_date_array[2],end_invalid_day=invalid_date_array[3]+"-"+invalid_date_array[4]+"-"+invalid_date_array[5];invalid_date_range.push([start_invalid_day,end_invalid_day])}jQuery.each(invalid_date_range,function(e,t){for(var i=new Date(t[0]);i<=new Date(t[1]);i.setDate(i.getDate()+1))invalid_dates_finish.push(jQuery.datepicker.formatDate("mm/dd/yy",i))});var string_days=jQuery.datepicker.formatDate("mm/dd/yy",date),day=date.getDay();return[-1==invalid_dates_finish.indexOf(string_days)&&eval(w_hide_sunday)&&eval(w_hide_monday)&&eval(w_hide_tuesday)&&eval(w_hide_wednesday)&&eval(w_hide_thursday)&&eval(w_hide_friday)&&eval(w_hide_saturday)]})}function set_sel_am_pm(e){e.options[0].selected?(e.options[0].setAttribute("selected","selected"),e.options[1].removeAttribute("selected")):(e.options[1].setAttribute("selected","selected"),e.options[0].removeAttribute("selected"))}function change_captcha_digit(e){captcha=document.getElementById("_wd_captchaform_id_temp"),document.getElementById("captcha_digit").value?(captcha.setAttribute("digit",e),captcha.setAttribute("src",url_for_ajax+"?action=formmakerwdcaptcha&digit="+e+"&nonce="+fm_ajax.ajaxnonce+"&i=form_id_temp"),document.getElementById("_wd_captcha_inputform_id_temp").style.width=10*document.getElementById("captcha_digit").value+15+"px"):(captcha.setAttribute("digit","6"),captcha.setAttribute("src",url_for_ajax+"?action=formmakerwdcaptcha&digit=6&nonce="+fm_ajax.ajaxnonce+"&i=form_id_temp"),document.getElementById("_wd_captcha_inputform_id_temp").style.width="75px")}function check_isnum_interval(e,t,i,a){var n=e.which||e.keyCode;return!(31<n&&(n<48||57<n))&&(val=""+document.getElementById(t).value+String.fromCharCode(n),!(2<val.length)&&("00"!=val&&!(val<i||val>a)))}function check_isnum_point(e){var t=e.which||e.keyCode;return 46==t||!(31<t&&(t<48||57<t))}function check_isnum_price(e,t){var i=e.which||e.keyCode;return!((""==t||-1<t.indexOf("."))&&31<i&&(i<48||57<i))&&!(31<i&&46!=i&&(i<48||57<i))}function check_isspacebar(e){return 32!=(e.which||e.keyCode)}function change_w_label(e,t){document.getElementById(e)&&(document.getElementById(e).innerHTML=t)}function change_w(e,t){document.getElementById(e).setAttribute("width",t)}function change_h(e,t){document.getElementById(e).setAttribute("height",t)}function change_key(e,t){document.getElementById("wd_recaptchaform_id_temp").setAttribute(t,e)}function captcha_refresh(e){srcArr=document.getElementById(e+"form_id_temp").src.split("&r="),document.getElementById(e+"form_id_temp").src=srcArr[0]+"&r="+Math.floor(100*Math.random()),document.getElementById(e+"_inputform_id_temp").value=""}function up_row(e){for("undefined"!=typeof event&&event.stopPropagation(),wdform_field=document.getElementById("wdform_field"+e),wdform_row=wdform_field.parentNode,wdform_column=wdform_row.parentNode,wdform_section=wdform_column.parentNode,wdform_page=wdform_section.parentNode,k=0;wdform_column.childNodes[k]&&(!wdform_column.childNodes[k].getAttribute("wdid")||e!=wdform_column.childNodes[k].getAttribute("wdid"));)k++;if(0!=k)return up=wdform_column.childNodes[k-1],down=wdform_column.childNodes[k],wdform_column.removeChild(down),void wdform_column.insertBefore(down,up);wdform_section.previousSibling&&wdform_section.previousSibling.getAttribute("type")?wdform_section.previousSibling.previousSibling.firstChild.appendChild(wdform_row):page_up(e)}function down_row(e){for("undefined"!=typeof event&&event.stopPropagation(),wdform_field=document.getElementById("wdform_field"+e),wdform_row=wdform_field.parentNode,wdform_column=wdform_row.parentNode,wdform_section=wdform_column.parentNode,wdform_page=wdform_section.parentNode,l=wdform_column.childNodes.length,k=0;wdform_column.childNodes[k]&&(!wdform_column.childNodes[k].getAttribute("wdid")||e!=wdform_column.childNodes[k].getAttribute("wdid"));)k++;if(k!=l-1)return up=wdform_column.childNodes[k],down=wdform_column.childNodes[k+2],wdform_column.removeChild(up),down||(down=null),void wdform_column.insertBefore(up,down);wdform_section.nextSibling.getAttribute("type")?wdform_section.nextSibling.nextSibling.firstChild.appendChild(wdform_row):page_down(e)}function right_row(e){if("undefined"!=typeof event&&event.stopPropagation(),wdform_field=document.getElementById("wdform_field"+e),wdform_row=wdform_field.parentNode,wdform_column=wdform_row.parentNode,wdform_section=wdform_column.parentNode,null!=wdform_column.nextSibling)wdform_column_next=wdform_column.nextSibling,wdform_column_next.appendChild(wdform_row);else{var t=document.createElement("div");t.setAttribute("class","wdform_column"),wdform_section.appendChild(t),t.appendChild(wdform_row)}sortable_columns()}function left_row(e){"undefined"!=typeof event&&event.stopPropagation(),wdform_field=document.getElementById("wdform_field"+e),wdform_row=wdform_field.parentNode,wdform_column=wdform_row.parentNode,wdform_section=wdform_column.parentNode,null!=wdform_column.previousSibling&&(wdform_column_next=wdform_column.previousSibling,wdform_column_next.appendChild(wdform_row)),sortable_columns()}function page_up(e){for("undefined"!=typeof event&&event.stopPropagation(),wdform_field=document.getElementById("wdform_field"+e),wdform_row=wdform_field.parentNode,wdform_column=wdform_row.parentNode,wdform_section=wdform_column.parentNode,wdform_page=wdform_section.parentNode,wdform_page_and_images=wdform_page.parentNode;wdform_page_and_images;){if(wdform_page_and_images=wdform_page_and_images.previousSibling,!wdform_page_and_images)return void alert("Unable to move");if(jQuery(wdform_page_and_images.firstChild).is(":visible"))break}n=wdform_page_and_images.getElementsByClassName("wdform_page")[0].childNodes.length,wdform_page_and_images.getElementsByClassName("wdform_page")[0].childNodes[n-2].firstChild.appendChild(wdform_row),refresh_pages(e)}function page_down(e){for("undefined"!=typeof event&&event.stopPropagation(),wdform_field=document.getElementById("wdform_field"+e),wdform_row=wdform_field.parentNode,wdform_column=wdform_row.parentNode,wdform_section=wdform_column.parentNode,wdform_page=wdform_section.parentNode,wdform_page_and_images=wdform_page.parentNode;wdform_page_and_images;){if(wdform_page_and_images=wdform_page_and_images.nextSibling,!wdform_page_and_images||"add_field_cont"==wdform_page_and_images.id)return void alert("Unable to move");if(jQuery(wdform_page_and_images.firstChild).is(":visible"))break}wdform_page_and_images.getElementsByClassName("wdform_page")[0].firstChild.firstChild.insertBefore(wdform_row,wdform_page_and_images.firstChild.firstChild.firstChild.firstChild),refresh_pages(e)}function remove_whitespace(e){var t;for(t=0;t<e.childNodes.length;t++)e.childNodes[t]&&"3"==e.childNodes[t].nodeType&&!/\S/.test(e.childNodes[t].nodeValue)?(e.removeChild(e.childNodes[t]),t--):e.childNodes[t].childNodes.length&&remove_whitespace(e.childNodes[t])}function Disable(){}function all_labels(){for(labels=new Array,k=1;k<=form_view_max;k++)if(document.getElementById("form_id_tempform_view"+k))for(wdform_page=document.getElementById("form_id_tempform_view"+k),remove_whitespace(wdform_page),n=wdform_page.childNodes.length-2,z=0;z<=n;z++)if(!wdform_page.childNodes[z].getAttribute("wdid"))for(wdform_section=wdform_page.childNodes[z],x=0;x<wdform_section.childNodes.length;x++)if(wdform_column=wdform_section.childNodes[x],wdform_column.firstChild)for(y=0;y<wdform_column.childNodes.length;y++)wdform_row=wdform_column.childNodes[y],3!=wdform_row.nodeType&&(wdid=wdform_row.getAttribute("wdid"),wdid&&labels.push(document.getElementById(wdid+"_element_labelform_id_temp").innerHTML));return labels}function set_checked(e,t){return checking=document.getElementById(e+"_elementform_id_temp"+t),checking.checked&&checking.setAttribute("checked","checked"),!(!checking.checked&&(checking.removeAttribute("checked"),checking.getAttribute("other")&&1==checking.getAttribute("other")))||(document.getElementById(e+"_other_inputform_id_temp")&&(document.getElementById(e+"_other_inputform_id_temp").parentNode.removeChild(document.getElementById(e+"_other_brform_id_temp")),document.getElementById(e+"_other_inputform_id_temp").parentNode.removeChild(document.getElementById(e+"_other_inputform_id_temp"))),!1)}function set_default(e,t){for(k=0;k<100;k++)document.getElementById(e+"_elementform_id_temp"+k)&&(document.getElementById(e+"_elementform_id_temp"+k).checked?document.getElementById(e+"_elementform_id_temp"+t).setAttribute("checked","checked"):document.getElementById(e+"_elementform_id_temp"+k).removeAttribute("checked"));document.getElementById(e+"_other_inputform_id_temp")&&(document.getElementById(e+"_other_inputform_id_temp").parentNode.removeChild(document.getElementById(e+"_other_brform_id_temp")),document.getElementById(e+"_other_inputform_id_temp").parentNode.removeChild(document.getElementById(e+"_other_inputform_id_temp")))}function set_select(e){for(p=e.length-1;0<=p;p--)e.options[p].selected?e.options[p].setAttribute("selected","selected"):e.options[p].removeAttribute("selected")}function add_0(e){input=document.getElementById(e),1==input.value.length&&(input.value="0"+input.value,input.setAttribute("value",input.value))}function label_top_stripe(e){document.getElementById(e+"_label_sectionform_id_temp").style.display="block",document.getElementById(e+"_element_sectionform_id_temp").style.display="block"}function label_left_stripe(e){document.getElementById(e+"_label_sectionform_id_temp").style.display="table-cell",document.getElementById(e+"_element_sectionform_id_temp").style.display="table-cell"}function change_value_range(e,t,i){jQuery("#"+e).datepicker("option",t,i)}function change_func(e,t){document.getElementById(e).setAttribute("onclick",t)}function change_in_value(e,t){t=(t=t.replace(/(<([^>]+)>)/gi,"")).replace(/"/g,"&quot;"),document.getElementById(e).setAttribute("value",t)}function change_size(e,t){switch(document.getElementById(t+"_elementform_id_temp").style.width=e+"px",document.getElementById(t+"_element_input")&&(document.getElementById(t+"_element_input").style.width=e+"px"),e){case"111":document.getElementById(t+"_elementform_id_temp").setAttribute("rows","2");break;case"222":document.getElementById(t+"_elementform_id_temp").setAttribute("rows","4");break;case"444":document.getElementById(t+"_elementform_id_temp").setAttribute("rows","8")}}function getIFrameDocument(e){var t=null;return document.getElementById(e)&&document.getElementById(e).contentDocument?t=document.getElementById(e).contentDocument:document.getElementById(e)&&(t=document.frames[e].document),t}function format_extended(t,e,i,a,n){w_size=document.getElementById(t+"_element_firstform_id_temp").style.width,tr_name1=document.getElementById(t+"_tr_name1"),tr_name2=document.getElementById(t+"_tr_name2");var l=document.createElement("div");l.setAttribute("id",t+"_td_name_input_title"),l.style.display="table-cell";var d=document.createElement("div");d.setAttribute("id",t+"_td_name_input_middle"),d.style.display="table-cell";var _=document.createElement("div");_.setAttribute("id",t+"_td_name_label_title"),_.setAttribute("align","left"),_.style.display="table-cell";var r=document.createElement("div");r.setAttribute("id",t+"_td_name_label_middle"),r.setAttribute("align","left"),r.style.display="table-cell";var o=document.createElement("input");o.setAttribute("type","text"),o.style.cssText="margin: 0px 10px 0px 0px; padding: 0px; width:40px",o.setAttribute("id",t+"_element_titleform_id_temp"),o.setAttribute("name",t+"_element_titleform_id_temp"),e==a?o.setAttribute("value",a):o.setAttribute("value",e),o.setAttribute("title",a);var m=document.createElement("label");m.setAttribute("class","mini_label"),m.setAttribute("id",t+"_mini_label_title"),m.innerHTML=w_mini_labels[0];var s=document.createElement("input");s.setAttribute("type","text"),s.style.cssText="padding: 0px; width:"+w_size,s.setAttribute("id",t+"_element_middleform_id_temp"),s.setAttribute("name",t+"_element_middleform_id_temp"),i==n?s.setAttribute("value",n):s.setAttribute("value",i),s.setAttribute("title",n);var u=document.createElement("label");u.setAttribute("class","mini_label"),u.setAttribute("id",t+"_mini_label_middle"),u.innerHTML=w_mini_labels[3],first_input=document.getElementById(t+"_td_name_input_first"),last_input=document.getElementById(t+"_td_name_input_last"),first_label=document.getElementById(t+"_td_name_label_first"),last_label=document.getElementById(t+"_td_name_label_last"),l.appendChild(o),d.appendChild(s),tr_name1.insertBefore(l,first_input),tr_name1.insertBefore(d,null),_.appendChild(m),r.appendChild(u),tr_name2.insertBefore(_,first_label),tr_name2.insertBefore(r,null);var c=document.createTextNode("-"),p=document.createTextNode("-"),f=document.createElement("input");f.setAttribute("id","el_first_value_title"),f.setAttribute("type","text"),f.setAttribute("value",a),f.style.cssText="width:50px; margin-left:4px; margin-right:4px",f.setAttribute("onKeyUp","change_input_value(this.value,'"+t+"_element_titleform_id_temp')");var y=document.createElement("input");y.setAttribute("id","el_first_value_middle"),y.setAttribute("type","text"),y.setAttribute("value",n),y.style.cssText="width:100px; margin-left:4px",y.setAttribute("onKeyUp","change_input_value(this.value,'"+t+"_element_middleform_id_temp')"),el_first_value_first=document.getElementById("el_first_value_first"),parent=el_first_value_first.parentNode,parent.insertBefore(c,el_first_value_first),parent.insertBefore(f,c),parent.appendChild(p),parent.appendChild(y),refresh_attr(t,"type_name"),refresh_id_name(t,"type_name"),jQuery(document).ready(function(){jQuery("label#"+t+"_mini_label_title").on("click",function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='title' size='10' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.title").focus(),jQuery("input.title").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_title").text(e)})}}),jQuery("label#"+t+"_mini_label_middle").on("click",function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='middle' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.middle").focus(),jQuery("input.middle").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_middle").text(e)})}})})}function format_normal(e){tr_name1=document.getElementById(e+"_tr_name1"),tr_name2=document.getElementById(e+"_tr_name2"),td_name_input1=document.getElementById(e+"_td_name_input_title"),td_name_input4=document.getElementById(e+"_td_name_input_middle"),td_name_label1=document.getElementById(e+"_td_name_label_title"),td_name_label4=document.getElementById(e+"_td_name_label_middle"),tr_name1.removeChild(td_name_input1),tr_name1.removeChild(td_name_input4),tr_name2.removeChild(td_name_label1),tr_name2.removeChild(td_name_label4),el_first_value_first=document.getElementById("el_first_value_first"),parent=el_first_value_first.parentNode,parent.removeChild(document.getElementById("el_first_value_title").nextSibling),parent.removeChild(document.getElementById("el_first_value_title")),parent.removeChild(document.getElementById("el_first_value_middle").previousSibling),parent.removeChild(document.getElementById("el_first_value_middle")),refresh_attr(e,"type_name"),refresh_id_name(e,"type_name")}function type_number(e,t,i,a,l,d,_,r,o,m,s,u){document.getElementById("element_type").value="type_number",delete_last_child();var c=document.createElement("div");c.setAttribute("id","edit_div");var p=document.createElement("table");p.setAttribute("id","edit_main_table"),p.setAttribute("cellpadding","3"),p.setAttribute("cellspacing","0");var f=document.createElement("tr"),y=document.createElement("tr"),h=document.createElement("tr"),b=document.createElement("tr"),v=document.createElement("tr"),w=document.createElement("tr"),g=document.createElement("tr"),E=document.createElement("tr"),A=document.createElement("tr"),x=document.createElement("td"),k=document.createElement("td"),I=document.createElement("td"),C=document.createElement("td"),B=document.createElement("td"),Q=document.createElement("td"),T=document.createElement("td"),M=document.createElement("td"),L=document.createElement("td"),z=document.createElement("td"),q=document.createElement("td"),H=document.createElement("td"),N=document.createElement("td"),S=(document.createElement("td"),document.createElement("td")),D=document.createElement("td"),P=document.createElement("td"),O=document.createElement("td"),K=document.createElement("label");K.setAttribute("class","fm-field-label"),K.setAttribute("for","edit_for_label"),K.innerHTML="Field label";var U=document.createElement("textarea");U.setAttribute("id","edit_for_label"),U.setAttribute("rows","4"),U.setAttribute("onKeyUp","change_label('"+e+"_element_labelform_id_temp', this.value)"),U.innerHTML=t;var F=document.createElement("label");F.setAttribute("class","fm-field-label"),F.setAttribute("for","edit_for_label_size"),F.innerHTML="Field label size(px) ";var R=document.createElement("input");R.setAttribute("id","edit_for_label_size"),R.setAttribute("type","text"),R.setAttribute("value",i),R.setAttribute("onKeyPress","return check_isnum(event)"),R.setAttribute("onKeyUp","change_w_style('"+e+"_label_sectionform_id_temp', this.value)");var W=document.createElement("label");W.setAttribute("class","fm-field-label"),W.innerHTML="Field label position";var V=document.createElement("input");V.setAttribute("id","edit_for_label_position_top"),V.setAttribute("type","radio"),V.setAttribute("name","edit_for_label_position"),V.setAttribute("onchange","label_left("+e+")");var $=document.createElement("label");$.setAttribute("for","edit_for_label_position_top"),$.innerHTML="Left";var G=document.createElement("input");G.setAttribute("id","edit_for_label_position_left"),G.setAttribute("type","radio"),G.setAttribute("name","edit_for_label_position"),G.setAttribute("onchange","label_top("+e+")");var Y=document.createElement("label");Y.setAttribute("for","edit_for_label_position_left"),Y.innerHTML="Top","top"==a?G.setAttribute("checked","checked"):V.setAttribute("checked","checked");var Z=document.createElement("label");Z.setAttribute("class","fm-field-label"),Z.setAttribute("for","edit_for_input_size"),Z.innerHTML="Field size(px) ";var X=document.createElement("input");X.setAttribute("id","edit_for_input_size"),X.setAttribute("type","text"),X.setAttribute("value",l),X.setAttribute("onKeyPress","return check_isnum(event)"),X.setAttribute("onKeyUp","change_w_style('"+e+"_elementform_id_temp', this.value)");var J=document.createElement("label");J.setAttribute("class","fm-field-label"),J.setAttribute("for","el_first_value_input"),J.innerHTML="Placeholder ";var ee=document.createElement("input");ee.setAttribute("id","el_first_value_input"),ee.setAttribute("type","text"),ee.setAttribute("value",_),ee.setAttribute("onKeyUp","change_input_value(this.value,'"+e+"_elementform_id_temp');");var te=document.createElement("label");te.setAttribute("class","fm-field-label"),te.setAttribute("for","el_required"),te.innerHTML="Required";var ie=document.createElement("input");ie.setAttribute("id","el_required"),ie.setAttribute("type","checkbox"),ie.setAttribute("onclick","set_required('"+e+"_required')"),"yes"==r&&ie.setAttribute("checked","checked");var ae=document.createElement("label");ae.setAttribute("class","fm-field-label"),ae.setAttribute("for","el_unique"),ae.innerHTML="Allow only unique values";var ne=document.createElement("input");ne.setAttribute("id","el_unique"),ne.setAttribute("type","checkbox"),ne.setAttribute("onclick","set_unique('"+e+"_uniqueform_id_temp')"),"yes"==o&&ne.setAttribute("checked","checked");var le=document.createElement("label");le.setAttribute("class","fm-field-label"),le.setAttribute("for","el_style_textarea"),le.innerHTML="Class name";var de=document.createElement("input");de.setAttribute("id","el_style_textarea"),de.setAttribute("type","text"),de.setAttribute("value",m),de.setAttribute("onChange","change_class(this.value,'"+e+"')");var _e=document.createElement("label");_e.setAttribute("class","fm-field-label"),_e.innerHTML="Additional Attributes";var re=document.createElement("img");re.setAttribute("src",plugin_url+"/images/add.png?ver=1.8.0"),re.style.cssText="cursor:pointer; margin-left:68px",re.setAttribute("title","add"),re.setAttribute("onClick","add_attr("+e+", 'type_text')");var oe=document.createElement("table");oe.setAttribute("id","attributes"),oe.setAttribute("border","0"),oe.style.cssText="margin-left:0px";var me=document.createElement("tr");me.setAttribute("idi","0");var se=document.createElement("th");se.style.cssText="width:100px";var ue=document.createElement("th");ue.style.cssText="width:100px";var ce=document.createElement("th");ce.style.cssText="width:10px";var pe=document.createElement("label");pe.style.cssText="color:#000; font-weight:bold; font-size: 11px",pe.innerHTML="Name";var fe=document.createElement("label");for(fe.style.cssText="color:#000; font-weight:bold; font-size: 11px",fe.innerHTML="Value",oe.appendChild(me),me.appendChild(se),me.appendChild(ue),me.appendChild(ce),se.appendChild(pe),ue.appendChild(fe),n=s.length,j=1;j<=n;j++){var ye=document.createElement("tr");ye.setAttribute("id","attr_row_"+j),ye.setAttribute("idi",j);var he=document.createElement("td");he.style.cssText="width:100px";var be=document.createElement("td");be.style.cssText="width:100px";var ve=document.createElement("td"),we=document.createElement("input");we.setAttribute("type","text"),we.setAttribute("class","fm-field-choice"),we.setAttribute("value",s[j-1]),we.setAttribute("id","attr_name"+j),we.setAttribute("onChange","change_attribute_name("+e+", this, 'type_text')");var ge=document.createElement("input");ge.setAttribute("type","text"),ge.setAttribute("class","fm-field-choice"),ge.setAttribute("value",u[j-1]),ge.setAttribute("id","attr_value"+j),ge.setAttribute("onChange","change_attribute_value("+e+", "+j+", 'type_text')");var Ee=document.createElement("img");Ee.setAttribute("id","el_choices"+j+"_remove"),Ee.setAttribute("src",plugin_url+"/images/delete.png?ver=1.8.0"),Ee.style.cssText="cursor:pointer; vertical-align:middle; margin:2px",Ee.setAttribute("onClick","remove_attr("+j+", "+e+", 'type_text')"),oe.appendChild(ye),ye.appendChild(he),ye.appendChild(be),ye.appendChild(ve),he.appendChild(we),be.appendChild(ge),ve.appendChild(Ee)}var Ae=document.getElementById("edit_table"),je=document.createElement("br"),xe=document.createElement("br");x.appendChild(K),k.appendChild(U),P.appendChild(F),O.appendChild(R),I.appendChild(W),C.appendChild(V),C.appendChild($),C.appendChild(je),C.appendChild(G),C.appendChild(Y),B.appendChild(Z),Q.appendChild(X),T.appendChild(J),M.appendChild(ee),L.appendChild(le),z.appendChild(de),q.appendChild(te),H.appendChild(ie),S.appendChild(ae),D.appendChild(ne),N.appendChild(_e),N.appendChild(re),N.appendChild(xe),N.appendChild(oe),N.setAttribute("colspan","2"),f.appendChild(x),f.appendChild(k),A.appendChild(P),A.appendChild(O),y.appendChild(I),y.appendChild(C),h.appendChild(B),h.appendChild(Q),b.appendChild(T),b.appendChild(M),v.appendChild(L),v.appendChild(z),w.appendChild(q),w.appendChild(H),E.appendChild(S),E.appendChild(D),g.appendChild(N),p.appendChild(f),p.appendChild(A),p.appendChild(y),p.appendChild(h),p.appendChild(b),p.appendChild(v),p.appendChild(w),p.appendChild(E),p.appendChild(g),c.appendChild(p),Ae.appendChild(c),add_id_and_name(e,"type_text"),element="input",type="text";var ke=document.createElement("input");ke.setAttribute("type","hidden"),ke.setAttribute("value","type_number"),ke.setAttribute("name",e+"_typeform_id_temp"),ke.setAttribute("id",e+"_typeform_id_temp");var Ie=document.createElement("input");Ie.setAttribute("type","hidden"),Ie.setAttribute("value",r),Ie.setAttribute("name",e+"_requiredform_id_temp"),Ie.setAttribute("id",e+"_requiredform_id_temp");var Ce=document.createElement("input");Ce.setAttribute("type","hidden"),Ce.setAttribute("value",o),Ce.setAttribute("name",e+"_uniqueform_id_temp"),Ce.setAttribute("id",e+"_uniqueform_id_temp");var Be=document.createElement(element);Be.setAttribute("type",type),Be.style.cssText="width:"+l+"px;",Be.setAttribute("id",e+"_elementform_id_temp"),Be.setAttribute("name",e+"_elementform_id_temp"),Be.setAttribute("value",d),Be.setAttribute("title",_),Be.setAttribute("placeholder",_),Be.setAttribute("onKeyPress","return check_isnum(event)");var Qe=document.createElement("div");Qe.setAttribute("id","main_div");var Te=document.createElement("div");Te.setAttribute("id",e+"_elemet_tableform_id_temp");var Me=document.createElement("div");Me.setAttribute("align","left"),Me.style.display="table-cell",Me.style.width=i+"px",Me.setAttribute("id",e+"_label_sectionform_id_temp");var Le=document.createElement("div");Le.setAttribute("align","left"),Le.style.display="table-cell",Le.setAttribute("id",e+"_element_sectionform_id_temp");var ze=document.createElement("span");ze.setAttribute("id",e+"_element_labelform_id_temp"),ze.innerHTML=t,ze.setAttribute("class","label"),ze.style.verticalAlign="top";var qe=document.createElement("span");qe.setAttribute("id",e+"_required_elementform_id_temp"),qe.innerHTML="",qe.setAttribute("class","required"),qe.style.verticalAlign="top","yes"==r&&(qe.innerHTML=" *");var He=document.getElementById("show_table");Me.appendChild(ze),Me.appendChild(qe),Le.appendChild(ke),Le.appendChild(Ie),Le.appendChild(Ce),Le.appendChild(Be),Te.appendChild(Me),Te.appendChild(Le),Qe.appendChild(Te),He.appendChild(Qe),"top"==a&&label_top(e),change_class(m,e),refresh_attr(e,"type_text")}function type_wdeditor(e,t,i,a,l,d,_,r,o,m,s){document.getElementById("element_type").value="type_wdeditor",delete_last_child();var u=document.createElement("div");u.setAttribute("id","edit_div");var c=document.createElement("table");c.setAttribute("id","edit_main_table"),c.setAttribute("cellpadding","3"),c.setAttribute("cellspacing","0");var p=document.createElement("tr"),f=document.createElement("tr"),y=document.createElement("tr"),h=document.createElement("tr"),b=document.createElement("tr"),v=document.createElement("tr"),w=document.createElement("tr"),g=document.createElement("tr"),E=document.createElement("td"),A=document.createElement("td"),x=document.createElement("td"),k=document.createElement("td"),I=document.createElement("td"),C=document.createElement("td");C.style.cssText="padding-top:10px";var B=document.createElement("td"),Q=document.createElement("td");Q.style.cssText="padding-top:10px";var T=document.createElement("td"),M=document.createElement("td");M.style.cssText="padding-top:10px";var L=document.createElement("td"),z=document.createElement("td");z.style.cssText="padding-top:10px";var q=document.createElement("td"),H=document.createElement("td"),N=document.createElement("td"),S=document.createElement("td"),D=document.createElement("label");D.setAttribute("class","fm-field-label"),D.setAttribute("for","edit_for_label"),D.innerHTML="Field label";var P=document.createElement("textarea");P.setAttribute("id","edit_for_label"),P.setAttribute("rows","4"),P.setAttribute("onKeyUp","change_label('"+e+"_element_labelform_id_temp', this.value)"),P.innerHTML=t;var O=document.createElement("label");O.setAttribute("class","fm-field-label"),O.setAttribute("for","edit_for_label_size"),O.innerHTML="Field label size(px) ";var K=document.createElement("input");K.setAttribute("id","edit_for_label_size"),K.setAttribute("type","text"),K.setAttribute("value",i),K.setAttribute("onKeyPress","return check_isnum(event)"),K.setAttribute("onKeyUp","change_w_style('"+e+"_label_sectionform_id_temp', this.value)");var U=document.createElement("label");U.setAttribute("class","fm-field-label"),U.setAttribute("for","edit_for_label_position_top"),U.innerHTML="Field label position";var F=document.createElement("input");F.setAttribute("id","edit_for_label_position_top"),F.setAttribute("type","radio"),F.setAttribute("value","left"),F.setAttribute("name","edit_for_label_position"),F.setAttribute("onchange","label_left("+e+")"),Left=document.createTextNode("Left");var R=document.createElement("input");R.setAttribute("id","edit_for_label_position_left"),R.setAttribute("type","radio"),R.setAttribute("value","top"),R.setAttribute("name","edit_for_label_position"),R.setAttribute("onchange","label_top("+e+")"),Top=document.createTextNode("Top"),"top"==a?R.setAttribute("checked","checked"):F.setAttribute("checked","checked");var W=document.createElement("label");W.style.cssText="color:#000; font-weight:bold; font-size: 13px",W.innerHTML="Field size(px) ";var V=document.createElement("input");V.setAttribute("id","edit_for_input_size"),V.setAttribute("type","text"),V.setAttribute("value",l),V.style.cssText="margin-right:2px; width: 60px",V.setAttribute("name","edit_for_size"),V.setAttribute("onKeyPress","return check_isnum(event)"),V.setAttribute("onKeyUp","change_w_style('"+e+"_elementform_id_temp', this.value)"),X=document.createTextNode("x");var $=document.createElement("input");$.setAttribute("id","edit_for_input_size"),$.setAttribute("type","text"),$.setAttribute("value",d),$.style.cssText="margin-left:2px; width:60px",$.setAttribute("name","edit_for_size"),$.setAttribute("onKeyPress","return check_isnum(event)"),$.setAttribute("onKeyUp","change_h_style('"+e+"_elementform_id_temp', this.value)");var G=document.createElement("label");G.style.cssText="color:#000; font-weight:bold; font-size: 13px",G.innerHTML="Placeholder";var Y=document.createElement("input");Y.setAttribute("id","el_first_value_input"),Y.setAttribute("type","text"),Y.setAttribute("value",_),Y.setAttribute("onKeyUp","change_input_value(this.value,'"+e+"_elementform_id_temp')");var Z=document.createElement("label");Z.setAttribute("class","fm-field-label"),Z.setAttribute("for","el_send"),Z.innerHTML="Required";var J=document.createElement("input");J.setAttribute("id","el_send"),J.setAttribute("type","checkbox"),J.setAttribute("value","yes"),J.setAttribute("onclick","set_required('"+e+"_required')"),"yes"==r&&J.setAttribute("checked","checked");var ee=document.createElement("label");ee.setAttribute("class","fm-field-label"),ee.setAttribute("for","element_style"),ee.innerHTML="Class name";var te=document.createElement("input");te.setAttribute("id","element_style"),te.setAttribute("type","text"),te.setAttribute("value",o),te.setAttribute("onChange","change_class(this.value,'"+e+"')");var ie=document.createElement("label");ie.setAttribute("class","fm-field-label"),ie.setAttribute("for","el_choices_add"),ie.innerHTML="Additional Attributes";var ae=document.createElement("img");ae.setAttribute("id","el_choices_add"),ae.setAttribute("src",plugin_url+"/images/add.png?ver=1.8.0"),ae.style.cssText="cursor:pointer; margin-left:68px",ae.setAttribute("title","add"),ae.setAttribute("onClick","add_attr("+e+", 'type_text')");var ne=document.createElement("table");ne.setAttribute("id","attributes"),ne.setAttribute("border","0"),ne.style.cssText="margin-left:0px";var le=document.createElement("tr");le.setAttribute("idi","0");var de=document.createElement("th");de.style.cssText="width:100px";var _e=document.createElement("th");_e.style.cssText="width:100px";var re=document.createElement("th");re.style.cssText="width:10px";var oe=document.createElement("label");oe.style.cssText="color:#000; font-weight:bold; font-size: 11px",oe.innerHTML="Name";var me=document.createElement("label");for(me.style.cssText="color:#000; font-weight:bold; font-size: 11px",me.innerHTML="Value",ne.appendChild(le),le.appendChild(de),le.appendChild(_e),le.appendChild(re),de.appendChild(oe),_e.appendChild(me),n=m.length,j=1;j<=n;j++){var se=document.createElement("tr");se.setAttribute("id","attr_row_"+j),se.setAttribute("idi",j);var ue=document.createElement("td");ue.style.cssText="width:100px";var ce=document.createElement("td");ce.style.cssText="width:100px";var pe=document.createElement("td"),fe=document.createElement("input");fe.setAttribute("type","text"),fe.setAttribute("class","fm-field-choice"),fe.setAttribute("value",m[j-1]),fe.setAttribute("id","attr_name"+j),fe.setAttribute("onChange","change_attribute_name("+e+", this, 'type_text')");var ye=document.createElement("input");ye.setAttribute("type","text"),ye.setAttribute("class","fm-field-choice"),ye.setAttribute("value",s[j-1]),ye.setAttribute("id","attr_value"+j),ye.setAttribute("onChange","change_attribute_value("+e+", "+j+", 'type_text')");var he=document.createElement("img");he.setAttribute("id","el_choices"+j+"_remove"),he.setAttribute("src",plugin_url+"/images/delete.png?ver=1.8.0"),he.style.cssText="cursor:pointer; vertical-align:middle; margin:2px",he.setAttribute("align","top"),he.setAttribute("onClick","remove_attr("+j+", "+e+", 'type_text')"),ne.appendChild(se),se.appendChild(ue),se.appendChild(ce),se.appendChild(pe),ue.appendChild(fe),ce.appendChild(ye),pe.appendChild(he)}var be=document.getElementById("edit_table"),ve=document.createElement("br"),we=(document.createElement("br"),document.createElement("br"),document.createElement("br")),ge=(document.createElement("br"),document.createElement("br"),document.createElement("br"));E.appendChild(D),A.appendChild(P),N.appendChild(O),S.appendChild(K),x.appendChild(U),k.appendChild(F),k.appendChild(el_label_left),k.appendChild(ve),k.appendChild(R),k.appendChild(el_label_top),I.appendChild(W),C.appendChild(V),C.appendChild(X),C.appendChild($),B.appendChild(G),Q.appendChild(Y),T.appendChild(ee),M.appendChild(te),L.appendChild(Z),z.appendChild(J),q.appendChild(ie),q.appendChild(ae),q.appendChild(ge),q.appendChild(ne),q.setAttribute("colspan","2"),p.appendChild(E),p.appendChild(A),g.appendChild(N),g.appendChild(S),f.appendChild(x),f.appendChild(k),y.appendChild(I),y.appendChild(C),h.appendChild(B),h.appendChild(Q),b.appendChild(T),b.appendChild(M),v.appendChild(L),v.appendChild(z),w.appendChild(q),w.appendChild(H),c.appendChild(p),c.appendChild(g),c.appendChild(f),c.appendChild(y),c.appendChild(h),c.appendChild(b),c.appendChild(v),c.appendChild(w),u.appendChild(c),be.appendChild(u),add_id_and_name(e,"type_text"),element="editor";var Ee=document.createElement("input");Ee.setAttribute("type","hidden"),Ee.setAttribute("value","type_wdeditor"),Ee.setAttribute("name",e+"_typeform_id_temp"),Ee.setAttribute("id",e+"_typeform_id_temp");var Ae=document.createElement("input");Ae.setAttribute("type","hidden"),Ae.setAttribute("value",r),Ae.setAttribute("name",e+"_requiredform_id_temp"),Ae.setAttribute("id",e+"_requiredform_id_temp");var je=document.createElement("div");je.setAttribute("id","main_div");var xe=document.createElement("div");xe.setAttribute("id",e+"_elemet_tableform_id_temp");var ke=document.createElement("div");ke.setAttribute("align","left"),ke.style.display="table-cell",ke.style.width=i+"px",ke.setAttribute("id",e+"_label_sectionform_id_temp");var Ie=document.createElement("div");Ie.setAttribute("align","left"),Ie.style.display="table-cell",Ie.setAttribute("id",e+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br"),we=document.createElement("br"),document.createElement("br");var Ce=document.createElement("span");Ce.setAttribute("id",e+"_element_labelform_id_temp"),Ce.innerHTML=t,Ce.setAttribute("class","label");var Be=document.createElement("span");Be.setAttribute("id",e+"_required_elementform_id_temp"),Be.innerHTML="",Be.setAttribute("class","required"),"yes"==r&&(Be.innerHTML=" *");var Qe=document.createElement("input");Qe.setAttribute("id",e+"_elementform_id_temp"),Qe.setAttribute("name",e+"_elementform_id_temp"),Qe.setAttribute("type","hidden"),Qe.style.width=l+"px",Qe.style.height=d+"px",Qe.setAttribute("title",_);var Te=document.createElement("span");Te.style.color="red",Te.style.fontStyle="italic",Te.innerHTML="Editor doesn't display in back end",Left=document.createTextNode(e+"_editorform_id_temp");var Me=document.createElement("div");Me.style.display="none";var Le=document.getElementById("show_table");ke.appendChild(Ce),ke.appendChild(Be),Ie.appendChild(Ee),Ie.appendChild(Ae),Ie.appendChild(Qe),Ie.appendChild(Te),Me.appendChild(Left),Ie.appendChild(Me),xe.appendChild(ke),xe.appendChild(Ie),je.appendChild(xe),je.appendChild(we),Le.appendChild(je),"top"==a&&label_top(e),change_class(o,e),refresh_attr(e,"type_text")}function change_input_range(e,t){var i="";""!=document.getElementById("el_range_"+e+"1").value&&(i=document.getElementById("el_range_"+e+"1").value),""!=document.getElementById("el_range_"+e+"2").value&&(""==document.getElementById("el_range_"+e+"1").value&&(i="0"),i=i+"."+document.getElementById("el_range_"+e+"2").value),document.getElementById(t+"_range_"+e+"form_id_temp").value=i}function explode(e,t){return 2!=arguments.length||void 0===e||void 0===t?null:""!==e&&!1!==e&&null!==e&&("function"==typeof e||"object"==typeof e||"function"==typeof t||"object"==typeof t?{0:""}:(!0===e&&(e="1"),t.toString().split(e.toString())))}function type_paypal_price(t,e,i,a,l,d,_,r,o,m,s,u,c,p,f){document.getElementById("element_type").value="type_paypal_price",delete_last_child();var y=document.createElement("div");y.setAttribute("id","edit_div");var h=document.createElement("table");h.setAttribute("id","edit_main_table"),h.setAttribute("cellpadding","3"),h.setAttribute("cellspacing","0");var b=document.createElement("tr"),v=document.createElement("tr"),w=document.createElement("tr"),g=document.createElement("tr"),E=document.createElement("tr"),A=document.createElement("tr"),x=document.createElement("tr"),k=document.createElement("tr"),I=document.createElement("tr"),C=document.createElement("tr"),B=document.createElement("td"),Q=document.createElement("td"),T=document.createElement("td"),M=document.createElement("td"),L=document.createElement("td"),z=document.createElement("td");z.style.cssText="line-height:20px";var q=document.createElement("td"),H=document.createElement("td"),N=document.createElement("td"),S=document.createElement("td"),D=document.createElement("td"),P=document.createElement("td"),O=document.createElement("td"),K=document.createElement("td"),U=document.createElement("td"),F=document.createElement("td"),R=document.createElement("td"),W=document.createElement("td"),V=document.createElement("td"),$=document.createElement("td"),G=document.createElement("label");G.setAttribute("class","fm-field-label"),G.setAttribute("for","edit_for_label"),G.innerHTML="Field label";var Y=document.createElement("textarea");Y.setAttribute("id","edit_for_label"),Y.setAttribute("rows","4"),Y.setAttribute("onKeyUp","change_label('"+t+"_element_labelform_id_temp', this.value)"),Y.innerHTML=e;var Z=document.createElement("label");Z.setAttribute("class","fm-field-label"),Z.setAttribute("for","edit_for_label_size"),Z.innerHTML="Field label size(px) ";var X=document.createElement("input");X.setAttribute("id","edit_for_label_size"),X.setAttribute("type","text"),X.setAttribute("value",i),X.setAttribute("onKeyPress","return check_isnum(event)"),X.setAttribute("onKeyUp","change_w_style('"+t+"_label_sectionform_id_temp', this.value)");var J=document.createElement("label");J.setAttribute("class","fm-field-label"),J.innerHTML="Field label position";var ee=document.createElement("input");ee.setAttribute("id","edit_for_label_position_top"),ee.setAttribute("type","radio"),ee.setAttribute("name","edit_for_label_position"),ee.setAttribute("onchange","label_left("+t+")");var te=document.createElement("label");te.setAttribute("for","edit_for_label_position_top"),te.innerHTML="Left";var ie=document.createElement("input");ie.setAttribute("id","edit_for_label_position_left"),ie.setAttribute("type","radio"),ie.setAttribute("name","edit_for_label_position"),ie.setAttribute("onchange","label_top("+t+")");var ae=document.createElement("label");ae.setAttribute("for","edit_for_label_position_left"),ae.innerHTML="Top","top"==a?ie.setAttribute("checked","checked"):ee.setAttribute("checked","checked"),w_range_minarray=explode(".",p),w_range_maxarray=explode(".",f);var ne=document.createElement("label");ne.setAttribute("class","fm-field-label"),ne.innerHTML="Range ";var le=document.createTextNode("Min"),de=document.createElement("input");de.setAttribute("type","text"),de.setAttribute("id","el_range_min1"),w_range_minarray[0]&&de.setAttribute("value",w_range_minarray[0]),de.style.cssText="width:60px; margin-right:4px;margin-left:8px",de.setAttribute("onKeyPress","return check_isnum(event)"),de.setAttribute("onChange","change_input_range('min', '"+t+"')");var _e=document.createTextNode("."),re=document.createElement("input");re.setAttribute("type","text"),re.setAttribute("id","el_range_min2"),w_range_minarray[1]&&re.setAttribute("value",w_range_minarray[1]),re.style.cssText="width:30px; margin-left:4px",re.setAttribute("onKeyPress","return check_isnum(event)"),re.setAttribute("onChange","change_input_range('min', '"+t+"')");var oe=document.createTextNode("Max"),me=document.createElement("input");me.setAttribute("type","text"),me.setAttribute("id","el_range_max1"),w_range_maxarray[0]&&me.setAttribute("value",w_range_maxarray[0]),me.style.cssText="width:60px; margin-right:4px; margin-left:7px",me.setAttribute("onKeyPress","return check_isnum(event)"),me.setAttribute("onChange","change_input_range('max', '"+t+"')");var se=document.createTextNode("."),ue=document.createElement("input");ue.setAttribute("type","text"),ue.setAttribute("id","el_range_max2"),w_range_maxarray[1]&&ue.setAttribute("value",w_range_maxarray[1]),ue.style.cssText="width:30px; margin-left:4px",ue.setAttribute("onKeyPress","return check_isnum(event)"),ue.setAttribute("onChange","change_input_range('max', '"+t+"')");var ce=document.createTextNode("-"),pe=document.createElement("label");pe.setAttribute("class","fm-field-label"),pe.setAttribute("for","el_first_value_first"),pe.innerHTML="Placeholder ";var fe=document.createElement("input");fe.setAttribute("id","el_first_value_first"),fe.setAttribute("type","text"),fe.setAttribute("value",d[0]),fe.style.cssText="width:120px; margin-right:4px",fe.setAttribute("onKeyPress","return check_isnum(event)"),fe.setAttribute("onKeyUp","change_input_value(this.value,'"+t+"_element_dollarsform_id_temp')");var ye=document.createElement("input");ye.setAttribute("id","el_first_value_last"),ye.setAttribute("type","text"),ye.setAttribute("value",d[1]),ye.style.cssText="width:67px; margin-left:4px; margin-right:4px",ye.setAttribute("onKeyPress","return check_isnum_interval(event,'"+t+"_element_centsform_id_temp',0,99)"),ye.setAttribute("onKeyUp","change_input_value(this.value,'"+t+"_element_centsform_id_temp')");var he=document.createElement("label");he.setAttribute("class","fm-field-label"),he.setAttribute("for","edit_for_input_size"),he.innerHTML="Field size(px) ";var be=document.createElement("input");be.setAttribute("id","edit_for_input_size"),be.setAttribute("type","text"),be.setAttribute("value",r),be.setAttribute("onKeyPress","return check_isnum(event)"),be.setAttribute("onKeyUp","change_w_style('"+t+"_element_dollarsform_id_temp', this.value);");var ve=document.createElement("label");ve.setAttribute("class","fm-field-label"),ve.setAttribute("for","el_required"),ve.innerHTML="Required";var we=document.createElement("input");we.setAttribute("id","el_required"),we.setAttribute("type","checkbox"),we.setAttribute("onclick","set_required('"+t+"_required')"),"yes"==o&&we.setAttribute("checked","checked");var ge=document.createElement("label");ge.setAttribute("class","fm-field-label"),ge.setAttribute("for","el_hide_cents"),ge.innerHTML="Hide Cents";var Ee=document.createElement("input");Ee.setAttribute("id","el_hide_cents"),Ee.setAttribute("type","checkbox"),Ee.setAttribute("onclick","hide_show_cents(this.checked, "+t+")"),"yes"==m&&Ee.setAttribute("checked","checked");var Ae=document.createElement("label");Ae.setAttribute("class","fm-field-label"),Ae.setAttribute("for","el_style_textarea"),Ae.innerHTML="Class name";var je=document.createElement("input");je.setAttribute("id","el_style_textarea"),je.setAttribute("type","text"),je.setAttribute("value",s),je.setAttribute("onChange","change_class(this.value,'"+t+"')");var xe=document.createElement("label");xe.setAttribute("class","fm-field-label"),xe.innerHTML="Additional Attributes";var ke=document.createElement("img");ke.setAttribute("src",plugin_url+"/images/add.png?ver=1.8.0"),ke.style.cssText="cursor:pointer; margin-left:68px",ke.setAttribute("title","add"),ke.setAttribute("onClick","add_attr("+t+", 'type_paypal_price')");var Ie=document.createElement("table");Ie.setAttribute("id","attributes"),Ie.setAttribute("border","0"),Ie.style.cssText="margin-left:0px";var Ce=document.createElement("tr");Ce.setAttribute("idi","0");var Be=document.createElement("th");Be.style.cssText="width:100px";var Qe=document.createElement("th");Qe.style.cssText="width:100px";var Te=document.createElement("th");Te.style.cssText="width:10px";var Me=document.createElement("label");Me.style.cssText="color:#000; font-weight:bold; font-size: 11px",Me.innerHTML="Name";var Le=document.createElement("label");for(Le.style.cssText="color:#000; font-weight:bold; font-size: 11px",Le.innerHTML="Value",Ie.appendChild(Ce),Ce.appendChild(Be),Ce.appendChild(Qe),Ce.appendChild(Te),Be.appendChild(Me),Qe.appendChild(Le),n=u.length,j=1;j<=n;j++){var ze=document.createElement("tr");ze.setAttribute("id","attr_row_"+j),ze.setAttribute("idi",j);var qe=document.createElement("td");qe.style.cssText="width:100px";var He=document.createElement("td");He.style.cssText="width:100px";var Ne=document.createElement("td"),Se=document.createElement("input");Se.setAttribute("type","text"),Se.setAttribute("class","fm-field-choice"),Se.setAttribute("value",u[j-1]),Se.setAttribute("id","attr_name"+j),Se.setAttribute("onChange","change_attribute_name("+t+", this, 'type_paypal_price')");var De=document.createElement("input");De.setAttribute("type","text"),De.setAttribute("class","fm-field-choice"),De.setAttribute("value",c[j-1]),De.setAttribute("id","attr_value"+j),De.setAttribute("onChange","change_attribute_value("+t+", "+j+", 'type_paypal_price')");var Pe=document.createElement("img");Pe.setAttribute("id","el_choices"+j+"_remove"),Pe.setAttribute("src",plugin_url+"/images/delete.png?ver=1.8.0"),Pe.style.cssText="cursor:pointer; vertical-align:middle; margin:2px",Pe.setAttribute("onClick","remove_attr("+j+", "+t+", 'type_paypal_price')"),Ie.appendChild(ze),ze.appendChild(qe),ze.appendChild(He),ze.appendChild(Ne),qe.appendChild(Se),He.appendChild(De),Ne.appendChild(Pe)}var Oe=document.getElementById("edit_table"),Ke=document.createElement("br"),Ue=document.createElement("br"),Fe=(document.createElement("br"),document.createElement("br"));document.createElement("br"),document.createElement("br"),document.createElement("br");B.appendChild(G),Q.appendChild(Y),V.appendChild(Z),$.appendChild(X),T.appendChild(J),M.appendChild(ee),M.appendChild(te),M.appendChild(Ke),M.appendChild(ie),M.appendChild(ae),L.appendChild(ne),z.appendChild(le),z.appendChild(de),z.appendChild(_e),z.appendChild(re),z.appendChild(Ue),z.appendChild(oe),z.appendChild(me),z.appendChild(se),z.appendChild(ue),R.appendChild(pe),W.appendChild(fe),W.appendChild(ce),W.appendChild(ye),O.appendChild(he),K.appendChild(be),q.appendChild(Ae),H.appendChild(je),N.appendChild(ve),S.appendChild(we),U.appendChild(ge),F.appendChild(Ee),D.appendChild(xe),D.appendChild(ke),D.appendChild(Fe),D.appendChild(Ie),D.setAttribute("colspan","2"),b.appendChild(B),b.appendChild(Q),C.appendChild(V),C.appendChild($),v.appendChild(T),v.appendChild(M),w.appendChild(L),w.appendChild(z),x.appendChild(O),x.appendChild(K),g.appendChild(q),g.appendChild(H),E.appendChild(N),E.appendChild(S),A.appendChild(D),A.appendChild(P),k.appendChild(U),k.appendChild(F),I.appendChild(R),I.appendChild(W),h.appendChild(b),h.appendChild(C),h.appendChild(v),h.appendChild(w),h.appendChild(I),h.appendChild(x),h.appendChild(g),h.appendChild(E),h.appendChild(k),h.appendChild(A),y.appendChild(h),Oe.appendChild(y),add_id_and_name(t,"type_name");var Re=document.createElement("input");Re.setAttribute("type","hidden"),Re.setAttribute("value","type_paypal_price"),Re.setAttribute("name",t+"_typeform_id_temp"),Re.setAttribute("id",t+"_typeform_id_temp");var We=document.createElement("input");We.setAttribute("type","hidden"),We.setAttribute("value",o),We.setAttribute("name",t+"_requiredform_id_temp"),We.setAttribute("id",t+"_requiredform_id_temp");var Ve=document.createElement("input");Ve.setAttribute("type","hidden"),Ve.setAttribute("value",p),Ve.setAttribute("name",t+"_range_minform_id_temp"),Ve.setAttribute("id",t+"_range_minform_id_temp");var $e=document.createElement("input");$e.setAttribute("type","hidden"),$e.setAttribute("value",f),$e.setAttribute("name",t+"_range_maxform_id_temp"),$e.setAttribute("id",t+"_range_maxform_id_temp");var Ge=document.createElement("div");Ge.setAttribute("id","main_div");var Ye=document.createElement("div");Ye.setAttribute("class","fm-editable-label"),edit_labels=document.createTextNode("The labels of the fields are editable. Please, click on the label to edit."),Ye.appendChild(edit_labels);var Ze=document.createElement("div");Ze.setAttribute("id",t+"_elemet_tableform_id_temp");var Xe=document.createElement("div");Xe.setAttribute("align","left"),Xe.style.display="table-cell",Xe.style.width=i+"px",Xe.setAttribute("id",t+"_label_sectionform_id_temp");var Je=document.createElement("div");Je.setAttribute("align","left"),Je.style.display="table-cell",Je.setAttribute("id",t+"_element_sectionform_id_temp");var et=document.createElement("div");et.setAttribute("id",t+"_table_price"),et.style.display="table";var tt=document.createElement("div");tt.setAttribute("id",t+"_tr_price1"),tt.style.display="table-row";var it=document.createElement("div");it.setAttribute("id",t+"_tr_price2"),it.style.display="table-row";var at=document.createElement("div");at.setAttribute("id",t+"_td_name_currency"),at.style.display="table-cell";var nt=document.createElement("div");nt.setAttribute("id",t+"_td_name_dollars"),nt.style.display="table-cell";var lt=document.createElement("div");lt.setAttribute("id",t+"_td_name_divider"),lt.style.display="table-cell";var dt=document.createElement("div");dt.setAttribute("id",t+"_td_name_cents"),dt.style.display="table-cell";var _t=document.createElement("div");_t.style.display="table-cell";var rt=document.createElement("div");rt.setAttribute("align","left"),rt.style.display="table-cell";var ot=document.createElement("div");ot.setAttribute("id",t+"_td_name_label_divider"),ot.style.display="table-cell";var mt=document.createElement("div");mt.setAttribute("align","left"),mt.setAttribute("id",t+"_td_name_label_cents"),mt.style.display="table-cell";var st=document.createElement("span");st.setAttribute("id",t+"_element_labelform_id_temp"),st.innerHTML=e,st.setAttribute("class","label"),st.style.verticalAlign="top";var ut=document.createElement("span");ut.setAttribute("id",t+"_required_elementform_id_temp"),ut.innerHTML="",ut.setAttribute("class","required"),ut.style.verticalAlign="top","yes"==o&&(ut.innerHTML=" *");var ct=document.createElement("span");ct.setAttribute("class","wdform_colon"),ct.style.cssText="font-style:bold; vertical-align:middle",ct.innerHTML="\x3c!--repstart--\x3e&nbsp;$&nbsp;\x3c!--repend--\x3e";var pt=document.createElement("label");pt.setAttribute("class","mini_label");var ft=document.createElement("input");ft.setAttribute("type","text"),ft.style.cssText="width:"+r+"px",ft.setAttribute("id",t+"_element_dollarsform_id_temp"),ft.setAttribute("name",t+"_element_dollarsform_id_temp"),ft.setAttribute("value",l[0]),ft.setAttribute("title",d[0]),ft.setAttribute("onKeyPress","return check_isnum(event)");var yt=document.createElement("label");yt.setAttribute("class","mini_label"),yt.setAttribute("id",t+"_mini_label_dollars"),yt.innerHTML=_[0];var ht=document.createElement("span");ht.setAttribute("class","wdform_colon"),ht.style.cssText="font-style:bold; vertical-align:middle",ht.innerHTML="&nbsp;.&nbsp;";var bt=document.createElement("label");bt.setAttribute("class","mini_label");var vt=document.createElement("input");vt.setAttribute("type","text"),vt.style.cssText="width:30px",vt.setAttribute("id",t+"_element_centsform_id_temp"),vt.setAttribute("name",t+"_element_centsform_id_temp"),vt.setAttribute("value",l[1]),vt.setAttribute("title",d[1]),vt.setAttribute("onBlur",'add_0("'+t+'_element_centsform_id_temp")'),vt.setAttribute("onKeyPress","return check_isnum_interval(event,'"+t+"_element_centsform_id_temp',0,99)");var wt=document.createElement("label");wt.setAttribute("class","mini_label"),wt.setAttribute("id",t+"_mini_label_cents"),wt.innerHTML=_[1];var gt=document.getElementById("show_table");Xe.appendChild(st),Xe.appendChild(ut),at.appendChild(ct),nt.appendChild(ft),lt.appendChild(ht),dt.appendChild(vt),tt.appendChild(at),tt.appendChild(nt),tt.appendChild(lt),tt.appendChild(dt),_t.appendChild(pt),rt.appendChild(yt),ot.appendChild(bt),mt.appendChild(wt),it.appendChild(_t),it.appendChild(rt),it.appendChild(ot),it.appendChild(mt),et.appendChild(tt),et.appendChild(it),Je.appendChild(Re),Je.appendChild(We),Je.appendChild(Ve),Je.appendChild($e),Je.appendChild(et),Ze.appendChild(Xe),Ze.appendChild(Je),Ge.appendChild(Ze),Ge.appendChild(Fe),Ge.appendChild(Ye),gt.appendChild(Ge),"top"==a&&label_top(t),"yes"==m&&hide_show_cents(!0,t),change_class(s,t),refresh_attr(t,"type_paypal_price"),jQuery(document).ready(function(){jQuery("label#"+t+"_mini_label_dollars").on("click",function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='dollars' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery(e).focus(),jQuery("input.dollars").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_dollars").text(e)})}}),jQuery("label#"+t+"_mini_label_cents").on("click",function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='cents' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.cents").focus(),jQuery("input.cents").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_cents").text(e)})}})})}function hide_show_cents(e,t){td_divider=document.getElementById(t+"_td_name_divider"),td_cents=document.getElementById(t+"_td_name_cents"),td_divider_label=document.getElementById(t+"_td_name_label_divider"),td_cents_label=document.getElementById(t+"_td_name_label_cents"),change_input_value("",t+"_element_centsform_id_temp"),document.getElementById("el_first_value_last").value="",document.getElementById(t+"_element_centsform_id_temp").value="",td_cents_label.style.display=e?(td_divider.style.display="none",td_cents.style.display="none",td_divider_label.style.display="none"):(td_divider.style.display="table-cell",td_cents.style.display="table-cell",td_divider_label.style.display="table-cell")}function type_date(e,t,i,a,l,d,_,r,o,m,s,u){document.getElementById("element_type").value="type_date",delete_last_child();var c=document.createElement("div");c.setAttribute("id","edit_div");var p=document.createElement("table");p.setAttribute("id","edit_main_table"),p.setAttribute("cellpadding","3"),p.setAttribute("cellspacing","0");var f=document.createElement("tr"),y=document.createElement("tr"),h=document.createElement("tr"),b=document.createElement("tr");b.style.cssText="display:none;";var v=document.createElement("tr"),w=document.createElement("tr"),g=document.createElement("tr"),E=document.createElement("tr"),A=document.createElement("tr"),x=document.createElement("td"),k=document.createElement("td"),I=document.createElement("td"),C=document.createElement("td"),B=document.createElement("td"),Q=document.createElement("td"),T=document.createElement("td"),M=document.createElement("td"),L=document.createElement("td"),z=document.createElement("td"),q=document.createElement("td"),H=document.createElement("td"),N=document.createElement("td"),S=document.createElement("td"),D=document.createElement("td"),P=document.createElement("td"),O=document.createElement("td"),K=document.createElement("td"),U=document.createElement("label");U.setAttribute("for","edit_for_label"),U.setAttribute("class","fm-field-label"),U.innerHTML="Field label";var F=document.createElement("textarea");F.setAttribute("id","edit_for_label"),F.setAttribute("rows","4"),F.setAttribute("onKeyUp","change_label('"+e+"_element_labelform_id_temp', this.value)"),F.innerHTML=t;var R=document.createElement("label");R.setAttribute("class","fm-field-label"),R.setAttribute("for","edit_for_label_size"),R.innerHTML="Field label size(px) ";var W=document.createElement("input");W.setAttribute("id","edit_for_label_size"),W.setAttribute("type","text"),W.setAttribute("value",i),W.setAttribute("onKeyPress","return check_isnum(event)"),W.setAttribute("onKeyUp","change_w_style('"+e+"_label_sectionform_id_temp', this.value)");var V=document.createElement("label");V.setAttribute("class","fm-field-label"),V.innerHTML="Field label position";var $=document.createElement("input");$.setAttribute("id","edit_for_label_position_top"),$.setAttribute("type","radio"),$.setAttribute("name","edit_for_label_position"),$.setAttribute("onchange","label_left("+e+")");var G=document.createElement("label");G.setAttribute("for","edit_for_label_position_top"),G.innerHTML="Left";var Y=document.createElement("input");Y.setAttribute("id","edit_for_label_position_left"),Y.setAttribute("type","radio"),Y.setAttribute("name","edit_for_label_position"),Y.setAttribute("onchange","label_top("+e+")");var Z=document.createElement("label");Z.setAttribute("for","edit_for_label_position_left"),Z.innerHTML="Top","top"==a?Y.setAttribute("checked","checked"):$.setAttribute("checked","checked");var X=document.createElement("label");X.setAttribute("class","fm-field-label"),X.setAttribute("for","date_format"),X.innerHTML="Date format";var J=document.createElement("input");J.setAttribute("id","date_format"),J.setAttribute("type","text"),J.setAttribute("value",r),J.setAttribute("onChange","change_date_format(this.value,'"+e+"', 'format')");var ee=document.createElement("label");ee.setAttribute("class","fm-field-label"),ee.setAttribute("for","button_value"),ee.innerHTML="Date Picker label";var te=document.createElement("input");te.setAttribute("id","button_value"),te.setAttribute("type","text"),te.setAttribute("value",o),te.style.cssText="width:150px;",te.setAttribute("onKeyUp","change_file_value(this.value,'"+e+"_buttonform_id_temp')");var ie=document.createElement("label");ie.setAttribute("class","fm-field-label"),ie.setAttribute("for","el_disable_past_days"),ie.innerHTML="Allow selecting dates starting from current day";var ae=document.createElement("input");ae.setAttribute("id","el_disable_past_days"),ae.setAttribute("type","checkbox"),ae.setAttribute("onclick","change_date_format(this.checked, '"+e+"', 'dis_days')"),"yes"==u&&ae.setAttribute("checked","checked");var ne=document.createElement("label");ne.setAttribute("class","fm-field-label"),ne.setAttribute("for","el_style_textarea"),ne.innerHTML="Class name";var le=document.createElement("input");le.setAttribute("id","el_style_textarea"),le.setAttribute("type","text"),le.setAttribute("value",_),le.setAttribute("onChange","change_class(this.value,'"+e+"')");var de=document.createElement("label");de.setAttribute("class","fm-field-label"),de.setAttribute("for","el_required"),de.innerHTML="Required";var _e=document.createElement("input");_e.setAttribute("id","el_required"),_e.setAttribute("type","checkbox"),_e.setAttribute("onclick","set_required('"+e+"_required')"),"yes"==d&&_e.setAttribute("checked","checked");var re=document.createElement("label");re.setAttribute("class","fm-field-label"),re.innerHTML="Additional Attributes";var oe=document.createElement("img");oe.setAttribute("src",plugin_url+"/images/add.png?ver=1.8.0"),oe.style.cssText="cursor:pointer; margin-left:68px",oe.setAttribute("title","add"),oe.setAttribute("onClick","add_attr("+e+", 'type_date')");var me=document.createElement("table");me.setAttribute("id","attributes"),me.setAttribute("border","0"),me.style.cssText="margin-left:0px";var se=document.createElement("tr");se.setAttribute("idi","0");var ue=document.createElement("th");ue.style.cssText="width:100px";var ce=document.createElement("th");ce.style.cssText="width:100px";var pe=document.createElement("th");pe.style.cssText="width:10px";var fe=document.createElement("label");fe.style.cssText="color:#000; font-weight:bold; font-size: 11px",fe.innerHTML="Name";var ye=document.createElement("label");for(ye.style.cssText="color:#000; font-weight:bold; font-size: 11px",ye.innerHTML="Value",me.appendChild(se),se.appendChild(ue),se.appendChild(ce),se.appendChild(pe),ue.appendChild(fe),ce.appendChild(ye),n=m.length,j=1;j<=n;j++){var he=document.createElement("tr");he.setAttribute("id","attr_row_"+j),he.setAttribute("idi",j);var be=document.createElement("td");be.style.cssText="width:100px";var ve=document.createElement("td");ve.style.cssText="width:100px";var we=document.createElement("td"),ge=document.createElement("input");ge.setAttribute("type","text"),ge.setAttribute("class","fm-field-choice"),ge.setAttribute("value",m[j-1]),ge.setAttribute("id","attr_name"+j),ge.setAttribute("onChange","change_attribute_name("+e+", this, 'type_date')");var Ee=document.createElement("input");Ee.setAttribute("type","text"),Ee.setAttribute("class","fm-field-choice"),Ee.setAttribute("value",s[j-1]),Ee.setAttribute("id","attr_value"+j),Ee.setAttribute("onChange","change_attribute_value("+e+", "+j+", 'type_date')");var Ae=document.createElement("img");Ae.setAttribute("id","el_choices"+j+"_remove"),Ae.setAttribute("src",plugin_url+"/images/delete.png?ver=1.8.0"),Ae.style.cssText="cursor:pointer; vertical-align:middle; margin:2px",Ae.setAttribute("onClick","remove_attr("+j+", "+e+", 'type_date')"),me.appendChild(he),he.appendChild(be),he.appendChild(ve),he.appendChild(we),be.appendChild(ge),ve.appendChild(Ee),we.appendChild(Ae)}var je=document.getElementById("edit_table"),xe=document.createElement("br"),ke=document.createElement("br");x.appendChild(U),k.appendChild(F),D.appendChild(R),P.appendChild(W),I.appendChild(V),C.appendChild($),C.appendChild(G),C.appendChild(xe),C.appendChild(Y),C.appendChild(Z),B.appendChild(X),Q.appendChild(J),T.appendChild(ee),M.appendChild(te),O.appendChild(ie),K.appendChild(ae),L.appendChild(ne),z.appendChild(le),q.appendChild(de),H.appendChild(_e),N.appendChild(re),N.appendChild(oe),N.appendChild(ke),N.appendChild(me),N.setAttribute("colspan","2"),f.appendChild(x),f.appendChild(k),E.appendChild(D),E.appendChild(P),y.appendChild(I),y.appendChild(C),h.appendChild(B),h.appendChild(Q),b.appendChild(T),b.appendChild(M),A.appendChild(O),A.appendChild(K),v.appendChild(L),v.appendChild(z),w.appendChild(q),w.appendChild(H),g.appendChild(N),g.appendChild(S),p.appendChild(f),p.appendChild(E),p.appendChild(y),p.appendChild(h),p.appendChild(b),p.appendChild(A),p.appendChild(v),p.appendChild(w),p.appendChild(g),c.appendChild(p),je.appendChild(c),add_id_and_name(e,"type_text");var Ie=document.createElement("input");Ie.setAttribute("type","hidden"),Ie.setAttribute("value","type_date"),Ie.setAttribute("name",e+"_typeform_id_temp"),Ie.setAttribute("id",e+"_typeform_id_temp");var Ce=document.createElement("input");Ce.setAttribute("type","hidden"),Ce.setAttribute("value",d),Ce.setAttribute("name",e+"_requiredform_id_temp"),Ce.setAttribute("id",e+"_requiredform_id_temp");var Be=document.createElement("input");Be.setAttribute("type","hidden"),Be.setAttribute("value",u),Be.setAttribute("id",e+"_dis_past_daysform_id_temp"),Be.setAttribute("name",e+"_dis_past_daysform_id_temp");var Qe=document.createElement("div");Qe.setAttribute("id","main_div");var Te=document.createElement("div");Te.setAttribute("id",e+"_elemet_tableform_id_temp");var Me=document.createElement("div");Me.setAttribute("align","left"),Me.style.display="table-cell",Me.style.width=i+"px",Me.setAttribute("id",e+"_label_sectionform_id_temp");var Le=document.createElement("div");Le.setAttribute("align","left"),Le.style.display="table-cell",Le.setAttribute("id",e+"_element_sectionform_id_temp");var ze=document.createElement("div");ze.setAttribute("id",e+"_table_date"),ze.style.display="table";var qe=document.createElement("div");qe.setAttribute("id",e+"_tr_date1"),qe.style.display="table-row";var He=document.createElement("div");He.setAttribute("id",e+"_tr_date2"),He.style.display="table-row";var Ne=document.createElement("div");Ne.setAttribute("id",e+"_td_date_input1"),Ne.style.display="table-cell";var Se=document.createElement("div");Se.setAttribute("id",e+"_td_date_input2"),Se.style.display="table-cell";var De=document.createElement("div");De.setAttribute("id",e+"_td_date_input3"),De.style.display="table-cell";var Pe=document.createElement("div");Pe.setAttribute("id",e+"_td_date_label1"),Pe.style.display="table-cell";var Oe=document.createElement("div");Oe.setAttribute("id",e+"_td_date_label2"),Oe.style.display="table-cell";var Ke=document.createElement("div");Ke.setAttribute("id",e+"_td_date_label3"),Ke.style.display="table-cell";var Ue=document.createElement("br"),Fe=(document.createElement("br"),document.createElement("span"));Fe.setAttribute("id",e+"_element_labelform_id_temp"),Fe.innerHTML=t,Fe.setAttribute("class","label"),Fe.style.verticalAlign="top";var Re=document.createElement("span");Re.setAttribute("id",e+"_required_elementform_id_temp"),Re.innerHTML="",Re.setAttribute("class","required"),Re.style.verticalAlign="top","yes"==d&&(Re.innerHTML=" *");var We=document.createElement("input");We.setAttribute("type","text"),We.setAttribute("value",l),We.setAttribute("class","wdform-date"),We.setAttribute("id",e+"_elementform_id_temp"),We.setAttribute("name",e+"_elementform_id_temp"),We.setAttribute("maxlength","10"),We.setAttribute("size","10");var Ve=document.createElement("input");Ve.setAttribute("id",e+"_buttonform_id_temp"),Ve.setAttribute("class","button"),Ve.setAttribute("type","reset"),Ve.setAttribute("value",o),Ve.setAttribute("format",r);var $e=document.getElementById("show_table");Me.appendChild(Fe),Me.appendChild(Re),Le.appendChild(Ie),Le.appendChild(Ce),Le.appendChild(Be),Le.appendChild(We),Le.appendChild(Ve),Te.appendChild(Me),Te.appendChild(Le),Qe.appendChild(Te),Qe.appendChild(Ue),$e.appendChild(Qe),"top"==a&&label_top(e),change_class(_,e),refresh_attr(e,"type_date")}function form_maker_getElementsByAttribute(e,t,i,a){for(var n,l,d="*"==t&&e.all?e.all:e.getElementsByTagName(t),_=new Array,r=void 0!==a?new RegExp("(^|\\s)"+a+"(\\s|$)"):null,o=0;o<d.length;o++)"string"==typeof(n=(l=d[o]).getAttribute&&l.getAttribute(i))&&0<n.length&&(void 0===a||r&&r.test(n))&&_.push(l);return _}function change_element_attribute(e,t,i){"w_readonly"==i||"w_hide_field"==i?"yes"==document.getElementById(t+"_elementform_id_temp").getAttribute(i)?document.getElementById(t+"_elementform_id_temp").setAttribute(i,"no"):document.getElementById(t+"_elementform_id_temp").setAttribute(i,"yes"):document.getElementById(t+"_elementform_id_temp").setAttribute(i,e)}function change_input_style(e){document.getElementById(e+"_elementform_id_temp").getAttribute("readonly")?document.getElementById(e+"_elementform_id_temp").removeAttribute("readonly"):document.getElementById(e+"_elementform_id_temp").setAttribute("readonly","readonly")}function change_src(e,t,i){for(var a=0;a<=e;a++)document.getElementById(t+"_star_"+a).src=plugin_url+"/images/star_"+document.getElementById(t+"_star_colorform_id_temp").value+".png"}function reset_src(e,t){for(var i=0;i<=e;i++)document.getElementById(t+"_star_"+i).src=plugin_url+"/images/star.png"}function select_star_rating(e,t,i){}function change_range_width(e,t,i){document.getElementById(t+"_elementform_id_temp0").style.cssText="width:"+e+"px",document.getElementById(t+"_elementform_id_temp1").style.cssText="width:"+e+"px",document.getElementById(t+"_range_widthform_id_temp").value=e}function go_to_type_paypal_price(e){w_attr_name=[],w_attr_value=[],w_first_val=["",""],w_title=["",""],w_mini_labels=["Dollars","Cents"],type_paypal_price(e,"Amount","100","left",w_first_val,w_title,w_mini_labels,"100","no","no","",w_attr_name,w_attr_value,"","")}function go_to_type_number(e){w_attr_name=[],w_attr_value=[],type_number(e,"Number:","100","left","200","","","no","no","",w_attr_name,w_attr_value)}function go_to_type_wdeditor(e){w_attr_name=[],w_attr_value=[],type_wdeditor(e,"Editor:","100","left","380","200","","no","",w_attr_name,w_attr_value)}function go_to_type_date(e){w_attr_name=[],w_attr_value=[],type_date(e,"Date:","100","left","","no","","%Y-%m-%d","...",w_attr_name,w_attr_value,"no")}function remove_section_break(e){var t=jQuery("#wdform_field"+e).parent(),i=t.next(),a=t.prev();i.find(".wdform_column").each(function(e,t){var i=a.children().eq(e);!i||i.hasClass("wdform_column_empty")?a.find(".wdform_column_empty").before(t):jQuery(t).find(".wdform_row").each(function(e,t){i.append(t)})}),t.remove(),i.remove()}function fm_remove_section(e){var t=jQuery(".fm-row-deleting").first().closest(".wdform_section"),i=t.prev(".wdform_tr_section_break");if(!e){var a=t.prevAll(".wdform_section:first");if(a.length||(a=t.nextAll(".wdform_section:first")),!a.length)return;t.find(".wdform_column").each(function(e,t){a.append(t)})}i.remove(),t.remove()}function remove_row(e){var t=document.getElementById("wdform_field"+e).parentNode;t.parentNode.removeChild(t)}function destroyChildren(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function show_or_hide(e){jQuery("#form_id_tempform_view"+e).is(":visible")?hide_form_view(e):show_form_view(e)}function show_form_view(e){jQuery("#form_id_tempform_view"+e).show()}function hide_form_view(e){jQuery("#form_id_tempform_view"+e).hide()}function generate_buttons(e){var t;form_view_elemet=document.getElementById("form_id_tempform_view"+e),(t=document.createElement("div")).setAttribute("valign","middle"),t.setAttribute("align","left"),t.style.display="inline-block",t.style.width="40%",page_nav.appendChild(t),form_view_elemet.parentNode.previousSibling&&("DIV"==form_view_elemet.parentNode.previousSibling.tagName?table=!0:form_view_elemet.parentNode.previousSibling.previousSibling&&"DIV"==form_view_elemet.parentNode.previousSibling.previousSibling.tagName?table=!0:table=!1,table&&(form_view_elemet.getAttribute("previous_title")?(previous_title=form_view_elemet.getAttribute("previous_title"),previous_type=form_view_elemet.getAttribute("previous_type"),previous_class=form_view_elemet.getAttribute("previous_class")):(previous_title="Previous",previous_type="button",previous_class=""),next_or_previous="previous",previous=make_pagebreak_button(next_or_previous,previous_title,previous_type,previous_class,e),t.appendChild(previous))),(t=document.createElement("div")).setAttribute("id","page_numbersform_id_temp"+e),t.setAttribute("valign","middle"),t.setAttribute("align","center"),t.style.display="inline-block",t.style.width="20%",page_nav.appendChild(t),(t=document.createElement("div")).setAttribute("valign","middle"),t.setAttribute("align","right"),t.style.display="inline-block",t.style.width="40%",page_nav.appendChild(t),form_view_elemet.parentNode.nextSibling&&("DIV"==form_view_elemet.parentNode.nextSibling.tagName?table=!0:form_view_elemet.parentNode.nextSibling.nextSibling&&"DIV"==form_view_elemet.parentNode.nextSibling.nextSibling.tagName?table=!0:table=!1,table&&(form_view_elemet.getAttribute("previous_title")?(next_title=form_view_elemet.getAttribute("next_title"),next_type=form_view_elemet.getAttribute("next_type"),next_class=form_view_elemet.getAttribute("next_class")):(next_title="Next",next_type="button",next_class=""),next_or_previous="next",next=make_pagebreak_button(next_or_previous,next_title,next_type,next_class,e),t.appendChild(next)))}function generate_page_nav(e){form_view=e,document.getElementById("form_id_tempform_view"+e).parentNode.style.borderWidth="1px",jQuery(".wdform-page-and-images").each(function(){var e=jQuery(this).find(".form_id_tempform_view_img").attr("id").split("form_id_tempform_view_img");t=e[1],page_nav=document.getElementById("form_id_temppage_nav"+t),destroyChildren(page_nav),generate_buttons(t)}),generate_page_bar(),refresh_page_numbers()}function remove_page(e){jQuery("#fm_delete_page_id").val(e),fm_popup_toggle("fm_delete_page_popup_container")}function remove_field(e,t){jQuery("#fm_delete_field_id").val(e),fm_popup_toggle("fm_delete_field_popup_container"),void 0!==t&&(t.stopPropagation(),t.preventDefault())}function fm_remove_column_popup(e){jQuery(".wdform_column").removeClass("fm-column-deleting"),jQuery(e).closest(".wdform_column").addClass("fm-column-deleting"),fm_popup_toggle("fm_delete_column_popup_container")}function fm_remove_row_popup(e){jQuery(".wdform_section").removeClass("fm-row-deleting"),jQuery(e).closest(".wdform_section").addClass("fm-row-deleting"),jQuery(e).closest(".wdform_section").find(".wdform_row").length?fm_popup_toggle("fm_delete_row_popup_container"):fm_remove_section(!1)}function fm_remove_column(){jQuery(".fm-column-deleting").remove()}function remove_page_only(){id=jQuery("#fm_delete_page_id").val(),refresh_pages_without_deleting(id)}function remove_page_all(){id=jQuery("#fm_delete_page_id").val(),form_view_elemet=document.getElementById("form_id_tempform_view"+id);var e=jQuery(".wdform-page-and-images").length;if(2==e&&(jQuery(".form_id_tempform_view_img").removeClass("form_view_show").addClass("form_view_hide"),jQuery("*[id*=form_id_temppage_nav]").empty()),1==e)return form_view_elemet.innerHTML="",tbody=form_view_elemet,tr=document.createElement("div"),tr.setAttribute("class","wdform_section"),tr.style.display="table-row",tr_page_nav=document.createElement("div"),tr_page_nav.setAttribute("valign","top"),tr_page_nav.setAttribute("class","wdform_footer"),tr_page_nav.style.width="100%",td_page_nav=document.createElement("div"),td_page_nav.style.width="100%",table_min_page_nav=document.createElement("div"),table_min_page_nav.style.width="100%",table_min_page_nav.style.display="table",tbody_min_page_nav=document.createElement("div"),tbody_min_page_nav.style.display="table-row-group",tr_min_page_nav=document.createElement("div"),tr_min_page_nav.setAttribute("id","form_id_temppage_nav"+form_view),tr_min_page_nav.style.display="table-row",table_min=document.createElement("div"),table_min.setAttribute("class","wdform_column"),tr.appendChild(table_min),tbody_min_page_nav.appendChild(tr_min_page_nav),table_min_page_nav.appendChild(tbody_min_page_nav),td_page_nav.appendChild(table_min_page_nav),tr_page_nav.appendChild(td_page_nav),tbody.appendChild(tr),void tbody.appendChild(tr_page_nav);form_view_table=form_view_elemet.parentNode,document.getElementById("take").removeChild(form_view_table),refresh_pages(id)}function refresh_pages(e){temp=1,destroyChildren(document.getElementById("pages"));var t=jQuery(".wdform-page-and-images").length;generate_page_bar(),1<t?jQuery("#page_bar").removeClass("form_view_hide"):(destroyChildren(document.getElementById("edit_page_navigation")),jQuery("#page_bar").addClass("form_view_hide"),jQuery(".wdform_page").removeAttr("style"))}function refresh_pages_without_deleting(e){var t=jQuery("#form_id_tempform_view"+e);t.find(".wdform_row");2==jQuery(".wdform-page-and-images").length&&(jQuery(".form_id_tempform_view_img").removeClass("form_view_show").addClass("form_view_hide"),jQuery("*[id*=form_id_temppage_nav]").empty());var i=t.parent(),a=i.prevAll(".wdform-page-and-images:first");a.length||(a=i.nextAll(".wdform-page-and-images:first")),a.length&&(i.find(".wdform_section").each(function(e,t){var i=a.find(".wdform_section").eq(e);i.length?jQuery(t).find(".wdform_column:not(:empty)").each(function(e,t){i.append(t)}):a.find(".wdform_row_empty").before(t)}),i.remove(),refresh_pages(e),all_sortable_events())}function make_page_steps_front(){destroyChildren(document.getElementById("pages")),show_title=document.getElementById("el_show_title_input").checked,k=0,jQuery(".wdform-page-and-images").each(function(){var e=jQuery(this).find(".wdform_page").attr("id");j=e.split("form_id_tempform_view")[1],document.getElementById("form_id_tempform_view"+j).getAttribute("page_title")?w_pages=document.getElementById("form_id_tempform_view"+j).getAttribute("page_title"):w_pages="",k++,page_number=document.createElement("span"),page_number.setAttribute("id","page_"+j),page_number.setAttribute("onClick",'generate_page_nav("'+j+'")'),j==form_view?page_number.setAttribute("class","page_active"):page_number.setAttribute("class","page_deactive"),show_title?page_number.innerHTML=w_pages:page_number.innerHTML=k,document.getElementById("pages").appendChild(page_number)})}function make_page_percentage_front(){destroyChildren(document.getElementById("pages")),show_title=document.getElementById("el_show_title_input").checked;var e=document.createElement("div");e.setAttribute("class","page_percentage_deactive");var t=document.createElement("div");t.setAttribute("id","div_percentage"),t.setAttribute("class","page_percentage_active");var i=document.createElement("b");t.appendChild(i),k=0,cur_page_title="",jQuery(".wdform-page-and-images").each(function(){var e=jQuery(this).find(".wdform_page").attr("id");if(j=e.split("form_id_tempform_view")[1],document.getElementById("form_id_tempform_view"+j).getAttribute("page_title")?w_pages=document.getElementById("form_id_tempform_view"+j).getAttribute("page_title"):w_pages="",k++,j==form_view){if(show_title){var t=document.createElement("span");1==k?t.style.paddingLeft="30px":t.style.paddingLeft="5px",t.innerHTML=w_pages}page_number=k}}),i.innerHTML=Math.round((page_number-1)/k*100)+"%",t.style.width=(page_number-1)/k*100+"%",e.appendChild(t),cur_page_title&&e.appendChild(cur_page_title),document.getElementById("pages").appendChild(e)}function make_page_none_front(){var e=document.createElement("div");e.innerHTML="NO PAGE BAR",jQuery("#pages").empty(),jQuery("#pages").append(e)}function generate_page_bar(){need_enable=!1,el_page_navigation(),add(0,!1),need_enable=!0}function remove_add_(e){attr_name=new Array,attr_value=new Array;var t=document.getElementById(e);for(atr=t.attributes,v=0;v<30;v++)atr[v]&&0==atr[v].name.indexOf("add_")&&(attr_name.push(atr[v].name.replace("add_","")),attr_value.push(atr[v].value),t.removeAttribute(atr[v].name),v--);for(v=0;v<attr_name.length;v++)t.setAttribute(attr_name[v],attr_value[v])}function duplicate(e,a){if(jQuery("#wdform_field"+e).closest(".wdform_column").after("<div id='cur_column' class='wdform_column'></div>"),type=document.getElementById("wdform_field"+e).getAttribute("type"),document.getElementById(e+"_element_labelform_id_temp").innerHTML&&(w_field_label=document.getElementById(e+"_element_labelform_id_temp").innerHTML),labels=all_labels(),m=0,t=!0,"type_section_break"!=type){for(;t;)for(m++,k=0;k<labels.length&&(t=!0,labels[k]!=w_field_label+"("+m+")");k++)t=!1;w_field_label=w_field_label+"("+m+")"}switch(k=0,w_choices=new Array,w_choices_value=new Array,w_choices_params=new Array,w_choices_checked=new Array,w_choices_disabled=new Array,w_allow_other_num=0,w_property=new Array,w_property_values=new Array,w_choices_price=new Array,t=0,document.getElementById(e+"_label_sectionform_id_temp")&&("block"==document.getElementById(e+"_label_sectionform_id_temp").style.display?w_field_label_pos="top":w_field_label_pos="left"),document.getElementById(e+"_elementform_id_temp")&&(s=document.getElementById(e+"_elementform_id_temp").style.width,w_size=s.substring(0,s.length-2)),document.getElementById(e+"_label_sectionform_id_temp")&&(s=document.getElementById(e+"_label_sectionform_id_temp").style.width,w_field_label_size=s.substring(0,s.length-2)),document.getElementById(e+"_requiredform_id_temp")&&(w_required=document.getElementById(e+"_requiredform_id_temp").value),document.getElementById(e+"_uniqueform_id_temp")&&(w_unique=document.getElementById(e+"_uniqueform_id_temp").value),document.getElementById(e+"_label_sectionform_id_temp")&&(w_class=document.getElementById(e+"_label_sectionform_id_temp").getAttribute("class"),w_class||(w_class="")),type){case"type_editor":w_editor=document.getElementById("wdform_field"+e).innerHTML,type_editor(gen,w_editor);break;case"type_section_break":w_editor=document.getElementById(e+"_element_sectionform_id_temp").innerHTML,type_section_break(gen,w_editor);break;case"type_send_copy":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(e+"_elementform_id_temp").checked,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_send_copy(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_first_val,w_required,w_attr_name,w_attr_value);break;case"type_text":w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,w_regExp_status=document.getElementById(e+"_regExpStatusform_id_temp").value,w_regExp_value=unescape(document.getElementById(e+"_regExp_valueform_id_temp").value),w_regExp_common=document.getElementById(e+"_regExp_commonform_id_temp").value,w_regExp_arg=document.getElementById(e+"_regArgumentform_id_temp").value,w_regExp_alert=document.getElementById(e+"_regExp_alertform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_readonly=document.getElementById(e+"_readonlyform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,type_text(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_first_val,w_title,w_required,w_regExp_status,w_regExp_value,w_regExp_common,w_regExp_arg,w_regExp_alert,w_unique,w_attr_name,w_attr_value,w_readonly);break;case"type_number":w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_number(gen,w_field_label,w_field_label_size,w_field_label_pos,w_size,w_first_val,w_title,w_required,w_unique,w_class,w_attr_name,w_attr_value);break;case"type_password":w_placeholder_value=document.getElementById(e+"_elementform_id_temp").placeholder,w_verification=document.getElementById(e+"_verification_id_temp").value,document.getElementById(e+"_1_element_labelform_id_temp").innerHTML?w_verification_label=document.getElementById(e+"_1_element_labelform_id_temp").innerHTML:w_verification_label=" ",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_password(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_required,w_unique,w_class,w_verification,w_verification_label,w_placeholder_value,w_attr_name,w_attr_value);break;case"type_textarea":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,s=document.getElementById(e+"_elementform_id_temp").style.height,w_size_h=s.substring(0,s.length-2),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_textarea(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_size_h,w_first_val,w_title,w_required,w_unique,w_class,w_attr_name,w_attr_value);break;case"type_wdeditor":w_title=document.getElementById(e+"_elementform_id_temp").title,s=document.getElementById(e+"_elementform_id_temp").style.height,w_size_h=s.substring(0,s.length-2),w=document.getElementById(e+"_elementform_id_temp").style.width,w_size_w=w.substring(0,w.length-2),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_wdeditor(gen,w_field_label,w_field_label_size,w_field_label_pos,w_size_w,w_size_h,w_title,w_required,w_class,w_attr_name,w_attr_value);break;case"type_phone":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=[document.getElementById(e+"_element_firstform_id_temp").value,document.getElementById(e+"_element_lastform_id_temp").value],w_title=[document.getElementById(e+"_element_firstform_id_temp").title,document.getElementById(e+"_element_lastform_id_temp").title],s=document.getElementById(e+"_element_lastform_id_temp").style.width,w_size=s.substring(0,s.length-2),w_mini_labels=[document.getElementById(e+"_mini_label_area_code").innerHTML,document.getElementById(e+"_mini_label_phone_number").innerHTML],atrs=return_attributes(e+"_element_firstform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_phone(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_first_val,w_title,w_mini_labels,w_required,w_unique,w_class,w_attr_name,w_attr_value);break;case"type_phone_new":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_top_country=document.getElementById(e+"_elementform_id_temp").getAttribute("top-country"),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_phone_new(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_first_val,w_top_country,w_required,w_unique,w_class,w_attr_name,w_attr_value);break;case"type_name":if(document.getElementById(e+"_enable_fieldsform_id_temp")){w_name_format="normal",w_first_val=[document.getElementById(e+"_element_firstform_id_temp").value,document.getElementById(e+"_element_lastform_id_temp").value],w_title=[document.getElementById(e+"_element_firstform_id_temp").title,document.getElementById(e+"_element_lastform_id_temp").title];for(var l=["title","middle"],d=0;d<2;d++)w_first_val.push(document.getElementById(e+"_element_"+l[d]+"form_id_temp")?document.getElementById(e+"_element_"+l[d]+"form_id_temp").value:""),w_title.push(document.getElementById(e+"_element_"+l[d]+"form_id_temp")?document.getElementById(e+"_element_"+l[d]+"form_id_temp").title:"")}else document.getElementById(e+"_element_middleform_id_temp")?w_name_format="extended":w_name_format="normal","normal"==w_name_format?(w_first_val=[document.getElementById(e+"_element_firstform_id_temp").value,document.getElementById(e+"_element_lastform_id_temp").value],w_title=[document.getElementById(e+"_element_firstform_id_temp").title,document.getElementById(e+"_element_lastform_id_temp").title]):(w_first_val=[document.getElementById(e+"_element_firstform_id_temp").value,document.getElementById(e+"_element_lastform_id_temp").value,document.getElementById(e+"_element_titleform_id_temp").value,document.getElementById(e+"_element_middleform_id_temp").value],w_title=[document.getElementById(e+"_element_firstform_id_temp").title,document.getElementById(e+"_element_lastform_id_temp").title,document.getElementById(e+"_element_titleform_id_temp").title,document.getElementById(e+"_element_middleform_id_temp").title]);document.getElementById(e+"_mini_label_title")?w_mini_title=document.getElementById(e+"_mini_label_title").innerHTML:w_mini_title="Title",document.getElementById(e+"_mini_label_middle")?w_mini_middle=document.getElementById(e+"_mini_label_middle").innerHTML:w_mini_middle="Middle",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_mini_labels=[w_mini_title,document.getElementById(e+"_mini_label_first").innerHTML,document.getElementById(e+"_mini_label_last").innerHTML,w_mini_middle],w_name_title=document.getElementById(e+"_enable_fieldsform_id_temp")?document.getElementById(e+"_enable_fieldsform_id_temp").getAttribute("title"):"normal"==w_name_format?"no":"yes",w_name_middle=document.getElementById(e+"_enable_fieldsform_id_temp")?document.getElementById(e+"_enable_fieldsform_id_temp").getAttribute("middle"):"normal"==w_name_format?"no":"yes",w_name_fields=[w_name_title,w_name_middle],w_autofill=document.getElementById(e+"_autofillform_id_temp").value,s=document.getElementById(e+"_element_firstform_id_temp").style.width,w_size=s.substring(0,s.length-2),atrs=return_attributes(e+"_element_firstform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_name(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_first_val,w_title,w_mini_labels,w_size,w_name_format,w_required,w_unique,w_class,w_attr_name,w_attr_value,w_name_fields,w_autofill);break;case"type_paypal_price":w_first_val=[document.getElementById(e+"_element_dollarsform_id_temp").value,document.getElementById(e+"_element_centsform_id_temp").value],w_title=[document.getElementById(e+"_element_dollarsform_id_temp").title,document.getElementById(e+"_element_centsform_id_temp").title],"none"==document.getElementById(e+"_td_name_cents").style.display?w_hide_cents="yes":w_hide_cents="no",s=document.getElementById(e+"_element_dollarsform_id_temp").style.width,w_size=s.substring(0,s.length-2),atrs=return_attributes(e+"_element_dollarsform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_range_min=document.getElementById(e+"_range_minform_id_temp").value,w_range_max=document.getElementById(e+"_range_maxform_id_temp").value,w_mini_labels=[document.getElementById(e+"_mini_label_dollars").innerHTML,document.getElementById(e+"_mini_label_cents").innerHTML],type_paypal_price(gen,w_field_label,w_field_label_size,w_field_label_pos,w_first_val,w_title,w_mini_labels,w_size,w_required,w_hide_cents,w_class,w_attr_name,w_attr_value,w_range_min,w_range_max);break;case"type_paypal_price_new":w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,s=document.getElementById(e+"_elementform_id_temp").style.width,w_size=s.substring(0,s.length-2),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_range_min=document.getElementById(e+"_range_minform_id_temp").value,w_range_max=document.getElementById(e+"_range_maxform_id_temp").value,w_readonly=document.getElementById(e+"_readonlyform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,"none"==document.getElementById(e+"_td_name_currency").style.display?w_currency="yes":w_currency="no",type_paypal_price_new(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_first_val,w_title,w_size,w_required,w_class,w_attr_name,w_attr_value,w_range_min,w_range_max,w_readonly,w_currency);break;case"type_address":s=document.getElementById(e+"_div_address").style.width,w_size=s.substring(0,s.length-2),document.getElementById(e+"_mini_label_street1")?w_street1=document.getElementById(e+"_mini_label_street1").innerHTML:w_street1=document.getElementById(e+"_street1form_id_temp").value,document.getElementById(e+"_mini_label_street2")?w_street2=document.getElementById(e+"_mini_label_street2").innerHTML:w_street2=document.getElementById(e+"_street2form_id_temp").value,document.getElementById(e+"_mini_label_city")?w_city=document.getElementById(e+"_mini_label_city").innerHTML:w_city=document.getElementById(e+"_cityform_id_temp").value,document.getElementById(e+"_mini_label_state")?w_state=document.getElementById(e+"_mini_label_state").innerHTML:w_state=document.getElementById(e+"_stateform_id_temp").value,document.getElementById(e+"_mini_label_postal")?w_postal=document.getElementById(e+"_mini_label_postal").innerHTML:w_postal=document.getElementById(e+"_postalform_id_temp").value,document.getElementById(e+"_mini_label_country")?w_country=document.getElementById(e+"_mini_label_country").innerHTML:w_country=document.getElementById(e+"_countryform_id_temp").value,w_mini_labels=[w_street1,w_street2,w_city,w_state,w_postal,w_country];var _=document.getElementById(e+"_disable_fieldsform_id_temp");w_street1_dis=_.getAttribute("street1"),w_street2_dis=_.getAttribute("street2"),w_city_dis=_.getAttribute("city"),w_state_dis=_.getAttribute("state"),w_us_states_dis=_.getAttribute("us_states"),w_postal_dis=_.getAttribute("postal"),w_country_dis=_.getAttribute("country"),w_disabled_fields=[w_street1_dis,w_street2_dis,w_city_dis,w_state_dis,w_postal_dis,w_country_dis,w_us_states_dis],w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_street1form_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_address(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_mini_labels,w_disabled_fields,w_required,w_class,w_attr_name,w_attr_value);break;case"type_submitter_mail":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,w_autofill=document.getElementById(e+"_autofillform_id_temp").value,w_verification=document.getElementById(e+"_verification_id_temp").value,w_verification_placeholder=document.getElementById(e+"_1_elementform_id_temp").title,document.getElementById(e+"_1_element_labelform_id_temp").innerHTML?w_verification_label=document.getElementById(e+"_1_element_labelform_id_temp").innerHTML:w_verification_label=" ",atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_submitter_mail(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_first_val,w_title,w_required,w_unique,w_class,w_verification,w_verification_label,w_verification_placeholder,w_attr_name,w_attr_value,w_autofill);break;case"type_checkbox":if(w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value,document.getElementById(e+"_rowcol_numform_id_temp").value?(document.getElementById(e+"_table_little").getAttribute("for_hor")?w_flow="hor":w_flow="ver",w_rowcol=document.getElementById(e+"_rowcol_numform_id_temp").value):(document.getElementById(e+"_hor")?w_flow="hor":w_flow="ver",w_rowcol=1),v=0,"ver"==w_flow){var r=document.getElementById(e+"_table_little");for(k=0;k<r.childNodes.length;k++){var o=r.childNodes[k];for(m=0;m<o.childNodes.length;m++){var u=o.childNodes[m].getAttribute("idi");document.getElementById(e+"_elementform_id_temp"+u).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+u).getAttribute("other")&&(w_allow_other_num=t),w_choices[t]=document.getElementById(e+"_label_element"+u).innerHTML,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+u).checked,w_choices_value[t]=document.getElementById(e+"_elementform_id_temp"+u).value,document.getElementById(e+"_label_element"+u).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+u).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+u).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+u).getAttribute("db_info"):w_choices_params[t]="",t++,v=u}}}else{var c=(p=(r=document.getElementById(e+"_table_little")).childNodes)[0].childNodes;for(k=0;k<c.length;k++)for(m=0;m<p.length;m++)if(p[m].childNodes[k]){u=(o=p[m].childNodes[k]).getAttribute("idi");document.getElementById(e+"_elementform_id_temp"+u).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+u).getAttribute("other")&&(w_allow_other_num=t),w_choices[t]=document.getElementById(e+"_label_element"+u).innerHTML,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+u).checked,w_choices_value[t]=document.getElementById(e+"_elementform_id_temp"+u).value,document.getElementById(e+"_label_element"+u).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+u).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+u).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+u).getAttribute("db_info"):w_choices_params[t]="",t++,v=u}}document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_value_disabled=document.getElementById(e+"_value_disabledform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_checkbox(gen,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_checked,w_rowcol,w_required,w_randomize,w_allow_other,w_allow_other_num,w_class,w_attr_name,w_attr_value,w_value_disabled,w_choices_value,w_choices_params);break;case"type_paypal_checkbox":for(document.getElementById(e+"_hor")?w_flow="hor":w_flow="ver",w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value,v=0,k=0;k<100;k++)if(document.getElementById(e+"_elementform_id_temp"+k)&&(document.getElementById(e+"_elementform_id_temp"+k).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+k).getAttribute("other")&&(w_allow_other_num=t),w_choices[t]=document.getElementById(e+"_label_element"+k).innerHTML,w_choices_price[t]=document.getElementById(e+"_elementform_id_temp"+k).value,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+k).checked,document.getElementById(e+"_label_element"+k).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+k).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+k).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+k).getAttribute("db_info"):w_choices_params[t]="",t++,v=k),document.getElementById(e+"_propertyform_id_temp"+k))if(w_property.push(document.getElementById(e+"_property_label_form_id_temp"+k).innerHTML),document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length)for(w_property_values[w_property.length-1]=new Array,m=0;m<document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length;m++)w_property_values[w_property.length-1].push(document.getElementById(e+"_propertyform_id_temp"+k).childNodes[m].value);else w_property_values.push("");w_quantity="no",w_quantity_value=1,document.getElementById(e+"_element_quantityform_id_temp")&&(w_quantity="yes",w_quantity_value=document.getElementById(e+"_element_quantityform_id_temp").value),document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_paypal_checkbox(gen,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_price,w_choices_checked,w_required,w_randomize,w_allow_other,w_allow_other_num,w_class,w_attr_name,w_attr_value,w_property,w_property_values,w_quantity,w_quantity_value,w_choices_params);break;case"type_radio":if(w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value,document.getElementById(e+"_rowcol_numform_id_temp").value?(document.getElementById(e+"_table_little").getAttribute("for_hor")?w_flow="hor":w_flow="ver",w_rowcol=document.getElementById(e+"_rowcol_numform_id_temp").value):(document.getElementById(e+"_table_little").getAttribute("for_hor")?w_flow="hor":w_flow="ver",w_rowcol=1),v=0,"ver"==w_flow){r=document.getElementById(e+"_table_little");for(k=0;k<r.childNodes.length;k++){o=r.childNodes[k];for(m=0;m<o.childNodes.length;m++){u=o.childNodes[m].getAttribute("idi");document.getElementById(e+"_elementform_id_temp"+u).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+u).getAttribute("other")&&(w_allow_other_num=t),w_choices[t]=document.getElementById(e+"_label_element"+u).innerHTML,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+u).checked,w_choices_value[t]=document.getElementById(e+"_elementform_id_temp"+u).value,document.getElementById(e+"_label_element"+u).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+u).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+u).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+u).getAttribute("db_info"):w_choices_params[t]="",t++,v=u}}}else{var p;c=(p=(r=document.getElementById(e+"_table_little")).childNodes)[0].childNodes;for(k=0;k<c.length;k++)for(m=0;m<p.length;m++)if(p[m].childNodes[k]){u=(o=p[m].childNodes[k]).getAttribute("idi");document.getElementById(e+"_elementform_id_temp"+u).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+u).getAttribute("other")&&(w_allow_other_num=t),w_choices[t]=document.getElementById(e+"_label_element"+u).innerHTML,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+u).checked,w_choices_value[t]=document.getElementById(e+"_elementform_id_temp"+u).value,document.getElementById(e+"_label_element"+u).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+u).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+u).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+u).getAttribute("db_info"):w_choices_params[t]="",t++,v=u}}document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_value_disabled=document.getElementById(e+"_value_disabledform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_radio(gen,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_checked,w_rowcol,w_required,w_randomize,w_allow_other,w_allow_other_num,w_class,w_attr_name,w_attr_value,w_value_disabled,w_choices_value,w_choices_params);break;case"type_paypal_radio":for(document.getElementById(e+"_hor")?w_flow="hor":w_flow="ver",w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value,v=0,k=0;k<100;k++)if(document.getElementById(e+"_elementform_id_temp"+k)&&(document.getElementById(e+"_elementform_id_temp"+k).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+k).getAttribute("other")&&(w_allow_other_num=t),w_choices[t]=document.getElementById(e+"_label_element"+k).innerHTML,w_choices_price[t]=document.getElementById(e+"_elementform_id_temp"+k).value,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+k).checked,document.getElementById(e+"_label_element"+k).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+k).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+k).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+k).getAttribute("db_info"):w_choices_params[t]="",t++,v=k),document.getElementById(e+"_propertyform_id_temp"+k))if(w_property.push(document.getElementById(e+"_property_label_form_id_temp"+k).innerHTML),document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length)for(w_property_values[w_property.length-1]=new Array,m=0;m<document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length;m++)w_property_values[w_property.length-1].push(document.getElementById(e+"_propertyform_id_temp"+k).childNodes[m].value);else w_property_values.push("");w_quantity="no",w_quantity_value=1,document.getElementById(e+"_element_quantityform_id_temp")&&(w_quantity="yes",w_quantity_value=document.getElementById(e+"_element_quantityform_id_temp").value),document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_paypal_radio(gen,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_price,w_choices_checked,w_required,w_randomize,w_allow_other,w_allow_other_num,w_class,w_attr_name,w_attr_value,w_property,w_property_values,w_quantity,w_quantity_value,w_choices_params);break;case"type_paypal_shipping":for(document.getElementById(e+"_hor")?w_flow="hor":w_flow="ver",w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value,v=0,k=0;k<100;k++)if(document.getElementById(e+"_elementform_id_temp"+k)&&(document.getElementById(e+"_elementform_id_temp"+k).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+k).getAttribute("other")&&(w_allow_other_num=t),w_choices[t]=document.getElementById(e+"_label_element"+k).innerHTML,w_choices_price[t]=document.getElementById(e+"_elementform_id_temp"+k).value,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+k).checked,document.getElementById(e+"_label_element"+k).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+k).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+k).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+k).getAttribute("db_info"):w_choices_params[t]="",t++,v=k),document.getElementById(e+"_propertyform_id_temp"+k))if(w_property.push(document.getElementById(e+"_property_label_form_id_temp"+k).innerHTML),document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length)for(w_property_values[w_property.length-1]=new Array,m=0;m<document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length;m++)w_property_values[w_property.length-1].push(document.getElementById(e+"_propertyform_id_temp"+k).childNodes[m].value);else w_property_values.push("");document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_paypal_shipping(gen,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_price,w_choices_checked,w_required,w_randomize,w_allow_other,w_allow_other_num,w_class,w_attr_name,w_attr_value,w_property,w_property_values,w_choices_params);break;case"type_paypal_total":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_size=jQuery("#"+e+"paypal_totalform_id_temp").css("width")?jQuery("#"+e+"paypal_totalform_id_temp").css("width").substring(0,jQuery("#"+e+"paypal_totalform_id_temp").css("width").length-2):"300",type_paypal_total(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_class,w_size);break;case"type_stripe":type_stripe(gen,w_size,w_field_label_size,w_field_label_pos,w_class);break;case"type_star_rating":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_star_amount=document.getElementById(e+"_star_amountform_id_temp").value,w_field_label_col=document.getElementById(e+"_star_colorform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_star_rating(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_label_col,w_star_amount,w_required,w_class,w_attr_name,w_attr_value);break;case"type_scale_rating":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_mini_labels=[document.getElementById(e+"_mini_label_worst").innerHTML,document.getElementById(e+"_mini_label_best").innerHTML],w_scale_amount=document.getElementById(e+"_scale_amountform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_scale_rating(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_mini_labels,w_scale_amount,w_required,w_class,w_attr_name,w_attr_value);break;case"type_spinner":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_field_min_value=document.getElementById(e+"_min_valueform_id_temp").value,w_field_max_value=document.getElementById(e+"_max_valueform_id_temp").value,w_field_width=document.getElementById(e+"_spinner_widthform_id_temp").value,w_field_step=document.getElementById(e+"_stepform_id_temp").value,w_field_value=document.getElementById(e+"_elementform_id_temp").getAttribute("aria-valuenow"),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_spinner(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_width,w_field_min_value,w_field_max_value,w_field_step,w_field_value,w_required,w_class,w_attr_name,w_attr_value);break;case"type_slider":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_field_min_value=document.getElementById(e+"_slider_min_valueform_id_temp").value,w_field_max_value=document.getElementById(e+"_slider_max_valueform_id_temp").value,w_field_step=document.getElementById(e+"_slider_stepform_id_temp")&&document.getElementById(e+"_slider_stepform_id_temp").value?document.getElementById(e+"_slider_stepform_id_temp").value:1,w_field_width=document.getElementById(e+"_slider_widthform_id_temp").value,w_field_value=document.getElementById(e+"_slider_valueform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_slider(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_width,w_field_min_value,w_field_max_value,w_field_step,w_field_value,w_required,w_class,w_attr_name,w_attr_value);break;case"type_range":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_field_range_width=document.getElementById(e+"_range_widthform_id_temp").value,w_field_range_step=document.getElementById(e+"_range_stepform_id_temp").value,w_field_value1=document.getElementById(e+"_elementform_id_temp0").getAttribute("aria-valuenow"),w_field_value2=document.getElementById(e+"_elementform_id_temp1").getAttribute("aria-valuenow"),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_mini_labels=[document.getElementById(e+"_mini_label_from").innerHTML,document.getElementById(e+"_mini_label_to").innerHTML],type_range(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_range_width,w_field_range_step,w_field_value1,w_field_value2,w_mini_labels,w_required,w_class,w_attr_name,w_attr_value);break;case"type_grading":for(w_total=document.getElementById(e+"_grading_totalform_id_temp").value,w_items=[],k=0;k<100;k++)document.getElementById(e+"_label_elementform_id_temp"+k)&&w_items.push(document.getElementById(e+"_label_elementform_id_temp"+k).innerHTML);w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_grading(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_items,w_total,w_required,w_class,w_attr_name,w_attr_value),refresh_grading_items(e);break;case"type_matrix":for(w_rows=[],w_rows[0]="",k=1;k<100;k++)document.getElementById(e+"_label_elementform_id_temp"+k+"_0")&&w_rows.push(document.getElementById(e+"_label_elementform_id_temp"+k+"_0").innerHTML);for(w_columns=[],w_columns[0]="",k=1;k<100;k++)document.getElementById(e+"_label_elementform_id_temp0_"+k)&&w_columns.push(document.getElementById(e+"_label_elementform_id_temp0_"+k).innerHTML);w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_field_input_type=document.getElementById(e+"_input_typeform_id_temp").value,w_textbox_size=document.getElementById(e+"_textbox_sizeform_id_temp")?document.getElementById(e+"_textbox_sizeform_id_temp").value:"100",atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_matrix(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_input_type,w_rows,w_columns,w_required,w_class,w_attr_name,w_attr_value,w_textbox_size),refresh_matrix(e);break;case"type_time":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_hhform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_hh=document.getElementById(e+"_hhform_id_temp").value,w_mm=document.getElementById(e+"_mmform_id_temp").value,document.getElementById(e+"_ssform_id_temp")?(w_ss=document.getElementById(e+"_ssform_id_temp").value,w_sec="1",w_mini_label_ss=document.getElementById(e+"_mini_label_ss").innerHTML):(w_ss="",w_sec="0",w_mini_label_ss=""),document.getElementById(e+"_am_pm_select")?(w_am_pm=document.getElementById(e+"_am_pmform_id_temp").value,w_time_type="12",w_mini_labels=[document.getElementById(e+"_mini_label_hh").innerHTML,document.getElementById(e+"_mini_label_mm").innerHTML,w_mini_label_ss,document.getElementById(e+"_mini_label_am_pm").innerHTML]):(w_am_pm=0,w_time_type="24",w_mini_labels=[document.getElementById(e+"_mini_label_hh").innerHTML,document.getElementById(e+"_mini_label_mm").innerHTML,w_mini_label_ss,"AM/PM"]),type_time(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_time_type,w_am_pm,w_sec,w_hh,w_mm,w_ss,w_mini_labels,w_required,w_class,w_attr_name,w_attr_value);break;case"type_date":atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_date=document.getElementById(e+"_elementform_id_temp").value,w_format=document.getElementById(e+"_buttonform_id_temp").getAttribute("format"),w_but_val=document.getElementById(e+"_buttonform_id_temp").value,w_disable_past_days=document.getElementById(e+"_dis_past_daysform_id_temp")?document.getElementById(e+"_dis_past_daysform_id_temp").value:"no",type_date(gen,w_field_label,w_field_label_size,w_field_label_pos,w_date,w_required,w_class,w_format,w_but_val,w_attr_name,w_attr_value,w_disable_past_days);break;case"type_date_new":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_date=document.getElementById(e+"_elementform_id_temp").value,w_format=document.getElementById(e+"_buttonform_id_temp").getAttribute("format"),w_but_val=document.getElementById(e+"_buttonform_id_temp").value,w_start_day=document.getElementById(e+"_start_dayform_id_temp").value,w_default_date=document.getElementById(e+"_default_date_id_temp").value,w_min_date=document.getElementById(e+"_min_date_id_temp").value,w_max_date=document.getElementById(e+"_max_date_id_temp").value,w_invalid_dates=document.getElementById(e+"_invalid_dates_id_temp").value,w_hide_time=document.getElementById(e+"_hide_timeform_id_temp").value,w_show_image=document.getElementById(e+"_show_imageform_id_temp").value,w_disable_past_days=document.getElementById(e+"_dis_past_daysform_id_temp")?document.getElementById(e+"_dis_past_daysform_id_temp").value:"no";var f=document.getElementById(e+"_show_week_days");w_sunday=f.getAttribute("sunday"),w_monday=f.getAttribute("monday"),w_tuesday=f.getAttribute("tuesday"),w_wednesday=f.getAttribute("wednesday"),w_thursday=f.getAttribute("thursday"),w_friday=f.getAttribute("friday"),w_saturday=f.getAttribute("saturday"),w_show_days=[w_sunday,w_monday,w_tuesday,w_wednesday,w_thursday,w_friday,w_saturday],type_date_new(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_date,w_required,w_show_image,w_class,w_format,w_start_day,w_default_date,w_min_date,w_max_date,w_invalid_dates,w_show_days,w_hide_time,w_but_val,w_attr_name,w_attr_value,w_disable_past_days);break;case"type_date_range":atrs=return_attributes(e+"_elementform_id_temp0"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_date="",w_format=document.getElementById(e+"_buttonform_id_temp").getAttribute("format"),w_but_val=document.getElementById(e+"_buttonform_id_temp").value,w_default_date_start=document.getElementById(e+"_default_date_id_temp_start").value,w_default_date_end=document.getElementById(e+"_default_date_id_temp_end").value,w_min_date=document.getElementById(e+"_min_date_id_temp").value,w_start_day=document.getElementById(e+"_start_dayform_id_temp").value,w_max_date=document.getElementById(e+"_max_date_id_temp").value,w_invalid_dates=document.getElementById(e+"_invalid_dates_id_temp").value,w_hide_time=document.getElementById(e+"_hide_timeform_id_temp").value,w_show_image=document.getElementById(e+"_show_imageform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,s=document.getElementById(e+"_elementform_id_temp0").style.width,w_size=s.substring(0,s.length-2),w_disable_past_days=document.getElementById(e+"_dis_past_daysform_id_temp")?document.getElementById(e+"_dis_past_daysform_id_temp").value:"no";f=document.getElementById(e+"_show_week_days");w_sunday=f.getAttribute("sunday"),w_monday=f.getAttribute("monday"),w_tuesday=f.getAttribute("tuesday"),w_wednesday=f.getAttribute("wednesday"),w_thursday=f.getAttribute("thursday"),w_friday=f.getAttribute("friday"),w_saturday=f.getAttribute("saturday"),w_show_days=[w_sunday,w_monday,w_tuesday,w_wednesday,w_thursday,w_friday,w_saturday],type_date_range(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_date,w_required,w_show_image,w_class,w_format,w_start_day,w_default_date_start,w_default_date_end,w_min_date,w_max_date,w_invalid_dates,w_show_days,w_hide_time,w_but_val,w_attr_name,w_attr_value,w_disable_past_days);break;case"type_date_fields":atrs=return_attributes(e+"_dayform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_day=document.getElementById(e+"_dayform_id_temp").value,w_month=document.getElementById(e+"_monthform_id_temp").value,w_year=document.getElementById(e+"_yearform_id_temp").value,w_day_type=document.getElementById(e+"_dayform_id_temp").tagName,w_month_type=document.getElementById(e+"_monthform_id_temp").tagName,w_year_type=document.getElementById(e+"_yearform_id_temp").tagName,w_day_label=document.getElementById(e+"_day_label").innerHTML,w_month_label=document.getElementById(e+"_month_label").innerHTML,w_year_label=document.getElementById(e+"_year_label").innerHTML,s=document.getElementById(e+"_dayform_id_temp").style.width,w_day_size=s.substring(0,s.length-2),s=document.getElementById(e+"_monthform_id_temp").style.width,w_month_size=s.substring(0,s.length-2),s=document.getElementById(e+"_yearform_id_temp").style.width,w_year_size=s.substring(0,s.length-2),w_from=document.getElementById(e+"_yearform_id_temp").getAttribute("from"),w_to=document.getElementById(e+"_yearform_id_temp").getAttribute("to"),w_divider=document.getElementById(e+"_separator1").innerHTML,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,type_date_fields(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_day,w_month,w_year,w_day_type,w_month_type,w_year_type,w_day_label,w_month_label,w_year_label,w_day_size,w_month_size,w_year_size,w_required,w_class,w_from,w_to,w_divider,w_attr_name,w_attr_value);break;case"type_own_select":jQuery("#"+e+"_elementform_id_temp option").each(function(){w_choices[t]=jQuery(this).html(),w_choices_value[t]=jQuery(this).val(),w_choices_checked[t]=jQuery(this)[0].selected,jQuery(this).attr("where")?w_choices_params[t]=jQuery(this).attr("where")+"[where_order_by]"+jQuery(this).attr("order_by")+"[db_info]"+jQuery(this).attr("db_info"):w_choices_params[t]="",jQuery(this).val()?w_choices_disabled[t]=!1:w_choices_disabled[t]=!0,t++}),w_value_disabled=document.getElementById(e+"_value_disabledform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_own_select(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_choices,w_choices_checked,w_required,w_value_disabled,w_class,w_attr_name,w_attr_value,w_choices_disabled,w_choices_value,w_choices_params);break;case"type_paypal_select":for(jQuery("#"+e+"_elementform_id_temp option").each(function(){w_choices[t]=jQuery(this).html(),w_choices_price[t]=jQuery(this).val(),w_choices_checked[t]=jQuery(this)[0].selected,jQuery(this).attr("where")?w_choices_params[t]=jQuery(this).attr("where")+"[where_order_by]"+jQuery(this).attr("order_by")+"[db_info]"+jQuery(this).attr("db_info"):w_choices_params[t]="",""==jQuery(this)[0].value?w_choices_disabled[t]=!0:w_choices_disabled[t]=!1,t++}),k=0;k<100;k++)if(document.getElementById(e+"_propertyform_id_temp"+k))if(w_property.push(document.getElementById(e+"_property_label_form_id_temp"+k).innerHTML),document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length)for(w_property_values[w_property.length-1]=new Array,m=0;m<document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length;m++)w_property_values[w_property.length-1].push(document.getElementById(e+"_propertyform_id_temp"+k).childNodes[m].value);else w_property_values.push("");w_quantity="no",w_quantity_value=1,document.getElementById(e+"_element_quantityform_id_temp")&&(w_quantity="yes",w_quantity_value=document.getElementById(e+"_element_quantityform_id_temp").value),w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_paypal_select(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_choices,w_choices_price,w_choices_checked,w_required,w_quantity,w_quantity_value,w_class,w_attr_name,w_attr_value,w_choices_disabled,w_property,w_property_values,w_choices_params);break;case"type_country":for(w_countries=[],select_=document.getElementById(e+"_elementform_id_temp"),n=select_.childNodes.length,i=0;i<n;i++)w_countries.push(select_.childNodes[i].value);w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_country(gen,w_field_label,w_field_label_size,w_hide_label,w_countries,w_field_label_pos,w_size,w_required,w_class,w_attr_name,w_attr_value);break;case"type_file_upload":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_destination=document.getElementById(e+"_destination").value.replace("***destinationverj"+e+"***","").replace("***destinationskizb"+e+"***",""),w_extension=document.getElementById(e+"_extension").value.replace("***extensionverj"+e+"***","").replace("***extensionskizb"+e+"***",""),w_max_size=document.getElementById(e+"_max_size").value.replace("***max_sizeverj"+e+"***","").replace("***max_sizeskizb"+e+"***",""),w_multiple=document.getElementById(e+"_elementform_id_temp").getAttribute("multiple")?"yes":"no",atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_file_upload(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_destination,w_extension,w_max_size,w_required,w_multiple,w_class,w_attr_name,w_attr_value);break;case"type_map":for(w_lat=[],w_long=[],w_info=[],w_center_x=document.getElementById(e+"_elementform_id_temp").getAttribute("center_x"),w_center_y=document.getElementById(e+"_elementform_id_temp").getAttribute("center_y"),w_zoom=document.getElementById(e+"_elementform_id_temp").getAttribute("zoom"),w_width=parseInt(document.getElementById(e+"_elementform_id_temp").style.width),w_height=parseInt(document.getElementById(e+"_elementform_id_temp").style.height),j=0;j<=20;j++)document.getElementById(e+"_elementform_id_temp").getAttribute("lat"+j)&&(w_lat.push(document.getElementById(e+"_elementform_id_temp").getAttribute("lat"+j)),w_long.push(document.getElementById(e+"_elementform_id_temp").getAttribute("long"+j)),w_info.push(document.getElementById(e+"_elementform_id_temp").getAttribute("info"+j)));atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_map(gen,w_center_x,w_center_y,w_long,w_lat,w_zoom,w_width,w_height,w_class,w_info,w_attr_name,w_attr_value);break;case"type_mark_map":w_info=document.getElementById(e+"_elementform_id_temp").getAttribute("info0"),w_long=document.getElementById(e+"_elementform_id_temp").getAttribute("long0"),w_lat=document.getElementById(e+"_elementform_id_temp").getAttribute("lat0"),w_zoom=document.getElementById(e+"_elementform_id_temp").getAttribute("zoom"),w_width=parseInt(document.getElementById(e+"_elementform_id_temp").style.width),w_height=parseInt(document.getElementById(e+"_elementform_id_temp").style.height),w_center_x=document.getElementById(e+"_elementform_id_temp").getAttribute("center_x"),w_center_y=document.getElementById(e+"_elementform_id_temp").getAttribute("center_y"),w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_mark_map(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_center_x,w_center_y,w_long,w_lat,w_zoom,w_width,w_height,w_class,w_info,w_attr_name,w_attr_value);break;case"type_submit_reset":atrs=return_attributes(e+"_element_submitform_id_temp"),w_act=!("none"==document.getElementById(e+"_element_resetform_id_temp").style.display),w_attr_name=atrs[0],w_attr_value=atrs[1],w_submit_title=document.getElementById(e+"_element_submitform_id_temp").value,w_reset_title=document.getElementById(e+"_element_resetform_id_temp").value,type_submit_reset(gen,w_submit_title,w_reset_title,w_class,w_act,w_attr_name,w_attr_value);break;case"type_button":for(w_title=new Array,w_func=new Array,t=0,v=0,k=0;k<100;k++)document.getElementById(e+"_elementform_id_temp"+k)&&(w_title[t]=document.getElementById(e+"_elementform_id_temp"+k).value,w_func[t]=document.getElementById(e+"_elementform_id_temp"+k).getAttribute("onclick"),t++,v=k);atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_button(gen,w_title,w_func,w_class,w_attr_name,w_attr_value);break;case"type_hidden":w_value=document.getElementById(e+"_elementform_id_temp").value,w_name=document.getElementById(e+"_elementform_id_temp").name,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_hidden(gen,w_name,w_value,w_attr_name,w_attr_value)}add(0,need_enable=!1),need_enable=!0,void 0!==a&&(a.stopPropagation(),a.preventDefault())}function fm_columns_refresh(){jQuery(".wdform_column:not(#add_field_cont):empty").remove(),jQuery(".fm-form-builder .wdform_column:not(#add_field_cont)").before(jQuery('<div class="wdform_column fm-hidden"></div>')),jQuery(".fm-form-builder .wdform_column:not(#add_field_cont):last-child").after(jQuery('<div class="wdform_column fm-hidden"></div>')),jQuery(".fm-form-builder .wdform_section").each(function(){var e=jQuery(this);0==e.find(".wdform_column").length&&e.append('<div class="wdform_column"></div>')}),sortable_columns()}function fm_rows_refresh(){jQuery(".wdform_page").each(function(){jQuery(this).children(".wdform_row_empty").remove(),0===jQuery(this).find(".wdform_row_empty").length&&jQuery(this).find(".wdform_footer").before(jQuery('<div class="wdform_row_empty"><div><span class="add_row_icon fm-ico-plus-circle"></span><span class="add_row_button">'+form_maker_manage.add_column+"</span></div></div>"))}),jQuery(".wdform_row_empty > div").off("click").on("click",function(){var e=jQuery('<div><div class="wdform_column"></div></div>').addClass("wdform_section");jQuery(this).closest(".wdform_row_empty").before(e),fm_row_handle(e),all_sortable_events()}),sortable_columns()}function fm_convert_form_structure(){jQuery(".wdform-page-and-images").each(function(){var e=jQuery(this);e.addClass("fm-form-builder");e.find(".wdform_section").length;e.find(".wdform_section").each(function(){var t=jQuery(this),a=t.find(".wdform_column").length;t.find(".wdform_column").each(function(){var e=jQuery(this),i=jQuery('<div class="wdform_section '+("fm-col-"+a)+'"></div>');e.find(".wdform_row").each(function(){var e=jQuery(this),t=jQuery('<div class="wdform_column"></div>').append(e);i.append(t)}),t.before(i),fm_row_handle(i)}),t.remove()})}),jQuery(".wdform_tr_section_break").remove(),all_sortable_events(),jQuery("#fm-edit-disable-overlay").remove()}function FormManageSubmitButton(e){for(null==e&&(e=!1,jQuery(window).off("beforeunload")),tox="",form_fields="",jQuery("#saving").html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>'),e||(document.getElementById("take").style.display="none",document.getElementById("page_bar").style.display="none",jQuery(".wdform_section").each(function(){var e=this;jQuery(e).find(".wdform_column").each(function(){!jQuery(this).html()&&1<jQuery(e).children().length&&jQuery(this).remove(),jQuery(this).find(".wdform_section_handle").remove()}),jQuery(this).find(".wdform_row_handle").remove(),jQuery(this).find(".wdform_column_empty").remove()}),jQuery(".wdform_row_empty").remove(),jQuery(".wdform_column:empty").remove(),jQuery(".fm-section-overlay").remove()),remove_whitespace(document.getElementById("take")),l_id_array=labels_id_array,l_label_array=labels_label_array,l_type_array=labels_type_array,l_id_removed=[],x=0;x<l_id_array.length;x++)l_id_removed[l_id_array[x]]=!0;for(t=1;t<=form_view_max;t++)if(document.getElementById("form_id_tempform_view"+t))for(wdform_page=document.getElementById("form_id_tempform_view"+t),remove_whitespace(wdform_page),n=wdform_page.childNodes.length-1,q=0;q<=n;q++)if(wdform_page.childNodes[q].getAttribute("wdid"))id=wdform_page.childNodes[q].getAttribute("wdid"),w_editor=document.getElementById(id+"_element_sectionform_id_temp").innerHTML,form_fields+=id+"*:*id*:*",form_fields+="type_section_break*:*type*:*",form_fields+="custom_"+id+"*:*w_field_label*:*",form_fields+=w_editor+"*:*w_editor*:*",form_fields+="*:*new_field*:*",e||(wdform_page.childNodes[q].innerHTML="%"+id+" - custom_"+id+"%");else if(-1==wdform_page.className.indexOf("fm-form-builder")||-1!=wdform_page.childNodes[q].className.indexOf("wdform_section"))for(wdform_section=wdform_page.childNodes[q],x=0;x<wdform_section.childNodes.length;x++)if(wdform_column=wdform_section.childNodes[x],wdform_column.firstChild)for(y=0;y<wdform_column.childNodes.length;y++)if(is_in_old=!1,wdform_row=wdform_column.childNodes[y],3!=wdform_row.nodeType&&(wdid=wdform_row.getAttribute("wdid"),wdid&&jQuery("#"+wdid+"_element_labelform_id_temp").length)){l_id=wdid,l_label=document.getElementById(wdid+"_element_labelform_id_temp").innerHTML,l_label=l_label.replace(/(\r\n|\n|\r)/gm," "),wdtype=wdform_row.firstChild.getAttribute("type");for(var i=0;i<l_id_array.length;i++)"type_address"==l_type_array[i]?(document.getElementById(l_id+"_mini_label_street1")||document.getElementById(l_id+"_mini_label_street2")||document.getElementById(l_id+"_mini_label_city")||document.getElementById(l_id+"_mini_label_state")||document.getElementById(l_id+"_mini_label_postal")||document.getElementById(l_id+"_mini_label_country"))&&(l_id_removed[l_id_array[i]]=!1):l_id_array[i]==wdid&&(l_id_removed[l_id]=!1);"type_address"==wdtype?(addr_id=parseInt(wdid),id_for_country=addr_id,document.getElementById(id_for_country+"_mini_label_street1")&&(tox=tox+addr_id+"#**id**#"+document.getElementById(id_for_country+"_mini_label_street1").innerHTML+"#**label**#type_address#****#"),addr_id++,document.getElementById(id_for_country+"_mini_label_street2")&&(tox=tox+addr_id+"#**id**#"+document.getElementById(id_for_country+"_mini_label_street2").innerHTML+"#**label**#type_address#****#"),addr_id++,document.getElementById(id_for_country+"_mini_label_city")&&(tox=tox+addr_id+"#**id**#"+document.getElementById(id_for_country+"_mini_label_city").innerHTML+"#**label**#type_address#****#"),addr_id++,document.getElementById(id_for_country+"_mini_label_state")&&(tox=tox+addr_id+"#**id**#"+document.getElementById(id_for_country+"_mini_label_state").innerHTML+"#**label**#type_address#****#"),addr_id++,document.getElementById(id_for_country+"_mini_label_postal")&&(tox=tox+addr_id+"#**id**#"+document.getElementById(id_for_country+"_mini_label_postal").innerHTML+"#**label**#type_address#****#"),addr_id++,document.getElementById(id_for_country+"_mini_label_country")&&(tox=tox+addr_id+"#**id**#"+document.getElementById(id_for_country+"_mini_label_country").innerHTML+"#**label**#type_address#****#")):tox=tox+wdid+"#**id**#"+l_label+"#**label**#"+wdtype+"#****#",id=wdid,form_fields+=wdid+"*:*id*:*",form_fields+=wdtype+"*:*type*:*",w_choices=new Array,w_choices_value=new Array,w_choices_checked=new Array,w_choices_disabled=new Array,w_choices_params=new Array,w_allow_other_num=0,w_property=new Array,w_property_type=new Array,w_property_values=new Array,w_choices_price=new Array,document.getElementById(id+"_element_labelform_id_temp").innerHTML?w_field_label=document.getElementById(id+"_element_labelform_id_temp").innerHTML.replace(/(\r\n|\n|\r)/gm," "):w_field_label=" ",document.getElementById(id+"_label_sectionform_id_temp")&&("block"==document.getElementById(id+"_label_sectionform_id_temp").style.display?w_field_label_pos="top":w_field_label_pos="left"),document.getElementById(id+"_elementform_id_temp")&&(s=document.getElementById(id+"_elementform_id_temp").style.width,w_size=s.substring(0,s.length-2)),document.getElementById(id+"_label_sectionform_id_temp")&&(s=document.getElementById(id+"_label_sectionform_id_temp").style.width,w_field_label_size=s.substring(0,s.length-2)),document.getElementById(id+"_requiredform_id_temp")&&(w_required=document.getElementById(id+"_requiredform_id_temp").value),document.getElementById(id+"_uniqueform_id_temp")&&(w_unique=document.getElementById(id+"_uniqueform_id_temp").value),document.getElementById(id+"_label_sectionform_id_temp")&&(w_class=document.getElementById(id+"_label_sectionform_id_temp").getAttribute("class"),w_class||(w_class="")),gen_form_fields(),e||(wdform_row.innerHTML="%"+id+" - "+l_label+"%")}for(e||(document.getElementById("label_order_current").value=fm_base64EncodeUnicode(fm_htmlentities(tox))),x=0;x<l_id_array.length;x++)l_id_removed[l_id_array[x]]&&(tox=tox+l_id_array[x]+"#**id**#"+l_label_array[x]+"#**label**#"+l_type_array[x]+"#****#");if(e||(document.getElementById("label_order").value=fm_base64EncodeUnicode(fm_htmlentities(tox)),document.getElementById("form_fields").value=fm_base64EncodeUnicode(fm_htmlentities(form_fields)),refresh_(),document.getElementById("pagination").value=document.getElementById("pages").getAttribute("type"),document.getElementById("show_title").value=document.getElementById("pages").getAttribute("show_title"),document.getElementById("show_numbers").value=document.getElementById("pages").getAttribute("show_numbers")),form_changed=!1,e){form_fields!=form_fields_initial&&(form_changed=!0),jQuery(".fm-check-change").each(function(){jQuery(this).val()!=jQuery(this).attr("data-initial-value")&&(form_changed=!0)}),"undefined"!=typeof tinyMCE&&null!=tinyMCE.get("header_description")&&tinyMCE.get("header_description").isDirty()&&(form_changed=!0);var a=decodeURIComponent(jQuery("#header_description_initial_value").val()),l=jQuery("#header_description").val();jQuery("<span>"+a+"</span>").html()!=jQuery("<span>"+l+"</span>").html()&&(form_changed=!0),jQuery("#header_hide_image").prop("checked")!=(1==jQuery("#header_hide_image").attr("data-initial-value"))&&(form_changed=!0)}return!e||!form_changed}function fm_base64EncodeUnicode(e){return utf8Bytes=encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}),btoa(utf8Bytes)}function fm_htmlentities(e){var t=document.createElement("div"),i=document.createTextNode(e);return t.style.cssText="display:none",t.appendChild(i),t.innerHTML}function formOnload(rows){for(t=0;t<rows;t++)if(document.getElementById(t+"_typeform_id_temp"))if("type_map"==document.getElementById(t+"_typeform_id_temp").value||"type_mark_map"==document.getElementById(t+"_typeform_id_temp").value)for(if_gmap_init(t),q=0;q<20;q++)document.getElementById(t+"_elementform_id_temp").getAttribute("long"+q)&&(w_long=parseFloat(document.getElementById(t+"_elementform_id_temp").getAttribute("long"+q)),w_lat=parseFloat(document.getElementById(t+"_elementform_id_temp").getAttribute("lat"+q)),w_info=parseFloat(document.getElementById(t+"_elementform_id_temp").getAttribute("info"+q)),add_marker_on_map(t,q,w_long,w_lat,w_info,!1));else if("type_name"==document.getElementById(t+"_typeform_id_temp").value){var myu=t;jQuery(document).ready(function(){jQuery("#"+myu+"_mini_label_first").on("click",function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='first' class='first' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.first").focus(),jQuery("input.first").blur(function(){var e=document.getElementById("first").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_first").text(t)})}}),jQuery("label#"+myu+"_mini_label_last").on("click",function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='last' class='last' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.last").focus(),jQuery("input.last").blur(function(){var e=document.getElementById("last").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_last").text(t)})}}),jQuery("label#"+myu+"_mini_label_title").on("click",function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='title_' class='title_' style='outline:none; border:none; background:none; width:50px;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.title_").focus(),jQuery("input.title_").blur(function(){var e=document.getElementById("title_").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_title").text(t)})}}),jQuery("label#"+myu+"_mini_label_middle").on("click",function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='middle' class='middle' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.middle").focus(),jQuery("input.middle").blur(function(){var e=document.getElementById("middle").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_middle").text(t)})}})})}else if("type_phone"==document.getElementById(t+"_typeform_id_temp").value){var myu=t;jQuery(document).ready(function(){jQuery("label#"+myu+"_mini_label_area_code").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='area_code' class='area_code' size='10' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.area_code").focus(),jQuery("input.area_code").blur(function(){var e=document.getElementById("area_code").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_area_code").text(t)})}}),jQuery("label#"+myu+"_mini_label_phone_number").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='phone_number' class='phone_number' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.phone_number").focus(),jQuery("input.phone_number").blur(function(){var e=document.getElementById("phone_number").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_phone_number").text(t)})}})})}else if("type_date_fields"==document.getElementById(t+"_typeform_id_temp").value){var myu=t;jQuery(document).ready(function(){jQuery("label#"+myu+"_day_label").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='day' class='day' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.day").focus(),jQuery("input.day").blur(function(){var e=document.getElementById("day").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_day_label").text(t)})}}),jQuery("label#"+myu+"_month_label").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='month' class='month' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.month").focus(),jQuery("input.month").blur(function(){var e=document.getElementById("month").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_month_label").text(t)})}}),jQuery("label#"+myu+"_year_label").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='year' class='year' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.year").focus(),jQuery("input.year").blur(function(){var e=document.getElementById("year").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_year_label").text(t)})}})})}else if("type_time"==document.getElementById(t+"_typeform_id_temp").value){var myu=t;jQuery(document).ready(function(){jQuery("label#"+myu+"_mini_label_hh").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='hh' class='hh' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.hh").focus(),jQuery("input.hh").blur(function(){var e=document.getElementById("hh").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_hh").text(t)})}}),jQuery("label#"+myu+"_mini_label_mm").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='mm' class='mm' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.mm").focus(),jQuery("input.mm").blur(function(){var e=document.getElementById("mm").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_mm").text(t)})}}),jQuery("label#"+myu+"_mini_label_ss").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='ss' class='ss' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.ss").focus(),jQuery("input.ss").blur(function(){var e=document.getElementById("ss").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_ss").text(t)})}}),jQuery("label#"+myu+"_mini_label_am_pm").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='am_pm' class='am_pm' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.am_pm").focus(),jQuery("input.am_pm").blur(function(){var e=document.getElementById("am_pm").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_am_pm").text(t)})}})})}else if("type_paypal_price"==document.getElementById(t+"_typeform_id_temp").value){var myu=t;jQuery(document).ready(function(){jQuery("#"+myu+"_mini_label_dollars").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='dollars' class='dollars' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.dollars").focus(),jQuery("input.dollars").blur(function(){var e=document.getElementById("dollars").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_dollars").text(t)})}}),jQuery("label#"+myu+"_mini_label_cents").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='cents' class='cents' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.cents").focus(),jQuery("input.cents").blur(function(){var e=document.getElementById("cents").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_cents").text(t)})}})})}else if("type_address"==document.getElementById(t+"_typeform_id_temp").value){var myu=t;jQuery(document).ready(function(){jQuery("label#"+myu+"_mini_label_street1").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='street1' class='street1' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.street1").focus(),jQuery("input.street1").blur(function(){var e=document.getElementById("street1").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_street1").text(t)})}}),jQuery("label#"+myu+"_mini_label_street2").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='street2' class='street2' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.street2").focus(),jQuery("input.street2").blur(function(){var e=document.getElementById("street2").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_street2").text(t)})}}),jQuery("label#"+myu+"_mini_label_city").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='city' class='city' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.city").focus(),jQuery("input.city").blur(function(){var e=document.getElementById("city").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_city").text(t)})}}),jQuery("label#"+myu+"_mini_label_state").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='state' class='state' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.state").focus(),jQuery("input.state").blur(function(){var e=document.getElementById("state").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_state").text(t)})}}),jQuery("label#"+myu+"_mini_label_postal").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='postal' class='postal' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.postal").focus(),jQuery("input.postal").blur(function(){var e=document.getElementById("postal").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_postal").text(t)})}}),jQuery("label#"+myu+"_mini_label_country").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='country' id='country' class='country' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.country").focus(),jQuery("input.country").blur(function(){var e=document.getElementById("country").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_country").text(t)})}})})}else if("type_scale_rating"==document.getElementById(t+"_typeform_id_temp").value){var myu=t;jQuery(document).ready(function(){jQuery("#"+myu+"_mini_label_worst").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='worst' class='worst' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.worst").focus(),jQuery("input.worst").blur(function(){var e=document.getElementById("worst").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_worst").text(t)})}}),jQuery("label#"+myu+"_mini_label_best").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='best' class='best' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.best").focus(),jQuery("input.best").blur(function(){var e=document.getElementById("best").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_best").text(t)})}})})}else if("type_spinner"==document.getElementById(t+"_typeform_id_temp").value){var spinner_value=document.getElementById(t+"_elementform_id_temp").value,spinner_min_value=document.getElementById(t+"_min_valueform_id_temp").value,spinner_max_value=document.getElementById(t+"_max_valueform_id_temp").value,spinner_step=document.getElementById(t+"_stepform_id_temp").value;jQuery("#"+t+"_elementform_id_temp")[0].spin=null,spinner=jQuery("#"+t+"_elementform_id_temp").spinner(),null==spinner_value&&spinner.spinner("value",""),jQuery("#"+t+"_elementform_id_temp").spinner({min:spinner_min_value}),jQuery("#"+t+"_elementform_id_temp").spinner({max:spinner_max_value}),jQuery("#"+t+"_elementform_id_temp").spinner({step:spinner_step})}else if("type_slider"==document.getElementById(t+"_typeform_id_temp").value){var slider_value=document.getElementById(t+"_slider_valueform_id_temp").value,slider_min_value=document.getElementById(t+"_slider_min_valueform_id_temp").value,slider_max_value=document.getElementById(t+"_slider_max_valueform_id_temp").value,slider_element_value=document.getElementById(t+"_element_valueform_id_temp"),slider_value_save=document.getElementById(t+"_slider_valueform_id_temp");jQuery("#"+t+"_elementform_id_temp")[0].slide=null,jQuery(function(){jQuery("#"+t+"_elementform_id_temp").slider({range:"min",value:eval(slider_value),min:eval(slider_min_value),max:eval(slider_max_value),slide:function(e,t){slider_element_value.innerHTML=""+t.value,slider_value_save.value=""+t.value}})})}else if("type_range"==document.getElementById(t+"_typeform_id_temp").value){var spinner_value0=document.getElementById(t+"_elementform_id_temp0").value,spinner_step=document.getElementById(t+"_range_stepform_id_temp").value;jQuery("#"+t+"_elementform_id_temp0")[0].spin=null,jQuery("#"+t+"_elementform_id_temp1")[0].spin=null,spinner0=jQuery("#"+t+"_elementform_id_temp0").spinner(),null==spinner_value0&&spinner0.spinner("value",""),jQuery("#"+t+"_elementform_id_temp0").spinner({step:spinner_step});var spinner_value1=document.getElementById(t+"_elementform_id_temp1").value;spinner1=jQuery("#"+t+"_elementform_id_temp1").spinner(),null==spinner_value1&&spinner1.spinner("value",""),jQuery("#"+t+"_elementform_id_temp1").spinner({step:spinner_step});var myu=t;jQuery(document).ready(function(){jQuery("#"+myu+"_mini_label_from").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='from' class='from' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.from").focus(),jQuery("input.from").blur(function(){var e=document.getElementById("from").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_from").text(t)})}}),jQuery("label#"+myu+"_mini_label_to").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='to' class='to' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.to").focus(),jQuery("input.to").blur(function(){var e=document.getElementById("to").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_to").text(t)})}})})}else if("type_date_range"==document.getElementById(t+"_typeform_id_temp").value){var default_date_start=jQuery("#"+t+"_default_date_id_temp_start").val(),default_date_end=jQuery("#"+t+"_default_date_id_temp_end").val(),date_format=jQuery("#"+t+"_buttonform_id_temp").attr("format");jQuery("#"+t+"_elementform_id_temp0").datepicker(),jQuery("#"+t+"_elementform_id_temp1").datepicker(),jQuery("#"+t+"_elementform_id_temp0").datepicker("option","dateFormat",date_format),jQuery("#"+t+"_elementform_id_temp1").datepicker("option","dateFormat",date_format),"today"==default_date_start?jQuery("#"+t+"_elementform_id_temp0").datepicker("setDate",new Date):(-1==default_date_start.indexOf("d")&&-1==default_date_start.indexOf("m")&&-1==default_date_start.indexOf("y")&&-1==default_date_start.indexOf("w")&&""!==default_date_start&&(default_date_start=jQuery.datepicker.formatDate(date_format,new Date(default_date_start))),jQuery("#"+t+"_elementform_id_temp0").datepicker("setDate",default_date_start)),"today"==default_date_end?jQuery("#"+t+"_elementform_id_temp1").datepicker("setDate",new Date):(-1==default_date_end.indexOf("d")&&-1==default_date_end.indexOf("m")&&-1==default_date_end.indexOf("y")&&-1==default_date_end.indexOf("w")&&""!==default_date_end&&(default_date_end=jQuery.datepicker.formatDate(date_format,new Date(default_date_end))),jQuery("#"+t+"_elementform_id_temp1").datepicker("setDate",default_date_end))}else if("type_date_new"==document.getElementById(t+"_typeform_id_temp").value){var default_date=jQuery("#"+t+"_default_date_id_temp").val(),date_format=jQuery("#"+t+"_buttonform_id_temp").attr("format");jQuery("#"+t+"_elementform_id_temp").datepicker(),jQuery("#"+t+"_elementform_id_temp").datepicker("option","dateFormat",date_format),"today"==default_date?jQuery("#"+t+"_elementform_id_temp").datepicker("setDate",new Date):(-1==default_date.indexOf("d")&&-1==default_date.indexOf("m")&&-1==default_date.indexOf("y")&&-1==default_date.indexOf("w")&&""!==default_date&&(default_date=jQuery.datepicker.formatDate(date_format,new Date(default_date))),jQuery("#"+t+"_elementform_id_temp").datepicker("setDate",default_date))}else"type_phone_new"==document.getElementById(t+"_typeform_id_temp").value&&(jQuery("#"+t+"_elementform_id_temp").intlTelInput({nationalMode:!1,preferredCountries:[jQuery("#"+t+"_elementform_id_temp").attr("top-country")]}),jQuery("#"+t+"_elementform_id_temp").intlTelInput("setNumber",jQuery("#"+t+"_elementform_id_temp").val()));remove_whitespace(document.getElementById("take")),form_view=1,form_view_max=1;var form_view_count=jQuery(".wdform-page-and-images").length;if(jQuery(".wdform-page-and-images").each(function(){var e=jQuery(this).find(".wdform_page").attr("id").split("form_id_tempform_view"),t=parseInt(e[1]);form_view_max=t>form_view_max?t:form_view_max,page_toolbar_wrap=document.createElement("div"),page_toolbar_wrap.setAttribute("id","form_id_tempform_view_img"+t),page_toolbar_wrap.setAttribute("class","form_id_tempform_view_img"),page_title=document.createElement("div"),page_title.setAttribute("class","wdform_page_title"),page_title.innerHTML='<span class="fm-ico-draggable"></span>'+document.getElementById("form_id_tempform_view"+t).getAttribute("page_title"),page_toolbar_wrap.appendChild(page_title),page_toolbar=document.createElement("div");var i="none"==document.getElementById("form_id_tempform_view"+t).style.display?"fm-ico-expand":"fm-ico-collapse",a=document.createElement("span");a.setAttribute("title","Show or hide the page"),a.setAttribute("class","page_toolbar dashicons "+i),a.setAttribute("id","show_page_img_"+t),a.setAttribute("onClick",'show_or_hide("'+t+'"); change_show_hide_icon(this);');var n=document.createElement("span");n.setAttribute("title","Delete the page"),n.setAttribute("class","page_toolbar fm-ico-delete"),n.setAttribute("onclick",'remove_page("'+t+'")');var l=document.createElement("span");l.setAttribute("title","Edit the page"),l.setAttribute("class","page_toolbar fm-ico-edit"),l.setAttribute("onclick",'edit_page_break("'+t+'")'),page_toolbar.appendChild(n),page_toolbar.appendChild(l),page_toolbar.appendChild(a),page_toolbar_wrap.appendChild(page_toolbar);var d=document.getElementById("form_id_tempform_view"+t).parentNode;d.insertBefore(page_toolbar_wrap,d.childNodes[0])}),1<form_view_count){firstid=jQuery(".wdform_page").first().attr("id"),firstid=firstid.split("form_id_tempform_view"),first_form_view=firstid[1],form_view=form_view_max,need_enable=!1,generate_page_nav(first_form_view);var icon_edit=document.createElement("span");icon_edit.setAttribute("class","fm-ico-edit"),icon_edit.setAttribute("onclick","el_page_navigation()");var edit_page_navigation=document.getElementById("edit_page_navigation");edit_page_navigation.appendChild(icon_edit),document.getElementById("page_navigation").appendChild(edit_page_navigation),jQuery("#page_bar").removeClass("form_view_hide")}else jQuery("#page_bar").addClass("form_view_hide");1==form_view_count&&jQuery(".form_id_tempform_view_img").addClass("form_view_hide")}function change_show_hide_icon(e){jQuery(e).toggleClass("fm-ico-collapse").toggleClass("fm-ico-expand")}function edit_page_break(e){enable2(),document.getElementById("editing_id").value=e,form_view_element=document.getElementById("form_id_tempform_view"+e),page_title=form_view_element.getAttribute("page_title"),form_view_element.getAttribute("next_title")?(next_title=form_view_element.getAttribute("next_title"),next_type=form_view_element.getAttribute("next_type"),next_class=form_view_element.getAttribute("next_class"),next_checkable=form_view_element.getAttribute("next_checkable"),previous_title=form_view_element.getAttribute("previous_title"),previous_type=form_view_element.getAttribute("previous_type"),previous_class=form_view_element.getAttribute("previous_class"),previous_checkable=form_view_element.getAttribute("previous_checkable"),w_title=[next_title,previous_title],w_type=[next_type,previous_type],w_class=[next_class,previous_class],w_check=[next_checkable,previous_checkable]):(w_title=["Next","Previous"],w_type=["text","text"],w_class=["",""],w_check=["true","true"]),w_attr_name=[],w_attr_value=[],type_page_break(e,page_title,w_title,w_type,w_class,w_check,w_attr_name,w_attr_value)}function fm_popup_toggle(e){jQuery("#"+e).toggleClass("hidden"),jQuery("body").toggleClass("fm-disable-scroll")}function storageAvailable(e){try{var t=window[e],i="__storage_test__";return t.setItem(i,i),t.removeItem(i),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==t.length}}function fm_check_something_really_important(){return is7=jQuery(".wdform_field:not([type=type_section_break])").length,9<=is7&&(fm_limitation_alert(!0),!0)}function filter(e){var t=jQuery(e).val().toLowerCase();if(jQuery(".filtered-fields .inside").html(""),""!=t){var i=!1;jQuery(".field_types_cont .postbox").addClass("hide"),jQuery(".field_types .postbox:not(.filtered-fields) .wd-button").each(function(){"-1"!=jQuery(this).html().toLowerCase().indexOf(t)&&(jQuery(".filtered-fields .inside").append(jQuery(this).clone()),i=!0)}),i||jQuery(".filtered-fields .inside").html(form_maker.nothing_found),jQuery(".field_types_cont .filtered-fields").removeClass("hide")}else jQuery(".field_types_cont .postbox").removeClass("hide"),jQuery(".field_types_cont .filtered-fields").addClass("hide")}function Enable(){for(k=1;k<=form_view_max;k++)if(document.getElementById("form_id_tempform_view"+k))for(wdform_page=document.getElementById("form_id_tempform_view"+k),remove_whitespace(wdform_page),n=wdform_page.childNodes.length-2,z=0;z<=n;z++)if(!wdform_page.childNodes[z].getAttribute("wdid"))for(wdform_section=wdform_page.childNodes[z],x=0;x<wdform_section.childNodes.length;x++)if(wdform_column=wdform_section.childNodes[x],wdform_column.firstChild)for(y=0;y<wdform_column.childNodes.length;y++)wdform_row=wdform_column.childNodes[y],wdid=wdform_row.getAttribute("wdid"),wdid}function enable2(){fm_add_field_button(),jQuery(".add-popup").slideToggle(200),jQuery(".popup-title").html(form_maker.edit_field),jQuery(".wd-add-button").html(form_maker.update),jQuery(".field_types").hide(),jQuery("#field_container").addClass("field_container_full")}function edit(e,a){switch(need_enable&&enable2(),document.getElementById("editing_id").value=e,type=document.getElementById("wdform_field"+e).getAttribute("type"),k=0,w_choices=new Array,w_choices_value=new Array,w_choices_params=new Array,w_choices_checked=new Array,w_choices_disabled=new Array,f=0,h=new Array,b=new Array,w_choices_price=new Array,t=0,document.getElementById(e+"_element_labelform_id_temp").innerHTML?w_field_label=document.getElementById(e+"_element_labelform_id_temp").innerHTML:w_field_label=" ",document.getElementById(e+"_label_sectionform_id_temp")&&("block"==document.getElementById(e+"_label_sectionform_id_temp").style.display?w_field_label_pos="top":w_field_label_pos="left"),document.getElementById(e+"_elementform_id_temp")&&(s=document.getElementById(e+"_elementform_id_temp").style.width,""==s?w_size=s:w_size=s.substring(0,s.length-2)),document.getElementById(e+"_label_sectionform_id_temp")&&(s=document.getElementById(e+"_label_sectionform_id_temp").style.width,""==s?w_field_label_size=s:w_field_label_size=s.substring(0,s.length-2)),document.getElementById(e+"_requiredform_id_temp")&&(w_required=document.getElementById(e+"_requiredform_id_temp").value),document.getElementById(e+"_uniqueform_id_temp")&&(w_unique=document.getElementById(e+"_uniqueform_id_temp").value),document.getElementById(e+"_label_sectionform_id_temp")&&(w_class=document.getElementById(e+"_label_sectionform_id_temp").getAttribute("class"),w_class||(w_class="")),type){case"type_editor":w_editor=document.getElementById("wdform_field"+e).innerHTML,type_editor(e,w_editor);break;case"type_section_break":w_editor=document.getElementById(e+"_element_sectionform_id_temp").innerHTML,type_section_break(e,w_editor);break;case"type_send_copy":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(e+"_elementform_id_temp").checked,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_send_copy(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_first_val,w_required,w_attr_name,w_attr_value);break;case"type_text":w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,w_regExp_status=document.getElementById(e+"_regExpStatusform_id_temp").value,w_regExp_value=unescape(document.getElementById(e+"_regExp_valueform_id_temp").value),w_regExp_common=document.getElementById(e+"_regExp_commonform_id_temp").value,w_regExp_arg=document.getElementById(e+"_regArgumentform_id_temp").value,w_regExp_alert=document.getElementById(e+"_regExp_alertform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_readonly=document.getElementById(e+"_readonlyform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,type_text(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_first_val,w_title,w_required,w_regExp_status,w_regExp_value,w_regExp_common,w_regExp_arg,w_regExp_alert,w_unique,w_attr_name,w_attr_value,w_readonly,w_class);break;case"type_number":w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_number(e,w_field_label,w_field_label_size,w_field_label_pos,w_size,w_first_val,w_title,w_required,w_unique,w_class,w_attr_name,w_attr_value);break;case"type_password":w_placeholder_value=document.getElementById(e+"_elementform_id_temp").placeholder,w_verification=document.getElementById(e+"_verification_id_temp").value,document.getElementById(e+"_1_element_labelform_id_temp").innerHTML?w_verification_label=document.getElementById(e+"_1_element_labelform_id_temp").innerHTML:w_verification_label=" ",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_password(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_required,w_unique,w_class,w_verification,w_verification_label,w_placeholder_value,w_attr_name,w_attr_value);break;case"type_textarea":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,s=document.getElementById(e+"_elementform_id_temp").style.height,w_size_h=s.substring(0,s.length-2),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_textarea(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_size_h,w_first_val,w_title,w_required,w_unique,w_class,w_attr_name,w_attr_value);break;case"type_wdeditor":w_title=document.getElementById(e+"_elementform_id_temp").title,s=document.getElementById(e+"_elementform_id_temp").style.height,w_size_h=s.substring(0,s.length-2),w=document.getElementById(e+"_elementform_id_temp").style.width,w_size_w=w.substring(0,w.length-2),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_wdeditor(e,w_field_label,w_field_label_size,w_field_label_pos,w_size_w,w_size_h,w_title,w_required,w_class,w_attr_name,w_attr_value);break;case"type_phone":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=[document.getElementById(e+"_element_firstform_id_temp").value,document.getElementById(e+"_element_lastform_id_temp").value],w_title=[document.getElementById(e+"_element_firstform_id_temp").title,document.getElementById(e+"_element_lastform_id_temp").title],s=document.getElementById(e+"_element_lastform_id_temp").style.width,w_size=s.substring(0,s.length-2),w_mini_labels=[document.getElementById(e+"_mini_label_area_code").innerHTML,document.getElementById(e+"_mini_label_phone_number").innerHTML],atrs=return_attributes(e+"_element_firstform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_phone(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_first_val,w_title,w_mini_labels,w_required,w_unique,w_class,w_attr_name,w_attr_value);break;case"type_phone_new":var l=jQuery("#"+e+"_elementform_id_temp").intlTelInput("getSelectedCountryData");w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_top_country=l.iso2,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_phone_new(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_first_val,w_top_country,w_required,w_unique,w_class,w_attr_name,w_attr_value);break;case"type_name":if(document.getElementById(e+"_enable_fieldsform_id_temp")){w_name_format="normal",w_first_val=[document.getElementById(e+"_element_firstform_id_temp").value,document.getElementById(e+"_element_lastform_id_temp").value],w_title=[document.getElementById(e+"_element_firstform_id_temp").title,document.getElementById(e+"_element_lastform_id_temp").title];for(var d=["title","middle"],_=0;_<2;_++)w_first_val.push(document.getElementById(e+"_element_"+d[_]+"form_id_temp")?document.getElementById(e+"_element_"+d[_]+"form_id_temp").value:""),w_title.push(document.getElementById(e+"_element_"+d[_]+"form_id_temp")?document.getElementById(e+"_element_"+d[_]+"form_id_temp").title:"")}else document.getElementById(e+"_element_middleform_id_temp")?w_name_format="extended":w_name_format="normal","normal"==w_name_format?(w_first_val=[document.getElementById(e+"_element_firstform_id_temp").value,document.getElementById(e+"_element_lastform_id_temp").value],w_title=[document.getElementById(e+"_element_firstform_id_temp").title,document.getElementById(e+"_element_lastform_id_temp").title]):(w_first_val=[document.getElementById(e+"_element_firstform_id_temp").value,document.getElementById(e+"_element_lastform_id_temp").value,document.getElementById(e+"_element_titleform_id_temp").value,document.getElementById(e+"_element_middleform_id_temp").value],w_title=[document.getElementById(e+"_element_firstform_id_temp").title,document.getElementById(e+"_element_lastform_id_temp").title,document.getElementById(e+"_element_titleform_id_temp").title,document.getElementById(e+"_element_middleform_id_temp").title]);document.getElementById(e+"_mini_label_title")?w_mini_title=document.getElementById(e+"_mini_label_title").innerHTML:w_mini_title="Title",document.getElementById(e+"_mini_label_middle")?w_mini_middle=document.getElementById(e+"_mini_label_middle").innerHTML:w_mini_middle="Middle",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_mini_labels=[w_mini_title,document.getElementById(e+"_mini_label_first").innerHTML,document.getElementById(e+"_mini_label_last").innerHTML,w_mini_middle],w_name_title=document.getElementById(e+"_enable_fieldsform_id_temp")?document.getElementById(e+"_enable_fieldsform_id_temp").getAttribute("title"):"normal"==w_name_format?"no":"yes",w_name_middle=document.getElementById(e+"_enable_fieldsform_id_temp")?document.getElementById(e+"_enable_fieldsform_id_temp").getAttribute("middle"):"normal"==w_name_format?"no":"yes",w_name_fields=[w_name_title,w_name_middle],w_autofill=document.getElementById(e+"_autofillform_id_temp").value,s=document.getElementById(e+"_element_firstform_id_temp").style.width,w_size=s.substring(0,s.length-2),atrs=return_attributes(e+"_element_firstform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_name(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_first_val,w_title,w_mini_labels,w_size,w_name_format,w_required,w_unique,w_class,w_attr_name,w_attr_value,w_name_fields,w_autofill);break;case"type_paypal_price":w_first_val=[document.getElementById(e+"_element_dollarsform_id_temp").value,document.getElementById(e+"_element_centsform_id_temp").value],w_title=[document.getElementById(e+"_element_dollarsform_id_temp").title,document.getElementById(e+"_element_centsform_id_temp").title],"none"==document.getElementById(e+"_td_name_cents").style.display?w_hide_cents="yes":w_hide_cents="no",s=document.getElementById(e+"_element_dollarsform_id_temp").style.width,w_size=s.substring(0,s.length-2),atrs=return_attributes(e+"_element_dollarsform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_range_min=document.getElementById(e+"_range_minform_id_temp").value,w_range_max=document.getElementById(e+"_range_maxform_id_temp").value,w_mini_labels=[document.getElementById(e+"_mini_label_dollars").innerHTML,document.getElementById(e+"_mini_label_cents").innerHTML],type_paypal_price(e,w_field_label,w_field_label_size,w_field_label_pos,w_first_val,w_title,w_mini_labels,w_size,w_required,w_hide_cents,w_class,w_attr_name,w_attr_value,w_range_min,w_range_max);break;case"type_paypal_price_new":w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,s=document.getElementById(e+"_elementform_id_temp").style.width,w_size=s.substring(0,s.length-2),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_range_min=document.getElementById(e+"_range_minform_id_temp").value,w_range_max=document.getElementById(e+"_range_maxform_id_temp").value,w_readonly=document.getElementById(e+"_readonlyform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,"none"==document.getElementById(e+"_td_name_currency").style.display?w_currency="yes":w_currency="no",type_paypal_price_new(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_first_val,w_title,w_size,w_required,w_class,w_attr_name,w_attr_value,w_range_min,w_range_max,w_readonly,w_currency);break;case"type_address":s=document.getElementById(e+"_div_address").style.width,w_size=s.substring(0,s.length-2),document.getElementById(e+"_mini_label_street1")?w_street1=document.getElementById(e+"_mini_label_street1").innerHTML:w_street1=document.getElementById(e+"_street1form_id_temp").value,document.getElementById(e+"_mini_label_street2")?w_street2=document.getElementById(e+"_mini_label_street2").innerHTML:w_street2=document.getElementById(e+"_street2form_id_temp").value,document.getElementById(e+"_mini_label_city")?w_city=document.getElementById(e+"_mini_label_city").innerHTML:w_city=document.getElementById(e+"_cityform_id_temp").value,document.getElementById(e+"_mini_label_state")?w_state=document.getElementById(e+"_mini_label_state").innerHTML:w_state=document.getElementById(e+"_stateform_id_temp").value,document.getElementById(e+"_mini_label_postal")?w_postal=document.getElementById(e+"_mini_label_postal").innerHTML:w_postal=document.getElementById(e+"_postalform_id_temp").value,document.getElementById(e+"_mini_label_country")?w_country=document.getElementById(e+"_mini_label_country").innerHTML:w_country=document.getElementById(e+"_countryform_id_temp").value,w_mini_labels=[w_street1,w_street2,w_city,w_state,w_postal,w_country];var r=document.getElementById(e+"_disable_fieldsform_id_temp");w_street1_dis=r.getAttribute("street1"),w_street2_dis=r.getAttribute("street2"),w_city_dis=r.getAttribute("city"),w_state_dis=r.getAttribute("state"),w_us_states_dis=r.getAttribute("us_states"),w_postal_dis=r.getAttribute("postal"),w_country_dis=r.getAttribute("country"),w_disabled_fields=[w_street1_dis,w_street2_dis,w_city_dis,w_state_dis,w_postal_dis,w_country_dis,w_us_states_dis],w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_street1form_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_address(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_mini_labels,w_disabled_fields,w_required,w_class,w_attr_name,w_attr_value);break;case"type_submitter_mail":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,w_autofill=document.getElementById(e+"_autofillform_id_temp").value,w_verification=document.getElementById(e+"_verification_id_temp").value,w_verification_placeholder=document.getElementById(e+"_1_elementform_id_temp").title,document.getElementById(e+"_1_element_labelform_id_temp").innerHTML?w_verification_label=document.getElementById(e+"_1_element_labelform_id_temp").innerHTML:w_verification_label=" ",atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_submitter_mail(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_first_val,w_title,w_required,w_unique,w_class,w_verification,w_verification_label,w_verification_placeholder,w_attr_name,w_attr_value,w_autofill);break;case"type_checkbox":if(w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value,document.getElementById(e+"_rowcol_numform_id_temp").value?(document.getElementById(e+"_table_little").getAttribute("for_hor")?w_flow="hor":w_flow="ver",w_rowcol=document.getElementById(e+"_rowcol_numform_id_temp").value):(document.getElementById(e+"_hor")?w_flow="hor":w_flow="ver",w_rowcol=1),v=0,"ver"==w_flow){var o=document.getElementById(e+"_table_little");for(k=0;k<o.childNodes.length;k++){var u=o.childNodes[k];for(m=0;m<u.childNodes.length;m++){var c=u.childNodes[m].getAttribute("idi");document.getElementById(e+"_elementform_id_temp"+c).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+c).getAttribute("other")&&(f=t),w_choices[t]=document.getElementById(e+"_label_element"+c).innerHTML,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+c).checked,w_choices_value[t]=document.getElementById(e+"_elementform_id_temp"+c).value,document.getElementById(e+"_label_element"+c).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+c).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+c).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+c).getAttribute("db_info"):w_choices_params[t]="",t++,v=c}}}else{var p=(y=(o=document.getElementById(e+"_table_little")).childNodes)[0].childNodes;for(k=0;k<p.length;k++)for(m=0;m<y.length;m++)if(y[m].childNodes[k]){c=(u=y[m].childNodes[k]).getAttribute("idi");document.getElementById(e+"_elementform_id_temp"+c).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+c).getAttribute("other")&&(f=t),w_choices[t]=document.getElementById(e+"_label_element"+c).innerHTML,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+c).checked,w_choices_value[t]=document.getElementById(e+"_elementform_id_temp"+c).value,document.getElementById(e+"_label_element"+c).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+c).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+c).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+c).getAttribute("db_info"):w_choices_params[t]="",t++,v=c}}document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_value_disabled=document.getElementById(e+"_value_disabledform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_checkbox(e,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_checked,w_rowcol,w_required,w_randomize,w_allow_other,f,w_class,w_attr_name,w_attr_value,w_value_disabled,w_choices_value,w_choices_params);break;case"type_paypal_checkbox":document.getElementById(e+"_hor")?w_flow="hor":w_flow="ver",w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value;var f=v=0;o=document.getElementById(e+"_table_little");for(k=0;k<o.childNodes.length;k++){u=o.childNodes[k];for(m=0;m<u.childNodes.length;m++){c=u.childNodes[m].getAttribute("idi");w_choices[t]=document.getElementById(e+"_label_element"+c).innerHTML,w_choices_price[t]=document.getElementById(e+"_elementform_id_temp"+c).value,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+c).checked,document.getElementById(e+"_label_element"+c).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+c).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+c).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+c).getAttribute("db_info"):w_choices_params[t]="",t++,v=c}}for("hor"==w_flow&&flow_hor(e),k=0;k<100;k++)if(document.getElementById(e+"_propertyform_id_temp"+k))if(h.push(document.getElementById(e+"_property_label_form_id_temp"+k).innerHTML),document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length)for(b[h.length-1]=new Array,m=0;m<document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length;m++)b[h.length-1].push(document.getElementById(e+"_propertyform_id_temp"+k).childNodes[m].value);else b.push("");w_quantity="no",w_quantity_value=1,document.getElementById(e+"_element_quantityform_id_temp")&&(w_quantity="yes",w_quantity_value=document.getElementById(e+"_element_quantityform_id_temp").value),document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_paypal_checkbox(e,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_price,w_choices_checked,w_required,w_randomize,w_allow_other,f,w_class,w_attr_name,w_attr_value,h,b,w_quantity,w_quantity_value,w_choices_params);break;case"type_radio":if(w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value,document.getElementById(e+"_rowcol_numform_id_temp").value?(document.getElementById(e+"_table_little").getAttribute("for_hor")?w_flow="hor":w_flow="ver",w_rowcol=document.getElementById(e+"_rowcol_numform_id_temp").value):(document.getElementById(e+"_table_little").getAttribute("for_hor")?w_flow="hor":w_flow="ver",w_rowcol=1),v=0,"ver"==w_flow){o=document.getElementById(e+"_table_little");for(k=0;k<o.childNodes.length;k++){u=o.childNodes[k];for(m=0;m<u.childNodes.length;m++){c=u.childNodes[m].getAttribute("idi");document.getElementById(e+"_elementform_id_temp"+c).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+c).getAttribute("other")&&(f=t),w_choices[t]=document.getElementById(e+"_label_element"+c).innerHTML,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+c).checked,w_choices_value[t]=document.getElementById(e+"_elementform_id_temp"+c).value,document.getElementById(e+"_label_element"+c).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+c).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+c).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+c).getAttribute("db_info"):w_choices_params[t]="",t++,v=c}}}else{var y;p=(y=(o=document.getElementById(e+"_table_little")).childNodes)[0].childNodes;for(k=0;k<p.length;k++)for(m=0;m<y.length;m++)if(y[m].childNodes[k]){c=(u=y[m].childNodes[k]).getAttribute("idi");document.getElementById(e+"_elementform_id_temp"+c).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+c).getAttribute("other")&&(f=t),w_choices[t]=document.getElementById(e+"_label_element"+c).innerHTML,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+c).checked,w_choices_value[t]=document.getElementById(e+"_elementform_id_temp"+c).value,document.getElementById(e+"_label_element"+c).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+c).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+c).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+c).getAttribute("db_info"):w_choices_params[t]="",t++,v=c}}document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_value_disabled=document.getElementById(e+"_value_disabledform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_radio(e,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_checked,w_rowcol,w_required,w_randomize,w_allow_other,f,w_class,w_attr_name,w_attr_value,w_value_disabled,w_choices_value,w_choices_params);break;case"type_paypal_radio":document.getElementById(e+"_hor")?w_flow="hor":w_flow="ver",w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value;f=v=0,o=document.getElementById(e+"_table_little");for(k=0;k<o.childNodes.length;k++){u=o.childNodes[k];for(m=0;m<u.childNodes.length;m++){c=u.childNodes[m].getAttribute("idi");w_choices[t]=document.getElementById(e+"_label_element"+c).innerHTML,w_choices_price[t]=document.getElementById(e+"_elementform_id_temp"+c).value,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+c).checked,document.getElementById(e+"_label_element"+c).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+c).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+c).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+c).getAttribute("db_info"):w_choices_params[t]="",t++,v=c}}for("hor"==w_flow&&flow_hor(e),k=0;k<100;k++)if(document.getElementById(e+"_propertyform_id_temp"+k))if(h.push(document.getElementById(e+"_property_label_form_id_temp"+k).innerHTML),document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length)for(b[h.length-1]=new Array,m=0;m<document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length;m++)b[h.length-1].push(document.getElementById(e+"_propertyform_id_temp"+k).childNodes[m].value);else b.push("");w_quantity="no",w_quantity_value=1,document.getElementById(e+"_element_quantityform_id_temp")&&(w_quantity="yes",w_quantity_value=document.getElementById(e+"_element_quantityform_id_temp").value),document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_paypal_radio(e,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_price,w_choices_checked,w_required,w_randomize,w_allow_other,f,w_class,w_attr_name,w_attr_value,h,b,w_quantity,w_quantity_value,w_choices_params);break;case"type_paypal_shipping":document.getElementById(e+"_hor")?w_flow="hor":w_flow="ver",w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value;f=v=0,o=document.getElementById(e+"_table_little");for(k=0;k<o.childNodes.length;k++){u=o.childNodes[k];for(m=0;m<u.childNodes.length;m++){c=u.childNodes[m].getAttribute("idi");w_choices[t]=document.getElementById(e+"_label_element"+c).innerHTML,w_choices_price[t]=document.getElementById(e+"_elementform_id_temp"+c).value,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+c).checked,document.getElementById(e+"_label_element"+c).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+c).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+c).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+c).getAttribute("db_info"):w_choices_params[t]="",t++,v=c}}"hor"==w_flow&&flow_hor(e);var h=[],b=[];document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_paypal_shipping(e,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_price,w_choices_checked,w_required,w_randomize,w_allow_other,f,w_class,w_attr_name,w_attr_value,h,b,w_choices_params);break;case"type_paypal_total":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_size=jQuery("#"+e+"paypal_totalform_id_temp").css("width")?jQuery("#"+e+"paypal_totalform_id_temp").css("width").substring(0,jQuery("#"+e+"paypal_totalform_id_temp").css("width").length-2):"300",type_paypal_total(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_class,w_size);break;case"type_stripe":type_stripe(e,w_size,w_field_label_size,w_field_label_pos,w_class);break;case"type_star_rating":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_star_amount=document.getElementById(e+"_star_amountform_id_temp").value,w_field_label_col=document.getElementById(e+"_star_colorform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_star_rating(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_label_col,w_star_amount,w_required,w_class,w_attr_name,w_attr_value);break;case"type_scale_rating":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_mini_labels=[document.getElementById(e+"_mini_label_worst").innerHTML,document.getElementById(e+"_mini_label_best").innerHTML],w_scale_amount=document.getElementById(e+"_scale_amountform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_scale_rating(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_mini_labels,w_scale_amount,w_required,w_class,w_attr_name,w_attr_value);break;case"type_spinner":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_field_min_value=document.getElementById(e+"_min_valueform_id_temp").value,w_field_max_value=document.getElementById(e+"_max_valueform_id_temp").value,w_field_width=document.getElementById(e+"_spinner_widthform_id_temp").value,w_field_step=document.getElementById(e+"_stepform_id_temp").value,w_field_value=document.getElementById(e+"_elementform_id_temp").getAttribute("aria-valuenow"),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_spinner(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_width,w_field_min_value,w_field_max_value,w_field_step,w_field_value,w_required,w_class,w_attr_name,w_attr_value);break;case"type_slider":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_field_min_value=document.getElementById(e+"_slider_min_valueform_id_temp").value,w_field_max_value=document.getElementById(e+"_slider_max_valueform_id_temp").value,w_field_step=document.getElementById(e+"_slider_stepform_id_temp")&&document.getElementById(e+"_slider_stepform_id_temp").value?document.getElementById(e+"_slider_stepform_id_temp").value:1,w_field_width=document.getElementById(e+"_slider_widthform_id_temp").value,w_field_value=document.getElementById(e+"_slider_valueform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_slider(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_width,w_field_min_value,w_field_max_value,w_field_step,w_field_value,w_required,w_class,w_attr_name,w_attr_value);break;case"type_range":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_field_range_width=document.getElementById(e+"_range_widthform_id_temp").value,w_field_range_step=document.getElementById(e+"_range_stepform_id_temp").value,w_field_value1=document.getElementById(e+"_elementform_id_temp0").getAttribute("aria-valuenow"),w_field_value2=document.getElementById(e+"_elementform_id_temp1").getAttribute("aria-valuenow"),atrs=return_attributes(e+"_elementform_id_temp0"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_mini_labels=[document.getElementById(e+"_mini_label_from").innerHTML,document.getElementById(e+"_mini_label_to").innerHTML],type_range(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_range_width,w_field_range_step,w_field_value1,w_field_value2,w_mini_labels,w_required,w_class,w_attr_name,w_attr_value);break;case"type_grading":for(w_total=document.getElementById(e+"_grading_totalform_id_temp").value,w_items=[],k=0;k<100;k++)document.getElementById(e+"_label_elementform_id_temp"+k)&&w_items.push(document.getElementById(e+"_label_elementform_id_temp"+k).innerHTML);w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_grading(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_items,w_total,w_required,w_class,w_attr_name,w_attr_value),refresh_grading_items(e);break;case"type_matrix":for(w_rows=[],w_rows[0]="",k=1;k<100;k++)document.getElementById(e+"_label_elementform_id_temp"+k+"_0")&&w_rows.push(document.getElementById(e+"_label_elementform_id_temp"+k+"_0").innerHTML);for(w_columns=[],w_columns[0]="",k=1;k<100;k++)document.getElementById(e+"_label_elementform_id_temp0_"+k)&&w_columns.push(document.getElementById(e+"_label_elementform_id_temp0_"+k).innerHTML);w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_field_input_type=document.getElementById(e+"_input_typeform_id_temp").value,w_textbox_size=document.getElementById(e+"_textbox_sizeform_id_temp")?document.getElementById(e+"_textbox_sizeform_id_temp").value:"100",atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_matrix(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_input_type,w_rows,w_columns,w_required,w_class,w_attr_name,w_attr_value,w_textbox_size),refresh_matrix(e);break;case"type_time":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_hhform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_hh=document.getElementById(e+"_hhform_id_temp").value,w_mm=document.getElementById(e+"_mmform_id_temp").value,document.getElementById(e+"_ssform_id_temp")?(w_ss=document.getElementById(e+"_ssform_id_temp").value,w_sec="1",w_mini_label_ss=document.getElementById(e+"_mini_label_ss").innerHTML):(w_ss="",w_sec="0",w_mini_label_ss=""),document.getElementById(e+"_am_pm_select")?(w_am_pm=document.getElementById(e+"_am_pmform_id_temp").value,w_time_type="12",w_mini_labels=[document.getElementById(e+"_mini_label_hh").innerHTML,document.getElementById(e+"_mini_label_mm").innerHTML,w_mini_label_ss,document.getElementById(e+"_mini_label_am_pm").innerHTML]):(w_am_pm=0,w_time_type="24",w_mini_labels=[document.getElementById(e+"_mini_label_hh").innerHTML,document.getElementById(e+"_mini_label_mm").innerHTML,w_mini_label_ss,"AM/PM"]),type_time(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_time_type,w_am_pm,w_sec,w_hh,w_mm,w_ss,w_mini_labels,w_required,w_class,w_attr_name,w_attr_value);break;case"type_date":atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_date=document.getElementById(e+"_elementform_id_temp").value,w_format=document.getElementById(e+"_buttonform_id_temp").getAttribute("format"),w_but_val=document.getElementById(e+"_buttonform_id_temp").value,w_disable_past_days=document.getElementById(e+"_dis_past_daysform_id_temp")?document.getElementById(e+"_dis_past_daysform_id_temp").value:"no",type_date(e,w_field_label,w_field_label_size,w_field_label_pos,w_date,w_required,w_class,w_format,w_but_val,w_attr_name,w_attr_value,w_disable_past_days);break;case"type_date_new":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_date=document.getElementById(e+"_elementform_id_temp").value,w_format=document.getElementById(e+"_buttonform_id_temp").getAttribute("format"),w_but_val=document.getElementById(e+"_buttonform_id_temp").value,w_start_day=document.getElementById(e+"_start_dayform_id_temp").value,w_default_date=document.getElementById(e+"_default_date_id_temp").value,w_min_date=document.getElementById(e+"_min_date_id_temp").value,w_max_date=document.getElementById(e+"_max_date_id_temp").value,w_invalid_dates=document.getElementById(e+"_invalid_dates_id_temp").value,w_hide_time=document.getElementById(e+"_hide_timeform_id_temp").value,w_show_image=document.getElementById(e+"_show_imageform_id_temp").value,w_disable_past_days=document.getElementById(e+"_dis_past_daysform_id_temp")?document.getElementById(e+"_dis_past_daysform_id_temp").value:"no";var g=document.getElementById(e+"_show_week_days");w_sunday=g.getAttribute("sunday"),w_monday=g.getAttribute("monday"),w_tuesday=g.getAttribute("tuesday"),w_wednesday=g.getAttribute("wednesday"),w_thursday=g.getAttribute("thursday"),w_friday=g.getAttribute("friday"),w_saturday=g.getAttribute("saturday"),w_show_days=[w_sunday,w_monday,w_tuesday,w_wednesday,w_thursday,w_friday,w_saturday],type_date_new(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_date,w_required,w_show_image,w_class,w_format,w_start_day,w_default_date,w_min_date,w_max_date,w_invalid_dates,w_show_days,w_hide_time,w_but_val,w_attr_name,w_attr_value,w_disable_past_days);break;case"type_date_range":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp0"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_date="",w_format=document.getElementById(e+"_buttonform_id_temp").getAttribute("format"),w_but_val=document.getElementById(e+"_buttonform_id_temp").value,s=document.getElementById(e+"_elementform_id_temp0").style.width,w_size=s.substring(0,s.length-2),w_start_day=document.getElementById(e+"_start_dayform_id_temp").value,w_default_date_start=document.getElementById(e+"_default_date_id_temp_start").value,w_default_date_end=document.getElementById(e+"_default_date_id_temp_end").value,w_min_date=document.getElementById(e+"_min_date_id_temp").value,w_max_date=document.getElementById(e+"_max_date_id_temp").value,w_invalid_dates=document.getElementById(e+"_invalid_dates_id_temp").value,w_hide_time=document.getElementById(e+"_hide_timeform_id_temp").value,w_show_image=document.getElementById(e+"_show_imageform_id_temp").value,w_disable_past_days=document.getElementById(e+"_dis_past_daysform_id_temp")?document.getElementById(e+"_dis_past_daysform_id_temp").value:"no";g=document.getElementById(e+"_show_week_days");w_sunday=g.getAttribute("sunday"),w_monday=g.getAttribute("monday"),w_tuesday=g.getAttribute("tuesday"),w_wednesday=g.getAttribute("wednesday"),w_thursday=g.getAttribute("thursday"),w_friday=g.getAttribute("friday"),w_saturday=g.getAttribute("saturday"),w_show_days=[w_sunday,w_monday,w_tuesday,w_wednesday,w_thursday,w_friday,w_saturday],type_date_range(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_date,w_required,w_show_image,w_class,w_format,w_start_day,w_default_date_start,w_default_date_end,w_min_date,w_max_date,w_invalid_dates,w_show_days,w_hide_time,w_but_val,w_attr_name,w_attr_value,w_disable_past_days);break;case"type_date_fields":atrs=return_attributes(e+"_dayform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_day=document.getElementById(e+"_dayform_id_temp").value,w_month=document.getElementById(e+"_monthform_id_temp").value,w_year=document.getElementById(e+"_yearform_id_temp").value,w_day_type=document.getElementById(e+"_dayform_id_temp").tagName,w_month_type=document.getElementById(e+"_monthform_id_temp").tagName,w_year_type=document.getElementById(e+"_yearform_id_temp").tagName,w_day_label=document.getElementById(e+"_day_label").innerHTML,w_month_label=document.getElementById(e+"_month_label").innerHTML,w_year_label=document.getElementById(e+"_year_label").innerHTML,s=document.getElementById(e+"_dayform_id_temp").style.width,w_day_size=s.substring(0,s.length-2),s=document.getElementById(e+"_monthform_id_temp").style.width,w_month_size=s.substring(0,s.length-2),s=document.getElementById(e+"_yearform_id_temp").style.width,w_year_size=s.substring(0,s.length-2),w_from=document.getElementById(e+"_yearform_id_temp").getAttribute("from"),w_to=document.getElementById(e+"_yearform_id_temp").getAttribute("to"),w_divider=document.getElementById(e+"_separator1").innerHTML,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,type_date_fields(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_day,w_month,w_year,w_day_type,w_month_type,w_year_type,w_day_label,w_month_label,w_year_label,w_day_size,w_month_size,w_year_size,w_required,w_class,w_from,w_to,w_divider,w_attr_name,w_attr_value);break;case"type_own_select":jQuery("#"+e+"_elementform_id_temp option").each(function(){w_choices[t]=jQuery(this).html(),w_choices_value[t]=jQuery(this).val(),w_choices_checked[t]=jQuery(this)[0].selected,jQuery(this).attr("where")?w_choices_params[t]=jQuery(this).attr("where")+"[where_order_by]"+jQuery(this).attr("order_by")+"[db_info]"+jQuery(this).attr("db_info"):w_choices_params[t]="",jQuery(this).val()?w_choices_disabled[t]=!1:w_choices_disabled[t]=!0,t++}),w_value_disabled=document.getElementById(e+"_value_disabledform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_own_select(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_choices,w_choices_checked,w_required,w_value_disabled,w_class,w_attr_name,w_attr_value,w_choices_disabled,w_choices_value,w_choices_params);break;case"type_paypal_select":for(jQuery("#"+e+"_elementform_id_temp option").each(function(){w_choices[t]=jQuery(this).html(),w_choices_price[t]=jQuery(this).val(),w_choices_checked[t]=jQuery(this)[0].selected,jQuery(this).attr("where")?w_choices_params[t]=jQuery(this).attr("where")+"[where_order_by]"+jQuery(this).attr("order_by")+"[db_info]"+jQuery(this).attr("db_info"):w_choices_params[t]="",""==jQuery(this)[0].value?w_choices_disabled[t]=!0:w_choices_disabled[t]=!1,t++}),k=0;k<100;k++)if(document.getElementById(e+"_propertyform_id_temp"+k))if(h.push(document.getElementById(e+"_property_label_form_id_temp"+k).innerHTML),document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length)for(b[h.length-1]=new Array,m=0;m<document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length;m++)b[h.length-1].push(document.getElementById(e+"_propertyform_id_temp"+k).childNodes[m].value);else b.push("");w_quantity="no",w_quantity_value=1,document.getElementById(e+"_element_quantityform_id_temp")&&(w_quantity="yes",w_quantity_value=document.getElementById(e+"_element_quantityform_id_temp").value),w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_paypal_select(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_choices,w_choices_price,w_choices_checked,w_required,w_quantity,w_quantity_value,w_class,w_attr_name,w_attr_value,w_choices_disabled,h,b,w_choices_params);break;case"type_country":for(w_countries=[],select_=document.getElementById(e+"_elementform_id_temp"),n=select_.childNodes.length,i=0;i<n;i++)w_countries.push(select_.childNodes[i].value);w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_country(e,w_field_label,w_field_label_size,w_hide_label,w_countries,w_field_label_pos,w_size,w_required,w_class,w_attr_name,w_attr_value);break;case"type_file_upload":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_destination=document.getElementById(e+"_destination").value.replace("***destinationverj"+e+"***","").replace("***destinationskizb"+e+"***",""),w_extension=document.getElementById(e+"_extension").value.replace("***extensionverj"+e+"***","").replace("***extensionskizb"+e+"***",""),w_max_size=document.getElementById(e+"_max_size").value.replace("***max_sizeverj"+e+"***","").replace("***max_sizeskizb"+e+"***",""),w_multiple=document.getElementById(e+"_elementform_id_temp").getAttribute("multiple")?"yes":"no",atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_file_upload(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_destination,w_extension,w_max_size,w_required,w_multiple,w_class,w_attr_name,w_attr_value);break;case"type_captcha":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_digit=document.getElementById("_wd_captchaform_id_temp").getAttribute("digit"),atrs=return_attributes("_wd_captchaform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_captcha(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_digit,w_class,w_attr_name,w_attr_value);break;case"type_arithmetic_captcha":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_count=document.getElementById("_wd_arithmetic_captchaform_id_temp").getAttribute("operations_count"),w_operations=document.getElementById("_wd_arithmetic_captchaform_id_temp").getAttribute("operations"),w_input_size=document.getElementById("_wd_arithmetic_captchaform_id_temp").getAttribute("input_size"),atrs=return_attributes("_wd_captchaform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_arithmetic_captcha(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_count,w_operations,w_class,w_input_size,w_attr_name,w_attr_value);break;case"type_recaptcha":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_type=document.getElementById("wd_recaptchaform_id_temp").getAttribute("w_type"),w_position=document.getElementById("wd_recaptchaform_id_temp").getAttribute("position"),type_recaptcha(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_type,w_position);break;case"type_map":for(w_lat=[],w_long=[],w_info=[],w_center_x=document.getElementById(e+"_elementform_id_temp").getAttribute("center_x"),w_center_y=document.getElementById(e+"_elementform_id_temp").getAttribute("center_y"),w_zoom=document.getElementById(e+"_elementform_id_temp").getAttribute("zoom"),w_width=""==document.getElementById(e+"_elementform_id_temp").style.width?"":parseInt(document.getElementById(e+"_elementform_id_temp").style.width),w_height=parseInt(document.getElementById(e+"_elementform_id_temp").style.height),j=0;j<=20;j++)document.getElementById(e+"_elementform_id_temp").getAttribute("lat"+j)&&(w_lat.push(document.getElementById(e+"_elementform_id_temp").getAttribute("lat"+j)),w_long.push(document.getElementById(e+"_elementform_id_temp").getAttribute("long"+j)),w_info.push(document.getElementById(e+"_elementform_id_temp").getAttribute("info"+j)));atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_map(e,w_center_x,w_center_y,w_long,w_lat,w_zoom,w_width,w_height,w_class,w_info,w_attr_name,w_attr_value);break;case"type_mark_map":w_info=document.getElementById(e+"_elementform_id_temp").getAttribute("info0"),w_long=document.getElementById(e+"_elementform_id_temp").getAttribute("long0"),w_lat=document.getElementById(e+"_elementform_id_temp").getAttribute("lat0"),w_zoom=document.getElementById(e+"_elementform_id_temp").getAttribute("zoom"),w_width=""==document.getElementById(e+"_elementform_id_temp").style.width?"":parseInt(document.getElementById(e+"_elementform_id_temp").style.width),w_height=parseInt(document.getElementById(e+"_elementform_id_temp").style.height),w_center_x=document.getElementById(e+"_elementform_id_temp").getAttribute("center_x"),w_center_y=document.getElementById(e+"_elementform_id_temp").getAttribute("center_y"),w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_mark_map(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_center_x,w_center_y,w_long,w_lat,w_zoom,w_width,w_height,w_class,w_info,w_attr_name,w_attr_value);break;case"type_submit_reset":atrs=return_attributes(e+"_element_submitform_id_temp"),w_act=!("none"==document.getElementById(e+"_element_resetform_id_temp").style.display),w_attr_name=atrs[0],w_attr_value=atrs[1],w_submit_title=document.getElementById(e+"_element_submitform_id_temp").value,w_reset_title=document.getElementById(e+"_element_resetform_id_temp").value,type_submit_reset(e,w_submit_title,w_reset_title,w_class,w_act,w_attr_name,w_attr_value);break;case"type_button":for(w_title=new Array,w_func=new Array,t=0,v=0,k=0;k<100;k++)document.getElementById(e+"_elementform_id_temp"+k)&&(w_title[t]=document.getElementById(e+"_elementform_id_temp"+k).value,w_func[t]=document.getElementById(e+"_elementform_id_temp"+k).getAttribute("onclick"),t++,v=k);atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_button(e,w_title,w_func,w_class,w_attr_name,w_attr_value);break;case"type_hidden":w_value=document.getElementById(e+"_elementform_id_temp").value,w_name=document.getElementById(e+"_elementform_id_temp").name,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_hidden(e,w_name,w_value,w_attr_name,w_attr_value)}void 0!==a&&(a.stopPropagation(),a.preventDefault())}function fm_add_page(){for(t=form_view_max;0<t;t--)if(document.getElementById("form_id_tempform_view"+t)){form_view=t;break}if(form_view_count=jQuery(".wdform-page-and-images").length,1==form_view_count){(a=document.createElement("span")).setAttribute("title","Edit the pagination options"),a.setAttribute("class","page_toolbar fm-ico-edit"),a.setAttribute("onclick","el_page_navigation()");var e=document.getElementById("edit_page_navigation");e.appendChild(a),document.getElementById("page_navigation").appendChild(e)}jQuery("#page_bar").removeClass("form_view_hide"),old_to_gen=form_view,form_view_max++,form_view=form_view_max,1<form_view&&jQuery(".form_id_tempform_view_img").removeClass("form_view_hide"),table=document.createElement("div"),table.setAttribute("class","wdform-page-and-images fm-form-builder"),form_tempform_view=document.createElement("div"),form_tempform_view.setAttribute("id","form_id_tempform_view"+form_view),form_tempform_view.setAttribute("page_title","Untitled Page"),form_tempform_view.setAttribute("class","wdform_page"),page_toolbar_wrap=document.createElement("div"),page_toolbar_wrap.setAttribute("id","form_id_tempform_view_img"+form_view),page_toolbar_wrap.setAttribute("class","form_id_tempform_view_img"),page_title_div=document.createElement("div"),page_title_div.setAttribute("class","wdform_page_title"),page_toolbar_wrap.appendChild(page_title_div),page_toolbar=document.createElement("div");var i=document.createElement("span");i.setAttribute("title","Show or hide the page"),i.setAttribute("class","page_toolbar fm-ico-collapse"),i.setAttribute("id","show_page_img_"+form_view),i.setAttribute("onClick",'show_or_hide("'+form_view+'"); change_show_hide_icon(this);');var a,n=document.createElement("span");n.setAttribute("title","Delete the page"),n.setAttribute("class","page_toolbar fm-ico-delete"),n.setAttribute("onclick",'remove_page("'+form_view+'")'),(a=document.createElement("span")).setAttribute("title","Edit the page"),a.setAttribute("class","page_toolbar fm-ico-edit"),a.setAttribute("onclick",'edit_page_break("'+form_view+'")'),page_toolbar.appendChild(n),page_toolbar.appendChild(a),page_toolbar.appendChild(i),page_toolbar_wrap.appendChild(page_toolbar),tr=document.createElement("div"),tr.setAttribute("class","wdform_section"),tr_page_nav=document.createElement("div"),tr_page_nav.setAttribute("valign","top"),tr_page_nav.setAttribute("class","wdform_footer"),tr_page_nav.style.width="100%",td_page_nav=document.createElement("div"),td_page_nav.style.width="100%",table_min_page_nav=document.createElement("div"),table_min_page_nav.style.width="100%",table_min_page_nav.style.display="table",tbody_min_page_nav=document.createElement("div"),tbody_min_page_nav.style.display="table-row-group",tr_min_page_nav=document.createElement("div"),tr_min_page_nav.setAttribute("id","form_id_temppage_nav"+form_view),tr_min_page_nav.style.display="table-row",table_min=document.createElement("div"),table_min.setAttribute("class","wdform_column"),table_min1=document.createElement("div"),table_min1.setAttribute("class","wdform_column"),tr.appendChild(table_min),tbody_min_page_nav.appendChild(tr_min_page_nav),table_min_page_nav.appendChild(tbody_min_page_nav),td_page_nav.appendChild(table_min_page_nav),tr_page_nav.appendChild(td_page_nav),form_tempform_view.appendChild(tr),form_tempform_view.appendChild(tr_page_nav),table.appendChild(page_toolbar_wrap),table.appendChild(form_tempform_view),document.getElementById("take").insertBefore(table,document.getElementById("add_field_cont")),form_view_element=document.getElementById("form_id_tempform_view"+form_view),form_view_element.setAttribute("next_title","Next"),form_view_element.setAttribute("next_type","text"),form_view_element.setAttribute("next_class","wdform-page-button"),form_view_element.setAttribute("next_checkable","true"),form_view_element.setAttribute("previous_title","Previous"),form_view_element.setAttribute("previous_type","text"),form_view_element.setAttribute("previous_class","wdform-page-button"),form_view_element.setAttribute("previous_checkable","false"),form_view_element.setAttribute("page_title","Untitled Page"),page_title_div.innerHTML='<span class="fm-ico-draggable"></span>Untitled Page',2==form_view_count?(generate_page_nav(form_view),generate_page_nav(old_to_gen)):generate_page_nav(form_view),all_sortable_events(),jQuery(".wdform_arrows").hide(),draggable_page_break(nextID,form_view_max),nextID="",form_view_element.scrollIntoView()}function add(e,a,d){if("type_grading"==document.getElementById("element_type").value){for(k=100;0<k&&!document.getElementById("el_items"+k);k--);m=k;var _="";for(i=0;i<=m;i++)document.getElementById("el_items"+i)&&(_=_+document.getElementById("el_items"+i).value+":");_+=document.getElementById("element_total").value,document.getElementById("editing_id").value?id=document.getElementById("editing_id").value:id=gen;var r=document.createElement("input");r.setAttribute("id",id+"_hidden_itemform_id_temp"),r.setAttribute("name",id+"_hidden_itemform_id_temp"),r.setAttribute("type","hidden"),r.setAttribute("value",_),(p=document.getElementById(id+"_element_sectionform_id_temp")).appendChild(r)}if("type_matrix"==document.getElementById("element_type").value){for(i=100;0<i&&!document.getElementById("el_rows"+i);i--);for(m=i,i=100;0<i&&!document.getElementById("el_columns"+i);i--);n=i;var o="",s="",u="",c="";for(i=1;i<=m;i++)document.getElementById("el_rows"+i)&&(o=o+document.getElementById("el_rows"+i).value+"***",u+=i+",");for(i=1;i<=n;i++)document.getElementById("el_columns"+i)&&(s=s+document.getElementById("el_columns"+i).value+"***",c+=i+",");document.getElementById("editing_id").value?id=document.getElementById("editing_id").value:id=gen;var p=document.getElementById(id+"_element_sectionform_id_temp"),f=document.createElement("input");f.setAttribute("id",id+"_hidden_rowform_id_temp"),f.setAttribute("name",id+"_hidden_rowform_id_temp"),f.setAttribute("type","hidden"),f.setAttribute("value",o);var y=document.createElement("input");y.setAttribute("id",id+"_row_idsform_id_temp"),y.setAttribute("name",id+"_row_idsform_id_temp"),y.setAttribute("type","hidden"),y.setAttribute("value",u);var h=document.createElement("input");h.setAttribute("id",id+"_hidden_columnform_id_temp"),h.setAttribute("name",id+"_hidden_columnform_id_temp"),h.setAttribute("type","hidden"),h.setAttribute("value",s);var b=document.createElement("input");b.setAttribute("id",id+"_column_idsform_id_temp"),b.setAttribute("name",id+"_column_idsform_id_temp"),b.setAttribute("type","hidden"),b.setAttribute("value",c),p.appendChild(f),p.appendChild(y),p.appendChild(h),p.appendChild(b)}if("type_section_break"==document.getElementById("element_type").value){for(form_view=0,t=form_view_max;0<t;t--)if(document.getElementById("form_id_tempform_view"+t)&&jQuery("#form_id_tempform_view"+t).is(":visible")){form_view=t;break}if(0==form_view)return void alert("The pages are closed");if(document.getElementById("editing_id").value)i=document.getElementById("editing_id").value,document.getElementById("editing_id").value="",wdform_field_in_editor=document.getElementById(i+"_element_sectionform_id_temp"),ifr_id="form_maker_editor_ifr",ifr=getIFrameDocument(ifr_id),"none"==document.getElementById("form_maker_editor").style.display?wdform_field_in_editor.innerHTML=ifr.body.innerHTML:wdform_field_in_editor.innerHTML=document.getElementById("form_maker_editor").value;else{i=gen,gen++,(L=document.createElement("div")).setAttribute("wdid",i),L.setAttribute("type","type_section_break"),L.setAttribute("class","wdform_tr_section_break"),(z=document.createElement("div")).setAttribute("id","wdform_field"+i),z.setAttribute("type","type_section_break"),z.setAttribute("class","wdform_field_section_break"),(q=document.createElement("div")).setAttribute("id","wdform_arrows"+i),q.setAttribute("class","wdform_arrows"),q.style.display="none",z.appendChild(q),L.appendChild(z),(x=document.createElement("div")).setAttribute("id",i+"_element_labelform_id_temp"),x.style.color="red",x.innerHTML="Section Break",L.appendChild(x),wdform_page=document.getElementById("form_id_tempform_view"+form_view);var g='<span class="wdform_arrows_basic wdform_arrows_container"><span id="edit_'+i+'" valign="middle" class="element_toolbar"><span title="Edit the field" class="page_toolbar fm-ico-edit" ontouchend="edit(&quot;'+i+'&quot;, event)" onclick="edit(&quot;'+i+'&quot;, event)"></span></span><span id="duplicate_'+i+'" valign="middle" class="element_toolbar"><span title="Duplicate the field" class="page_toolbar fm-ico-duplicate" ontouchend="duplicate(&quot;'+i+'&quot;, event)" onclick="duplicate(&quot;'+i+'&quot;, event)"></span></span><span id="X_'+i+'" valign="middle" align="right" class="element_toolbar"><span title="Remove the field" class="page_toolbar fm-ico-delete" onclick="remove_section_break(&quot;'+i+'&quot;)"></span></span></span>';q.innerHTML=g;var E=document.createElement("div");E.setAttribute("id",i+"_element_sectionform_id_temp"),E.setAttribute("align","left"),E.setAttribute("class","wdform_section_break"),ifr_id="form_maker_editor_ifr",ifr=getIFrameDocument(ifr_id),"none"==document.getElementById("form_maker_editor").style.display?E.innerHTML=ifr.body.innerHTML:E.innerHTML=document.getElementById("form_maker_editor").value,(I=document.createElement("span")).setAttribute("id",i+"_element_labelform_id_temp"),I.innerHTML="Custom HTML"+i,I.style.cssText="display:none",z.appendChild(E),beforeTr=wdform_page.lastChild,wdform_page.insertBefore(L,beforeTr),wdform_section_new=document.createElement("div"),wdform_section_new.setAttribute("class","wdform_section"),wdform_column_new=document.createElement("div"),wdform_column_new.setAttribute("class","wdform_column"),wdform_column_new1=document.createElement("div"),wdform_column_new1.setAttribute("class","wdform_column"),wdform_section_new.appendChild(wdform_column_new1),draggable_section_break(nextID,L),nextID="",j=2}return jQuery(".wdform_arrows").hide(),close_window(),void all_sortable_events()}if("type_page_navigation"==document.getElementById("element_type").value)return document.getElementById("pages").setAttribute("show_title",document.getElementById("el_show_title_input").checked),document.getElementById("pages").setAttribute("show_numbers",document.getElementById("el_show_numbers_input").checked),document.getElementById("el_pagination_steps").checked?(document.getElementById("pages").setAttribute("type","steps"),make_page_steps_front()):document.getElementById("el_pagination_percentage").checked?(document.getElementById("pages").setAttribute("type","percentage"),make_page_percentage_front()):(document.getElementById("pages").setAttribute("type","none"),make_page_none_front()),refresh_page_numbers(),void close_window();if("type_page_break"==document.getElementById("element_type").value&&document.getElementById("editing_id").value){i=document.getElementById("editing_id").value,form_view_element=document.getElementById("form_id_tempform_view"+i),page_title=document.getElementById("_div_between").getAttribute("page_title"),next_title=document.getElementById("_div_between").getAttribute("next_title"),next_type=document.getElementById("_div_between").getAttribute("next_type"),next_class=document.getElementById("_div_between").getAttribute("next_class"),next_checkable=document.getElementById("_div_between").getAttribute("next_checkable"),previous_title=document.getElementById("_div_between").getAttribute("previous_title"),previous_type=document.getElementById("_div_between").getAttribute("previous_type"),previous_class=document.getElementById("_div_between").getAttribute("previous_class"),previous_checkable=document.getElementById("_div_between").getAttribute("previous_checkable"),form_view_element.setAttribute("next_title",next_title),form_view_element.setAttribute("next_type",next_type),form_view_element.setAttribute("next_class",next_class),form_view_element.setAttribute("next_checkable",next_checkable),form_view_element.setAttribute("previous_title",previous_title),form_view_element.setAttribute("previous_type",previous_type),form_view_element.setAttribute("previous_class",previous_class),form_view_element.setAttribute("previous_checkable",previous_checkable),form_view_element.setAttribute("page_title",page_title),document.getElementById("form_id_tempform_view_img"+i).firstChild.innerHTML='<span class="fm-ico-draggable"></span>'+page_title;var A=document.getElementById("_div_between");for(atr=A.attributes,v=0;v<30;v++)atr[v]&&0==atr[v].name.indexOf("add_")&&form_view_element.setAttribute(atr[v].name,atr[v].value);return form_view_count=jQuery(".wdform-page-and-images").length,1!=form_view_count&&generate_page_nav(form_view),sortable_columns(),jQuery(".wdform_arrows").hide(),void close_window()}for(form_view=0,t=form_view_max;0<t;t--)if(document.getElementById("form_id_tempform_view"+t)&&jQuery("#form_id_tempform_view"+t).is(":visible")){form_view=t;break}if(0!=form_view){if(document.getElementById("editing_id").value||0!=e||!fm_check_something_really_important(e)){if("block"==document.getElementById("main_editor").style.display){if(document.getElementById("editing_id").value)i=document.getElementById("editing_id").value,document.getElementById("editing_id").value="",destroyChildren(z=document.getElementById("wdform_field"+i)),ifr_id="form_maker_editor_ifr",ifr=getIFrameDocument(ifr_id),"none"==document.getElementById("form_maker_editor").style.display?z.innerHTML=ifr.body.innerHTML:z.innerHTML=document.getElementById("form_maker_editor").value,j=2;else{var x;i=gen,gen++,(x=document.createElement("option")).setAttribute("id",i+"_sel_el_pos"),x.setAttribute("value",i),x.innerHTML="Custom HTML"+i,l=document.getElementById("form_id_tempform_view"+form_view).childNodes.length,wdform_column=document.getElementById("form_id_tempform_view"+form_view).childNodes[l-2].firstChild,(L=document.createElement("div")).setAttribute("wdid",i),L.setAttribute("class","wdform_row ui-sortable-handle"),(z=document.createElement("div")).setAttribute("id","wdform_field"+i),z.setAttribute("type","type_editor"),z.setAttribute("class","wdform_field"),z.style.cssText="margin-top:0px",(q=document.createElement("div")).setAttribute("id","wdform_arrows"+i),q.setAttribute("class","wdform_arrows"),q.style.display="none",L.appendChild(z),L.appendChild(q);var I;g='<span class="wdform_arrows_advanced wdform_arrows_container"><span id="left_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field to the left" class="page_toolbar dashicons dashicons-arrow-left-alt" onclick="left_row(&quot;'+i+'&quot;)"></span></span><span id="up_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field up" class="page_toolbar dashicons dashicons-arrow-up-alt" onclick="up_row(&quot;'+i+'&quot;)"></span></span><span id="down_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field down" class="page_toolbar dashicons dashicons-arrow-down-alt" onclick="down_row(&quot;'+i+'&quot;)"></span></span><span id="right_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field to the right" class="page_toolbar dashicons dashicons-arrow-right-alt" onclick="right_row(&quot;'+i+'&quot;)"></span></span><span id="page_up_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field to the upper page" class="page_toolbar dashicons dashicons-upload" onclick="page_up(&quot;'+i+'&quot;)"></span></span><span id="page_down_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field to the lower page" class="page_toolbar dashicons dashicons-download" onclick="page_down(&quot;'+i+'&quot;)"></span></span></span><span class="wdform_arrows_basic wdform_arrows_container"><span id="edit_'+i+'" valign="middle" class="element_toolbar"><span title="Edit the field" class="page_toolbar fm-ico-edit" ontouchend="edit(&quot;'+i+'&quot;, event)" onclick="edit(&quot;'+i+'&quot;, event)"></span></span><span id="duplicate_'+i+'" valign="middle" class="element_toolbar"><span title="Duplicate the field" class="page_toolbar fm-ico-duplicate" ontouchend="duplicate(duplicate(&quot;'+i+'&quot;, event))" onclick="duplicate(&quot;'+i+'&quot;, event)"></span></span><span id="X_'+i+'" valign="middle" align="right" class="element_toolbar"><span title="Remove the field" class="page_toolbar fm-ico-delete" ontouchend="remove_field(&quot;'+i+'&quot;, event)" onclick="remove_field(&quot;'+i+'&quot;, event)"></span></span></span>';q.innerHTML=g,ifr_id="form_maker_editor_ifr",ifr=getIFrameDocument(ifr_id),"none"==document.getElementById("form_maker_editor").style.display?z.innerHTML=ifr.body.innerHTML:z.innerHTML=document.getElementById("form_maker_editor").value,(I=document.createElement("span")).setAttribute("id",i+"_element_labelform_id_temp"),I.innerHTML="Custom HTML"+i,I.style.color="red",L.appendChild(I),add_field_in_position(nextID,L),nextID="",j=2}close_window()}else if(document.getElementById("show_table").innerHTML){if(document.getElementById("editing_id").value?i=document.getElementById("editing_id").value:i=gen,type=document.getElementById("element_type").value,"type_hidden"==type&&""==document.getElementById(i+"_elementform_id_temp").name)return void alert("The name of the field is required.");if("type_map"==type){if(void 0===gmapdata[i]||void 0===gmapdata[i].getCenter())return alert("Please go to Global Options to setup the Map API key. It may take up to 5 minutes for API key change to take effect."),!1;if_gmap_updateMap(i)}if("type_mark_map"==type){if(void 0===gmapdata[i]||void 0===gmapdata[i].getCenter())return alert("Please go to Global Options to setup the Map API key. It may take up to 5 minutes for API key change to take effect."),!1;if_gmap_updateMap(i)}if(!document.getElementById(i+"_element_labelform_id_temp").innerHTML)return void alert("The field label is required.");if(document.getElementById("editing_id").value){for(Disable(),i=document.getElementById("editing_id").value,in_lab=!1,labels_array=new Array,w=0;w<gen;w++)w!=i&&document.getElementById(w+"_element_labelform_id_temp")&&labels_array.push(document.getElementById(w+"_element_labelform_id_temp").innerHTML);for(t=0;t<labels_array.length;t++)if(document.getElementById(i+"_element_labelform_id_temp").innerHTML==labels_array[t]){in_lab=!0;break}if(in_lab)return void alert("Sorry, the labels must be unique.");document.getElementById("editing_id").value="",z=document.getElementById("wdform_field"+i),q=document.getElementById("wdform_arrows"+i),destroyChildren(z);var C=document.getElementById(i+"_label_sectionform_id_temp"),B=document.getElementById(i+"_element_sectionform_id_temp");if(z.appendChild(q),z.appendChild(C),z.appendChild(B),"type_submitter_mail"==type||"type_password"==type){var Q=document.createElement("br"),T=document.getElementById(i+"_1_label_sectionform_id_temp"),M=document.getElementById(i+"_1_element_sectionform_id_temp");z.appendChild(Q),z.appendChild(T),z.appendChild(M)}j=2,close_window(),call(i,e)}else{for(i=gen,in_lab=!1,labels_array=new Array,w=0;w<gen;w++)document.getElementById(w+"_element_labelform_id_temp")&&labels_array.push(document.getElementById(w+"_element_labelform_id_temp").innerHTML);for(t=0;t<labels_array.length;t++)if(document.getElementById(i+"_element_labelform_id_temp").innerHTML==labels_array[t]){in_lab=!0;break}if(in_lab)return void alert("Sorry, the labels must be unique.");var L,z,q;"type_address"==type?gen+=6:gen++,l=document.getElementById("form_id_tempform_view"+form_view).childNodes.length,wdform_column=document.getElementById("form_id_tempform_view"+form_view).childNodes[l-2].firstChild,(L=document.createElement("div")).setAttribute("wdid",i),L.setAttribute("class","wdform_row ui-sortable-handle"),(z=document.createElement("div")).setAttribute("id","wdform_field"+i),z.setAttribute("type",type),z.setAttribute("class","wdform_field"),z.style.display="table-cell",(q=document.createElement("div")).setAttribute("id","wdform_arrows"+i),q.setAttribute("class","wdform_arrows"),q.style.display="none",L.appendChild(q),L.appendChild(z);g='<span class="wdform_arrows_advanced wdform_arrows_container"><span id="left_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field to the left" class="page_toolbar dashicons dashicons-arrow-left-alt" onclick="left_row(&quot;'+i+'&quot;)"></span></span><span id="up_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field up" class="page_toolbar dashicons dashicons-arrow-up-alt" onclick="up_row(&quot;'+i+'&quot;)"></span></span><span id="down_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field down" class="page_toolbar dashicons dashicons-arrow-down-alt" onclick="down_row(&quot;'+i+'&quot;)"></span></span><span id="right_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field to the right" class="page_toolbar dashicons dashicons-arrow-right-alt" onclick="right_row(&quot;'+i+'&quot;)"></span></span><span id="page_up_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field to the upper page" class="page_toolbar dashicons dashicons-upload" onclick="page_up(&quot;'+i+'&quot;)"></span></span><span id="page_down_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field to the lower page" class="page_toolbar dashicons dashicons-download" onclick="page_down(&quot;'+i+'&quot;)"></span></span></span><span class="wdform_arrows_basic wdform_arrows_container"><span id="edit_'+i+'" valign="middle" class="element_toolbar"><span title="Edit the field" class="page_toolbar fm-ico-edit" ontouchend="edit(&quot;'+i+'&quot;, event)" onclick="edit(&quot;'+i+'&quot;, event)"></span></span>'+("type_captcha"!=type&&"type_arithmetic_captcha"!=type&&"type_recaptcha"!=type&&"type_send_copy"!=type&&"type_stripe"!=type?'<span id="duplicate_'+i+'" valign="middle" class="element_toolbar"><span title="Duplicate the field" class="page_toolbar fm-ico-duplicate" ontouchend="duplicate(&quot;'+i+'&quot;, event)" onclick="duplicate(&quot;'+i+'&quot;, event)"></span></span>':"")+'<span id="X_'+i+'" valign="middle" align="right" class="element_toolbar"><span title="Remove the field" class="page_toolbar fm-ico-delete" ontouchend="remove_field(&quot;'+i+'&quot;, event)" onclick="remove_field(&quot;'+i+'&quot;, event)"></span></span></span>';q.innerHTML=g;C=document.getElementById(i+"_label_sectionform_id_temp"),B=document.getElementById(i+"_element_sectionform_id_temp");if(z.appendChild(C),z.appendChild(B),"type_submitter_mail"==type||"type_password"==type){Q=document.createElement("br"),T=document.getElementById(i+"_1_label_sectionform_id_temp"),M=document.getElementById(i+"_1_element_sectionform_id_temp");z.appendChild(Q),z.appendChild(T),z.appendChild(M)}add_field_in_position(nextID,L),nextID="",j=2,close_window(),call(i,e)}}else alert("Please select an element to add.");jQuery(".wdform_arrows_advanced").hide(),jQuery(".wdform_page input[type='text'], .wdform_page input[type='password'], .wdform_page input[type='file'], .wdform_page textarea, .wdform_page input[type='checkbox'], .wdform_page input[type='radio'], .wdform_page select").prop("disabled",!0),all_sortable_events()}}else alert("The pages are closed")}function move_submit_to_end(e){var t=jQuery(e).children(":not(.fm-hidden)").last();return!!t.find("[type=type_submit_reset]").length&&t}function add_field_in_position(e,t){if(null==e||""==e){var i=jQuery("#cur_column");if(1==i.val()){var a=jQuery('<div class="wdform_column"></div>').append(t),n=move_submit_to_end(i);!1!==n?jQuery(a).insertBefore(n):i.append(a)}else i.append(t)}else beforeTr=document.getElementById("wdform_field"+e).parentNode,wdform_column=beforeTr.parentNode,wdform_column.insertBefore(t,beforeTr);jQuery(window).scrollTop(jQuery(t).offset().top-100),jQuery("#cur_column").removeAttr("id")}function draggable_page_break(e,t){var i=jQuery(".wdform_row[wdid='"+e+"']"),a="form_id_tempform_view"+t;if(!(null==e||""==e||2<get_child_count())){var n=jQuery("#cur_column").parent().parent().attr("id"),l=parseInt(n.substr(n.indexOf("form_id_tempform_view")+21));if(2==t)jQuery("#form_id_tempform_view"+t+" .wdform_section .wdform_column:first-child").append(jQuery(i.nextAll().andSelf()));else if(n==a)jQuery("#form_id_tempform_view"+t+" .wdform_section .wdform_column:first-child").append(jQuery(i.nextAll().andSelf()));else{for(var d=t-l,_=t,r=1;r<d;r++)jQuery("#form_id_tempform_view"+_+" .wdform_section .wdform_column:first-child").append(jQuery("#form_id_tempform_view"+(_-1)+" .wdform_section .wdform_column:first-child .wdform_row")),_--;jQuery("#form_id_tempform_view"+_+" .wdform_section .wdform_column:first-child").append(jQuery(i.nextAll().andSelf()))}jQuery("#cur_column").removeAttr("id")}}function get_child_count(){var e=document.getElementById("cur_column").parentNode;return child=e.children,child.length}function draggable_section_break(e,t){if(null==e||""==e)return beforeTr=wdform_page.lastChild,void wdform_page.insertBefore(wdform_section_new,beforeTr);if(2<get_child_count())return beforeTr=wdform_page.lastChild,void wdform_page.insertBefore(wdform_section_new,beforeTr);beforeTr=document.getElementById("wdform_field"+e).parentNode,wdform_column=beforeTr.parentNode,wdform_section=wdform_column.parentNode,wdform_column.insertBefore(t,beforeTr);var a=jQuery("#cur_column").find("[wdid='"+i+"']");jQuery("<div class='wdform_section curr'><div class='wdform_column ui-sortable'>").insertAfter(a.parent().parent()).append(a.nextAll().andSelf()),jQuery(".wdform_section .wdform_tr_section_break").each(function(){jQuery(this).insertBefore(jQuery(this).parent())}),jQuery("#cur_column").removeAttr("id"),jQuery(".curr").children().appendTo(".curr .wdform_column"),jQuery(".curr").append("<div class='wdform_column ui-sortable'></div>"),jQuery(".curr").removeClass("curr")}function call(e,t){need_enable=!1,after_edit=!1,0==t&&(after_edit=!0,edit(e),add("1",after_edit,e)),need_enable=!0}function popup_ready(){jQuery(".popup-title").html(form_maker.add_field),jQuery("#add-button-cont").html(""),jQuery("#field_container .fm-free-message").addClass("fm-hidden"),jQuery(".field-types-filter").val(""),filter(jQuery(".field-types-filter")),jQuery(".field_types .postbox button.wd-button").removeClass("button-primary"),jQuery(".field_types").show(),jQuery("#field_container").removeClass("field_container_full"),jQuery(".add-popup").slideToggle(200)}function close_window(){need_enable&&popup_ready(),need_enable=!0,document.getElementById("edit_table").innerHTML="",document.getElementById("show_table").innerHTML="",document.getElementById("main_editor").style.display="none",document.getElementById("form_maker_editor_ifr")&&(ifr_id="form_maker_editor_ifr",ifr=getIFrameDocument(ifr_id),ifr.body.innerHTML=""),document.getElementById("form_maker_editor").value="",document.getElementById("editing_id").value="",document.getElementById("element_type").value=""}function addRow(e,t,i,a){if(jQuery(".field_types .postbox button.wd-button").removeClass("button-primary"),jQuery(t).addClass("button-primary"),void 0===a)a="";document.getElementById("show_table").innerHTML&&(document.getElementById("show_table").innerHTML="",document.getElementById("edit_table").innerHTML="");var n=""==jQuery("#editing_id").val()?gen:jQuery("#editing_id").val();window["el_"+i](a,n),fm_add_field_button(t,a)}function fm_add_field_button(e,t){jQuery(e).hasClass("wd-pro-fields")&&"stripe"!=t?(jQuery("#edit_main_table input").attr("disabled","disabled"),jQuery("#edit_main_table textarea").attr("disabled","disabled"),jQuery("#edit_main_table .fm-input-container span.dashicons").attr("onclick",""),jQuery("#add-button-cont").removeClass("add-button-cont").html(""),jQuery("#premium_message").removeClass("fm-hidden"),jQuery("#stripe_message").addClass("fm-hidden"),jQuery("#field_container .popup-body-col").addClass("fm-opacity-40")):"stripe"!=t||0!=is_addon_stripe_active&&0!=is_stripe_enabled?(jQuery("#add-button-cont").addClass("add-button-cont").html('<button class="button button-primary button-hero wd-add-button" onclick="add(0, false); return false;">'+form_maker.add+"</button>"),jQuery("#premium_message").addClass("fm-hidden"),jQuery("#stripe_message").addClass("fm-hidden"),jQuery("#field_container .popup-body-col").removeClass("fm-opacity-40")):(jQuery("#edit_main_table input").attr("disabled","disabled"),jQuery("#edit_main_table textarea").attr("disabled","disabled"),jQuery("#edit_main_table .fm-input-container span.dashicons").attr("onclick",""),jQuery(e).hasClass("wd-pro-fields")||0!=is_stripe_enabled||1!=is_addon_stripe_active?(jQuery("#add-button-cont").removeClass("add-button-cont").html(""),jQuery("#premium_message").addClass("fm-hidden"),jQuery("#stripe_message").removeClass("fm-hidden"),jQuery("#field_container .popup-body-col").addClass("fm-opacity-40")):(jQuery("#add-button-cont").removeClass("add-button-cont").html('<div class="error"><p>'+form_maker.stripe3+"</p></div>"),jQuery("#premium_message").addClass("fm-hidden"),jQuery("#stripe_message").addClass("fm-hidden"),jQuery("#field_container .popup-body-col").removeClass("fm-opacity-40")))}function el_text(e,t){window["go_to_type_"+e](t)}function el_checkbox(e,t){w_choices=["option 1","option 2"],w_choices_checked=[!1,!1],w_choices_value=["option 1","option 2"],w_choices_params=["",""],w_attr_name=[],w_attr_value=[],type_checkbox(t,"Multiple Choice","","top","right","no","ver",w_choices,w_choices_checked,"1","no","no","no","0","",w_attr_name,w_attr_value,"no",w_choices_value,w_choices_params)}function el_radio(e,t){w_choices=["option 1","option 2"],w_choices_checked=[!1,!1],w_choices_value=["option 1","option 2"],w_choices_params=["",""],w_attr_name=[],w_attr_value=[],type_radio(t,"Single Choice","","top","right","no","ver",w_choices,w_choices_checked,"1","no","no","no","0","",w_attr_name,w_attr_value,"no",w_choices_value,w_choices_params)}function el_survey(e,t){window["go_to_type_"+e](t)}function el_time_and_date(e,t){window["go_to_type_"+e](t)}function el_select(e,t){window["go_to_type_"+e](t)}function el_file_upload(e,t){w_attr_name=[],w_attr_value=[],type_file_upload(t,"Upload a File","","top","no","form-maker","jpg, jpeg, png, gif, bmp, tif, tiff, svg, pdf, txt, log, doc, docx, csv, xls, xlsx, pps, ppt, pptx, xml, mp3, mp4, wma, wav, mpg, wmv","2000","no","no","",w_attr_name,w_attr_value)}function el_section_break(e,t){type_section_break(t,"<div class='wdform-section-break-div' style='min-width: 300px; border-top:1px solid'></div>")}function el_page_break(e,t){w_page_title="Untitled Page",w_title=["Next","Previous"],w_type=["text","text"],w_class=["wdform-page-button","wdform-page-button"],w_check=["true","false"],w_attr_name=[],w_attr_value=[],type_page_break("0",w_page_title,w_title,w_type,w_class,w_check,w_attr_name,w_attr_value)}function el_map(e,t){w_long=["2.294254"],w_lat=["48.858334"],w_info=[""],w_attr_name=[],w_attr_value=[],type_map(t,"2.294254","48.858334",w_long,w_lat,"13","370","300","wdform_map",w_info,w_attr_name,w_attr_value)}function el_paypal(e,t){window["go_to_type_"+e](t)}function el_captcha(e,t){document.getElementById("_wd_captchaform_id_temp")||document.getElementById("_wd_arithmetic_captchaform_id_temp")||document.getElementById("wd_recaptchaform_id_temp")?alert(form_maker.captcha_created):window["go_to_type_"+e](t)}function el_button(e,t){window["go_to_type_"+e](t)}function el_editor(e,t){type_editor(t,"")}function create_option_container(e,t,i,a){var n=jQuery('<div class="fm-option-container"'+(void 0!==i?' id="'+i+'"':"")+(0==a?' style="display: none;"':"")+"></div>");if(null!=e){var l=jQuery('<div class="fm-label-container"></div>');l.append(e),n.append(l)}if(null!=t){var d=jQuery('<div class="fm-input-container'+(null==e?" fm-width-100":"")+'"></div>');d.append(t),n.append(d)}return n}function create_advanced_options_container(e,t,i){var a=jQuery("<div"+(null!=t?' id="'+t+'"':"")+' class="postbox closed"'+(0==i?' style="display: none;"':"")+"></div>"),n=jQuery('<button class="handlediv" type="button" aria-expanded="true" onclick="fm_toggle_postbox(this);"><span class="screen-reader-text">Toggle panel</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle ui-sortable-handle" onclick="fm_toggle_postbox(this);"><span>Advanced options</span></h2>');return a.append(n),a.append(e),a}function create_field_type(e){return create_option_container(null,jQuery('<span class="fm-field-label">'+jQuery(".wd-button[data-type="+e+"]").first().text()+"</span>"))}function create_label(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_label">Label</label>'),jQuery('<textarea class="fm-width-100" id="edit_for_label" rows="4" onKeyUp="change_label(\''+e+"_element_labelform_id_temp', this.value)\">"+t+"</textarea>"))}function change_label(e,t,i){t=(t=t.replace(/(<([^>]+)>)/gi,"")).replace(/"/g,"&quot;"),i?document.getElementById(i).innerHTML=t:(document.getElementById(e).innerHTML=t,document.getElementById(e).value=t)}function create_label_position(e,t){var i=jQuery('<label class="fm-field-label">Label position</label>'),a=jQuery('<input type="radio" id="edit_for_label_position_left" name="edit_for_label_position" onchange="label_left('+e+')"'+("top"==t?"":' checked="checked"')+" />"),n=jQuery('<label for="edit_for_label_position_left">Left</label>'),l=jQuery('<input type="radio" id="edit_for_label_position_top" name="edit_for_label_position" onchange="label_top('+e+')"'+("top"==t?' checked="checked"':"")+" />"),d=jQuery('<label for="edit_for_label_position_top">Top</label>'),_=a;return create_option_container(i,_=(_=(_=_.add(n)).add(l)).add(d))}function create_label_position_stripe(e,t){var i=jQuery('<label class="fm-field-label">Label position</label>'),a=jQuery('<input type="radio" id="edit_for_label_position_left" name="edit_for_label_position" onchange="label_left_stripe('+e+')"'+("top"==t?"":' checked="checked"')+" />"),n=jQuery('<label for="edit_for_label_position_left">Left</label>'),l=jQuery('<input type="radio" id="edit_for_label_position_top" name="edit_for_label_position" onchange="label_top_stripe('+e+')"'+("top"==t?' checked="checked"':"")+" />"),d=jQuery('<label for="edit_for_label_position_top">Top</label>'),_=a;return create_option_container(i,_=(_=(_=_.add(n)).add(l)).add(d))}function label_left(e){"no"==document.getElementById(e+"_hide_labelform_id_temp").value?document.getElementById(e+"_label_sectionform_id_temp").style.display="table-cell":document.getElementById(e+"_label_sectionform_id_temp").style.display="none",document.getElementById(e+"_element_sectionform_id_temp").style.display="table-cell",document.getElementById(e+"_1_label_sectionform_id_temp")&&("yes"==document.getElementById(e+"_verification_id_temp").value?(document.getElementById(e+"_1_label_sectionform_id_temp").style.display=document.getElementById(e+"_label_sectionform_id_temp").style.display,document.getElementById(e+"_1_element_sectionform_id_temp").style.display=document.getElementById(e+"_element_sectionform_id_temp").style.display):(document.getElementById(e+"_1_label_sectionform_id_temp").style.display="none",document.getElementById(e+"_1_element_sectionform_id_temp").style.display="none"))}function label_top(e){"no"==document.getElementById(e+"_hide_labelform_id_temp").value?(document.getElementById(e+"_label_sectionform_id_temp").style.display="block",document.getElementById(e+"_element_sectionform_id_temp").style.display="block",document.getElementById(e+"_1_label_sectionform_id_temp")&&("yes"==document.getElementById(e+"_verification_id_temp").value?(document.getElementById(e+"_1_label_sectionform_id_temp").style.display=document.getElementById(e+"_label_sectionform_id_temp").style.display,document.getElementById(e+"_1_element_sectionform_id_temp").style.display=document.getElementById(e+"_element_sectionform_id_temp").style.display):(document.getElementById(e+"_1_label_sectionform_id_temp").style.display="none",document.getElementById(e+"_1_element_sectionform_id_temp").style.display="none"))):(document.getElementById(e+"_label_sectionform_id_temp").style.display="none",document.getElementById(e+"_element_sectionform_id_temp").style.display="block",document.getElementById(e+"_1_label_sectionform_id_temp")&&("yes"==document.getElementById(e+"_verification_id_temp").value?(document.getElementById(e+"_1_label_sectionform_id_temp").style.display="none",document.getElementById(e+"_1_element_sectionform_id_temp").style.display="block"):(document.getElementById(e+"_1_label_sectionform_id_temp").style.display="none",document.getElementById(e+"_1_element_sectionform_id_temp").style.display="none")))}function create_hide_label(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_hide_label">Hide label</label>'),jQuery('<input type="checkbox" id="el_hide_label" onchange="hide_label('+e+')"'+("yes"==t?' checked="checked"':"")+" />"))}function hide_label(e){"no"==document.getElementById(e+"_hide_labelform_id_temp").value?(document.getElementById(e+"_hide_labelform_id_temp").value="yes",document.getElementById(e+"_label_sectionform_id_temp").style.display="none",document.getElementById(e+"_1_elementform_id_temp")&&document.getElementById(e+"_1_elementform_id_temp").offsetParent&&(document.getElementById(e+"_1_label_sectionform_id_temp").style.display="none")):(document.getElementById("edit_for_label_position_left").checked?(document.getElementById(e+"_label_sectionform_id_temp").style.display="table-cell",document.getElementById(e+"_element_sectionform_id_temp").style.display="table-cell",document.getElementById(e+"_1_elementform_id_temp")&&document.getElementById(e+"_1_elementform_id_temp").offsetParent&&(document.getElementById(e+"_1_label_sectionform_id_temp").style.display="table-cell",document.getElementById(e+"_1_element_sectionform_id_temp").style.display="table-cell")):(document.getElementById(e+"_label_sectionform_id_temp").style.display="block",document.getElementById(e+"_element_sectionform_id_temp").style.display="block",document.getElementById(e+"_1_elementform_id_temp")&&document.getElementById(e+"_1_elementform_id_temp").offsetParent&&(document.getElementById(e+"_1_label_sectionform_id_temp").style.display="block",document.getElementById(e+"_1_element_sectionform_id_temp").style.display="block")),document.getElementById(e+"_hide_labelform_id_temp").value="no")}function create_placeholder(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_first_value_input">Placeholder</label>'),jQuery('<input type="text" class="fm-width-100" id="el_first_value_input" onKeyUp="change_input_value(this.value,\''+e+'_elementform_id_temp\')" value="'+t.replace(/"/g,"&quot;")+'" />'))}function change_input_value(e,t){input=document.getElementById(t),input.title=e,input.placeholder=e}function create_required(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_required">Required</label>'),jQuery('<input type="checkbox" id="el_required" onchange="set_required(\''+e+"_required')\""+("yes"==t?' checked="checked"':"")+" />"))}function set_required(e,t){"yes"==document.getElementById(e+"form_id_temp").value?(document.getElementById(e+"form_id_temp").setAttribute("value","no"),document.getElementById(e+"_elementform_id_temp").innerHTML="",void 0!==t&&(document.getElementById(t+"_elementform_id_temp").innerHTML="")):(document.getElementById(e+"form_id_temp").setAttribute("value","yes"),document.getElementById(e+"_elementform_id_temp").innerHTML=" *",void 0!==t&&(document.getElementById(t+"_elementform_id_temp").innerHTML=" *"))}function create_field_size(e,t,i,a){return null==i&&(i="'"+e+"_elementform_id_temp'"),create_option_container(jQuery('<label class="fm-field-label" for="edit_for_input_size">Width(px)</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_input_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style('+i+", this.value, "+a+')" value="'+t+'" /><p class="description">'+form_maker.leave_empty+"</p>"))}function create_field_label_size(e,t,i,a){return null==i&&(i="'"+e+"_label_sectionform_id_temp'"),create_option_container(jQuery('<label class="fm-field-label" for="edit_for_label_size">Label width(px)</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_label_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style('+i+", this.value, "+a+')" value="'+t+'" /><p class="description">'+form_maker.leave_empty+"</p>"))}function change_w_style(e,t,i){""==t?jQuery("#"+e).css("width",t):(jQuery("#"+e).css("width",t+"px"),i&&(document.getElementById(i).style.width=t+"px"))}function change_h_style(e,t){document.getElementById(e).style.height=t+"px"}function create_readonly(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_readonly">Readonly</label>'),jQuery('<input type="checkbox" id="el_readonly" onchange="set_readonly('+e+')"'+("yes"==t?' checked="checked"':"")+" />"))}function set_readonly(e){"no"==document.getElementById(e+"_readonlyform_id_temp").value?(document.getElementById(e+"_readonlyform_id_temp").value="yes",document.getElementById(e+"_elementform_id_temp").setAttribute("readonly","readonly")):(document.getElementById(e+"_elementform_id_temp").removeAttribute("readonly"),document.getElementById(e+"_readonlyform_id_temp").value="no")}function create_unique_values(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_unique">Allow only unique values</label>'),jQuery('<input type="checkbox" id="el_unique" onchange="set_unique(\''+e+"_uniqueform_id_temp')\""+("yes"==t?' checked="checked"':"")+" />"))}function set_unique(e){"yes"==document.getElementById(e).value?document.getElementById(e).setAttribute("value","no"):document.getElementById(e).setAttribute("value","yes")}function create_regexp(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_regExp_'+e+'">Validation (RegExp.)</label>'),jQuery('<input type="checkbox" id="el_regExp_'+e+'" onchange="set_regExpStatus(\''+e+"_regExpStatus')\""+("yes"==t?' checked="checked"':"")+" />"))}function set_regExpStatus(e){jQuery("#edit_main_tr12, #edit_main_tr13, #edit_main_tr14, #edit_main_tr15").toggle(200),"yes"==document.getElementById(e+"form_id_temp").value?document.getElementById(e+"form_id_temp").setAttribute("value","no"):document.getElementById(e+"form_id_temp").setAttribute("value","yes")}function create_custom_regexp(e,t,i){return create_option_container(jQuery('<label class="fm-field-label regExp_cell" for="regExp_value'+e+'">Regular Expression</label>'),jQuery('<textarea id="regExp_value'+e+'" class="regExp_cell fm-width-100" onKeyUp="change_regExpValue('+e+", this.value , '"+e+"_regExp_valueform_id_temp', '')\">"+i+"</textarea>"),"edit_main_tr12","yes"==t)}function change_regExpValue(e,t,i,a){0<a.length?(document.getElementById("regExp_value"+e).value=a,document.getElementById(i).value=a,document.getElementById(e+"_regExp_commonform_id_temp").value=document.getElementById("common_RegExp"+e).selectedIndex):(document.getElementById(i).value=t,document.getElementById(e+"_regExp_commonform_id_temp").value=t)}function create_common_regexp(e,t,i){var a=jQuery('<label class="fm-field-label regExp_cell">Common Regular Expressions</label>'),n=jQuery('<select class="fm-width-100" id="common_RegExp'+e+'" name="common_RegExp'+e+'" onChange="change_regExpValue('+e+", ' + w_regExp_value + ', '"+e+"_regExp_valueform_id_temp', this.value)\"></select>"),l=0,d=[];for(var _ in d.Select="",d["Name(Latin letters and some symbols)"]="^[a-zA-Z'-'\\s]+$",d["Phone Number(Digits and dashes)"]="^(\\+)?[0-9]+(-[0-9]+)?(-[0-9]+)?(-[0-9]+)?$",d["Integer Number"]="^(-)?[0-9]+$",d["Decimal Number"]="^(-)?[0-9]+(\\.[0-9]+)?$",d["Latin letters and Numbers"]="^[a-z&A-Z0-9]*$",d["Credit Card (16 Digits)"]="^([0-9](\\.)?){15}[0-9]$",d["Zip Code"]="^(\\d{5}-\\d{4}|\\d{5}|\\d{9})$|^([a-zA-Z]\\d[a-zA-Z] \\d[a-zA-Z]\\d)$",d["IP Address"]="^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})$",d["Date m/d/y (e.g. 12/21/2013)"]="^([0-9]|1[0,1,2])/([0-9]|[0,1,2][0-9]|3[0,1])/[0-9]{4}$",d["Date d.m.y (e.g. 21.12.2013)"]="^([0-9]|[0,1,2][0-9]|3[0,1])\\.([0-9]|1[0,1,2])\\.[0-9]{4}$",d["MySQL Date Format (2013-12-21)"]="^\\d{4}-(0[0-9]|1[0,1,2])-([0,1,2][0-9]|3[0,1])$",d)if(d.hasOwnProperty(_)){var r=jQuery('<option id="edit_for_label_common'+l+'" value="'+d[_]+'"'+(i==l?' selected="selected"':"")+">"+_+"</option>");n.append(r),l++}return create_option_container(a,n,"edit_main_tr13","yes"==t)}function create_case_sensitive(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="el_regArg_'+e+'">Case Insensitive</label>'),jQuery('<input type="checkbox" id="el_regArg_'+e+'" onchange="set_regExpArgument(\''+e+"_regArgument')\""+("i"==i?' checked="checked"':"")+" />"),"edit_main_tr14","yes"==t)}function set_regExpArgument(e){document.getElementById(e+"form_id_temp").value.length<=0?document.getElementById(e+"form_id_temp").setAttribute("value","i"):document.getElementById(e+"form_id_temp").setAttribute("value","")}function create_alert_message(e,t,i){return create_option_container(jQuery('<label class="fm-field-label regExp_cell" for="regExp_alert'+e+'">Alert Message</label>'),jQuery('<textarea id="regExp_alert'+e+'" class="regExp_cell fm-width-100" onKeyUp="change_regExpAlert(this.value, \''+e+"_regExp_alertform_id_temp')\">"+i+"</textarea>"),"edit_main_tr15","yes"==t)}function change_regExpAlert(e,t){document.getElementById(t).value=e}function create_additional_attributes(e,t,i){var a=jQuery('<label class="fm-field-label">Additional Attributes</label>'),l=jQuery('<span class="fm-add-attribute dashicons dashicons-plus-alt" onClick="add_attr('+e+", '"+i+'\')" title="Add"></span>'),d=jQuery('<div id="attributes" class="fm-width-100"></div>'),_=jQuery('<div idi="0" class="fm-width-100"><div class="fm-header-label fm-width-45">Name</div><div class="fm-header-label fm-width-45">Value</div><div></div></div>');for(d.append(_),d.hide(),n=t.length,j=1;j<=n;j++){var r=jQuery('<div idi="'+j+'" id="attr_row_'+j+'" class="fm-width-100"><div class="fm-table-col fm-width-45"><input type="text" class="fm-field-choice" id="attr_name'+j+'" value="'+t[j-1]+'" onChange="change_attribute_name(\''+e+"', this, '"+i+'\')" /></div><div class="fm-table-col fm-width-45"><input type="text" class="fm-field-choice" id="attr_value'+j+'" value="'+w_attr_value[j-1]+'" onChange="change_attribute_value('+e+", "+j+", '"+i+'\')" /></div><div class="fm-table-col"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_choices'+j+'_remove" onClick="remove_attr('+j+", "+e+", '"+i+"')\"></span></div></div>");d.append(r),d.show()}var o=a;return create_option_container(null,o=(o=o.add(l)).add(d))}function add_attr(e,t){var i=jQuery("#attributes");i.show(),j=parseInt(i.children().last().attr("idi"))+1,w_attr_name="attribute",w_attr_value="value";var a=jQuery('<div idi="'+j+'" id="attr_row_'+j+'" class="fm-width-100"><div class="fm-table-col fm-width-45"><input type="text" class="fm-field-choice" id="attr_name'+j+'" value="'+w_attr_name+'" onChange="change_attribute_name(\''+e+"', this, '"+t+'\')" /></div><div class="fm-table-col fm-width-45"><input type="text" class="fm-field-choice" id="attr_value'+j+'" value="'+w_attr_value+'" onChange="change_attribute_value('+e+", "+j+", '"+t+'\')" /></div><div class="fm-table-col"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_choices'+j+'_remove" onClick="remove_attr('+j+", "+e+", '"+t+"')\"></span></div></div>");i.append(a),refresh_attr(e,t),jQuery("#edit_table").scrollTop(jQuery("#attributes").offset().top)}function change_attribute_name(e,t,i){if(value=t.value,value)if("style"!=value.toLowerCase())if(value!=parseInt(value)){if(-1!=value.indexOf(" ")){return value=value.replace(/\s+/g,""),t.value=value,alert("The name of the attribute cannot contain a space."),void refresh_attr(e,i)}refresh_attr(e,i)}else alert("The name of the attribute cannot be a number.");else alert('Sorry, you cannot add a style attribute here. Use "Class name" instead.');else alert("The name of the attribute is required.")}function change_attribute_value(e,t,i){document.getElementById("attr_name"+t).value?"style"!=document.getElementById("attr_name"+t).value.toLowerCase()?refresh_attr(e,i):alert('Sorry, you cannot add a style attribute here. Use "Class name" instead.'):alert("The name of the attribute is required.")}function remove_attr(e,t,i){tr=jQuery("#attr_row_"+e),table=jQuery("#attributes"),tr.remove(),1==table.children().length&&table.hide(),refresh_attr(t,i)}function refresh_attr(e,t){switch(t){case"type_text":case"type_paypal_price_new":case"type_star_rating":case"type_scale_rating":case"type_spinner":case"type_slider":case"type_grading":case"type_matrix":id_array=Array(),id_array[0]=e+"_elementform_id_temp";break;case"type_paypal_price":id_array=Array(),id_array[0]=e+"_element_dollarsform_id_temp",id_array[1]=e+"_element_centsform_id_temp";break;case"type_range":id_array=Array(),id_array[0]=e+"_elementform_id_temp0",id_array[1]=e+"_elementform_id_temp1";break;case"type_name":id_array=Array(),id_array[0]=e+"_element_firstform_id_temp",id_array[1]=e+"_element_lastform_id_temp",id_array[2]=e+"_element_titleform_id_temp",id_array[3]=e+"_element_middleform_id_temp";break;case"type_address":id_array=Array(),id_array[0]=e+"_street1form_id_temp",id_array[1]=e+"_street2form_id_temp",id_array[2]=e+"_cityform_id_temp",id_array[3]=e+"_stateform_id_temp",id_array[4]=e+"_postalform_id_temp",id_array[5]=e+"_countryform_id_temp";break;case"type_checkbox":case"type_radio":for(id_array=Array(),z=0;z<50;z++)id_array[z]=e+"_elementform_id_temp"+z;break;case"type_time":id_array=Array(),id_array[0]=e+"_hhform_id_temp",id_array[1]=e+"_mmform_id_temp",id_array[2]=e+"_ssform_id_temp",id_array[3]=e+"_am_pmform_id_temp";break;case"type_date":id_array=Array(),id_array[0]=e+"_elementform_id_temp",id_array[1]=e+"_buttonform_id_temp";break;case"type_date_fields":id_array=Array(),id_array[0]=e+"_dayform_id_temp",id_array[1]=e+"_monthform_id_temp",id_array[2]=e+"_yearform_id_temp";break;case"type_captcha":id_array=Array(),id_array[0]="_wd_captchaform_id_temp",id_array[1]="_wd_captcha_inputform_id_temp",id_array[2]="_element_refreshform_id_temp";break;case"type_arithmetic_captcha":id_array=Array(),id_array[0]="_wd_arithmetic_captchaform_id_temp",id_array[1]="_wd_arithmetic_captcha_inputform_id_temp",id_array[2]="_element_refreshform_id_temp";break;case"type_recaptcha":id_array=Array(),id_array[0]="wd_recaptchaform_id_temp";break;case"type_submit_reset":id_array=Array(),id_array[0]=e+"_element_submitform_id_temp",id_array[1]=e+"_element_resetform_id_temp";break;case"type_page_break":id_array=Array(),id_array[0]="_div_between"}for(q=0;q<id_array.length;q++){id=id_array[q];var a=document.getElementById(id);if(a){for(atr=a.attributes,i=0;i<30;i++)atr[i]&&0==atr[i].name.indexOf("add_")&&(a.removeAttribute(atr[i].name),i--);for(i=0;i<10;i++)if(document.getElementById("attr_name"+i))try{a.setAttribute("add_"+document.getElementById("attr_name"+i).value,document.getElementById("attr_value"+i).value)}catch(e){alert("Only letters, numbers, hyphens and underscores are allowed.")}}}}function return_attributes(e){attr_names=new Array,attr_values=new Array;var t=document.getElementById(e);if(t)for(atr=t.attributes,i=0;i<30;i++)atr[i]&&0==atr[i].name.indexOf("add_")&&(attr_names.push(atr[i].name.replace("add_","")),attr_values.push(atr[i].value));return Array(attr_names,attr_values)}function go_to_type_text(e){w_attr_name=[],w_attr_value=[],type_text(e,"Text","","top","no","","","","no","no","","","","Incorrect Value","no",w_attr_name,w_attr_value,"no","")}function delete_last_child(){document.getElementById("form_maker_editor_ifr")&&(ifr_id="form_maker_editor_ifr",ifr=getIFrameDocument(ifr_id),ifr.body.innerHTML=""),document.getElementById("main_editor").style.display="none",jQuery("#form_maker_editor").val(""),jQuery("#show_table").empty(),jQuery("#edit_table").empty()}function type_text(e,t,i,a,n,l,d,_,r,o,m,s,u,c,p,f,y,h,b){jQuery("#element_type").val("type_text"),delete_last_child();var v=jQuery("#edit_table"),w=jQuery('<div id="edit_div"></div>');v.append(w);var g=jQuery('<div id="edit_main_table"></div>');w.append(g),g.append(create_field_type("type_text")),g.append(create_label(e,t)),g.append(create_label_position(e,a)),g.append(create_hide_label(e,n)),g.append(create_required(e,r)),g.append(create_placeholder(e,_)),g.append(create_field_size(e,l));var E=jQuery('<div class="inside"></div>');g.append(create_advanced_options_container(E)),E.append(create_field_label_size(e,i)),E.append(create_readonly(e,h)),E.append(create_unique_values(e,p)),E.append(create_regexp(e,o)),E.append(create_common_regexp(e,o,s)),E.append(create_custom_regexp(e,o,m)),E.append(create_case_sensitive(e,o,u)),E.append(create_alert_message(e,o,c)),E.append(create_class(e,b)),E.append(create_additional_attributes(e,f,"type_text")),element="input",cur_type="text";var A=document.createElement("input");A.setAttribute("type","hidden"),A.setAttribute("value","type_text"),A.setAttribute("name",e+"_typeform_id_temp"),A.setAttribute("id",e+"_typeform_id_temp");var j=document.createElement("input");j.setAttribute("type","hidden"),j.setAttribute("value",r),j.setAttribute("name",e+"_requiredform_id_temp"),j.setAttribute("id",e+"_requiredform_id_temp");var x=document.createElement("input");x.setAttribute("type","hidden"),x.setAttribute("value",h),x.setAttribute("name",e+"_readonlyform_id_temp"),x.setAttribute("id",e+"_readonlyform_id_temp");var k=document.createElement("input");k.setAttribute("type","hidden"),k.setAttribute("value",n),k.setAttribute("name",e+"_hide_labelform_id_temp"),k.setAttribute("id",e+"_hide_labelform_id_temp");var I=document.createElement("input");I.setAttribute("type","hidden"),I.setAttribute("value",p),I.setAttribute("name",e+"_uniqueform_id_temp"),I.setAttribute("id",e+"_uniqueform_id_temp");var C=document.createElement(element);C.setAttribute("type",cur_type),C.style.cssText="width:"+l+"px;",C.setAttribute("id",e+"_elementform_id_temp"),C.setAttribute("name",e+"_elementform_id_temp"),C.setAttribute("value",d),C.setAttribute("title",_),C.setAttribute("placeholder",_),"yes"==h&&C.setAttribute("readonly","readonly");var B=document.createElement("input");B.setAttribute("type","hidden"),B.setAttribute("value",o),B.setAttribute("name",e+"_regExpStatusform_id_temp"),B.setAttribute("id",e+"_regExpStatusform_id_temp");var Q=document.createElement("input");Q.setAttribute("type","hidden"),Q.setAttribute("value",u),Q.setAttribute("name",e+"_regArgumentform_id_temp"),Q.setAttribute("id",e+"_regArgumentform_id_temp");var T=document.createElement("input");T.setAttribute("type","hidden"),T.setAttribute("value",s),T.setAttribute("name",e+"_regExp_commonform_id_temp"),T.setAttribute("id",e+"_regExp_commonform_id_temp");var M=document.createElement("input");M.setAttribute("type","hidden"),M.setAttribute("value",escape(m)),M.setAttribute("name",e+"_regExp_valueform_id_temp"),M.setAttribute("id",e+"_regExp_valueform_id_temp");var L=document.createElement("input");L.setAttribute("type","hidden"),L.setAttribute("value",c),L.setAttribute("name",e+"_regExp_alertform_id_temp"),L.setAttribute("id",e+"_regExp_alertform_id_temp");var z=document.createElement("div");z.setAttribute("id","main_div");var q=document.createElement("div");q.setAttribute("id",e+"_elemet_tableform_id_temp");var H="yes"==n?"none":"table-cell",N=document.createElement("div");N.setAttribute("align","left"),N.style.cssText="display:"+H,N.style.width=i+"px",N.setAttribute("id",e+"_label_sectionform_id_temp");var S=document.createElement("div");S.setAttribute("align","left"),S.style.display="table-cell",S.setAttribute("id",e+"_element_sectionform_id_temp");var D=document.createElement("br"),P=document.createElement("span");P.setAttribute("id",e+"_element_labelform_id_temp"),P.innerHTML=t,P.setAttribute("class","label"),P.style.verticalAlign="top";var O=document.createElement("span");O.setAttribute("id",e+"_required_elementform_id_temp"),O.innerHTML="",O.setAttribute("class","required"),O.style.verticalAlign="top","yes"==r&&(O.innerHTML=" *");var K=document.getElementById("show_table");N.appendChild(P),N.appendChild(O),S.appendChild(A),S.appendChild(j),S.appendChild(x),S.appendChild(k),S.appendChild(B),S.appendChild(M),S.appendChild(T),S.appendChild(L),S.appendChild(Q),S.appendChild(I),S.appendChild(C),q.appendChild(N),q.appendChild(S),z.appendChild(q),z.appendChild(D),K.appendChild(z),jQuery("#main_div").append(form_maker.type_text_description),"top"==a&&label_top(e),change_class(b,e),refresh_attr(e,"type_text")}function create_upload_max_size(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_max_size">Maximum size(KB)</label>'),jQuery('<input type="text" class="fm-width-100" id="edit_for_max_size" onKeyPress="return check_isnum(event)" onChange="change_file_value(this.value,\''+e+"_max_size', '***max_sizeskizb"+e+"***', '***max_sizeverj"+e+'***\')" value="'+t+'" />'))}function change_file_value(e,t,i,a){void 0===i&&(a=i=""),input=document.getElementById(t),input.value=i+e+a,input.setAttribute("value",i+e+a)}function create_upload_destination(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_destination_input">Destination</label>'),jQuery('<b id="el_destination_input_info">'+upload_url.replace(fm_site_url,"")+'/</b><input type="text" class="fm-width-100" id="el_destination_input" onChange="change_file_value(this.value,\''+e+"_destination', '***destinationskizb"+e+"***', '***destinationverj"+e+'***\')" value="'+t.replace(upload_url,"")+'" />'))}function create_upload_extensions(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_extension">Allowed file extensions</label>'),jQuery('<textarea class="fm-width-100" id="edit_for_extension" rows="4" onChange="change_file_value(this.value,\''+e+"_extension', '***extensionskizb"+e+"***', '***extensionverj"+e+"***')\">"+t+"</textarea>"))}function create_class(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_style_textarea">Class name</label>'),jQuery('<input type="text" class="fm-width-100" id="el_style_textarea" onChange="change_class(this.value,'+e+')" value="'+t+'" />'))}function change_class(e,t){document.getElementById(t+"_label_sectionform_id_temp")&&document.getElementById(t+"_label_sectionform_id_temp").setAttribute("class",e),document.getElementById(t+"_element_sectionform_id_temp")&&document.getElementById(t+"_element_sectionform_id_temp").setAttribute("class",e)}function create_multiple_upload(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_multiple">Allow Uploading Multiple Files</label>'),jQuery('<input type="checkbox" id="el_multiple" onchange="set_multiple('+e+', this.checked)"'+("yes"==t?' checked="checked"':"")+" />"))}function set_multiple(e,t){t?document.getElementById(e+"_elementform_id_temp").setAttribute("multiple","multiple"):document.getElementById(e+"_elementform_id_temp").removeAttribute("multiple")}function type_file_upload(e,t,i,a,n,l,d,_,r,o,m,s,u){jQuery("#element_type").val("type_file_upload"),delete_last_child();var c=jQuery("#edit_table"),p=jQuery('<div id="edit_div"></div>');c.append(p);var f=jQuery('<div id="edit_main_table"></div>');p.append(f),f.append(create_field_type("type_file_upload")),f.append(create_label(e,t)),f.append(create_label_position(e,a)),f.append(create_hide_label(e,n)),f.append(create_required(e,r)),f.append(create_upload_extensions(e,d));var y=jQuery('<div class="inside"></div>');f.append(create_advanced_options_container(y)),y.append(create_field_label_size(e,i)),y.append(create_upload_max_size(e,_)),y.append(create_upload_destination(e,l)),y.append(create_class(e,m)),y.append(create_multiple_upload(e,o)),y.append(create_additional_attributes(e,s,"type_file_upload")),element="input",type="file";var h=document.createElement("input");h.setAttribute("type","hidden"),h.setAttribute("value","type_file_upload"),h.setAttribute("name",e+"_typeform_id_temp"),h.setAttribute("id",e+"_typeform_id_temp");var b=document.createElement("input");b.setAttribute("type","hidden"),b.setAttribute("value",r),b.setAttribute("name",e+"_requiredform_id_temp"),b.setAttribute("id",e+"_requiredform_id_temp");var v=document.createElement("input");v.setAttribute("type","hidden"),v.setAttribute("value",n),v.setAttribute("name",e+"_hide_labelform_id_temp"),v.setAttribute("id",e+"_hide_labelform_id_temp");var w=document.createElement(element);w.setAttribute("type",type),w.setAttribute("class","file_upload"),w.setAttribute("id",e+"_elementform_id_temp"),w.setAttribute("name",e+"_fileform_id_temp"),"yes"==o&&w.setAttribute("multiple","multiple");var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value","***max_sizeskizb"+e+"***"+_+"***max_sizeverj"+e+"***"),g.setAttribute("id",e+"_max_size"),g.setAttribute("name",e+"_max_size");var E=document.createElement("input");E.setAttribute("type","hidden"),E.setAttribute("value","***destinationskizb"+e+"***"+l+"***destinationverj"+e+"***"),E.setAttribute("id",e+"_destination"),E.setAttribute("name",e+"_destination");var A=document.createElement("input");A.setAttribute("type","hidden"),A.setAttribute("value","***extensionskizb"+e+"***"+d+"***extensionverj"+e+"***"),A.setAttribute("id",e+"_extension"),A.setAttribute("name",e+"_extension");var j=document.createElement("div");j.setAttribute("id","main_div");var x=document.createElement("div");x.setAttribute("id",e+"_elemet_tableform_id_temp");var k="yes"==n?"none":"table-cell",I=document.createElement("div");I.setAttribute("align","left"),I.style.display=k,I.style.width=i+"px",I.setAttribute("id",e+"_label_sectionform_id_temp");var C=document.createElement("div");C.setAttribute("align","left"),C.style.display="table-cell",C.setAttribute("id",e+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var B=document.createElement("br"),Q=(document.createElement("br"),document.createElement("span"));Q.setAttribute("id",e+"_element_labelform_id_temp"),Q.innerHTML=t,Q.setAttribute("class","label"),Q.style.verticalAlign="top";var T=document.createElement("span");T.setAttribute("id",e+"_required_elementform_id_temp"),T.innerHTML="",T.setAttribute("class","required"),T.style.verticalAlign="top","yes"==r&&(T.innerHTML=" *");var M=document.getElementById("show_table");I.appendChild(Q),I.appendChild(T),C.appendChild(v),C.appendChild(h),C.appendChild(b),C.appendChild(g),C.appendChild(E),C.appendChild(A),C.appendChild(w),x.appendChild(I),x.appendChild(C),j.appendChild(x),j.appendChild(B),M.appendChild(j),jQuery("#main_div").append(form_maker.type_file_upload_description),"top"==a&&label_top(e),change_class(m,e),refresh_attr(e,"type_text")}function go_to_type_stripe(e){if(document.getElementById("is_stripe"))return!1;type_stripe(e,"","","top","")}function type_stripe(e,t,i,a,n){jQuery("#element_type").val("type_stripe"),delete_last_child();var l=jQuery("#edit_table"),d=jQuery('<div id="edit_div"></div>');l.append(d);var _=jQuery('<div id="edit_main_table"></div>');d.append(_),_.append(create_field_type("type_stripe")),_.append(create_field_size(e,t)),_.append(create_label_position_stripe(e,a));var r=jQuery('<div class="inside"></div>');_.append(create_advanced_options_container(r)),r.append(create_field_label_size(e,i)),r.append(create_class(e,n));var o=document.createElement("input");o.setAttribute("type","hidden"),o.setAttribute("value","type_stripe"),o.setAttribute("name",e+"_typeform_id_temp"),o.setAttribute("id",e+"_typeform_id_temp");var m=document.createElement("div");m.setAttribute("id","main_div");var s=document.createElement("div");s.setAttribute("id",e+"_elemet_tableform_id_temp");var u=document.createElement("div");u.setAttribute("align","left"),u.style.display="table-cell",u.setAttribute("id",e+"_label_sectionform_id_temp"),u.style.width=i+"px";var c=document.createElement("div");c.setAttribute("align","left"),c.style.display="table-cell",c.setAttribute("id",e+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var p=document.createElement("br"),f=(document.createElement("br"),document.createElement("span"));f.setAttribute("id",e+"_element_labelform_id_temp"),f.innerHTML="stripe",f.setAttribute("class","label"),f.style.display="none";var y=document.getElementById("show_table");u.appendChild(f),c.innerHTML="<div id='"+e+"_elementform_id_temp' style='width:"+t+"px; margin:10px; border: 1px solid #000; min-width:80px;text-align:center;'> Stripe Section</div><input type='hidden' id='is_stripe' />",c.appendChild(o),s.appendChild(u),s.appendChild(c),m.appendChild(s),m.appendChild(p),y.appendChild(m),jQuery("#main_div").append(form_maker.type_stripe_description),"top"==a?label_top_stripe(e):label_left_stripe(),change_class(n,e)}function create_field_size_2(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_input_size">Size(px)</label>'),jQuery('<input type="text" class="fm-width-40" id="edit_for_input_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style(\''+e+'_elementform_id_temp\', this.value)" value="'+t+'" />x<input type="text" class="fm-width-40" id="edit_for_input_size" onKeyPress="return check_isnum(event)" onKeyUp="change_h_style(\''+e+'_elementform_id_temp\', this.value)" value="'+i+'" /><p class="description">'+form_maker.leave_empty+"</p>"))}function go_to_type_textarea(e){w_attr_name=[],w_attr_value=[],type_textarea(e,"Textarea","","top","no","","100","","","no","no","",w_attr_name,w_attr_value)}function type_textarea(e,t,i,a,n,l,d,_,r,o,m,s,u,c){jQuery("#element_type").val("type_textarea"),delete_last_child();var p=jQuery("#edit_table"),f=jQuery('<div id="edit_div"></div>');p.append(f);var y=jQuery('<div id="edit_main_table"></div>');f.append(y),y.append(create_field_type("type_textarea")),y.append(create_label(e,t)),y.append(create_label_position(e,a)),y.append(create_hide_label(e,n)),y.append(create_required(e,o)),y.append(create_placeholder(e,r)),y.append(create_field_size_2(e,l,d));var h=jQuery('<div class="inside"></div>');y.append(create_advanced_options_container(h)),h.append(create_field_label_size(e,i)),h.append(create_unique_values(e,m)),h.append(create_class(e,s)),h.append(create_additional_attributes(e,u,"type_textarea")),element="textarea";var b=document.createElement("input");b.setAttribute("type","hidden"),b.setAttribute("value","type_textarea"),b.setAttribute("name",e+"_typeform_id_temp"),b.setAttribute("id",e+"_typeform_id_temp");var v=document.createElement("input");v.setAttribute("type","hidden"),v.setAttribute("value",o),v.setAttribute("name",e+"_requiredform_id_temp"),v.setAttribute("id",e+"_requiredform_id_temp");var w=document.createElement("input");w.setAttribute("type","hidden"),w.setAttribute("value",n),w.setAttribute("name",e+"_hide_labelform_id_temp"),w.setAttribute("id",e+"_hide_labelform_id_temp");var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value",m),g.setAttribute("name",e+"_uniqueform_id_temp"),g.setAttribute("id",e+"_uniqueform_id_temp");var E=document.createElement("div");E.setAttribute("id","main_div");var A=document.createElement("div");A.setAttribute("id",e+"_elemet_tableform_id_temp");var j="yes"==n?"none":"table-cell",x=document.createElement("div");x.setAttribute("align","left"),x.style.display=j,x.style.width=i+"px",x.style.verticalAlign="top",x.setAttribute("id",e+"_label_sectionform_id_temp");var k=document.createElement("div");k.setAttribute("align","left"),k.style.display="table-cell",k.setAttribute("id",e+"_element_sectionform_id_temp");var I=document.createElement("span");I.setAttribute("id",e+"_element_labelform_id_temp"),I.innerHTML=t,I.setAttribute("class","label"),I.style.verticalAlign="top";var C=document.createElement("span");C.setAttribute("id",e+"_required_elementform_id_temp"),C.innerHTML="",C.setAttribute("class","required"),C.style.verticalAlign="top","yes"==o&&(C.innerHTML=" *");var B=document.createElement(element);B.style.cssText="width:"+l+"px; height:"+d+"px;",B.setAttribute("id",e+"_elementform_id_temp"),B.setAttribute("name",e+"_elementform_id_temp"),B.setAttribute("title",r),B.setAttribute("placeholder",r),B.setAttribute("value",_),B.innerHTML=_;var Q=document.getElementById("show_table");x.appendChild(I),x.appendChild(C),k.appendChild(b),k.appendChild(v),k.appendChild(w),k.appendChild(g),k.appendChild(B),A.appendChild(x),A.appendChild(k),E.appendChild(A),Q.appendChild(E),jQuery("#main_div").append("<br>"+form_maker.type_textarea_description),"top"==a&&label_top(e),change_class(s,e),refresh_attr(e,"type_text")}function create_spinner_width(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_spinner_width">Width(px)</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_spinner_width" onKeyPress="return check_isnum(event)" onKeyUp="change_spinner_width(this.value,'+e+",'form_id_temp')\" value=\""+t+'" /><p class="description">'+form_maker.leave_empty+"</p>"))}function change_spinner_width(e,t,i){document.getElementById(t+"_elementform_id_temp").style.cssText="width:"+e+"px",document.getElementById(t+"_spinner_widthform_id_temp").value=e}function create_spinner_step(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_spinner_step">Step</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_spinner_step" onKeyPress="return check_isnum(event)" onKeyUp="change_spinner_step(this.value,'+e+",'form_id_temp')\" value=\""+t+'" />'))}function change_spinner_step(e,t,i){jQuery("#"+t+"_elementform_id_temp").spinner({step:e}),document.getElementById(t+"_stepform_id_temp").value=e}function create_spinner_minvalue(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_spinner_min_value">Min Value</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_spinner_min_value" onKeyPress="return check_isnum_or_minus(event)" onKeyUp="change_spinner_min_value(this.value,'+e+",'form_id_temp')\" value=\""+t+'" />'))}function change_spinner_min_value(e,t,i){jQuery("#"+t+"_elementform_id_temp").spinner({min:e}),document.getElementById(t+"_min_valueform_id_temp").value=e}function create_spinner_maxvalue(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_spinner_max_value">Max Value</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_spinner_max_value" onKeyPress="return check_isnum_or_minus(event)" onKeyUp="change_spinner_max_value(this.value,'+e+",'form_id_temp')\" value=\""+t+'" />'))}function change_spinner_max_value(e,t,i){jQuery("#"+t+"_elementform_id_temp").spinner({max:e}),document.getElementById(t+"_max_valueform_id_temp").value=e}function go_to_type_spinner(e){w_attr_name=[],w_attr_value=[],type_spinner(e,"Number","","top","no","60","","","1","","no","",w_attr_name,w_attr_value)}function type_spinner(e,t,i,a,n,l,d,_,r,o,m,s,u,c){jQuery("#element_type").val("type_spinner"),delete_last_child();var p=jQuery("#edit_table"),f=jQuery('<div id="edit_div"></div>');p.append(f);var y=jQuery('<div id="edit_main_table"></div>');f.append(y),y.append(create_field_type("type_spinner")),y.append(create_label(e,t)),y.append(create_label_position(e,a)),y.append(create_hide_label(e,n)),y.append(create_required(e,m)),y.append(create_spinner_step(e,r)),y.append(create_spinner_minvalue(e,d)),y.append(create_spinner_maxvalue(e,_)),y.append(create_spinner_width(e,l));var h=jQuery('<div class="inside"></div>');y.append(create_advanced_options_container(h)),h.append(create_field_label_size(e,i)),h.append(create_class(e,s)),h.append(create_additional_attributes(e,u,"type_spinner"));var b=document.createElement("input");b.setAttribute("type","hidden"),b.setAttribute("value","type_spinner"),b.setAttribute("name",e+"_typeform_id_temp"),b.setAttribute("id",e+"_typeform_id_temp");var v=document.createElement("input");v.setAttribute("type","hidden"),v.setAttribute("value",m),v.setAttribute("name",e+"_requiredform_id_temp"),v.setAttribute("id",e+"_requiredform_id_temp");var w=document.createElement("input");w.setAttribute("type","hidden"),w.setAttribute("value",n),w.setAttribute("name",e+"_hide_labelform_id_temp"),w.setAttribute("id",e+"_hide_labelform_id_temp");var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value",l),g.setAttribute("name",e+"_spinner_widthform_id_temp"),g.setAttribute("id",e+"_spinner_widthform_id_temp");var E=document.createElement("input");E.setAttribute("type","hidden"),E.setAttribute("value",d),E.setAttribute("id",e+"_min_valueform_id_temp"),E.setAttribute("name",e+"_min_valueform_id_temp");var A=document.createElement("input");A.setAttribute("type","hidden"),A.setAttribute("value",_),A.setAttribute("name",e+"_max_valueform_id_temp"),A.setAttribute("id",e+"_max_valueform_id_temp");var j=document.createElement("input");j.setAttribute("type","hidden"),j.setAttribute("value",r),j.setAttribute("name",e+"_stepform_id_temp"),j.setAttribute("id",e+"_stepform_id_temp");var x=document.createElement("input");x.setAttribute("type",""),x.style.cssText="width:"+l+"px",x.setAttribute("name",e+"_elementform_id_temp"),x.setAttribute("id",e+"_elementform_id_temp"),x.setAttribute("value",o),x.setAttribute("onClick","check_isnum_or_minus(event)"),x.setAttribute("onKeyPress","return check_isnum_or_minus(event)");var k=document.createElement("div");k.setAttribute("id","main_div");var I=document.createElement("div");I.setAttribute("id",e+"_elemet_tableform_id_temp");var C="yes"==n?"none":"table-cell",B=document.createElement("div");B.setAttribute("align","left"),B.style.display=C,B.style.width=i+"px",B.setAttribute("id",e+"_label_sectionform_id_temp");var Q=document.createElement("div");Q.setAttribute("align","left"),Q.style.display="table-cell",Q.setAttribute("id",e+"_element_sectionform_id_temp");var T=document.createElement("br"),M=document.createElement("span");M.setAttribute("id",e+"_element_labelform_id_temp"),M.innerHTML=t,M.setAttribute("class","label");var L=document.createElement("span");L.setAttribute("id",e+"_required_elementform_id_temp"),L.innerHTML="",L.setAttribute("class","required"),"yes"==m&&(L.innerHTML=" *");var z=document.getElementById("show_table");B.appendChild(M),B.appendChild(L),Q.appendChild(w),Q.appendChild(b),Q.appendChild(v),Q.appendChild(g),Q.appendChild(E),Q.appendChild(A),Q.appendChild(j),Q.appendChild(x),I.appendChild(B),I.appendChild(Q),k.appendChild(I),k.appendChild(T),z.appendChild(k),"top"==a&&label_top(e),change_class(s,e),refresh_attr(e,"type_spinner"),jQuery("#"+e+"_elementform_id_temp").spinner();var q=jQuery("#"+e+"_elementform_id_temp").spinner();null==o&&q.spinner("value",""),jQuery("#"+e+"_elementform_id_temp").spinner({min:d}),jQuery("#"+e+"_elementform_id_temp").spinner({max:_}),jQuery("#"+e+"_elementform_id_temp").spinner({step:r}),jQuery("#main_div").append(form_maker.type_number_description)}function create_date_format(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="date_format">Date Format</label>'),jQuery('<input class="fm-width-100" type="text" id="date_format" onChange="change_date_format(this.value, '+e+", 'format')\" value=\""+t+'" />'))}function change_date_format(e,t,i){var a=document.getElementById(t+"_buttonform_id_temp");if("format"==i){document.getElementById(t+"_dis_past_daysform_id_temp").value;a.setAttribute("format",e)}else{document.getElementById(t+"_dis_past_daysform_id_temp").value=1==e?"yes":"no";e=document.getElementById("date_format").value}jQuery("[name^="+t+"_elementform_id_temp]").datepicker("option","dateFormat",e)}function create_week_start(e,t){var i=jQuery('<label class="fm-field-label">First Day of the Week</label>'),a=jQuery('<select class="fm-width-100" id="start_day" name="start_day" onChange="change_start_day(this.value,'+e+')"></select>'),n=0,l=[];for(var d in l[0]=form_maker.sunday,l[1]=form_maker.monday,l[2]=form_maker.tuesday,l[3]=form_maker.wednesday,l[4]=form_maker.thursday,l[5]=form_maker.friday,l[6]=form_maker.saturday,l)if(l.hasOwnProperty(d)){var _=jQuery('<option value="'+d+'"'+(t==n?' selected="selected"':"")+">"+l[d]+"</option>");a.append(_),n++}return create_option_container(i,a)}function change_start_day(e,t){document.getElementById(t+"_start_dayform_id_temp").value=e,jQuery("input[name^="+t+"_elementform_id_temp]").datepicker("option","firstDay",e)}function create_default_date(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="default_date">Default Date</label>'),jQuery('<input class="fm-width-100" type="text" id="default_date" onChange="change_hidden_input_value(this.value, \'default_date\', '+e+", '"+e+'_default_date_id_temp\')" value="'+t+'" />'))}function change_hidden_input_value(element_value,date_fields,id_int,id){document.getElementById(id).value=element_value,"default_date"==date_fields?"today"==element_value?jQuery("#"+id_int+"_elementform_id_temp").datepicker("setDate",new Date):(-1==element_value.indexOf("d")&&-1==element_value.indexOf("m")&&-1==element_value.indexOf("y")&&-1==element_value.indexOf("w")&&""!==element_value&&(element_value=jQuery.datepicker.formatDate(jQuery("#"+id_int+"_buttonform_id_temp").attr("format"),new Date(element_value))),jQuery("#"+id_int+"_elementform_id_temp").datepicker("setDate",element_value)):"minDate"==date_fields||"maxDate"==date_fields?"today"==element_value?jQuery("#"+id_int+"_elementform_id_temp").datepicker("option",date_fields,new Date):(-1==element_value.indexOf("d")&&-1==element_value.indexOf("m")&&-1==element_value.indexOf("y")&&-1==element_value.indexOf("w")&&""!==element_value&&(element_value=jQuery.datepicker.formatDate(jQuery("#"+id_int+"_buttonform_id_temp").attr("format"),new Date(element_value))),jQuery("#"+id_int+"_elementform_id_temp").datepicker("option",date_fields,element_value)):jQuery("#"+id_int+"_elementform_id_temp").datepicker("option","beforeShowDay",function(date){for(var invalid_dates=element_value,invalid_dates_finish=[],invalid_dates_start=invalid_dates.split(","),invalid_date_range=[],i=0;i<invalid_dates_start.length;i++)if(invalid_dates_start[i]=invalid_dates_start[i].trim(),invalid_dates_start[i].length<11)invalid_dates_finish.push(invalid_dates_start[i]);else if(4<invalid_dates_start[i].indexOf("-"))invalid_date_range.push(invalid_dates_start[i].split("-"));else{var invalid_date_array=invalid_dates_start[i].split("-"),start_invalid_day=invalid_date_array[0]+"-"+invalid_date_array[1]+"-"+invalid_date_array[2],end_invalid_day=invalid_date_array[3]+"-"+invalid_date_array[4]+"-"+invalid_date_array[5];invalid_date_range.push([start_invalid_day,end_invalid_day])}jQuery.each(invalid_date_range,function(e,t){for(var i=new Date(t[0]);i<=new Date(t[1]);i.setDate(i.getDate()+1))invalid_dates_finish.push(jQuery.datepicker.formatDate("mm/dd/yy",i))});var w_hide_sunday="yes"==jQuery("#"+id_int+"_show_week_days").attr("sunday")?"true":"day != 0",w_hide_monday="yes"==jQuery("#"+id_int+"_show_week_days").attr("monday")?"true":"day != 1",w_hide_tuesday="yes"==jQuery("#"+id_int+"_show_week_days").attr("tuesday")?"true":"day != 2",w_hide_wednesday="yes"==jQuery("#"+id_int+"_show_week_days").attr("wednesday")?"true":"day != 3",w_hide_thursday="yes"==jQuery("#"+id_int+"_show_week_days").attr("thursday")?"true":"day != 4",w_hide_friday="yes"==jQuery("#"+id_int+"_show_week_days").attr("friday")?"true":"day != 5",w_hide_saturday="yes"==jQuery("#"+id_int+"_show_week_days").attr("saturday")?"true":"day != 6",day=date.getDay(),string_days=jQuery.datepicker.formatDate("mm/dd/yy",date);return[-1==invalid_dates_finish.indexOf(string_days)&&eval(w_hide_sunday)&&eval(w_hide_monday)&&eval(w_hide_tuesday)&&eval(w_hide_wednesday)&&eval(w_hide_thursday)&&eval(w_hide_friday)&&eval(w_hide_saturday)]})}function create_minimum_date(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="min_date">Minimum Date</label>'),jQuery('<input class="fm-width-100" type="text" id="min_date" onChange="'+(1==i?"change_hidden_input_value_range(this.value, 'minDate', 'start', '"+e+"', '"+e+"_min_date_id_temp')":"change_hidden_input_value(this.value, 'minDate', "+e+", '"+e+"_min_date_id_temp')")+'" value="'+t+'" />'))}function create_maximum_date(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="max_date">Maximum Date</label>'),jQuery('<input class="fm-width-100" type="text" id="max_date" onChange="'+(1==i?"change_hidden_input_value_range(this.value, 'maxDate', 'end', "+e+", '"+e+"_max_date_id_temp')":"change_hidden_input_value(this.value, 'maxDate', "+e+", '"+e+"_max_date_id_temp')")+'" value="'+t+'" />'))}function create_excluded_dates(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="invalid_dates">Dates to Exclude</label>'),jQuery('<textarea class="fm-width-100" id="invalid_dates" rows="4" onChange="'+(1==i?"change_hidden_input_value_range(this.value, 'invalide_date', '', "+e+", '"+e+"_invalid_dates_id_temp')":"change_hidden_input_value(this.value, 'invalide_date', "+e+", '"+e+"_invalid_dates_id_temp')")+'">'+t+"</textarea>"))}function create_show_date_picker_button(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="el_show_image">Show Date Picker Button</label>'),jQuery('<input type="checkbox" id="el_show_image" onchange="show_image_datepicker(\''+e+"_show_image', '"+i+"')\""+("yes"==t?' checked="checked"':"")+" />"))}function show_image_datepicker(e,t){"yes"==document.getElementById(e+"form_id_temp").value?("date_range"==t?(jQuery("#"+e+"dateform_id_temp0").removeClass("wd-inline-block"),jQuery("#"+e+"dateform_id_temp0").addClass("wd-hidden"),jQuery("#"+e+"dateform_id_temp1").removeClass("wd-inline-block"),jQuery("#"+e+"dateform_id_temp1").addClass("wd-hidden")):(jQuery("#"+e+"dateform_id_temp").removeClass("wd-inline-block"),jQuery("#"+e+"dateform_id_temp").addClass("wd-hidden")),document.getElementById(e+"form_id_temp").setAttribute("value","no")):("date_range"==t?(jQuery("#"+e+"dateform_id_temp0").removeClass("wd-hidden"),jQuery("#"+e+"dateform_id_temp0").addClass("wd-inline-block"),jQuery("#"+e+"dateform_id_temp1").removeClass("wd-hidden"),jQuery("#"+e+"dateform_id_temp1").addClass("wd-inline-block")):(jQuery("#"+e+"dateform_id_temp").removeClass("wd-hidden"),jQuery("#"+e+"dateform_id_temp").addClass("wd-inline-block")),document.getElementById(e+"form_id_temp").setAttribute("value","yes"))}function create_selectable_week_days(e,t){var i=jQuery('<label class="fm-field-label">Selectable Week Days</label>'),a=jQuery('<input type="checkbox" id="el_show_sunday" onclick="show_week_days('+e+", 'sunday')\""+("yes"==t[0]?' checked="checked"':"")+" />"),n=jQuery('<label for="el_show_sunday">'+form_maker.sunday+"</label>"),l=jQuery('<input type="checkbox" id="el_show_monday" onclick="show_week_days('+e+", 'monday')\""+("yes"==t[1]?' checked="checked"':"")+" />"),d=jQuery('<label for="el_show_monday">'+form_maker.monday+"</label>"),_=jQuery('<input type="checkbox" id="el_show_tuesday" onclick="show_week_days('+e+", 'tuesday')\""+("yes"==t[2]?' checked="checked"':"")+" />"),r=jQuery('<label for="el_show_tuesday">'+form_maker.tuesday+"</label>"),o=jQuery('<input type="checkbox" id="el_show_wednesday" onclick="show_week_days('+e+", 'wednesday')\""+("yes"==t[3]?' checked="checked"':"")+" />"),m=jQuery('<label for="el_show_wednesday">'+form_maker.wednesday+"</label>"),s=jQuery('<input type="checkbox" id="el_show_thursday" onclick="show_week_days('+e+", 'thursday')\""+("yes"==t[4]?' checked="checked"':"")+" />"),u=jQuery('<label for="el_show_thursday">'+form_maker.thursday+"</label>"),c=jQuery('<input type="checkbox" id="el_show_friday" onclick="show_week_days('+e+", 'friday')\""+("yes"==t[5]?' checked="checked"':"")+" />"),p=jQuery('<label for="el_show_friday">'+form_maker.friday+"</label>"),f=jQuery('<input type="checkbox" id="el_show_saturday" onclick="show_week_days('+e+", 'saturday')\""+("yes"==t[6]?' checked="checked"':"")+" />"),y=jQuery('<label for="el_show_saturday">'+form_maker.saturday+"</label>"),h=a;return create_option_container(i,h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=h.add(n)).add(jQuery("<br />"))).add(l)).add(d)).add(jQuery("<br />"))).add(_)).add(r)).add(jQuery("<br />"))).add(o)).add(m)).add(jQuery("<br />"))).add(s)).add(u)).add(jQuery("<br />"))).add(c)).add(p)).add(jQuery("<br />"))).add(f)).add(y))}function go_to_type_date_new(e){w_attr_name=[],w_attr_value=[],w_show_days=["yes","yes","yes","yes","yes","yes","yes"],type_date_new(e,"Date","","top","no","","","no","no","","mm/dd/yy","0","","","","",w_show_days,"yes","...",w_attr_name,w_attr_value,"no")}function type_date_new(i,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_date,w_required,w_show_image,w_class,w_format,w_start_day,w_default_date,w_min_date,w_max_date,w_invalid_dates,w_show_days,w_hide_time,w_but_val,w_attr_name,w_attr_value,w_disable_past_days){jQuery("#element_type").val("type_date_new"),delete_last_child();var t=jQuery("#edit_table"),edit_div=jQuery('<div id="edit_div"></div>');t.append(edit_div);var edit_main_table=jQuery('<div id="edit_main_table"></div>');edit_div.append(edit_main_table),edit_main_table.append(create_field_type("type_date_new")),edit_main_table.append(create_label(i,w_field_label)),edit_main_table.append(create_label_position(i,w_field_label_pos)),edit_main_table.append(create_hide_label(i,w_hide_label)),edit_main_table.append(create_required(i,w_required)),edit_main_table.append(create_field_size(i,w_size)),edit_main_table.append(create_date_format(i,w_format)),edit_main_table.append(create_week_start(i,w_start_day));var advanced_options_container=jQuery('<div class="inside"></div>');edit_main_table.append(create_advanced_options_container(advanced_options_container)),advanced_options_container.append(create_default_date(i,w_default_date)),advanced_options_container.append(create_minimum_date(i,w_min_date)),advanced_options_container.append(create_maximum_date(i,w_max_date)),advanced_options_container.append(create_excluded_dates(i,w_invalid_dates)),advanced_options_container.append(create_selectable_week_days(i,w_show_days)),advanced_options_container.append(create_field_label_size(i,w_field_label_size)),advanced_options_container.append(create_class(i,w_class)),advanced_options_container.append(create_show_date_picker_button(i,w_show_image,"new_date")),advanced_options_container.append(create_additional_attributes(i,w_attr_name,"type_date_new"));var adding_type=document.createElement("input");adding_type.setAttribute("type","hidden"),adding_type.setAttribute("value","type_date_new"),adding_type.setAttribute("name",i+"_typeform_id_temp"),adding_type.setAttribute("id",i+"_typeform_id_temp");var adding_required=document.createElement("input");adding_required.setAttribute("type","hidden"),adding_required.setAttribute("value",w_required),adding_required.setAttribute("name",i+"_requiredform_id_temp"),adding_required.setAttribute("id",i+"_requiredform_id_temp");var adding_hide_label=document.createElement("input");adding_hide_label.setAttribute("type","hidden"),adding_hide_label.setAttribute("value",w_hide_label),adding_hide_label.setAttribute("name",i+"_hide_labelform_id_temp"),adding_hide_label.setAttribute("id",i+"_hide_labelform_id_temp");var adding_dis_past_days=document.createElement("input");adding_dis_past_days.setAttribute("type","hidden"),adding_dis_past_days.setAttribute("value",w_disable_past_days),adding_dis_past_days.setAttribute("id",i+"_dis_past_daysform_id_temp"),adding_dis_past_days.setAttribute("name",i+"_dis_past_daysform_id_temp");var adding_start_day=document.createElement("input");adding_start_day.setAttribute("type","hidden"),adding_start_day.setAttribute("value",w_start_day),adding_start_day.setAttribute("name",i+"_start_dayform_id_temp"),adding_start_day.setAttribute("id",i+"_start_dayform_id_temp");var adding_default_date=document.createElement("input");adding_default_date.setAttribute("type","hidden"),adding_default_date.setAttribute("name",i+"_default_date_id_temp"),adding_default_date.setAttribute("id",i+"_default_date_id_temp"),adding_default_date.setAttribute("value",w_default_date);var adding_min_date=document.createElement("input");adding_min_date.setAttribute("type","hidden"),adding_min_date.setAttribute("name",i+"_min_date_id_temp"),adding_min_date.setAttribute("id",i+"_min_date_id_temp"),adding_min_date.setAttribute("value",w_min_date);var adding_max_date=document.createElement("input");adding_max_date.setAttribute("type","hidden"),adding_max_date.setAttribute("name",i+"_max_date_id_temp"),adding_max_date.setAttribute("id",i+"_max_date_id_temp"),adding_max_date.setAttribute("value",w_max_date);var adding_invalid_dates=document.createElement("input");adding_invalid_dates.setAttribute("type","hidden"),adding_invalid_dates.setAttribute("name",i+"_invalid_dates_id_temp"),adding_invalid_dates.setAttribute("id",i+"_invalid_dates_id_temp"),adding_invalid_dates.setAttribute("value",w_invalid_dates);var adding_show_days=document.createElement("input");adding_show_days.setAttribute("type","hidden"),adding_show_days.setAttribute("name",i+"_show_week_days"),adding_show_days.setAttribute("id",i+"_show_week_days"),adding_show_days.setAttribute("sunday",w_show_days[0]),adding_show_days.setAttribute("monday",w_show_days[1]),adding_show_days.setAttribute("tuesday",w_show_days[2]),adding_show_days.setAttribute("wednesday",w_show_days[3]),adding_show_days.setAttribute("thursday",w_show_days[4]),adding_show_days.setAttribute("friday",w_show_days[5]),adding_show_days.setAttribute("saturday",w_show_days[6]);var adding_show_image=document.createElement("input");adding_show_image.setAttribute("type","hidden"),adding_show_image.setAttribute("value",w_show_image),adding_show_image.setAttribute("name",i+"_show_imageform_id_temp"),adding_show_image.setAttribute("id",i+"_show_imageform_id_temp");var adding_hide_time=document.createElement("input");adding_hide_time.setAttribute("type","hidden"),adding_hide_time.setAttribute("value",w_hide_time),adding_hide_time.setAttribute("name",i+"_hide_timeform_id_temp"),adding_hide_time.setAttribute("id",i+"_hide_timeform_id_temp");var div=document.createElement("div");div.setAttribute("id","main_div");var div_field=document.createElement("div");div_field.setAttribute("id",i+"_elemet_tableform_id_temp");var display_label_div="yes"==w_hide_label?"none":"table-cell",div_label=document.createElement("div");div_label.setAttribute("align","left"),div_label.style.display=display_label_div,div_label.style.width=w_field_label_size+"px",div_label.setAttribute("id",i+"_label_sectionform_id_temp");var div_element=document.createElement("div");div_element.setAttribute("align","left"),div_element.style.display="table-cell",div_element.style.position="relative",div_element.setAttribute("id",i+"_element_sectionform_id_temp");var table_date=document.createElement("div");table_date.setAttribute("id",i+"_table_date"),table_date.style.display="table";var tr_date1=document.createElement("div");tr_date1.setAttribute("id",i+"_tr_date1"),tr_date1.style.display="table-row";var tr_date2=document.createElement("div");tr_date2.setAttribute("id",i+"_tr_date2"),tr_date2.style.display="table-row";var td_date_input1=document.createElement("div");td_date_input1.setAttribute("id",i+"_td_date_input1"),td_date_input1.style.display="table-cell";var td_date_input2=document.createElement("div");td_date_input2.setAttribute("id",i+"_td_date_input2"),td_date_input2.style.display="table-cell";var td_date_input3=document.createElement("div");td_date_input3.setAttribute("id",i+"_td_date_input3"),td_date_input3.style.display="table-cell";var td_date_label1=document.createElement("div");td_date_label1.setAttribute("id",i+"_td_date_label1"),td_date_label1.style.display="table-cell";var td_date_label2=document.createElement("div");td_date_label2.setAttribute("id",i+"_td_date_label2"),td_date_label2.style.display="table-cell";var td_date_label3=document.createElement("div");td_date_label3.setAttribute("id",i+"_td_date_label3"),td_date_label3.style.display="table-cell";var br3=document.createElement("br"),br4=document.createElement("br"),label=document.createElement("span");label.setAttribute("id",i+"_element_labelform_id_temp"),label.innerHTML=w_field_label,label.setAttribute("class","label"),label.style.verticalAlign="top";var required=document.createElement("span");required.setAttribute("id",i+"_required_elementform_id_temp"),required.innerHTML="",required.setAttribute("class","required"),required.style.verticalAlign="top","yes"==w_required&&(required.innerHTML=" *");var adding=document.createElement("input");adding.setAttribute("type","text"),adding.setAttribute("value",w_date),adding.setAttribute("id",i+"_elementform_id_temp"),adding.setAttribute("name",i+"_elementform_id_temp"),adding.style.cssText="width:"+w_size+"px;";var adding_image=document.createElement("span");adding_image.setAttribute("id",i+"_show_imagedateform_id_temp"),adding_image.setAttribute("class","dashicons dashicons-calendar-alt wd-calendar-button "+("yes"==w_show_image?"wd-inline-block":"wd-hidden")),adding_image.setAttribute("onClick","show_datepicker('"+i+"_elementform_id_temp')");var adding_desc_p=document.createElement("p"),adding_desc_b=document.createElement("b"),text_format_1=document.createTextNode("The format can be combinations of the following:"),text_format_2=document.createTextNode("d - day of month (no leading zero)"),text_format_3=document.createTextNode("dd - day of month (two digit)"),text_format_4=document.createTextNode("o - day of the year (no leading zeros)"),text_format_5=document.createTextNode("oo - day of the year (three digit)"),text_format_6=document.createTextNode("D - day name short"),text_format_7=document.createTextNode("DD - day name long"),text_format_8=document.createTextNode("m - month of year (no leading zero)"),text_format_9=document.createTextNode("mm - month of year (two digit)"),text_format_10=document.createTextNode("M - month name short"),text_format_11=document.createTextNode("MM - month name long"),text_format_12=document.createTextNode("y - year (two digit)"),text_format_13=document.createTextNode("yy - year (four digit)"),format_br_1=document.createElement("br"),format_br_2=document.createElement("br"),format_br_3=document.createElement("br"),format_br_4=document.createElement("br"),format_br_5=document.createElement("br"),format_br_6=document.createElement("br"),format_br_7=document.createElement("br"),format_br_8=document.createElement("br"),format_br_9=document.createElement("br"),format_br_10=document.createElement("br"),format_br_11=document.createElement("br"),format_br_12=document.createElement("br"),format_br_13=document.createElement("br"),adding_desc_p_2=document.createElement("p"),adding_desc_b_2=document.createElement("b"),text_default_1=document.createTextNode("Accepted values of Default, Minimum and Maximum:"),text_default_3=document.createTextNode("Date: A fixed date using the date format mm/dd/yy, e.g. 05/25/2016"),text_default_2=document.createTextNode("Empty: No default / minimum / maximum"),text_default_4=document.createTextNode("'today' : current date"),text_default_5=document.createTextNode("Relative date: A number of days/weeks/months/years from today, e.g. '-1d' will be yesterday, '+1y+3m+2w+3d' will be 1 year, 3 months, 2 weeks and 3 days from today."),adding_desc_p_3=document.createElement("p"),adding_desc_b_3=document.createElement("b"),text_default_6=document.createTextNode("Dates to exclude:"),text_default_7=document.createTextNode("Enter comma-separated list of dates and date ranges using the date format 'mm/dd/yy', e.g. 08/15/2016, 06/15/2016-06/20/2016"),default_br_1=document.createElement("br"),default_br_2=document.createElement("br"),default_br_3=document.createElement("br"),default_br_4=document.createElement("br"),default_br_5=document.createElement("br"),default_br_6=document.createElement("br"),default_br_7=document.createElement("br"),dis_past_days="yes"==w_disable_past_days,adding_button=document.createElement("input");adding_button.setAttribute("id",i+"_buttonform_id_temp"),adding_button.setAttribute("class","button"),adding_button.setAttribute("type","hidden"),adding_button.setAttribute("value",w_but_val),adding_button.setAttribute("format",w_format);var main_td=document.getElementById("show_table");div_label.appendChild(label),div_label.appendChild(required),div_element.appendChild(adding_type),div_element.appendChild(adding_required),div_element.appendChild(adding_hide_label),div_element.appendChild(adding_show_image),div_element.appendChild(adding_dis_past_days),div_element.appendChild(adding),div_element.appendChild(adding_image),adding_desc_b.appendChild(text_format_1),adding_desc_p.appendChild(adding_desc_b),adding_desc_p.appendChild(format_br_1),adding_desc_p.appendChild(text_format_2),adding_desc_p.appendChild(format_br_2),adding_desc_p.appendChild(text_format_3),adding_desc_p.appendChild(format_br_3),adding_desc_p.appendChild(text_format_4),adding_desc_p.appendChild(format_br_4),adding_desc_p.appendChild(text_format_5),adding_desc_p.appendChild(format_br_5),adding_desc_p.appendChild(text_format_6),adding_desc_p.appendChild(format_br_6),adding_desc_p.appendChild(text_format_7),adding_desc_p.appendChild(format_br_7),adding_desc_p.appendChild(text_format_8),adding_desc_p.appendChild(format_br_8),adding_desc_p.appendChild(text_format_9),adding_desc_p.appendChild(format_br_9),adding_desc_p.appendChild(text_format_10),adding_desc_p.appendChild(format_br_10),adding_desc_p.appendChild(text_format_11),adding_desc_p.appendChild(format_br_11),adding_desc_p.appendChild(text_format_12),adding_desc_p.appendChild(format_br_12),adding_desc_p.appendChild(text_format_13),adding_desc_p.appendChild(format_br_13),adding_desc_b_2.appendChild(text_default_1),adding_desc_p_2.appendChild(adding_desc_b_2),adding_desc_p_2.appendChild(default_br_1),adding_desc_p_2.appendChild(text_default_2),adding_desc_p_2.appendChild(default_br_2),adding_desc_p_2.appendChild(text_default_3),adding_desc_p_2.appendChild(default_br_3),adding_desc_p_2.appendChild(text_default_4),adding_desc_p_2.appendChild(default_br_4),adding_desc_p_2.appendChild(text_default_5),adding_desc_b_3.appendChild(text_default_6),adding_desc_p_3.appendChild(adding_desc_b_3),adding_desc_p_3.appendChild(default_br_6),adding_desc_p_3.appendChild(text_default_7),adding_desc_p_3.appendChild(default_br_7),div_element.appendChild(adding_default_date),div_element.appendChild(adding_start_day),div_element.appendChild(adding_min_date),div_element.appendChild(adding_max_date),div_element.appendChild(adding_invalid_dates),div_element.appendChild(adding_hide_time),div_element.appendChild(adding_show_days),div_element.appendChild(adding_button),div_field.appendChild(div_label),div_field.appendChild(div_element),div.appendChild(div_field),div.appendChild(br3),div.appendChild(adding_desc_p),div.appendChild(adding_desc_p_2),div.appendChild(adding_desc_p_3),main_td.appendChild(div),"top"==w_field_label_pos&&label_top(i),change_class(w_class,i),refresh_attr(i,"type_text"),jQuery("#"+i+"_elementform_id_temp").datepicker({dateFormat:"mm/dd/yy",minDate:w_min_date,maxDate:w_max_date,firstDay:w_start_day,changeMonth:!0,changeYear:!0,yearRange:"-100:+50",showOtherMonths:!0,selectOtherMonths:!0,beforeShowDay:function(date){for(var invalid_dates=w_invalid_dates,invalid_dates_finish=[],invalid_dates_start=invalid_dates.split(","),invalid_date_range=[],i=0;i<invalid_dates_start.length;i++)if(invalid_dates_start[i]=invalid_dates_start[i].trim(),invalid_dates_start[i].length<11)invalid_dates_finish.push(invalid_dates_start[i]);else if(4<invalid_dates_start[i].indexOf("-"))invalid_date_range.push(invalid_dates_start[i].split("-"));else{var invalid_date_array=invalid_dates_start[i].split("-"),start_invalid_day=invalid_date_array[0]+"-"+invalid_date_array[1]+"-"+invalid_date_array[2],end_invalid_day=invalid_date_array[3]+"-"+invalid_date_array[4]+"-"+invalid_date_array[5];invalid_date_range.push([start_invalid_day,end_invalid_day])}jQuery.each(invalid_date_range,function(e,t){for(var i=new Date(t[0]);i<=new Date(t[1]);i.setDate(i.getDate()+1))invalid_dates_finish.push(jQuery.datepicker.formatDate("mm/dd/yy",i))});var string_days=jQuery.datepicker.formatDate("mm/dd/yy",date),day=date.getDay(),w_hide_sunday="yes"==w_show_days[0]?"true":"day != 0",w_hide_monday="yes"==w_show_days[1]?"true":"day != 1",w_hide_tuesday="yes"==w_show_days[2]?"true":"day != 2",w_hide_wednesday="yes"==w_show_days[3]?"true":"day != 3",w_hide_thursday="yes"==w_show_days[4]?"true":"day != 4",w_hide_friday="yes"==w_show_days[5]?"true":"day != 5",w_hide_saturday="yes"==w_show_days[6]?"true":"day != 6";return[-1==invalid_dates_finish.indexOf(string_days)&&eval(w_hide_sunday)&&eval(w_hide_monday)&&eval(w_hide_tuesday)&&eval(w_hide_wednesday)&&eval(w_hide_thursday)&&eval(w_hide_friday)&&eval(w_hide_saturday)]}}),jQuery("#"+i+"_elementform_id_temp").datepicker("option","dateFormat",w_format),"today"==w_default_date?jQuery("#"+i+"_elementform_id_temp").datepicker("setDate",new Date):(-1==w_default_date.indexOf("d")&&-1==w_default_date.indexOf("m")&&-1==w_default_date.indexOf("y")&&-1==w_default_date.indexOf("w")&&""!==w_default_date&&(w_default_date=jQuery.datepicker.formatDate(w_format,new Date(w_default_date))),jQuery("#"+i+"_elementform_id_temp").datepicker("setDate",w_default_date))}function create_enable_options_value(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="el_disable_value">Enable option\'s value</label>'),jQuery('<input type="checkbox" id="el_disable_value" onchange="refresh_sel_options('+e+", '"+i+"')\""+("yes"==t?' checked="checked"':"")+" />"))}function refresh_sel_options(i,e){if("checkbox"!=e&&"radio"!=e||(jQuery("#el_disable_value").prop("checked")?(jQuery("#"+i+"_value_disabledform_id_temp").val("yes"),jQuery(".el_option_value").removeAttr("disabled")):(jQuery("#"+i+"_value_disabledform_id_temp").val("no"),jQuery(".el_option_value").attr("disabled","disabled")),refresh_rowcol(i,e)),"select"==e){jQuery("#el_disable_value").prop("checked")?(jQuery("#"+i+"_value_disabledform_id_temp").val("yes"),jQuery(".el_option_value").removeAttr("disabled"),jQuery(".el_option_dis").attr("disabled","disabled")):(jQuery("#"+i+"_value_disabledform_id_temp").val("no"),jQuery(".el_option_value").attr("disabled","disabled"),jQuery(".el_option_dis").removeAttr("disabled"));var a=document.getElementById(i+"_elementform_id_temp");a.innerHTML="",jQuery(".change_pos").each(function(){var e=jQuery(this)[0].id,t=document.createElement("option");t.setAttribute("id",i+"_option"+e),jQuery("#el_disable_value").prop("checked")?t.setAttribute("value",jQuery(this).find(jQuery("input[type='text']"))[1].value):jQuery(this).find(jQuery("input[type='checkbox']")).prop("checked")?t.value="":t.setAttribute("value",jQuery(this).find(jQuery("input[type='text']"))[0].value),jQuery(this).find(jQuery(".el_option_params")).val()&&(w_params=jQuery(this).find(jQuery(".el_option_params")).val().split("[where_order_by]"),t.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),t.setAttribute("order_by",w_params[0]),t.setAttribute("db_info",w_params[1])),t.setAttribute("onselect","set_select('"+i+"_option"+e+"')"),t.innerHTML=jQuery(this).find(jQuery("input[type='text']"))[0].value,a.appendChild(t)})}form_maker.is_demo?jQuery("#el_choices_add").next().attr("onclick","alert('This feature is disabled in demo.')"):jQuery("#el_choices_add").next().attr("onclick","tb_show('', 'admin-ajax.php?action=select_data_from_db&field_id="+i+"&nonce="+fm_ajax.ajaxnonce+"&field_type="+e+"&value_disabled="+jQuery("#"+i+"_value_disabledform_id_temp").val()+"&width=530&height=370&TB_iframe=1');return false;")}function create_select_options(e,t,i,a,l,d){var _=jQuery('<label class="fm-field-label">Options</label>'),r=jQuery('<button id="el_choices_add" class="fm-add-option button-secondary" onClick="add_choise(\'select\', '+e+'); return false;" title="Add option"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>Option</button>');if(form_maker.is_demo)var o=jQuery('<button class="fm-add-option button-secondary" onClick="alert(\'This feature is disabled in demo.\') return false;" title="Add options from database"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>From Database</button>');else o=jQuery("<button class=\"fm-add-option button-secondary\" onClick=\"tb_show('', 'admin-ajax.php?action=select_data_from_db&nonce="+fm_ajax.ajaxnonce+"&field_id="+e+"&field_type=select&value_disabled="+t+'&width=530&height=370&TB_iframe=1\'); return false;" title="Add options from database"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>From Database</button>');var m=jQuery('<div class="fm-width-100 error">IMPORTANT! Check the "Empty value" checkbox only if you want the option to be considered as empty.</div>'),s=jQuery('<div id="choices" class="fm-width-100 ui-sortable"></div>'),u=jQuery('<div class="fm-width-100"><div class="fm-header-label fm-width-30">Name</div><div class="fm-header-label fm-width-30">Value</div><div class="fm-header-label fm-width-20">Empty value</div><div class="fm-header-label fm-width-10">Delete</div><div class="fm-header-label fm-width-10">Move</div></div>');for(s.append(u),n=i.length,j=0;j<n;j++){var c=jQuery('<div id="'+j+'" class="change_pos fm-width-100"><div class="fm-table-col fm-width-30"><input type="text" class="fm-field-choice" id="el_option'+j+'" value="'+i[j].replace(/"/g,"&quot;")+'" onKeyUp="change_label_name('+j+", '"+e+"_option"+j+"', this.value, 'select')\" onpaste=\"elem=this; change_label_name_on_paste("+j+", '"+e+"_option"+j+"', 'select')\""+(a[j]?' disabled="disabled"':"")+' /></div><div class="fm-table-col fm-width-30"><input type="text" class="fm-field-choice'+(a[j]?"":" el_option_value")+'" id="el_option_value'+j+'" value="'+l[j].replace(/"/g,"&quot;")+'" onKeyUp="change_label_value(\''+e+"_option"+j+"', this.value)\" onpaste=\"change_label_value_on_paste('"+e+"_option"+j+"', this)\""+("no"==t||a[j]?' disabled="disabled"':"")+' /></div><div class="fm-table-col fm-width-20"><input type="checkbox" title="Empty value" class="el_option_dis" id="el_option'+j+'_dis" onClick="dis_option(\''+e+"_option"+j+"', this.checked, "+j+')"'+("yes"==t?' disabled="disabled"':"")+(d[j]?' checked="checked"':"")+' /></div><div class="fm-table-col fm-width-10"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_option'+j+'_remove" onClick="remove_option('+j+", "+e+')"></span></div><div class="fm-table-col fm-width-10"><span class="fm-move-attribute fm-ico-draggable el_choices_sortable"></span></div><input type="hidden" class="el_option_params" id="el_option_params'+j+'" value="'+a[j]+'" /></div>');s.append(c)}var p=_;return create_option_container(null,p=(p=(p=(p=p.add(r)).add(o)).add(s)).add(m))}function add_choise(e,t){var i=0;if(jQuery(".change_pos").each(function(){var e=parseInt(jQuery(this)[0].id);i=i<e?e:i}),i+=1,"radio"==e||"checkbox"==e){var a=jQuery("#choices"),n=jQuery('<div id="'+i+'" class="change_pos fm-width-100"><div class="fm-table-col fm-width-40"><input type="text" class="fm-field-choice" id="el_choices'+i+'" value="" onKeyUp="change_label_name(\''+i+"', '"+t+"_label_element"+i+"', this.value, '"+e+"'); change_label_value('"+t+"_elementform_id_temp"+i+"', jQuery('#el_option_value"+i+'\').val())" onpaste="elem=this; change_label_name_on_paste('+i+", '"+t+"_label_element"+i+"', '"+e+"'); change_label_value_on_paste('"+t+"_elementform_id_temp"+i+'\', this)" /></div><div class="fm-table-col fm-width-40"><input type="text" class="fm-field-choice el_option_value" id="el_option_value'+i+'" value="" onKeyUp="change_label_value(\''+t+"_elementform_id_temp"+i+"', this.value)\" onpaste=\"change_label_value_on_paste('"+t+"_elementform_id_temp"+i+"', this)\""+(jQuery("#el_disable_value").prop("checked")?"":'disabled="disabled"')+' /></div><div class="fm-table-col fm-width-10"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_choices'+i+'_remove" onClick="remove_choise('+i+","+t+",'"+e+'\')"></span></div><div class="fm-table-col fm-width-10"><span class="fm-move-attribute fm-ico-draggable el_choices_sortable"></span></div></div>');a.append(n),refresh_rowcol(t,e)}if("select"==e){var l=jQuery("#"+t+"_elementform_id_temp"),d=jQuery('<option id="'+t+"_option"+i+'"></option>');l.append(d);a=jQuery("#choices"),n=jQuery('<div id="'+i+'" class="change_pos fm-width-100"><div class="fm-table-col fm-width-30"><input type="text" class="fm-field-choice" id="el_option'+i+'" value="" onKeyUp="change_label_name('+i+", '"+t+"_option"+i+"', this.value, 'select')\" onpaste=\"elem=this; change_label_name_on_paste("+i+", '"+t+"_option"+i+'\', \'select\')" /></div><div class="fm-table-col fm-width-30"><input type="text" class="fm-field-choice el_option_value" id="el_option_value'+i+'" value="" onKeyUp="change_label_value(\''+t+"_option"+i+"', this.value)\" onpaste=\"change_label_value_on_paste('"+t+"_option"+i+"', this)\""+(jQuery("#el_disable_value").prop("checked")?"":'disabled="disabled"')+' /></div><div class="fm-table-col fm-width-20"><input type="checkbox" title="Empty value" class="el_option_dis" id="el_option'+i+'_dis" onClick="dis_option(\''+t+"_option"+i+"', this.checked, "+i+')"'+(jQuery("#el_disable_value").prop("checked")?'disabled="disabled"':"")+' /></div><div class="fm-table-col fm-width-10"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_option'+i+'_remove" onClick="remove_option('+i+", "+t+')"></span></div><div class="fm-table-col fm-width-10"><span class="fm-move-attribute fm-ico-draggable el_choices_sortable"></span></div><input type="hidden" id="el_option_params'+i+'" class="el_option_params" value=""></div>');a.append(n)}}function change_label_name(e,t,i,a){jQuery("#"+t).html(i),jQuery("#el_disable_value").prop("checked")||(jQuery("#el_choices"+e).attr("other")||jQuery("#el_option_value"+e).val(i),"select"==a&&jQuery("#"+t).val(i))}function change_label_name_on_paste(e,t,i,a){setTimeout(function(){i=elem.value,jQuery("#"+t).html(i),jQuery("#el_disable_value").prop("checked")||(jQuery("#el_choices"+e).attr("other")||jQuery("#el_option_value"+e).val(i),"select"==a&&jQuery("#"+t).val(i))},100)}function change_label_value(e,t){document.getElementById(e).value=t}function change_label_value_on_paste(e,t){setTimeout(function(){label=t.value,document.getElementById(e).value=label},100)}function dis_option(e,t,i){t?(jQuery("#"+e).val(""),jQuery("#el_option_value"+i).val("")):(jQuery("#"+e).val(jQuery("#"+e).html()),jQuery("#el_option_value"+i).val(jQuery("#el_option"+i).val()))}function remove_option(e,t){var i=document.getElementById(t+"_elementform_id_temp"),a=document.getElementById(t+"_option"+e);i.removeChild(a);var n=document.getElementById("choices"),l=document.getElementById(e);n.removeChild(l)}function go_to_type_own_select(e){w_choices=["Select value","option 1","option 2"],w_choices_value=["","option 1","option 2"],w_choices_params=["","",""],w_choices_checked=["1","0","0"],w_choices_disabled=[!0,!1,!1],w_attr_name=[],w_attr_value=[],type_own_select(e,"Select","","top","no","",w_choices,w_choices_checked,"no","no","wdform_select",w_attr_name,w_attr_value,w_choices_disabled,w_choices_value,w_choices_params)}function type_own_select(i,e,t,a,l,d,_,r,o,m,s,u,c,p,f,y){jQuery("#element_type").val("type_own_select"),delete_last_child();var h=jQuery("#edit_table"),b=jQuery('<div id="edit_div"></div>');h.append(b);var v=jQuery('<div id="edit_main_table"></div>');b.append(v),v.append(create_field_type("type_own_select")),v.append(create_label(i,e)),v.append(create_label_position(i,a)),v.append(create_hide_label(i,l)),v.append(create_required(i,o)),v.append(create_field_size(i,d)),v.append(create_select_options(i,m,_,y,f,p));var w=jQuery('<div class="inside"></div>');v.append(create_advanced_options_container(w)),w.append(create_field_label_size(i,t)),w.append(create_class(i,s)),w.append(create_enable_options_value(i,m,"select")),w.append(create_additional_attributes(i,u,"type_own_select")),n=_.length;var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value","type_own_select"),g.setAttribute("name",i+"_typeform_id_temp"),g.setAttribute("id",i+"_typeform_id_temp");var E=document.createElement("input");E.setAttribute("type","hidden"),E.setAttribute("value",o),E.setAttribute("name",i+"_requiredform_id_temp"),E.setAttribute("id",i+"_requiredform_id_temp");var A=document.createElement("input");A.setAttribute("type","hidden"),A.setAttribute("value",l),A.setAttribute("name",i+"_hide_labelform_id_temp"),A.setAttribute("id",i+"_hide_labelform_id_temp");var x=document.createElement("input");x.setAttribute("type","hidden"),x.setAttribute("value",m),x.setAttribute("name",i+"_value_disabledform_id_temp"),x.setAttribute("id",i+"_value_disabledform_id_temp");var k=document.createElement("div");k.setAttribute("id","main_div");var I=document.createElement("div");I.setAttribute("id",i+"_elemet_tableform_id_temp");var C="yes"==l?"none":"table-cell",B=document.createElement("div");B.setAttribute("align","left"),B.style.display=C,B.style.width=t+"px",B.setAttribute("id",i+"_label_sectionform_id_temp");var Q=document.createElement("div");Q.setAttribute("align","left"),Q.style.display="table-cell",Q.setAttribute("id",i+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var T=document.createElement("br"),M=(document.createElement("br"),document.createElement("div"));M.setAttribute("id",i+"_table_little"),M.style.display="table";var L=document.createElement("div");L.setAttribute("id",i+"_element_tr1"),L.style.display="table-row";var z=document.createElement("div");z.setAttribute("id",i+"_element_tr2"),z.style.display="table-row";var q=document.createElement("div");q.setAttribute("valign","top"),q.setAttribute("id",i+"_td_little1"),q.style.display="table-cell";var H=document.createElement("div");H.setAttribute("valign","top"),H.setAttribute("id",i+"_td_little2"),H.style.display="table-cell";var N=document.createElement("span");N.setAttribute("id",i+"_element_labelform_id_temp"),N.innerHTML=e,N.setAttribute("class","label"),N.style.verticalAlign="top";var S=document.createElement("span");S.setAttribute("id",i+"_required_elementform_id_temp"),S.innerHTML="",S.setAttribute("class","required"),S.style.verticalAlign="top","yes"==o&&(S.innerHTML=" *");var D=document.createElement("select");for(D.setAttribute("id",i+"_elementform_id_temp"),D.setAttribute("name",i+"_elementform_id_temp"),D.style.cssText="width:"+d+"px",D.setAttribute("onchange","set_select(this)"),j=0;j<n;j++){var P=document.createElement("option");P.setAttribute("id",i+"_option"+j),"yes"==m?P.setAttribute("value",f[j].replace(/"/g,"&quot;")):p[j]?P.value="":P.setAttribute("value",_[j].replace(/"/g,"&quot;")),y[j]&&(w_params=y[j].split("[where_order_by]"),P.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),P.setAttribute("order_by",w_params[0]),P.setAttribute("db_info",w_params[1])),P.setAttribute("onselect","set_select('"+i+"_option"+j+"')"),P.innerHTML=_[j].replace(/"/g,"&quot;"),1==r[j]&&P.setAttribute("selected","selected"),D.appendChild(P)}var O=document.getElementById("show_table");B.appendChild(N),B.appendChild(S),Q.appendChild(A),Q.appendChild(g),Q.appendChild(E),Q.appendChild(x),Q.appendChild(D),I.appendChild(B),I.appendChild(Q),k.appendChild(I),k.appendChild(T),O.appendChild(k),"top"==a&&label_top(i),change_class(s,i),refresh_attr(i,"type_text"),jQuery(function(){jQuery("#choices").sortable({items:".change_pos",handle:".el_choices_sortable",update:function(e,t){refresh_sel_options(i,"select")}})}),jQuery("#main_div").append(form_maker.type_select_description)}function create_relative_position(e,t,i){var a=jQuery('<label class="fm-field-label">Relative Position</label>'),n=jQuery('<input type="radio" id="edit_for_flow_vertical" name="edit_for_flow" value="ver" onchange="refresh_rowcol('+e+",'"+i+"')\""+("hor"==t?"":' checked="checked"')+" />"),l=jQuery('<label for="edit_for_flow_vertical">Vertical</label>'),d=jQuery('<input type="radio" id="edit_for_flow_horizontal" name="edit_for_flow" value="hor" onchange="refresh_rowcol('+e+",'"+i+"')\""+("hor"==t?' checked="checked"':"")+" />"),_=jQuery('<label for="edit_for_flow_horizontal">Horizontal</label>'),r=n;return create_option_container(a,r=(r=(r=r.add(l)).add(d)).add(_))}function refresh_rowcol(l,d){document.getElementById("edit_for_rowcol").value||(document.getElementById("edit_for_rowcol").value=1),document.getElementById(l+"_rowcol_numform_id_temp").value=document.getElementById("edit_for_rowcol").value;var _=document.getElementById(l+"_table_little");if(_.removeAttribute("for_hor"),_.innerHTML="",choeices=jQuery(".change_pos").length,1==document.getElementById("edit_for_flow_vertical").checked){var n=document.getElementById("edit_for_rowcol").value,r=parseInt((choeices+1)/n),o=0,m=1;tr_row=document.createElement("div"),tr_row.setAttribute("id",l+"_element_tr0"),tr_row.style.display="table-row",jQuery(".change_pos").each(function(){var e=jQuery(this)[0].id;n<=o&&(o=0,tr_row=document.createElement("div"),tr_row.setAttribute("id",l+"_element_tr"+m),tr_row.style.display="table-row",m++);var t=document.createElement("div");t.setAttribute("valign","top"),t.setAttribute("id",l+"_td_little"+e),t.setAttribute("idi",e),t.style.display="table-cell";var i=document.createElement("input");i.setAttribute("type",d),i.setAttribute("id",l+"_elementform_id_temp"+e),"checked"==jQuery("#"+l+"_elementform_id_temp"+e).attr("checked")&&i.setAttribute("checked","checked"),"right"==document.getElementById(l+"_option_left_right").value&&(i.style.cssText="float: left !important"),"checkbox"==d&&(i.setAttribute("name",l+"_elementform_id_temp"+e),"yes"==document.getElementById(l+"_allow_otherform_id_temp").value&&"1"==jQuery(this).find("#el_choices"+e).attr("other")?(i.setAttribute("value",""),i.setAttribute("other","1"),i.setAttribute("onclick","if(set_checked('"+l+"','"+e+"','form_id_temp')) show_other_input('"+l+"','form_id_temp');")):("no"==document.getElementById(l+"_value_disabledform_id_temp").value?i.setAttribute("value",jQuery(this).find("#el_choices"+e).val()):i.setAttribute("value",jQuery(this).find("#el_option_value"+e).val()),i.setAttribute("onclick","set_checked('"+l+"','"+e+"','form_id_temp')"))),"radio"==d&&(i.setAttribute("name",l+"_elementform_id_temp"),"yes"==document.getElementById(l+"_allow_otherform_id_temp").value&&"1"==jQuery(this).find("#el_choices"+e).attr("other")?(i.setAttribute("value",""),i.setAttribute("other","1"),i.setAttribute("onClick","set_default('"+l+"','"+e+"','form_id_temp'); show_other_input('"+l+"','form_id_temp');")):("no"==document.getElementById(l+"_value_disabledform_id_temp").value?i.setAttribute("value",jQuery(this).find("#el_choices"+e).val()):i.setAttribute("value",jQuery(this).find("#el_option_value"+e).val()),i.setAttribute("onClick","set_default('"+l+"','"+e+"','form_id_temp')")));var a=document.createElement("label");a.setAttribute("id",l+"_label_element"+e),a.setAttribute("class","ch-rad-label"),a.setAttribute("for",l+"_elementform_id_temp"+e),a.innerHTML=jQuery(this).find("#el_choices"+e).val(),"right"==document.getElementById(l+"_option_left_right").value&&(a.style.cssText="float: none !important"),jQuery(this).find("#el_option_params"+e).val()&&(w_params=jQuery(this).find("#el_option_params"+e).val().split("[where_order_by]"),a.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),a.setAttribute("order_by",w_params[0]),a.setAttribute("db_info",w_params[1])),t.appendChild(a),t.appendChild(i),tr_row.appendChild(t),_.appendChild(tr_row),o++})}else{r=document.getElementById("edit_for_rowcol").value,n=parseInt((choeices+1)/r),o=0,m=0;jQuery(".change_pos").each(function(e){var t=jQuery(this)[0].id;o<r&&(tr_row=document.createElement("div"),tr_row.setAttribute("id",l+"_element_tr"+e),tr_row.style.display="table-row");var i=document.createElement("div");i.setAttribute("valign","top"),i.setAttribute("id",l+"_td_little"+t),i.setAttribute("idi",t),i.style.display="table-cell";var a=document.createElement("input");a.setAttribute("type",d),a.setAttribute("id",l+"_elementform_id_temp"+t),"checked"==jQuery("#"+l+"_elementform_id_temp"+t).attr("checked")&&a.setAttribute("checked","checked"),"right"==document.getElementById(l+"_option_left_right").value&&(a.style.cssText="float: left !important"),"checkbox"==d&&(a.setAttribute("name",l+"_elementform_id_temp"+t),"yes"==document.getElementById(l+"_allow_otherform_id_temp").value&&"1"==jQuery(this).find("#el_choices"+t).attr("other")?(a.setAttribute("value",""),a.setAttribute("other","1"),a.setAttribute("onclick","if(set_checked('"+l+"','"+t+"','form_id_temp')) show_other_input('"+l+"','form_id_temp');")):("no"==document.getElementById(l+"_value_disabledform_id_temp").value?a.setAttribute("value",jQuery(this).find("#el_choices"+t).val()):a.setAttribute("value",jQuery(this).find("#el_option_value"+t).val()),a.setAttribute("onclick","set_checked('"+l+"','"+t+"','form_id_temp')"))),"radio"==d&&(a.setAttribute("name",l+"_elementform_id_temp"),"yes"==document.getElementById(l+"_allow_otherform_id_temp").value&&"1"==jQuery(this).find("#el_choices"+t).attr("other")?(a.setAttribute("other","1"),a.setAttribute("onClick","set_default('"+l+"','"+t+"','form_id_temp'); show_other_input('"+l+"','form_id_temp')")):("no"==document.getElementById(l+"_value_disabledform_id_temp").value?a.setAttribute("value",jQuery(this).find("#el_choices"+t).val()):a.setAttribute("value",jQuery(this).find("#el_option_value"+t).val()),a.setAttribute("onClick","set_default('"+l+"','"+t+"','form_id_temp')")));var n=document.createElement("label");n.setAttribute("id",l+"_label_element"+t),n.setAttribute("class","ch-rad-label"),n.setAttribute("for",l+"_elementform_id_temp"+t),n.innerHTML=jQuery(this).find("#el_choices"+t).val(),"right"==document.getElementById(l+"_option_left_right").value&&(n.style.cssText="float: none !important"),jQuery(this).find("#el_option_params"+t).val()&&(w_params=jQuery(this).find("#el_option_params"+t).val().split("[where_order_by]"),n.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),n.setAttribute("order_by",w_params[0]),n.setAttribute("db_info",w_params[1])),i.appendChild(n),i.appendChild(a),o<r?(tr_row.appendChild(i),_.appendChild(tr_row)):(m==r&&(m=0),tr_row=document.getElementById(l+"_table_little").childNodes[m],tr_row.appendChild(i),m++),o++}),_.setAttribute("for_hor",l+"_hor")}refresh_attr(l,"type_"+d)}function show_other_input(t){jQuery(".change_pos").each(function(){var e=jQuery(this)[0].id;if(document.getElementById(t+"_elementform_id_temp"+e)&&document.getElementById(t+"_elementform_id_temp"+e).getAttribute("other")&&1==document.getElementById(t+"_elementform_id_temp"+e).getAttribute("other"))return element_other=document.getElementById(t+"_elementform_id_temp"+e),!1});var e=element_other.parentNode,i=document.createElement("br");i.setAttribute("id",t+"_other_brform_id_temp");var a=document.createElement("input");a.setAttribute("id",t+"_other_inputform_id_temp"),a.setAttribute("name",t+"_other_inputform_id_temp"),a.setAttribute("type","text"),a.setAttribute("class","other_input"),e.appendChild(i),e.appendChild(a)}function create_option_label_position(e,t,i){var a=jQuery('<label class="fm-field-label">Option Label Position</label>'),n=jQuery('<input type="radio" id="edit_for_option_position_left" name="edit_for_option_position" onchange="option_left('+e+",'"+i+"')\""+("right"==t?"":' checked="checked"')+" />"),l=jQuery('<label for="edit_for_option_position_left">Left</label>'),d=jQuery('<input type="radio" id="edit_for_option_position_right" name="edit_for_option_position" onchange="option_right('+e+",'"+i+"')\""+("right"==t?' checked="checked"':"")+" />"),_=jQuery('<label for="edit_for_option_position_right">Right</label>'),r=n;return create_option_container(a,r=(r=(r=r.add(l)).add(d)).add(_))}function option_right(e,t){jQuery("#"+e+"_table_little").find(jQuery(".ch-rad-label")).css("cssText","float: none !important;"),jQuery("#"+e+"_table_little").find(jQuery('#main_div input[type="'+t+'"]')).css("cssText","float: left !important;"),jQuery("#"+e+"_option_left_right").val("right")}function option_left(e,t){jQuery("#"+e+"_table_little").find(jQuery(".ch-rad-label")).css("cssText","float: left !important;"),jQuery("#"+e+"_table_little").find(jQuery('#main_div input[type="'+t+'"]')).css("cssText","float: right !important;"),jQuery("#"+e+"_option_left_right").val("left")}function create_rowcol(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_rowcol">Rows/Columns</label>'),jQuery('<input type="text" class="fm-width-100" id="edit_for_rowcol" onChange="refresh_rowcol('+e+",'"+i+'\')" value="'+t+'" />'))}function create_randomize(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_randomize">Randomize in frontend</label>'),jQuery('<input type="checkbox" id="el_randomize" onclick="set_randomize(\''+e+"_randomizeform_id_temp')\""+("yes"==t?' checked="checked"':"")+" />"))}function set_randomize(e){"yes"==document.getElementById(e).value?document.getElementById(e).setAttribute("value","no"):document.getElementById(e).setAttribute("value","yes")}function create_allow_other(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="el_allow_other">Allow other</label>'),jQuery('<input type="checkbox" id="el_allow_other" onclick="set_allow_other('+e+",'"+i+"')\""+("yes"==t?' checked="checked"':"")+" />"))}function set_allow_other(t,i){if("yes"==document.getElementById(t+"_allow_otherform_id_temp").value)document.getElementById(t+"_allow_otherform_id_temp").setAttribute("value","no"),jQuery(".change_pos").each(function(){var e=jQuery(this)[0].id;if(document.getElementById("el_choices"+e)&&document.getElementById("el_choices"+e).getAttribute("other")&&1==document.getElementById("el_choices"+e).getAttribute("other"))return remove_choise(e,t,i),!1});else{document.getElementById(t+"_allow_otherform_id_temp").setAttribute("value","yes");var a=0;jQuery(".change_pos").each(function(){var e=parseInt(jQuery(this)[0].id);a=a<e?e:a}),a+=1;var e=jQuery("#choices"),n=jQuery('<div id="'+a+'" class="change_pos fm-width-100"><div class="fm-table-col fm-width-40"><input type="text" class="fm-field-choice" id="el_choices'+a+'" value="other" other="1" onKeyUp="change_label(\''+t+"_label_element"+a+"', this.value); change_in_value('"+t+"_elementform_id_temp"+a+'\', this.value)" /></div><div class="fm-table-col fm-width-40"><input type="text" class="fm-field-choice" id="el_option_value'+a+'" value="" disabled="disabled" /></div><div class="fm-table-col fm-width-10"></div><div class="fm-table-col fm-width-10"><span class="fm-move-attribute fm-ico-draggable el_choices_sortable"></span></div></div>');e.append(n),refresh_rowcol(t,i)}}function create_radio_options(e,t,i,a,l,d,_,r,o){var m=jQuery('<label class="fm-field-label">Options</label>'),s=jQuery('<button id="el_choices_add" class="fm-add-option button-secondary" onClick="add_choise(\''+o+"', "+e+'); return false;" title="Add option"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>Option</button>');if(form_maker.is_demo)var u=jQuery('<button class="fm-add-option button-secondary" onClick="alert(\'This feature is disabled in demo.\')" title="Add options from database"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>From Database</button>');else u=jQuery("<button class=\"fm-add-option button-secondary\" onClick=\"tb_show('', 'admin-ajax.php?action=select_data_from_db&field_id="+e+"&nonce="+fm_ajax.ajaxnonce+"&field_type=radio&value_disabled="+t+'&width=530&height=370&TB_iframe=1\'); return false;" title="Add options from database"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>From Database</button>');var c=jQuery('<div id="choices" class="fm-width-100 ui-sortable"></div>'),p=jQuery('<div class="fm-width-100"><div class="fm-header-label fm-width-40">Name</div><div class="fm-header-label fm-width-40">Value</div><div class="fm-header-label fm-width-10">Delete</div><div class="fm-header-label fm-width-10">Move</div></div>');for(c.append(p),aaa=!1,n=i.length,j=0;j<n;j++){var f=jQuery('<div id="'+j+'" class="change_pos fm-width-100"><div class="fm-table-col fm-width-40"><input type="text" class="fm-field-choice" id="el_choices'+j+'"'+("yes"==d&&j==_?' other="1"':"")+' value="'+i[j].replace(/"/g,"&quot;")+'" onKeyUp="change_label(\''+e+"_label_element"+j+'\', this.value)" onpaste="elem=this; change_label_name_on_paste('+j+", '"+e+"_label_element"+j+"', '"+o+"'); change_label_value_on_paste('"+e+"_elementform_id_temp"+j+"', this)\""+(a[j]?' disabled="disabled"':"")+' /></div><div class="fm-table-col fm-width-40"><input type="text" class="fm-field-choice'+(a[j]||"yes"==d&&j==_?"":" el_option_value")+'" id="el_option_value'+j+'" value="'+l[j].replace(/"/g,"&quot;")+'" onKeyUp="change_label_value(\''+e+"_elementform_id_temp"+j+"', this.value)\" onpaste=\"change_label_value_on_paste('"+e+"_elementform_id_temp"+j+"', this)\""+("no"==t||a[j]||"yes"==d&&j==_?' disabled="disabled"':"")+' /><input type="hidden" id="el_option_params'+j+'" class="el_option_params" value="'+a[j]+'" /></div><div class="fm-table-col fm-width-10">'+("yes"==d&&j==_?"":'<span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_choices'+j+'_remove" onClick="remove_choise('+j+","+e+",'"+o+"')\"></span>")+'</div><div class="fm-table-col fm-width-10"><span class="fm-move-attribute fm-ico-draggable el_choices_sortable"></span></div></div>');c.append(f),1==r[j]&&"yes"==d&&j==_&&(aaa=!0)}var y=m;return create_option_container(null,y=(y=(y=y.add(s)).add(u)).add(c))}function remove_choise(e,t,i){var a=document.getElementById("choices"),n=document.getElementById(e);a.removeChild(n),refresh_rowcol(t,i)}function type_radio(i,e,t,a,n,l,d,_,r,o,m,s,u,c,p,f,y,h,b,v){jQuery("#element_type").val("type_radio"),delete_last_child();var w=jQuery("#edit_table"),g=jQuery('<div id="edit_div"></div>');w.append(g);var E=jQuery('<div id="edit_main_table"></div>');g.append(E),E.append(create_field_type("type_radio")),E.append(create_label(i,e)),E.append(create_label_position(i,a)),E.append(create_hide_label(i,l)),E.append(create_required(i,m)),E.append(create_relative_position(i,d,"radio")),E.append(create_option_label_position(i,n,"radio")),E.append(create_radio_options(i,h,_,v,b,u,c,r,"radio"));var A=jQuery('<div class="inside"></div>');E.append(create_advanced_options_container(A)),A.append(create_field_label_size(i,t)),A.append(create_class(i,p)),A.append(create_rowcol(i,o,"radio")),A.append(create_randomize(i,s)),A.append(create_enable_options_value(i,h,"radio")),A.append(create_allow_other(i,u,"radio")),A.append(create_additional_attributes(i,f,"type_radio")),element="input",type="radio";var j=document.createElement("input");j.setAttribute("type","hidden"),j.setAttribute("value","type_radio"),j.setAttribute("name",i+"_typeform_id_temp"),j.setAttribute("id",i+"_typeform_id_temp");var x=document.createElement("input");x.setAttribute("type","hidden"),x.setAttribute("value",m),x.setAttribute("name",i+"_requiredform_id_temp"),x.setAttribute("id",i+"_requiredform_id_temp");var k=document.createElement("input");k.setAttribute("type","hidden"),k.setAttribute("value",l),k.setAttribute("name",i+"_hide_labelform_id_temp"),k.setAttribute("id",i+"_hide_labelform_id_temp");var I=document.createElement("input");I.setAttribute("type","hidden"),I.setAttribute("value",s),I.setAttribute("name",i+"_randomizeform_id_temp"),I.setAttribute("id",i+"_randomizeform_id_temp");var C=document.createElement("input");C.setAttribute("type","hidden"),C.setAttribute("value",u),C.setAttribute("name",i+"_allow_otherform_id_temp"),C.setAttribute("id",i+"_allow_otherform_id_temp");var B=document.createElement("input");B.setAttribute("type","hidden"),B.setAttribute("value",o),B.setAttribute("name",i+"_rowcol_numform_id_temp"),B.setAttribute("id",i+"_rowcol_numform_id_temp");var Q=document.createElement("input");Q.setAttribute("type","hidden"),Q.setAttribute("value",n),Q.setAttribute("id",i+"_option_left_right");var T=document.createElement("input");T.setAttribute("type","hidden"),T.setAttribute("value",h),T.setAttribute("name",i+"_value_disabledform_id_temp"),T.setAttribute("id",i+"_value_disabledform_id_temp");var M=document.createElement("div");M.setAttribute("id","main_div");var L=document.createElement("div");L.setAttribute("id",i+"_elemet_tableform_id_temp");var z="yes"==l?"none":"table-cell",q=document.createElement("div");q.setAttribute("align","left"),q.style.display=z,q.style.width=t+"px",q.setAttribute("id",i+"_label_sectionform_id_temp");var H=document.createElement("div");H.setAttribute("align","left"),H.style.display="table-cell",H.setAttribute("id",i+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var N=document.createElement("br"),S=(document.createElement("br"),document.createElement("div"));S.style.display="table";var D=document.createElement("div");D.setAttribute("id",i+"_table_little"),D.style.display="table-row-group",S.appendChild(D);var P=document.createElement("div");P.setAttribute("id",i+"_element_tr1"),P.style.display="table-row";var O=document.createElement("div");O.setAttribute("id",i+"_element_tr2"),O.style.display="table-row";var K=document.createElement("div");K.setAttribute("valign","top"),K.setAttribute("id",i+"_td_little1"),K.style.display="table-cell";var U=document.createElement("div");U.setAttribute("valign","top"),U.setAttribute("id",i+"_td_little2"),U.style.display="table-cell";var F=document.createElement("span");F.setAttribute("id",i+"_element_labelform_id_temp"),F.innerHTML=e,F.setAttribute("class","label"),F.style.verticalAlign="top";var R=document.createElement("span");R.setAttribute("id",i+"_required_elementform_id_temp"),R.innerHTML="",R.setAttribute("class","required"),R.style.verticalAlign="top","yes"==m&&(R.innerHTML=" *");var W=document.getElementById("show_table");q.appendChild(F),q.appendChild(R),H.appendChild(j),H.appendChild(x),H.appendChild(k),H.appendChild(I),H.appendChild(C),H.appendChild(B),H.appendChild(Q),H.appendChild(T),H.appendChild(S),L.appendChild(q),L.appendChild(H),M.appendChild(L),M.appendChild(N),W.appendChild(M),jQuery("#main_div").append(form_maker.type_radio_description),"top"==a&&label_top(i),change_class(p,i),refresh_rowcol(i,"radio"),aaa&&show_other_input(i),jQuery(function(){jQuery("#choices").sortable({items:".change_pos",handle:".el_choices_sortable",update:function(e,t){refresh_rowcol(i,"radio")}})})}function type_checkbox(i,e,t,a,n,l,d,_,r,o,m,s,u,c,p,f,y,h,b,v){jQuery("#element_type").val("type_checkbox"),delete_last_child();var w=jQuery("#edit_table"),g=jQuery('<div id="edit_div"></div>');w.append(g);var E=jQuery('<div id="edit_main_table"></div>');g.append(E),E.append(create_field_type("type_checkbox")),E.append(create_label(i,e)),E.append(create_label_position(i,a)),E.append(create_hide_label(i,l)),E.append(create_required(i,m)),E.append(create_relative_position(i,d,"checkbox")),E.append(create_option_label_position(i,n,"checkbox")),E.append(create_radio_options(i,h,_,v,b,u,c,r,"checkbox"));var A=jQuery('<div class="inside"></div>');E.append(create_advanced_options_container(A)),A.append(create_field_label_size(i,t)),A.append(create_class(i,p)),A.append(create_rowcol(i,o,"checkbox")),A.append(create_randomize(i,s)),A.append(create_enable_options_value(i,h,"checkbox")),A.append(create_allow_other(i,u,"checkbox")),A.append(create_additional_attributes(i,f,"type_checkbox")),element="input",type="checkbox";var j=document.createElement("input");j.setAttribute("type","hidden"),j.setAttribute("value","type_checkbox"),j.setAttribute("name",i+"_typeform_id_temp"),j.setAttribute("id",i+"_typeform_id_temp");var x=document.createElement("input");x.setAttribute("type","hidden"),x.setAttribute("value",m),x.setAttribute("name",i+"_requiredform_id_temp"),x.setAttribute("id",i+"_requiredform_id_temp");var k=document.createElement("input");k.setAttribute("type","hidden"),k.setAttribute("value",l),k.setAttribute("name",i+"_hide_labelform_id_temp"),k.setAttribute("id",i+"_hide_labelform_id_temp");var I=document.createElement("input");I.setAttribute("type","hidden"),I.setAttribute("value",s),I.setAttribute("name",i+"_randomizeform_id_temp"),I.setAttribute("id",i+"_randomizeform_id_temp");var C=document.createElement("input");C.setAttribute("type","hidden"),C.setAttribute("value",u),C.setAttribute("name",i+"_allow_otherform_id_temp"),C.setAttribute("id",i+"_allow_otherform_id_temp");var B=document.createElement("input");B.setAttribute("type","hidden"),B.setAttribute("value",c),B.setAttribute("name",i+"_allow_other_numform_id_temp"),B.setAttribute("id",i+"_allow_other_numform_id_temp");var Q=document.createElement("input");Q.setAttribute("type","hidden"),Q.setAttribute("value",o),Q.setAttribute("name",i+"_rowcol_numform_id_temp"),Q.setAttribute("id",i+"_rowcol_numform_id_temp");var T=document.createElement("input");T.setAttribute("type","hidden"),T.setAttribute("value",n),T.setAttribute("id",i+"_option_left_right");var M=document.createElement("input");M.setAttribute("type","hidden"),M.setAttribute("value",h),M.setAttribute("name",i+"_value_disabledform_id_temp"),M.setAttribute("id",i+"_value_disabledform_id_temp");var L=document.createElement("div");L.setAttribute("id","main_div");var z=document.createElement("div");z.setAttribute("id",i+"_elemet_tableform_id_temp");var q="yes"==l?"none":"table-cell",H=document.createElement("div");H.setAttribute("align","left"),H.style.display=q,H.style.width=t+"px",H.setAttribute("id",i+"_label_sectionform_id_temp");var N=document.createElement("div");N.setAttribute("align","left"),N.style.display="table-cell",N.setAttribute("id",i+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var S=document.createElement("br"),D=(document.createElement("br"),document.createElement("div"));D.style.display="table";var P=document.createElement("div");P.setAttribute("id",i+"_table_little"),P.style.display="table-row-group",D.appendChild(P);var O=document.createElement("span");O.setAttribute("id",i+"_element_labelform_id_temp"),O.innerHTML=e,O.setAttribute("class","label"),O.style.verticalAlign="top";var K=document.createElement("span");K.setAttribute("id",i+"_required_elementform_id_temp"),K.innerHTML="",K.setAttribute("class","required"),K.style.verticalAlign="top","yes"==m&&(K.innerHTML=" *");var U=document.getElementById("show_table");H.appendChild(O),H.appendChild(K),N.appendChild(j),N.appendChild(x),N.appendChild(k),N.appendChild(I),N.appendChild(C),N.appendChild(B),N.appendChild(Q),N.appendChild(T),N.appendChild(M),N.appendChild(D),z.appendChild(H),z.appendChild(N),L.appendChild(z),L.appendChild(S),U.appendChild(L),jQuery("#main_div").append(form_maker.type_checkbox_description),"top"==a&&label_top(i),change_class(p,i),refresh_rowcol(i,"checkbox"),aaa&&show_other_input(i),jQuery(function(){jQuery("#choices").sortable({items:".change_pos",handle:".el_choices_sortable",update:function(e,t){refresh_rowcol(i,"checkbox")}})})}function create_keys(e,t){jQuery('<label class="fm-field-label">Keys</label>');return create_option_container(null,jQuery('<a href="'+admin_url+'?page=options_fm" target="_blank" class="fm-field-recaptcha-label">'+t+"</a>"))}function create_recaptcha_invisible(e,t){var i=jQuery('<label class="fm-field-label">Type</label>'),a=jQuery('<input type="radio" id="edit_for_recaptcha_type_v2" name="edit_for_recaptcha_type" value="v2" onchange="fm_recaptcha_type('+e+', this.value)"'+("v2"==t?' checked="checked"':"")+" />"),n=jQuery('<label for="edit_for_recaptcha_type_v2">reCAPTCHA v2 (checkbox)</label>'),l=jQuery('<input type="radio" id="edit_for_recaptcha_type_invisible" name="edit_for_recaptcha_type" value="invisible" onchange="fm_recaptcha_type('+e+', this.value)"'+("invisible"==t?' checked="checked"':"")+" />"),d=jQuery('<label for="edit_for_recaptcha_type_invisible">reCAPTCHA v2 (invisible)</label>'),_=jQuery('<input type="radio" id="edit_for_recaptcha_type_v3" name="edit_for_recaptcha_type" value="v3" onchange="fm_recaptcha_type('+e+', this.value)"'+("v3"==t?' checked="checked"':"")+" />"),r=jQuery('<label for="edit_for_recaptcha_type_v3">reCAPTCHA v3</label>'),o=a;return create_option_container(i,o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=o.add(n)).add(jQuery("<br />"))).add(jQuery('<span class="fm-description">Validate users with the "I\'m not a robot" checkbox.</span>'))).add(jQuery("<br />"))).add(l)).add(d)).add(jQuery("<br />"))).add(jQuery('<span class="fm-description">Validate users in the background.</span>'))).add(jQuery("<br />"))).add(_)).add(r)).add(jQuery("<br />"))).add(jQuery('<span class="fm-description">Verify requests with a score.</span>')))}function fm_recaptcha_type(e,t){jQuery("#wd_recaptchaform_id_temp").attr("w_type",t),"invisible"==t?(jQuery("#recaptcha_position").show(),jQuery("#recaptcha_keys_message").show(),jQuery("#recaptcha_advanced").hide(),jQuery("#recaptcha_score").hide(),jQuery("#"+e+"_hide_labelform_id_temp").val("no"),jQuery("#el_hide_label").attr("checked","checked"),hide_label(e)):"v3"==t?(jQuery("#recaptcha_score").show(),jQuery("#recaptcha_keys_message").show(),jQuery("#recaptcha_advanced").hide(),jQuery("#recaptcha_position").hide(),jQuery("#"+e+"_hide_labelform_id_temp").val("no"),jQuery("#el_hide_label").attr("checked","checked"),hide_label(e)):(jQuery("#recaptcha_position").hide(),jQuery("#recaptcha_score").hide(),jQuery("#recaptcha_keys_message").hide(),jQuery("#recaptcha_advanced").show())}function create_recaptcha_score(e,t,i){return create_option_container(jQuery('<label class="fm-field-label">Score</label>'),'ReCaptcha v3 returns a score based on the user interactions with your forms. Scores range from 0.0 to 1.0, with 0.0 indicating abusive traffic and 1.0 indicating good traffic. <a href="'+admin_url+'?page=options_fm" target="_blank" class="fm-field-recaptcha-label">To change recaptcha score click here</a>',"recaptcha_score","v3"==i)}function create_recaptcha_position(e,t,i){var a=jQuery('<label class="fm-field-label">Display</label>'),n=jQuery('<input type="radio" id="edit_for_recaptcha_position_hidden" name="edit_for_recaptcha_position" value="hidden" onchange="fm_recaptcha_position('+e+', this.value)"'+("hidden"==t?' checked="checked"':"")+" />"),l=jQuery('<label for="edit_for_recaptcha_position_hidden">Hidden</label>'),d=jQuery('<input type="radio" id="edit_for_recaptcha_position_inline" name="edit_for_recaptcha_position" value="inline" onchange="fm_recaptcha_position('+e+', this.value)"'+("inline"==t?' checked="checked"':"")+" />"),_=jQuery('<label for="edit_for_recaptcha_position_inline">Inline</label>'),r=jQuery('<input type="radio" id="edit_for_recaptcha_position_bottomright" name="edit_for_recaptcha_position" value="bottomright" onchange="fm_recaptcha_position('+e+', this.value)"'+("bottomright"==t?' checked="checked"':"")+" />"),o=jQuery('<label for="edit_for_recaptcha_position_bottomright">Bottom-Right</label>'),m=jQuery('<input type="radio" id="edit_for_recaptcha_position_bottomleft" name="edit_for_recaptcha_position" value="bottomleft" onchange="fm_recaptcha_position('+e+', this.value)"'+("bottomleft"==t?' checked="checked"':"")+" />"),s=jQuery('<label for="edit_for_recaptcha_position_bottomleft">Bottom-Left</label>'),u=n;return create_option_container(a,u=(u=(u=(u=(u=(u=(u=(u=(u=(u=u.add(l)).add(jQuery("<br />"))).add(d)).add(_)).add(jQuery("<br />"))).add(r)).add(o)).add(jQuery("<br />"))).add(m)).add(s),"recaptcha_position","invisible"==i)}function fm_recaptcha_position(e,t){jQuery("#wd_recaptchaform_id_temp").attr("position",t)}function go_to_type_recaptcha(e){type_recaptcha(e,"reCAPTCHA","","top","yes","invisible","bottomright",.5)}function type_recaptcha(e,t,i,a,n,l,d,_){jQuery("#element_type").val("type_recaptcha"),delete_last_child();var r=jQuery("#edit_table"),o=jQuery('<div id="edit_div"></div>');r.append(o);var m=jQuery('<div id="edit_main_table"></div>');o.append(m),m.append(create_field_type("type_recaptcha")),m.append(create_recaptcha_invisible(e,l)),m.append(create_recaptcha_position(e,d,l)),m.append(create_recaptcha_score(e,_,l)),m.append(create_keys(e,"To set up recaptcha keys click here"));var s=jQuery('<div class="inside"></div>'),u=!1;"invisible"!=l&&"v3"!=l&&(u=!0),m.append(create_advanced_options_container(s,"recaptcha_advanced",u)),s.append(create_label(e,t)),s.append(create_label_position(e,a)),s.append(create_hide_label(e,n)),s.append(create_field_label_size(e,i)),element="img",type="captcha";var c=document.createElement("input");c.setAttribute("type","hidden"),c.setAttribute("value","type_recaptcha"),c.setAttribute("name",e+"_typeform_id_temp"),c.setAttribute("id",e+"_typeform_id_temp");var p=document.createElement("input");p.setAttribute("type","hidden"),p.setAttribute("value",n),p.setAttribute("name",e+"_hide_labelform_id_temp"),p.setAttribute("id",e+"_hide_labelform_id_temp");var f=document.createElement("div");f.setAttribute("id","recaptcha_keys_message"),f.setAttribute("class","error"),f.innerHTML=form_maker.invisible_recaptcha_error;var y=document.createElement("div");y.setAttribute("id","wd_recaptchaform_id_temp"),y.setAttribute("w_type",l),y.setAttribute("position",d);var h=document.createElement("span");h.style.color="red",h.style.fontStyle="italic",h.innerHTML=form_maker.no_preview,y.appendChild(h);var b=document.createElement("div");b.setAttribute("id","main_div");var v=document.createElement("div");v.setAttribute("id",e+"_elemet_tableform_id_temp");var w="yes"==n?"none":"table-cell",g=document.createElement("div");g.setAttribute("align","left"),g.style.display=w,g.style.width=i+"px",g.setAttribute("id",e+"_label_sectionform_id_temp");var E=document.createElement("div");E.setAttribute("align","left"),E.style.display="table-cell",E.setAttribute("id",e+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var A=document.createElement("br"),j=(document.createElement("br"),document.createElement("span"));j.setAttribute("id",e+"_element_labelform_id_temp"),j.innerHTML=t,j.setAttribute("class","label"),j.style.verticalAlign="top";var x=document.getElementById("show_table");g.appendChild(j),E.appendChild(c),E.appendChild(p),E.appendChild(y),v.appendChild(f),v.appendChild(g),v.appendChild(E),b.appendChild(v),b.appendChild(A),x.appendChild(b),jQuery("#main_div").append(form_maker.type_recaptcha_description),"top"==a&&label_top(e),"v2"==jQuery("input[name='edit_for_recaptcha_type']:checked").val()&&jQuery("#recaptcha_keys_message").hide()}function create_submit_label(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_title">Submit label</label>'),jQuery('<input type="text" class="fm-width-100" id="edit_for_title" onKeyUp="change_label(\''+e+'_element_submitform_id_temp\', this.value)" value="'+t+'" />'))}function create_display_reset(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_reset_active">Display Reset</label>'),jQuery('<input type="checkbox" id="el_reset_active" onclick="active_reset(this.checked, '+e+')"'+(t?' checked="checked"':"")+" />"))}function active_reset(e,t){document.getElementById(t+"_element_resetform_id_temp").style.display=e?"inline":"none"}function create_reset_label(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_title_textarea">Reset label</label>'),jQuery('<input type="text" class="fm-width-100" id="edit_for_title_textarea" onKeyUp="change_label(\''+e+'_element_resetform_id_temp\', this.value)" value="'+t+'" />'))}function go_to_type_submit_reset(e){w_attr_name=[],w_attr_value=[],type_submit_reset(e,"Submit","Reset","",!0,w_attr_name,w_attr_value)}function type_submit_reset(e,t,i,a,n,l,d){jQuery("#element_type").val("type_submit_reset"),delete_last_child();var _=jQuery("#edit_table"),r=jQuery('<div id="edit_div"></div>');_.append(r);var o=jQuery('<div id="edit_main_table"></div>');r.append(o),o.append(create_field_type("type_submit_reset")),o.append(create_submit_label(e,t)),o.append(create_display_reset(e,n)),o.append(create_reset_label(e,i));var m=jQuery('<div class="inside"></div>');o.append(create_advanced_options_container(m)),m.append(create_class(e,a)),m.append(create_additional_attributes(e,l,"type_submit_reset"));var s=document.createElement("br"),u=document.createElement("input");u.setAttribute("type","hidden"),u.setAttribute("value","type_submit_reset"),u.setAttribute("name",e+"_typeform_id_temp"),u.setAttribute("id",e+"_typeform_id_temp");var c=document.createElement("button");c.setAttribute("type","button"),c.setAttribute("class","button button-secondary button-hero button-submit"),c.setAttribute("id",e+"_element_submitform_id_temp"),c.setAttribute("value",t),c.innerHTML=t,c.setAttribute("disabled","disabled");var p=document.createElement("button");p.setAttribute("type","button"),p.setAttribute("class","button button-secondary button-hero button-reset"),n||(p.style.display="none"),p.setAttribute("id",e+"_element_resetform_id_temp"),p.setAttribute("value",i),p.setAttribute("disabled","disabled"),p.innerHTML=i;var f=document.createElement("div");f.setAttribute("id","main_div");var y=document.createElement("div");y.setAttribute("id",e+"_elemet_tableform_id_temp");var h=document.createElement("div");h.setAttribute("align","left"),h.style.display="table-cell",h.setAttribute("id",e+"_label_sectionform_id_temp");var b=document.createElement("div");b.setAttribute("align","left"),b.style.display="table-cell",b.setAttribute("id",e+"_element_sectionform_id_temp");var v=document.createElement("span");v.setAttribute("id",e+"_element_labelform_id_temp"),v.style.cssText="display:none",v.innerHTML="type_submit_reset_"+e;var w=document.getElementById("show_table");h.appendChild(v),b.appendChild(u),b.appendChild(c),b.appendChild(p),y.appendChild(h),y.appendChild(b),f.appendChild(y),f.appendChild(s),w.appendChild(f),jQuery("#main_div").append(form_maker.type_submit_description),change_class(a,e),refresh_attr(e,"type_submit_reset")}function type_editor(e,t){jQuery("#element_type").val("type_editor"),delete_last_child();var i=jQuery("#edit_table"),a=jQuery('<div id="edit_div"></div>');i.append(a);var n,l=jQuery('<div id="edit_main_table"></div>');a.append(l),l.append(create_field_type("type_editor")),iReturnLeft=jQuery("#edit_table").offset().left,document.getElementById("main_editor").style.display="block",document.getElementById("main_editor").style.left=iReturnLeft+15+"px",document.getElementById("main_editor").style.top="120px",document.getElementById("main_editor").style.width=jQuery("#edit_table").width()-30+"px",document.getElementById("form_maker_editor_ifr")&&"none"==document.getElementById("form_maker_editor").style.display?(ifr_id="form_maker_editor_ifr",ifr=getIFrameDocument(ifr_id),ifr.body.innerHTML=t):document.getElementById("form_maker_editor").value=t,(n=document.createElement("div")).setAttribute("id","main_div"),document.getElementById("show_table").appendChild(n),(n=document.createElement("div")).style.width="500px",document.getElementById("edit_table").appendChild(n)}function type_section_break(e,t){jQuery("#element_type").val("type_section_break"),delete_last_child();var i=jQuery("#edit_table"),a=jQuery('<div id="edit_div"></div>');i.append(a);var n,l=jQuery('<div id="edit_main_table"></div>');a.append(l),l.append(create_field_type("type_section_break")),iReturnLeft=jQuery("#edit_table").offset().left,document.getElementById("main_editor").style.display="block",document.getElementById("main_editor").style.left=iReturnLeft+15+"px",document.getElementById("main_editor").style.top="120px",document.getElementById("main_editor").style.width=jQuery("#edit_table").width()-30+"px",document.getElementById("form_maker_editor_ifr")&&"none"==document.getElementById("form_maker_editor").style.display?(ifr_id="form_maker_editor_ifr",ifr=getIFrameDocument(ifr_id),ifr.body.innerHTML=t):document.getElementById("form_maker_editor").value=t,element="div",(n=document.createElement("div")).setAttribute("id","main_div"),document.getElementById("show_table").appendChild(n),(n=document.createElement("div")).style.width="500px",document.getElementById("edit_table").appendChild(n)}function create_page_title(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_page_title_input">Page Title</label>'),jQuery('<input type="text" class="fm-width-100" id="el_page_title_input" name="el_page_title_input" onKeyup="pagebreak_title_change(this.value,'+e+')" value="'+t+'" />'))}function pagebreak_title_change(e){e=e.replace(/(<([^>]+)>)/gi,""),document.getElementById("_div_between").setAttribute("page_title",e),document.getElementById("div_page_title").innerHTML=e+"<br/><br/>"}function create_next_type(e,t){var i=jQuery('<label class="fm-field-label">Next Type</label>'),a=jQuery('<input type="radio" id="el_type_next_text" name="el_type_next" value="text" onclick="pagebreak_type_change(\'next\',\'text\')"'+("text"==t[0]?' checked="checked"':"")+" />"),n=jQuery('<label for="el_type_next_text">Text</label>'),l=jQuery('<input type="radio" id="el_type_next_img" name="el_type_next" value="img" onclick="pagebreak_type_change(\'next\',\'img\')"'+("text"==t[0]?"":' checked="checked"')+" />"),d=jQuery('<label for="el_type_next_img">Image</label>'),_=a;return create_option_container(i,_=(_=(_=_.add(n)).add(l)).add(d))}function pagebreak_type_change(e,t){switch(document.getElementById("_div_between").setAttribute(e+"_type",t),t){case"button":document.getElementById("_div_between").setAttribute(e+"_title",e),(i=document.createElement("label")).setAttribute("class","fm-field-label"),i.setAttribute("for","el_title_"+e),i.setAttribute("id",e+"_label"),i.setAttribute("type","button"),i.innerHTML=e[0].toUpperCase()+e.slice(1)+" "+t+" name",document.getElementById(e+"_label").parentNode.replaceChild(i,document.getElementById(e+"_label")),document.getElementById("el_title_"+e).value=e,(a=document.createElement("button")).setAttribute("id","page_"+e+"_0"),a.setAttribute("class",document.getElementById("_div_between").getAttribute(e+"_class")),a.style.cursor="pointer",a.innerHTML=e,document.getElementById("_element_section_"+e).replaceChild(a,document.getElementById("page_"+e+"_0"));break;case"text":document.getElementById("_div_between").setAttribute(e+"_title",e),(i=document.createElement("label")).setAttribute("class","fm-field-label"),i.setAttribute("for","el_title_"+e),i.setAttribute("id",e+"_label"),i.innerHTML=e[0].toUpperCase()+e.slice(1)+" "+t+" name",document.getElementById(e+"_label").parentNode.replaceChild(i,document.getElementById(e+"_label")),document.getElementById("el_title_"+e).value=e[0].toUpperCase()+e.slice(1),(a=document.createElement("span")).setAttribute("id","page_"+e+"_0"),a.setAttribute("class",document.getElementById("_div_between").getAttribute(e+"_class")),a.style.cursor="pointer",a.innerHTML=e[0].toUpperCase()+e.slice(1),document.getElementById("_element_section_"+e).replaceChild(a,document.getElementById("page_"+e+"_0"));break;case"img":var i,a;document.getElementById("_div_between").setAttribute(e+"_title",plugin_url+"/images/"+e+".png"),(i=document.createElement("label")).setAttribute("class","fm-field-label"),i.setAttribute("for","el_title_"+e),i.setAttribute("id",e+"_label"),i.innerHTML=e[0].toUpperCase()+e.slice(1)+" "+t+" src",document.getElementById(e+"_label").parentNode.replaceChild(i,document.getElementById(e+"_label")),document.getElementById("el_title_"+e).value=plugin_url+"/images/"+e+".png",(a=document.createElement("img")).setAttribute("id","page_"+e+"_0"),a.setAttribute("class",document.getElementById("_div_between").getAttribute(e+"_class")),a.style.cursor="pointer",a.src=plugin_url+"/images/"+e+".png",document.getElementById("_element_section_"+e).replaceChild(a,document.getElementById("page_"+e+"_0"))}}function create_next_text_name(e,t){return create_option_container(jQuery('<label id="next_label" class="fm-field-label" for="el_title_next">Next text name</label>'),jQuery('<input type="text" class="fm-width-100" id="el_title_next" onKeyup="change_pagebreak_label( this.value, \'next\')" onChange="change_pagebreak_label( this.value, \'next\')" value="'+t[0]+'" />'))}function change_pagebreak_label(e,t){button_type=document.getElementById("_div_between").getAttribute(t+"_type"),"img"!=button_type?(document.getElementById("page_"+t+"_0").value=e,document.getElementById("page_"+t+"_0").innerHTML=e):document.getElementById("page_"+t+"_0").src=e,document.getElementById("_div_between").setAttribute(t+"_title",e)}function create_check_required_next(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_check_next_input">Check the required fields</label>'),jQuery('<input type="checkbox" id="el_check_next_input" onclick="set_checkable(\'next\')"'+("true"==t[0]?' checked="checked"':"")+" />"))}function set_checkable(e){document.getElementById("_div_between").setAttribute(e+"_checkable",document.getElementById("el_check_"+e+"_input").checked)}function create_previous_type(e,t){var i=jQuery('<label class="fm-field-label">Previous Type</label>'),a=jQuery('<input type="radio" id="el_type_previous_text" name="el_type_previous" value="text" onclick="pagebreak_type_change(\'previous\',\'text\')"'+("text"==t[1]?' checked="checked"':"")+" />"),n=jQuery('<label for="el_type_previous_text">Text</label>'),l=jQuery('<input type="radio" id="el_type_previous_img" name="el_type_previous" value="img" onclick="pagebreak_type_change(\'previous\',\'img\')"'+("text"==t[1]?"":' checked="checked"')+" />"),d=jQuery('<label for="el_type_previous_img">Image</label>'),_=a;return create_option_container(i,_=(_=(_=_.add(n)).add(l)).add(d))}function create_previous_text_name(e,t){return create_option_container(jQuery('<label id="previous_label" class="fm-field-label" for="el_title_previous">Previous text name</label>'),jQuery('<input type="text" class="fm-width-100" id="el_title_previous" onKeyup="change_pagebreak_label( this.value, \'previous\')" onChange="change_pagebreak_label( this.value, \'previous\')" value="'+t[1]+'" />'))}function create_check_required_previous(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_check_previous_input">Check the required fields</label>'),jQuery('<input type="checkbox" id="el_check_previous_input" onclick="set_checkable(\'previous\')"'+("true"==t[1]?' checked="checked"':"")+" />"))}function create_next_class(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="next_element_style">Next class</label>'),jQuery('<input type="text" class="fm-width-100" id="next_element_style" onChange="change_pagebreak_class(this.value, \'next\')" value="'+t[0]+'" />'))}function create_previous_class(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="previous_element_style">Previous class</label>'),jQuery('<input type="text" class="fm-width-100" id="previous_element_style" onChange="change_pagebreak_class(this.value, \'previous\')" value="'+t[1]+'" />'))}function change_pagebreak_class(e,t){document.getElementById("page_"+t+"_0").setAttribute("class",e),document.getElementById("_div_between").setAttribute(t+"_class",e)}function type_page_break(e,t,i,a,n,l,d,_){jQuery("#element_type").val("type_page_break"),delete_last_child();var r=jQuery("#edit_table"),o=jQuery('<div id="edit_div"></div>');r.append(o);var m=jQuery('<div id="edit_main_table"></div>');o.append(m),m.append(create_field_type("type_page_break")),m.append(create_page_title(e,t)),m.append(create_next_type(e,a)),m.append(create_next_text_name(e,i)),m.append(create_check_required_next(e,l)),m.append(create_previous_type(e,a)),m.append(create_previous_text_name(e,i)),m.append(create_check_required_previous(e,l));var s=jQuery('<div class="inside"></div>');m.append(create_advanced_options_container(s)),s.append(create_next_class(e,n)),s.append(create_previous_class(e,n)),s.append(create_additional_attributes(e,d,"type_page_break"));var u=document.createElement("br"),c=document.createElement("div");c.setAttribute("id","main_div");var p=document.createElement("div");p.setAttribute("id",e+"_elemet_tableform_id_temp");var f=document.createElement("div");f.setAttribute("align","left"),f.style.display="table-cell",f.setAttribute("id",e+"_label_sectionform_id_temp");var y=document.createElement("div");y.setAttribute("align","left"),y.style.display="table-cell",y.setAttribute("id",e+"_element_sectionform_id_temp");var h=document.createElement("div");h.setAttribute("align","right"),h.setAttribute("id","_element_section_next");var b=make_pagebreak_button("next",i[0],a[0],n[0],0);h.appendChild(b);var v=document.createElement("div");v.setAttribute("align","left"),v.setAttribute("id","_element_section_previous");var w=make_pagebreak_button("previous",i[1],a[1],n[1],0);v.appendChild(w);var g=document.createElement("div");g.setAttribute("align","center"),g.setAttribute("style","border:2px solid blue;padding:20px; margin:20px"),g.innerHTM="FIELDS";var E=document.createElement("div");E.innerHTML=t+"<br/><br/>",E.setAttribute("id","div_page_title"),E.setAttribute("align","center");var A=document.createElement("div");A.setAttribute("page_title",t),A.setAttribute("next_type",a[0]),A.setAttribute("next_title",i[0]),A.setAttribute("next_class",n[0]),A.setAttribute("next_checkable",l[0]),A.setAttribute("previous_type",a[1]),A.setAttribute("previous_title",i[1]),A.setAttribute("previous_class",n[1]),A.setAttribute("previous_checkable",l[1]),A.setAttribute("align","center"),A.setAttribute("id","_div_between"),A.innerHTML="--------------------------------------<br />P A G E B R E A K<br />--------------------------------------",y.appendChild(E),y.appendChild(g),y.appendChild(h),y.appendChild(A),y.appendChild(v);var j=document.getElementById("show_table");p.appendChild(y),c.appendChild(p),c.appendChild(u),j.appendChild(c),refresh_attr(e,"type_page_break")}function make_pagebreak_button(e,t,i,a,n){switch(i){case"button":return(l=document.createElement("button")).setAttribute("id","page_"+e+"_"+n),l.setAttribute("type","button"),l.setAttribute("class",a),l.style.cursor="pointer",l.innerHTML=t,l;case"text":return(l=document.createElement("span")).setAttribute("id","page_"+e+"_"+n),l.setAttribute("class",a),l.style.cursor="pointer",l.innerHTML=t,l;case"img":var l;return(l=document.createElement("img")).setAttribute("id","page_"+e+"_"+n),l.setAttribute("class",a),l.style.cursor="pointer",l.src=t,l}}function create_placeholder_name(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_first_value_input">Placeholder</label>'),jQuery('<input type="text" class="fm-width-40" id="el_first_value_first" onKeyUp="change_input_value(this.value,\''+e+'_element_firstform_id_temp\')" value="'+t[0].replace(/"/g,"&quot;")+'" />-<input type="text" class="fm-width-40" id="el_first_value_last" onKeyUp="change_input_value(this.value,\''+e+'_element_lastform_id_temp\')" value="'+t[1].replace(/"/g,"&quot;")+'" />'))}function create_field_size_name(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_input_size">Width(px)</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_input_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style(\''+e+"_element_firstform_id_temp', this.value); change_w_style('"+e+"_element_middleform_id_temp', this.value); change_w_style('"+e+'_element_lastform_id_temp\', this.value)" value="'+t+'" /><p class="description">'+form_maker.leave_empty+"</p>"))}function create_enable_name_fields(e,t,i){var a=jQuery('<label class="fm-field-label">Enable Field(s)</label>'),n=jQuery('<input type="checkbox" id="el_title" value="no" onclick="enable_name_fields('+e+",'title')\""+("yes"==t[0]?' checked="checked"':"")+" />"),l=jQuery('<label for="el_title" id="el_title_label">'+i[0]+"</label>"),d=jQuery('<input type="checkbox" id="el_middle" value="no" onclick="enable_name_fields('+e+",'middle')\""+("yes"==t[1]?' checked="checked"':"")+" />"),_=jQuery('<label for="el_middle" id="el_middle_label">'+i[3]+"</label>"),r=jQuery('<label id="el_first_label" class="fm-hide">'+i[1]+'</label><label id="el_last_label" class="fm-hide">'+i[2]+"</label>"),o=n;return create_option_container(a,o=(o=(o=(o=o.add(l)).add(d)).add(_)).add(r))}function enable_name_fields(t,e){var i="title"==e?2:3;tr_name1=document.getElementById(t+"_tr_name1"),tr_name2=document.getElementById(t+"_tr_name2"),first_input=document.getElementById(t+"_td_name_input_first"),first_label=document.getElementById(t+"_td_name_label_first");var a="title"==e?"40":document.getElementById("edit_for_input_size").value;if(1==document.getElementById("el_"+e).checked?document.getElementById(t+"_enable_fieldsform_id_temp").setAttribute(e,"yes"):document.getElementById(t+"_enable_fieldsform_id_temp").setAttribute(e,"no"),"yes"==document.getElementById(t+"_enable_fieldsform_id_temp").getAttribute(e)){var n=document.createElement("div");n.setAttribute("id",t+"_td_name_input_"+e),n.style.cssText="display:table-cell";var l=document.createElement("input");l.setAttribute("type","text"),w_title[i]==w_first_val[i]?(l.setAttribute("value",w_first_val[i]),l.setAttribute("placeholder",w_title[i])):l.setAttribute("value",w_first_val[i]),l.setAttribute("id",t+"_element_"+e+"form_id_temp"),l.setAttribute("name",t+"_element_"+e+"form_id_temp"),l.setAttribute("value",w_first_val[i]),l.setAttribute("title",w_title[i]),l.setAttribute("placeholder",w_title[i]),l.style.cssText="margin-right: 10px; width: "+a+"px";var d=document.createElement("div");d.setAttribute("id",t+"_td_name_label_"+e),d.style.cssText="display:table-cell";var _=document.createElement("label");_.setAttribute("class","mini_label"),_.setAttribute("id",t+"_mini_label_"+e),_.innerHTML=document.getElementById("el_"+e+"_label").innerHTML,n.appendChild(l),d.appendChild(_),"title"==e?(tr_name1.insertBefore(n,first_input),tr_name2.insertBefore(d,first_label)):(tr_name1.appendChild(n),tr_name2.appendChild(d))}else document.getElementById(t+"_td_name_input_"+e)&&(tr_name1.removeChild(document.getElementById(t+"_td_name_input_"+e)),tr_name2.removeChild(document.getElementById(t+"_td_name_label_"+e)));var r=document.createTextNode("-"),o=document.createTextNode("-");value_if_empty_width="title"==e?"60":"95";var m=document.createElement("input");m.setAttribute("id","el_first_value_"+e),m.setAttribute("type","text"),m.setAttribute("value",w_title[i]),m.style.cssText="width:"+value_if_empty_width+"px;",m.setAttribute("onKeyUp","change_input_value(this.value,'"+t+"_element_"+e+"form_id_temp')"),el_first_value_first=document.getElementById("el_first_value_first"),parent=el_first_value_first.parentNode,"yes"==document.getElementById(t+"_enable_fieldsform_id_temp").getAttribute(e)?"title"==e?(parent.insertBefore(r,el_first_value_first),parent.insertBefore(m,r)):(parent.appendChild(o),parent.appendChild(m)):document.getElementById("el_first_value_"+e)&&("title"==e?parent.removeChild(document.getElementById("el_first_value_title").nextSibling):parent.removeChild(document.getElementById("el_first_value_middle").previousSibling),parent.removeChild(document.getElementById("el_first_value_"+e))),refresh_attr(t,"type_name"),jQuery(document).ready(function(){jQuery("label#"+t+"_mini_label_title").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='title' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.title").focus(),jQuery("input.title").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_title").text(e),document.getElementById("el_title_label").innerHTML=e})}}),jQuery("label#"+t+"_mini_label_middle").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='middle' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.middle").focus(),jQuery("input.middle").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_middle").text(e),document.getElementById("el_middle_label").innerHTML=e})}})})}function create_autofill_user_name(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_autofill">Autofill with user name</label>'),jQuery('<input type="checkbox" id="el_autofill" onclick="set_autofill(\''+e+"_autofillform_id_temp')\""+("yes"==t?' checked="checked"':"")+" />"))}function set_autofill(e){"yes"==document.getElementById(e).value?document.getElementById(e).value="no":document.getElementById(e).value="yes"}function go_to_type_name(e){w_attr_name=[],w_attr_value=[],w_first_val=["","","",""],w_title=["","","",""],w_mini_labels=["Title","First","Last","Middle"],w_name_fields=["no","no"],type_name(e,"Name","","top","no",w_first_val,w_title,w_mini_labels,"","normal","no","no","",w_attr_name,w_attr_value,w_name_fields,"no")}function type_name(t,e,i,a,n,l,d,_,r,o,m,s,u,c,p,f,y){jQuery("#element_type").val("type_name"),delete_last_child();var h=jQuery("#edit_table"),b=jQuery('<div id="edit_div"></div>');h.append(b);var v=jQuery('<div id="edit_main_table"></div>');b.append(v),v.append(create_field_type("type_name")),v.append(create_label(t,e)),v.append(create_label_position(t,a)),v.append(create_hide_label(t,n)),v.append(create_required(t,m)),v.append(create_placeholder_name(t,d)),v.append(create_field_size_name(t,r));var w=jQuery('<div class="inside"></div>');v.append(create_advanced_options_container(w)),w.append(create_enable_name_fields(t,f,_)),w.append(create_autofill_user_name(t,y)),w.append(create_unique_values(t,s)),w.append(create_field_label_size(t,i)),w.append(create_class(t,u)),w.append(create_additional_attributes(t,c,"type_name"));var g=document.createElement("br"),E=document.createElement("input");E.setAttribute("type","hidden"),E.setAttribute("value","type_name"),E.setAttribute("name",t+"_typeform_id_temp"),E.setAttribute("id",t+"_typeform_id_temp");var A=document.createElement("input");A.setAttribute("type","hidden"),A.setAttribute("value",y),A.setAttribute("name",t+"_autofillform_id_temp"),A.setAttribute("id",t+"_autofillform_id_temp");var j=document.createElement("input");j.setAttribute("type","hidden"),j.setAttribute("value",m),j.setAttribute("name",t+"_requiredform_id_temp"),j.setAttribute("id",t+"_requiredform_id_temp");var x=document.createElement("input");x.setAttribute("type","hidden"),x.setAttribute("value",n),x.setAttribute("name",t+"_hide_labelform_id_temp"),x.setAttribute("id",t+"_hide_labelform_id_temp");var k=document.createElement("input");k.setAttribute("type","hidden"),k.setAttribute("name",t+"_enable_fieldsform_id_temp"),k.setAttribute("id",t+"_enable_fieldsform_id_temp"),k.setAttribute("title",f[0]),k.setAttribute("first","yes"),k.setAttribute("last","yes"),k.setAttribute("middle",f[1]);var I=document.createElement("input");I.setAttribute("type","hidden"),I.setAttribute("value",s),I.setAttribute("name",t+"_uniqueform_id_temp"),I.setAttribute("id",t+"_uniqueform_id_temp"),edit_labels=document.createTextNode("The labels of the fields are editable. Please, click on the label to edit.");var C=document.createElement("div");C.setAttribute("id","main_div");var B=document.createElement("div");B.setAttribute("class","fm-editable-label"),B.appendChild(edit_labels);var Q=document.createElement("div");Q.setAttribute("id",t+"_elemet_tableform_id_temp");var T="yes"==n?"none":"table-cell",M=document.createElement("div");M.setAttribute("align","left"),M.style.display=T,M.style.width=i+"px",M.setAttribute("id",t+"_label_sectionform_id_temp");var L=document.createElement("div");L.setAttribute("align","left"),L.style.display="table-cell",L.setAttribute("id",t+"_element_sectionform_id_temp");var z=document.createElement("div");z.style.display="table",z.setAttribute("id",t+"_table_name"),z.setAttribute("cellpadding","0"),z.setAttribute("cellspacing","0");var q=document.createElement("div");q.style.display="table-row",q.setAttribute("id",t+"_tr_name1");var H=document.createElement("div");H.style.display="table-row",H.setAttribute("id",t+"_tr_name2");var N=document.createElement("div");N.style.display="table-cell",N.setAttribute("id",t+"_td_name_input_first");var S=document.createElement("div");S.style.display="table-cell",S.setAttribute("id",t+"_td_name_input_last");var D=document.createElement("div");D.style.display="table-cell",D.setAttribute("id",t+"_td_name_label_first"),D.setAttribute("align","left");var P=document.createElement("div");P.style.display="table-cell",P.setAttribute("id",t+"_td_name_label_last"),P.setAttribute("align","left");var O=document.createElement("span");O.setAttribute("id",t+"_element_labelform_id_temp"),O.innerHTML=e,O.setAttribute("class","label"),O.style.verticalAlign="top";var K=document.createElement("span");K.setAttribute("id",t+"_required_elementform_id_temp"),K.innerHTML="",K.setAttribute("class","required"),K.style.verticalAlign="top","yes"==m&&(K.innerHTML=" *");var U=document.createElement("input");U.setAttribute("type","text"),U.style.cssText="margin-right: 10px; width:"+r+"px",U.setAttribute("id",t+"_element_firstform_id_temp"),U.setAttribute("name",t+"_element_firstform_id_temp"),U.setAttribute("value",l[0]),U.setAttribute("title",d[0]),U.setAttribute("placeholder",d[0]);var F=document.createElement("label");F.setAttribute("class","mini_label"),F.setAttribute("id",t+"_mini_label_first"),F.innerHTML=_[1];var R=document.createElement("input");R.setAttribute("type","text"),R.style.cssText="margin-right: 10px; width:"+r+"px",R.setAttribute("id",t+"_element_lastform_id_temp"),R.setAttribute("name",t+"_element_lastform_id_temp"),R.setAttribute("value",l[1]),R.setAttribute("title",d[1]),R.setAttribute("placeholder",d[1]);var W=document.createElement("label");W.setAttribute("class","mini_label"),W.setAttribute("id",t+"_mini_label_last"),W.innerHTML=_[2];var V=document.getElementById("show_table");M.appendChild(O),M.appendChild(K),N.appendChild(U),S.appendChild(R),q.appendChild(N),q.appendChild(S),D.appendChild(F),P.appendChild(W),H.appendChild(D),H.appendChild(P),z.appendChild(q),z.appendChild(H),L.appendChild(E),L.appendChild(j),L.appendChild(x),L.appendChild(I),L.appendChild(A),L.appendChild(k),L.appendChild(z),Q.appendChild(M),Q.appendChild(L),C.appendChild(Q),C.appendChild(g),C.appendChild(B),V.appendChild(C),jQuery("#main_div").append("<br>"+form_maker.type_name_description),"top"==a&&label_top(t),change_class(u,t),"yes"==f[0]&&enable_name_fields(t,"title"),"yes"==f[1]&&enable_name_fields(t,"middle"),jQuery(document).ready(function(){jQuery("label#"+t+"_mini_label_first").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='first' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.first").focus(),jQuery("input.first").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_first").text(e),document.getElementById("el_first_label").innerHTML=e})}}),jQuery("label#"+t+"_mini_label_last").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='last' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.last").focus(),jQuery("input.last").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_last").text(e),document.getElementById("el_last_label").innerHTML=e})}})}),refresh_attr(t,"type_name")}function create_autofill_user_email(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_autofill">Autofill with user email</label>'),jQuery('<input type="checkbox" id="el_autofill" onclick="set_autofill(\''+e+"_autofillform_id_temp')\""+("yes"==t?' checked="checked"':"")+" />"))}function create_confirmation_email(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_verification_mail">Confirmation Email</label>'),jQuery('<input type="checkbox" id="el_verification_mail" onclick="verification_mail('+e+')"'+("yes"==t?' checked="checked"':"")+" />"))}function verification_mail(e){document.getElementById("el_verification_mail").checked?(document.getElementById("confirm_validation_label").style.display="block",document.getElementById("confirm_validation_empty").style.display="block",document.getElementById(e+"_verification_id_temp").value="yes",document.getElementById(e+"_1_label_sectionform_id_temp").style.display=document.getElementById(e+"_label_sectionform_id_temp").style.display,document.getElementById(e+"_1_element_sectionform_id_temp").style.display=document.getElementById(e+"_element_sectionform_id_temp").style.display):(document.getElementById("confirm_validation_label").style.display="none",document.getElementById("confirm_validation_empty").style.display="none",document.getElementById(e+"_verification_id_temp").value="no",document.getElementById(e+"_1_label_sectionform_id_temp").style.display="none",document.getElementById(e+"_1_element_sectionform_id_temp").style.display="none")}function create_confirmation_email_label(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_label">Confirmation label</label>'),jQuery('<textarea id="edit_for_label" class="fm-width-100" onKeyUp="change_label(\''+e+"_element_labelform_id_temp', this.value, '"+e+'_1_element_labelform_id_temp\')" rows="4">'+i+"</textarea>"),"confirm_validation_label","yes"==t)}function create_confirmation_email_placeholder(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="el_first_value_verification_input">Confirmation placeholder</label>'),jQuery('<input type="text" class="fm-width-100" id="el_first_value_verification_input" onKeyUp="change_input_value(this.value,\''+e+'_1_elementform_id_temp\')" value="'+i.replace(/"/g,"&quot;")+'" />'),"confirm_validation_empty","yes"==t)}function go_to_type_submitter_mail(e){w_attr_name=[],w_attr_value=[],type_submitter_mail(e,"Email","","top","no","","","","no","no","","no","Email confirmation","",w_attr_name,w_attr_value,"no")}function type_submitter_mail(e,t,i,a,n,l,d,_,r,o,m,s,u,c,p,f,y){jQuery("#element_type").val("type_submitter_mail"),delete_last_child();var h=jQuery("#edit_table"),b=jQuery('<div id="edit_div"></div>');h.append(b);var v=jQuery('<div id="edit_main_table"></div>');b.append(v),v.append(create_field_type("type_submitter_mail")),v.append(create_label(e,t)),v.append(create_label_position(e,a)),v.append(create_hide_label(e,n)),v.append(create_required(e,r)),v.append(create_placeholder(e,_)),v.append(create_field_size(e,l,"'"+e+"_elementform_id_temp'","'"+e+"_1_elementform_id_temp'"));var w=jQuery('<div class="inside"></div>');v.append(create_advanced_options_container(w)),w.append(create_confirmation_email(e,s)),w.append(create_confirmation_email_label(e,s,u)),w.append(create_confirmation_email_placeholder(e,s,c)),w.append(create_autofill_user_email(e,y)),w.append(create_unique_values(e,o)),w.append(create_field_label_size(e,i,"'"+e+"_label_sectionform_id_temp'","'"+e+"_1_label_sectionform_id_temp'")),w.append(create_class(e,m)),w.append(create_additional_attributes(e,p,"type_submitter_mail")),element="input",type="text";var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value","type_submitter_mail"),g.setAttribute("name",e+"_typeform_id_temp"),g.setAttribute("id",e+"_typeform_id_temp");var E=document.createElement("input");E.setAttribute("type","hidden"),E.setAttribute("value",y),E.setAttribute("name",e+"_autofillform_id_temp"),E.setAttribute("id",e+"_autofillform_id_temp");var A=document.createElement("input");A.setAttribute("type","hidden"),A.setAttribute("value",r),A.setAttribute("name",e+"_requiredform_id_temp"),A.setAttribute("id",e+"_requiredform_id_temp");var j=document.createElement("input");j.setAttribute("type","hidden"),j.setAttribute("value",n),j.setAttribute("name",e+"_hide_labelform_id_temp"),j.setAttribute("id",e+"_hide_labelform_id_temp");var x=document.createElement("input");x.setAttribute("type","hidden"),x.setAttribute("value",o),x.setAttribute("name",e+"_uniqueform_id_temp"),x.setAttribute("id",e+"_uniqueform_id_temp");var k=document.createElement("input");k.setAttribute("type","hidden"),k.setAttribute("value",s),k.setAttribute("name",e+"_verification_id_temp"),k.setAttribute("id",e+"_verification_id_temp");var I=document.createElement(element);I.setAttribute("type",type),I.style.cssText="width:"+l+"px;",I.setAttribute("id",e+"_elementform_id_temp"),I.setAttribute("name",e+"_elementform_id_temp"),I.setAttribute("value",d),I.setAttribute("title",_),I.setAttribute("placeholder",_);var C=document.createElement(element);C.setAttribute("type",type),C.style.cssText="width:"+l+"px;",C.setAttribute("id",e+"_1_elementform_id_temp"),C.setAttribute("name",e+"_1_elementform_id_temp"),C.setAttribute("placeholder",c),C.setAttribute("title",c);var B=document.createElement("div");B.setAttribute("id","main_div");var Q=document.createElement("div");Q.setAttribute("id",e+"_elemet_tableform_id_temp");var T="yes"==n?"none":"table-cell",M=document.createElement("div");M.setAttribute("align","left"),M.style.display=T,M.style.width=i+"px",M.setAttribute("id",e+"_label_sectionform_id_temp");var L="yes"==n||"no"==s?"none":"table-cell",z=document.createElement("div");z.setAttribute("align","left"),z.style.display=L,z.style.width=i+"px",z.setAttribute("id",e+"_1_label_sectionform_id_temp");var q=document.createElement("div");q.setAttribute("align","left"),q.style.display="table-cell",q.setAttribute("id",e+"_element_sectionform_id_temp");var H="no"==s?"none":"table-cell",N=document.createElement("div");N.setAttribute("align","left"),N.style.display=H,N.setAttribute("id",e+"_1_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var S=document.createElement("br"),D=(document.createElement("br"),document.createElement("br")),P=document.createElement("span");P.setAttribute("id",e+"_element_labelform_id_temp"),P.innerHTML=t,P.setAttribute("class","label"),P.style.verticalAlign="top";var O=document.createElement("span");O.setAttribute("id",e+"_1_element_labelform_id_temp"),O.innerHTML=u,O.setAttribute("class","label"),O.style.verticalAlign="top";var K=document.createElement("span");K.setAttribute("id",e+"_required_elementform_id_temp"),K.innerHTML="",K.setAttribute("class","required"),K.style.verticalAlign="top","yes"==r&&(K.innerHTML=" *");var U=document.createElement("span");U.setAttribute("id",e+"_1_required_elementform_id_temp"),U.innerHTML="",U.setAttribute("class","required"),U.style.verticalAlign="top","yes"==r&&(U.innerHTML=" *");var F=document.getElementById("show_table");M.appendChild(P),M.appendChild(K),z.appendChild(O),z.appendChild(U),q.appendChild(g),q.appendChild(A),q.appendChild(j),q.appendChild(x),q.appendChild(k),q.appendChild(E),q.appendChild(I),N.appendChild(C),Q.appendChild(M),Q.appendChild(q),Q.appendChild(D),Q.appendChild(z),Q.appendChild(N),B.appendChild(Q),B.appendChild(S),F.appendChild(B),jQuery("#main_div").append(form_maker.type_email_description),"top"==a&&label_top(e),change_class(m,e),refresh_attr(e,"type_text")}function go_to_type_phone_new(e){w_attr_name=[],w_attr_value=[],type_phone_new(e,"Phone","","top","no","","","us","no","no","",w_attr_name,w_attr_value)}function type_phone_new(e,t,i,a,n,l,d,_,r,o,m,s,u){jQuery("#element_type").val("type_phone_new"),delete_last_child();var c=jQuery("#edit_table"),p=jQuery('<div id="edit_div"></div>');c.append(p);var f=jQuery('<div id="edit_main_table"></div>');p.append(f),f.append(create_field_type("type_phone_new")),f.append(create_label(e,t)),f.append(create_label_position(e,a)),f.append(create_hide_label(e,n)),f.append(create_required(e,r)),f.append(create_field_size(e,l));var y=jQuery('<div class="inside"></div>');f.append(create_advanced_options_container(y)),y.append(create_unique_values(e,o)),y.append(create_field_label_size(e,i)),y.append(create_class(e,m)),y.append(create_additional_attributes(e,s,"type_phone_new"));var h=document.createElement("br"),b=document.createElement("input");b.setAttribute("type","hidden"),b.setAttribute("value","type_phone_new"),b.setAttribute("name",e+"_typeform_id_temp"),b.setAttribute("id",e+"_typeform_id_temp");var v=document.createElement("input");v.setAttribute("type","hidden"),v.setAttribute("value",r),v.setAttribute("name",e+"_requiredform_id_temp"),v.setAttribute("id",e+"_requiredform_id_temp");var w=document.createElement("input");w.setAttribute("type","hidden"),w.setAttribute("value",n),w.setAttribute("name",e+"_hide_labelform_id_temp"),w.setAttribute("id",e+"_hide_labelform_id_temp");var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value",o),g.setAttribute("name",e+"_uniqueform_id_temp"),g.setAttribute("id",e+"_uniqueform_id_temp");var E=document.createElement("div");E.setAttribute("id","main_div");var A=document.createElement("div");A.setAttribute("id",e+"_elemet_tableform_id_temp");var j="yes"==n?"none":"table-cell",x=document.createElement("div");x.setAttribute("align","left"),x.style.display=j,x.style.width=i+"px",x.setAttribute("id",e+"_label_sectionform_id_temp");var k=document.createElement("div");k.setAttribute("align","left"),k.style.display="table-cell",k.setAttribute("id",e+"_element_sectionform_id_temp");var I=document.createElement("div");I.style.display="table",I.setAttribute("id",e+"_table_name");var C=document.createElement("div");C.style.display="table-row",C.setAttribute("id",e+"_tr_name1");var B=document.createElement("div");B.style.display="table-cell",B.setAttribute("id",e+"_td_name_input_first");var Q=document.createElement("span");Q.setAttribute("id",e+"_element_labelform_id_temp"),Q.innerHTML=t,Q.setAttribute("class","label"),Q.style.verticalAlign="top";var T=document.createElement("span");T.setAttribute("id",e+"_required_elementform_id_temp"),T.innerHTML="",T.setAttribute("class","required"),"yes"==r&&(T.innerHTML=" *");var M=document.createElement("input");M.setAttribute("type","text"),M.style.cssText="width:"+l+"px",M.setAttribute("id",e+"_elementform_id_temp"),M.setAttribute("name",e+"_elementform_id_temp"),M.setAttribute("value",d),M.setAttribute("top-country",_);var L=document.getElementById("show_table");x.appendChild(Q),x.appendChild(T),B.appendChild(M),C.appendChild(B),I.appendChild(C),k.appendChild(b),k.appendChild(v),k.appendChild(w),k.appendChild(g),k.appendChild(I),A.appendChild(x),A.appendChild(k),E.appendChild(A),E.appendChild(h),L.appendChild(E),jQuery("#main_div").append(form_maker.type_phone_description),"top"==a&&label_top(e),change_class(m,e),refresh_attr(e,"type_text"),jQuery("#"+e+"_elementform_id_temp").intlTelInput({nationalMode:!1,preferredCountries:[_]})}function create_address_size(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_input_size">Overall width(px)</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_input_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style(\''+e+'_div_address\', this.value)" value="'+t+'" /><p class="description">'+form_maker.leave_empty+"</p>"))}function create_use_us_states_list(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_us_states">Use list for US states and Canada provinces</label>'),jQuery('<input type="checkbox" id="el_us_states" onclick="disable_fields('+e+",'us_states');\""+("yes"==t[6]?' checked="checked"':"")+" />"))}function disable_fields(i,a){var e=document.getElementById(i+"_div_address");if(a&&(1==document.getElementById("el_"+a).checked?document.getElementById(i+"_disable_fieldsform_id_temp").setAttribute(a,"yes"):document.getElementById(i+"_disable_fieldsform_id_temp").setAttribute(a,"no")),"yes"==document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute("state"))document.getElementById("el_us_states").disabled=!0;else if(document.getElementById("el_us_states").disabled=!1,"us_states"==a)return void change_state_input(i,"form_id_temp");e.innerHTML="";var t=new Array,n=["street1","street2","city","state","postal","country"],d=0;for(l=0;l<6;l++){if("no"==document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute(n[l]))if("street1"==n[l]||"street2"==n[l]){var _=document.createElement("input");_.setAttribute("type","text"),_.style.cssText="width:100%",_.setAttribute("id",i+"_"+n[l]+"form_id_temp"),_.setAttribute("name",parseInt(i)+l+"_"+n[l]+"form_id_temp");var r=document.createElement("label");r.setAttribute("class","mini_label"),r.setAttribute("id",i+"_mini_label_"+n[l]),r.style.cssText="display:block;",r.innerHTML=document.getElementById("el_"+n[l]+"_label").innerHTML,w_mini_labels[l]=document.getElementById("el_"+n[l]+"_label").innerHTML,(m=document.createElement("span")).style.cssText="float:left; width:100%; padding-bottom: 8px; display:block",m.appendChild(_),m.appendChild(r),e.appendChild(m)}else{var o,m;if(d++,"country"!=n[l])(a=document.createElement("input")).setAttribute("type","text"),a.style.cssText="width:100%",a.setAttribute("id",i+"_"+n[l]+"form_id_temp"),a.setAttribute("name",parseInt(i)+l+"_"+n[l]+"form_id_temp"),(o=document.createElement("label")).setAttribute("class","mini_label"),o.setAttribute("id",i+"_mini_label_"+n[l]),o.style.cssText="display:block;",o.innerHTML=document.getElementById("el_"+n[l]+"_label").innerHTML,w_mini_labels[l]=document.getElementById("el_"+n[l]+"_label").innerHTML;else(a=document.createElement("select")).setAttribute("type","text"),a.style.cssText="width:100%",a.setAttribute("id",i+"_countryform_id_temp"),a.setAttribute("name",parseInt(i)+l+"_countryform_id_temp"),a.setAttribute("onChange","change_state_input('"+i+"', 'form_id_temp')"),(o=document.createElement("label")).setAttribute("class","mini_label"),o.setAttribute("id",i+"_mini_label_country"),o.style.cssText="display:block;",o.innerHTML=document.getElementById("el_"+n[l]+"_label").innerHTML,w_mini_labels[l]=document.getElementById("el_"+n[l]+"_label").innerHTML,countries=form_maker.countries,jQuery.each(countries,function(e,t){var i=document.createElement("option");i.setAttribute("value",t),i.innerHTML=t,a.appendChild(i)});if(d%2!=0)(m=document.createElement("span")).style.cssText="float:left; width:48%; padding-bottom: 8px;";else(m=document.createElement("span")).style.cssText="float:right; width:48%; padding-bottom: 8px;";m.appendChild(a),m.appendChild(o),e.appendChild(m)}else{var s=document.createElement("input");s.setAttribute("type","hidden"),s.setAttribute("id",i+"_"+n[l]+"form_id_temp"),s.setAttribute("value",document.getElementById("el_"+n[l]+"_label").innerHTML),s.setAttribute("id_for_label",parseInt(i)+l),t.push(s)}for(k=0;k<t.length;k++)e.appendChild(t[k])}"no"==document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute("state")&&"yes"==document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute("country")&&change_state_input(i,"form_id_temp"),jQuery(document).ready(function(t){t("label#"+i+"_mini_label_street1").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='street1' style='outline:none; border:none; background:none;' value=\""+t(this).text()+'">';t(this).html(e),t("input.street1").focus(),t("input.street1").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_street1").text(e),document.getElementById("el_street1_label").innerHTML=e})}}),t("label#"+i+"_mini_label_street2").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='street2' style='outline:none; border:none; background:none;' value=\""+t(this).text()+'">';t(this).html(e),t("input.street2").focus(),t("input.street2").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_street2").text(e),document.getElementById("el_street2_label").innerHTML=e})}}),t("label#"+i+"_mini_label_city").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='city' style='outline:none; border:none; background:none;' value=\""+t(this).text()+'">';t(this).html(e),t("input.city").focus(),t("input.city").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_city").text(e),document.getElementById("el_city_label").innerHTML=e})}}),t("label#"+i+"_mini_label_state").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='state' style='outline:none; border:none; background:none;' value=\""+t(this).text()+'">';t(this).html(e),t("input.state").focus(),t("input.state").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_state").text(e),document.getElementById("el_state_label").innerHTML=e})}}),t("label#"+i+"_mini_label_postal").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='postal' style='outline:none; border:none; background:none;' value=\""+t(this).text()+'">';t(this).html(e),t("input.postal").focus(),t("input.postal").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_postal").text(e),document.getElementById("el_postal_label").innerHTML=e})}}),t("label#"+i+"_mini_label_country").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='country' style='outline:none; border:none; background:none;' value=\""+t(this).text()+'">';t(this).html(e),t("input.country").focus(),t("input.country").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_country").text(e),document.getElementById("el_country_label").innerHTML=e})}})}),refresh_attr(i,"type_address")}function change_state_input(e,t){if(document.getElementById(e+"_country"+t)&&document.getElementById(e+"_state"+t)&&!document.getElementById("el_state").checked&&!document.getElementById("el_us_states").disabled){var i=!1,a=document.getElementById(e+"_state"+t);if("United States"==document.getElementById(e+"_country"+t).value&&document.getElementById("el_us_states").checked){var n=document.createElement("select"),l=form_maker.states;for(var d in l){(_=document.createElement("option")).setAttribute("value",d),_.innerHTML=l[d],n.appendChild(_)}i=!0}else if("Canada"==document.getElementById(e+"_country"+t).value&&document.getElementById("el_us_states").checked){n=document.createElement("select"),l=form_maker.provinces;for(var d in l){var _;(_=document.createElement("option")).setAttribute("value",d),_.innerHTML=l[d],n.appendChild(_)}i=!0}else if("SELECT"==document.getElementById(e+"_state"+t).tagName){n=document.createElement("input");i=!0}if(i){n.setAttribute("type","text"),n.style.cssText="width: 100%",n.setAttribute("id",e+"_state"+t),n.setAttribute("name",parseInt(e)+3+"_state"+t);var r=a.parentNode;r.removeChild(a),r.insertBefore(n,r.firstChild)}}}function create_disable_address_fields(e,t,i){var a=jQuery('<label class="fm-field-label">Disable Field(s)</label>'),n=jQuery('<input type="checkbox" id="el_street1" value="no" onclick="disable_fields('+e+",'street1')\""+("yes"==t[0]?' checked="checked"':"")+" />"),l=jQuery('<label for="el_street1" id="el_street1_label">'+i[0]+"</label>"),d=jQuery('<input type="checkbox" id="el_street2" value="no" onclick="disable_fields('+e+",'street2')\""+("yes"==t[1]?' checked="checked"':"")+" />"),_=jQuery('<label for="el_street2" id="el_street2_label">'+i[1]+"</label>"),r=jQuery('<input type="checkbox" id="el_city" value="no" onclick="disable_fields('+e+",'city')\""+("yes"==t[2]?' checked="checked"':"")+" />"),o=jQuery('<label for="el_city" id="el_city_label">'+i[2]+"</label>"),m=jQuery('<input type="checkbox" id="el_state" value="no" onclick="disable_fields('+e+",'state')\""+("yes"==t[3]?' checked="checked"':"")+" />"),s=jQuery('<label for="el_state" id="el_state_label">'+i[3]+"</label>"),u=jQuery('<input type="checkbox" id="el_postal" value="no" onclick="disable_fields('+e+",'postal')\""+("yes"==t[4]?' checked="checked"':"")+" />"),c=jQuery('<label for="el_postal" id="el_postal_label">'+i[4]+"</label>"),p=jQuery('<input type="checkbox" id="el_country" value="no" onclick="disable_fields('+e+",'country')\""+("yes"==t[5]?' checked="checked"':"")+" />"),f=jQuery('<label for="el_country" id="el_country_label">'+i[5]+"</label>"),y=n;return create_option_container(a,y=(y=(y=(y=(y=(y=(y=(y=(y=(y=(y=(y=(y=(y=(y=(y=y.add(l)).add(jQuery("<br />"))).add(d)).add(_)).add(jQuery("<br />"))).add(r)).add(o)).add(jQuery("<br />"))).add(m)).add(s)).add(jQuery("<br />"))).add(u)).add(c)).add(jQuery("<br />"))).add(p)).add(f))}function go_to_type_address(e){w_attr_name=[],w_attr_value=[],w_mini_labels=["Street Address","Street Address Line 2","City","State / Province / Region","Postal / Zip Code","Country"],w_disabled_fields=["no","no","no","no","no","no","yes"],type_address(e,"Address","","top","no","",w_mini_labels,w_disabled_fields,"no","wdform_address",w_attr_name,w_attr_value)}function type_address(i,e,t,a,n,l,d,_,r,o,m,s){jQuery("#element_type").val("type_address"),delete_last_child();var u=jQuery("#edit_table"),c=jQuery('<div id="edit_div"></div>');u.append(c);var p=jQuery('<div id="edit_main_table"></div>');c.append(p),p.append(create_field_type("type_address")),p.append(create_label(i,e)),p.append(create_label_position(i,a)),p.append(create_hide_label(i,n)),p.append(create_required(i,r)),p.append(create_address_size(i,l)),p.append(create_use_us_states_list(i,_));var f=jQuery('<div class="inside"></div>');p.append(create_advanced_options_container(f)),f.append(create_disable_address_fields(i,_,d)),f.append(create_field_label_size(i,t)),f.append(create_class(i,o)),f.append(create_additional_attributes(i,m,"type_address"));var y=document.createElement("input");y.setAttribute("type","hidden"),y.setAttribute("value","type_address"),y.setAttribute("name",i+"_typeform_id_temp"),y.setAttribute("id",i+"_typeform_id_temp");var h=document.createElement("input");h.setAttribute("type","hidden"),h.setAttribute("name",i+"_disable_fieldsform_id_temp"),h.setAttribute("id",i+"_disable_fieldsform_id_temp"),h.setAttribute("street1",_[0]),h.setAttribute("street2",_[1]),h.setAttribute("city",_[2]),h.setAttribute("state",_[3]),h.setAttribute("us_states",_[6]),h.setAttribute("postal",_[4]),h.setAttribute("country",_[5]);var b=document.createElement("input");b.setAttribute("type","hidden"),b.setAttribute("value",r),b.setAttribute("name",i+"_requiredform_id_temp"),b.setAttribute("id",i+"_requiredform_id_temp");var v=document.createElement("input");v.setAttribute("type","hidden"),v.setAttribute("value",n),v.setAttribute("name",i+"_hide_labelform_id_temp"),v.setAttribute("id",i+"_hide_labelform_id_temp");var w=document.createElement("div");w.setAttribute("id","main_div");var g=document.createTextNode("The labels of the fields are editable. Please, click on the label to edit."),E=document.createElement("div");E.setAttribute("style","margin-left:4px; color:red; display:inline-block;"),E.appendChild(g);var A=document.createElement("div");A.setAttribute("id",i+"_elemet_tableform_id_temp");var j="yes"==n?"none":"table-cell",x=document.createElement("div");x.setAttribute("align","left"),x.style.display=j,x.style.width=t+"px",x.style.verticalAlign="top",x.setAttribute("id",i+"_label_sectionform_id_temp");var k=document.createElement("div");k.setAttribute("align","left"),k.style.display="table-cell",k.setAttribute("id",i+"_element_sectionform_id_temp");var I=document.createElement("div");I.setAttribute("id",i+"_div_address"),I.style.cssText="width:"+l+"px";var C=document.createElement("span");C.style.cssText="float:left; width:100%; padding-bottom: 8px; display:block";var B=document.createElement("span");B.style.cssText="float:left; width:100%; padding-bottom: 8px; display:block";var Q=document.createElement("span");Q.style.cssText="float:left; width:48%; padding-bottom: 8px;";var T=document.createElement("span");T.style.cssText="float:right; width:48%; padding-bottom: 8px;";var M=document.createElement("span");M.style.cssText="float:left; width:48%; padding-bottom: 8px;";var L=document.createElement("span");L.style.cssText="float:right; width:48%; padding-bottom: 8px;";var z=document.createElement("br"),q=document.createElement("span");q.setAttribute("id",i+"_element_labelform_id_temp"),q.innerHTML=e,q.setAttribute("class","wd_form_label"),q.style.verticalAlign="top";var H=document.createElement("span");H.setAttribute("id",i+"_required_elementform_id_temp"),H.innerHTML="",H.setAttribute("class","required"),H.style.verticalAlign="top","yes"==r&&(H.innerHTML=" *");var N=document.createElement("input");N.setAttribute("type","text"),N.style.cssText="width:100%",N.setAttribute("id",i+"_street1form_id_temp"),N.setAttribute("name",i+"_street1form_id_temp");var S=document.createElement("label");S.setAttribute("class","mini_label"),S.setAttribute("id",i+"_mini_label_street1"),S.style.cssText="display:block;",S.innerHTML=d[0];var D=document.createElement("input");D.setAttribute("type","text"),D.style.cssText="width:100%",D.setAttribute("id",i+"_street2form_id_temp"),D.setAttribute("name",parseInt(i)+1+"_street2form_id_temp");var P=document.createElement("label");P.setAttribute("class","mini_label"),P.setAttribute("id",i+"_mini_label_street2"),P.style.cssText="display:block;",P.innerHTML=d[1];var O=document.createElement("input");O.setAttribute("type","text"),O.style.cssText="width:100%",O.setAttribute("id",i+"_cityform_id_temp"),O.setAttribute("name",parseInt(i)+2+"_cityform_id_temp");var K=document.createElement("label");K.setAttribute("class","mini_label"),K.setAttribute("id",i+"_mini_label_city"),K.style.cssText="display:block;",K.innerHTML=d[2];var U=document.createElement("input");U.setAttribute("type","text"),U.style.cssText="width:100%",U.setAttribute("id",i+"_stateform_id_temp"),U.setAttribute("name",parseInt(i)+3+"_stateform_id_temp");var F=document.createElement("label");F.setAttribute("class","mini_label"),F.setAttribute("id",i+"_mini_label_state"),F.style.cssText="display:block;",F.innerHTML=d[3];var R=document.createElement("input");R.setAttribute("type","text"),R.style.cssText="width:100%",R.setAttribute("id",i+"_postalform_id_temp"),R.setAttribute("name",parseInt(i)+4+"_postalform_id_temp");var W=document.createElement("label");W.setAttribute("class","mini_label"),W.setAttribute("id",i+"_mini_label_postal"),W.style.cssText="display:block;",W.innerHTML=d[4];var V=document.createElement("select");V.setAttribute("type","text"),V.style.cssText="width:100%",V.setAttribute("id",i+"_countryform_id_temp"),V.setAttribute("name",parseInt(i)+5+"_countryform_id_temp"),V.setAttribute("onChange","change_state_input('"+i+"','form_id_temp')");var $=document.createElement("label");$.setAttribute("class","mini_label"),$.setAttribute("id",i+"_mini_label_country"),$.style.cssText="display:block;",$.innerHTML=d[5],countries=form_maker.countries,jQuery.each(countries,function(e,t){var i=document.createElement("option");i.setAttribute("value",t),i.innerHTML=t,V.appendChild(i)});var G=document.getElementById("show_table");x.appendChild(q),x.appendChild(H),C.appendChild(N),C.appendChild(S),B.appendChild(D),B.appendChild(P),Q.appendChild(O),Q.appendChild(K),T.appendChild(U),T.appendChild(F),M.appendChild(R),M.appendChild(W),L.appendChild(V),L.appendChild($),I.appendChild(C),I.appendChild(B),I.appendChild(Q),I.appendChild(T),I.appendChild(M),I.appendChild(L),k.appendChild(y),k.appendChild(b),k.appendChild(v),k.appendChild(h),k.appendChild(I),A.appendChild(x),A.appendChild(k),w.appendChild(A),w.appendChild(z),w.appendChild(E),G.appendChild(w),jQuery("#main_div").append("<br><br>"+form_maker.type_address_description),"top"==a&&label_top(i),change_class(o,i),refresh_attr(i,"type_address"),"yes"==_[0]&&disable_fields(i,"street1"),"yes"==_[1]&&disable_fields(i,"street2"),"yes"==_[2]&&disable_fields(i,"city"),"yes"==_[3]&&disable_fields(i,"state"),"yes"==_[4]&&disable_fields(i,"postal"),"yes"==_[5]&&disable_fields(i,"country"),"yes"==_[6]&&disable_fields(i,"us_states"),jQuery(document).ready(function(t){t("label#"+i+"_mini_label_street1").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='street1' style='outline:none; border:none; background:none; width:130px;' value=\""+t(this).text()+'">';t(this).html(e),t("input.street1").focus(),t("input.street1").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_street1").text(e),document.getElementById("el_street1_label").innerHTML=e})}}),t("label#"+i+"_mini_label_street2").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='street2' style='outline:none; border:none; background:none; width:130px;' value=\""+t(this).text()+'">';t(this).html(e),t("input.street2").focus(),t("input.street2").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_street2").text(e),document.getElementById("el_street2_label").innerHTML=e})}}),t("label#"+i+"_mini_label_city").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='city' style='outline:none; border:none; background:none; width:130px;' value=\""+t(this).text()+'">';t(this).html(e),t("input.city").focus(),t("input.city").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_city").text(e),document.getElementById("el_city_label").innerHTML=e})}}),t("label#"+i+"_mini_label_state").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='state' style='outline:none; border:none; background:none; width:130px;' value=\""+t(this).text()+'">';t(this).html(e),t("input.state").focus(),t("input.state").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_state").text(e),document.getElementById("el_state_label").innerHTML=e})}}),t("label#"+i+"_mini_label_postal").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='postal' style='outline:none; border:none; background:none; width:130px;' value=\""+t(this).text()+'">';t(this).html(e),t("input.postal").focus(),t("input.postal").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_postal").text(e),document.getElementById("el_postal_label").innerHTML=e})}}),t("label#"+i+"_mini_label_country").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='country' style='outline:none; border:none; background:none; width:130px;' value=\""+t(this).text()+'">';t(this).html(e),t("input.country").focus(),t("input.country").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_country").text(e),document.getElementById("el_country_label").innerHTML=e})}})})}function create_markmap_address(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="addrval'+t+'">Address</label>'),jQuery('<input type="text" class="fm-width-100" id="addrval'+t+'" onChange="changeAddress('+e+", "+t+')" value="" />'))}function create_markmap_longitude(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="longval'+i+'">Longitude</label>'),jQuery('<input type="text" class="fm-width-100" id="longval'+i+'" onkeyup="update_position('+e+", "+i+')" value="'+t+'" />'))}function create_markmap_latitude(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="latval'+i+'">Latitude</label>'),jQuery('<input type="text" class="fm-width-100" id="latval'+i+'" onkeyup="update_position('+e+", "+i+')" value="'+t+'" />'))}function create_markmap_size(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_input_size">Size(px)</label>'),jQuery('<input type="text" class="fm-width-40" id="edit_for_input_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style(\''+e+'_elementform_id_temp\', this.value)" value="'+t+'" />x<input type="text" class="fm-width-40" id="edit_for_input_size" onKeyPress="return check_isnum(event)" onKeyUp="change_h_style(\''+e+'_elementform_id_temp\', this.value)" value="'+i+'" /><p class="description">'+form_maker.leave_empty+"</p>"))}function create_markmap_info(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="info'+i+'">Marker Info</label>'),jQuery('<textarea class="fm-width-100" id="info'+i+'" rows="3" onKeyUp="change_info(this.value,'+e+", "+i+')">'+t+"</textarea>"))}function go_to_type_mark_map(e){w_attr_name=[],w_attr_value=[],type_mark_map(e,"Mark your place on map","","top","no","2.294254","48.858334","2.294254","48.858334","13","370","300","wdform_map","",w_attr_name,w_attr_value)}function type_mark_map(e,t,i,a,n,l,d,_,r,o,m,s,u,c,p,f){jQuery("#element_type").val("type_mark_map"),delete_last_child();var y=jQuery("#edit_table"),h=jQuery('<div id="edit_div"></div>');y.append(h);var b=jQuery('<div id="edit_main_table"></div>');h.append(b),b.append(create_field_type("type_mark_map")),b.append(create_label(e,t)),b.append(create_label_position(e,a)),b.append(create_hide_label(e,n)),b.append(jQuery('<div class="notice notice-info"><p>Drag the marker to change default marker position.</p></div>')),b.append(create_markmap_address(e,0)),b.append(create_markmap_longitude(e,_,0)),b.append(create_markmap_latitude(e,r,0)),b.append(create_markmap_info(e,c,0)),b.append(create_markmap_size(e,m,s)),b.append(create_keys(e,"To set up map key click here"));var v=jQuery('<div class="inside"></div>');b.append(create_advanced_options_container(v)),v.append(create_field_label_size(e,i)),v.append(create_class(e,u)),v.append(create_additional_attributes(e,p,"type_mark_map")),element="div";var w=document.createElement("br"),g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value","type_mark_map"),g.setAttribute("name",e+"_typeform_id_temp"),g.setAttribute("id",e+"_typeform_id_temp");var E=document.createElement("div");E.setAttribute("id",e+"_elementform_id_temp"),E.setAttribute("long0",_),E.setAttribute("lat0",r),E.setAttribute("zoom",o),E.style.cssText="width:"+m+"px; height: "+s+"px",E.setAttribute("info0",c),E.setAttribute("center_x",l),E.setAttribute("center_y",d);var A=document.createElement("input");A.setAttribute("type","hidden"),A.setAttribute("value",n),A.setAttribute("name",e+"_hide_labelform_id_temp"),A.setAttribute("id",e+"_hide_labelform_id_temp");var j=document.createElement("span");j.setAttribute("id",e+"_element_labelform_id_temp"),j.innerHTML=t,j.setAttribute("class","wd_form_label"),j.style.verticalAlign="top";var x=document.createElement("div");x.setAttribute("id","main_div");var k=document.createElement("div");k.setAttribute("id",e+"_elemet_tableform_id_temp");var I="yes"==n?"none":"table-cell",C=document.createElement("div");C.setAttribute("align","left"),C.style.display=I,C.style.width=i+"px",C.style.verticalAlign="top",C.setAttribute("id",e+"_label_sectionform_id_temp");var B=document.createElement("div");B.setAttribute("align","left"),B.style.display="table-cell",B.setAttribute("id",e+"_element_sectionform_id_temp");var Q=document.getElementById("show_table");C.appendChild(j),B.appendChild(g),B.appendChild(E),B.appendChild(A),k.appendChild(C),k.appendChild(B),x.appendChild(k),x.appendChild(w),Q.appendChild(x),jQuery("#main_div").append(form_maker.type_mark_on_map_description),"top"==a&&label_top(e),change_class(u,e),refresh_attr(e,"type_text"),if_gmap_init(e),add_marker_on_map(e,0,_,r,c,!0)}function create_edit_country_list(e){jQuery('<label class="fm-field-label">Edit country list</label>');return create_option_container(null,jQuery("<a href=\"\" onclick=\"tb_show('', 'admin-ajax.php?action=FormMakerEditCountryinPopup&nonce="+fm_ajax.ajaxnonce+"&field_id="+e+'&width=530&height=370&TB_iframe=1\'); return false;" class="thickbox-preview fm-field-recaptcha-label">Edit country list</a>'))}function go_to_type_country(e){w_countries=form_maker.countries,w_attr_name=[],w_attr_value=[],type_country(e,"Country","","no",w_countries,"top","","no","wdform_select",w_attr_name,w_attr_value)}function type_country(e,t,i,a,n,l,d,_,r,o,m){jQuery("#element_type").val("type_country"),delete_last_child();var s=jQuery("#edit_table"),u=jQuery('<div id="edit_div"></div>');s.append(u);var c=jQuery('<div id="edit_main_table"></div>');u.append(c),c.append(create_field_type("type_country")),c.append(create_label(e,t)),c.append(create_label_position(e,l)),c.append(create_hide_label(e,a)),c.append(create_required(e,_)),c.append(create_field_size(e,d));var p=jQuery('<div class="inside"></div>');c.append(create_advanced_options_container(p)),p.append(create_edit_country_list(e)),p.append(create_field_label_size(e,i)),p.append(create_class(e,r)),p.append(create_additional_attributes(e,o,"type_country"));document.createElement("br");var f=document.createElement("input");f.setAttribute("type","hidden"),f.setAttribute("value","type_country"),f.setAttribute("name",e+"_typeform_id_temp"),f.setAttribute("id",e+"_typeform_id_temp");var y=document.createElement("input");y.setAttribute("type","hidden"),y.setAttribute("value",_),y.setAttribute("name",e+"_requiredform_id_temp"),y.setAttribute("id",e+"_requiredform_id_temp");var h=document.createElement("input");h.setAttribute("type","hidden"),h.setAttribute("value",a),h.setAttribute("name",e+"_hide_labelform_id_temp"),h.setAttribute("id",e+"_hide_labelform_id_temp");var b=document.createElement("div");b.setAttribute("id","main_div");var v=document.createElement("div");v.setAttribute("id",e+"_elemet_tableform_id_temp");var w="yes"==a?"none":"table-cell",g=document.createElement("div");g.setAttribute("align","left"),g.style.display=w,g.style.width=i+"px",g.setAttribute("id",e+"_label_sectionform_id_temp");var E=document.createElement("div");E.setAttribute("align","left"),E.style.display="table-cell",E.style.width=i+"px",E.setAttribute("id",e+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var A=document.createElement("br"),j=(document.createElement("br"),document.createElement("div"));j.setAttribute("id",e+"_table_little"),j.style.display="table";var x=document.createElement("div");x.setAttribute("id",e+"_element_tr1"),x.style.display="table-row";var k=document.createElement("div");k.setAttribute("id",e+"_element_tr2"),k.style.display="table-row";var I=document.createElement("div");I.setAttribute("valign","top"),I.setAttribute("id",e+"_td_little1"),I.style.display="table-cell";var C=document.createElement("div");C.setAttribute("valign","top"),C.setAttribute("id",e+"_td_little2"),C.style.display="table-cell";var B=document.createElement("span");B.setAttribute("id",e+"_element_labelform_id_temp"),B.innerHTML=t,B.setAttribute("class","label"),B.style.verticalAlign="top";var Q=document.createElement("span");Q.setAttribute("id",e+"_required_elementform_id_temp"),Q.innerHTML="",Q.setAttribute("class","required"),Q.style.verticalAlign="top","yes"==_&&(Q.innerHTML=" *");var T=document.createElement("select");T.setAttribute("id",e+"_elementform_id_temp"),T.setAttribute("name",e+"_elementform_id_temp"),T.style.cssText="width:"+d+"px",jQuery.each(n,function(e,t){var i=document.createElement("option");i.setAttribute("value",t),i.innerHTML=t,T.appendChild(i)});var M=document.getElementById("show_table");g.appendChild(B),g.appendChild(Q),E.appendChild(h),E.appendChild(f),E.appendChild(y),E.appendChild(T),v.appendChild(g),v.appendChild(E),b.appendChild(v),b.appendChild(A),M.appendChild(b),jQuery("#main_div").append(form_maker.type_country_list_description),"top"==l&&label_top(e),change_class(r,e),refresh_attr(e,"type_text")}function create_datefields_separator(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_fields_divider">Fields separator</label>'),jQuery('<input type="text" class="fm-width-100" id="edit_for_fields_divider" onKeyUp="set_divider('+e+', this.value)" value="'+t+'" />'))}function create_datefield_day_type(e,t){var i=jQuery('<label class="fm-field-label">Day field type</label>'),a=jQuery('<input type="radio" id="el_day_field_type_text" name="edit_for_day_field_type" onchange="field_to_text('+e+", 'day')\""+("SELECT"==t?"":' checked="checked"')+" />"),n=jQuery('<label for="el_day_field_type_text">Input</label>'),l=jQuery('<input type="radio" id="el_day_field_type_select" name="edit_for_day_field_type" onchange="field_to_select('+e+", 'day')\""+("SELECT"==t?' checked="checked"':"")+" />"),d=jQuery('<label for="el_day_field_type_select">Select</label>'),_=a;return create_option_container(i,_=(_=(_=_.add(n)).add(l)).add(d))}function create_datefields_day_size(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_day_size">Day field width(px)</label>'),jQuery('<input type="text" class="fm-width-100" id="edit_for_day_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style(\''+e+'_dayform_id_temp\', this.value)" value="'+t+'" />'))}function create_datefield_month_type(e,t){var i=jQuery('<label class="fm-field-label">Month field type</label>'),a=jQuery('<input type="radio" id="el_month_field_type_text" name="edit_for_month_field_type" onchange="field_to_text('+e+", 'month')\""+("SELECT"==t?"":' checked="checked"')+" />"),n=jQuery('<label for="el_month_field_type_text">Input</label>'),l=jQuery('<input type="radio" id="el_month_field_type_select" name="edit_for_month_field_type" onchange="field_to_select('+e+", 'month')\""+("SELECT"==t?' checked="checked"':"")+" />"),d=jQuery('<label for="el_month_field_type_select">Select</label>'),_=a;return create_option_container(i,_=(_=(_=_.add(n)).add(l)).add(d))}function create_datefields_month_size(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_month_size">Month field width(px)</label>'),jQuery('<input type="text" class="fm-width-100" id="edit_for_month_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style(\''+e+'_monthform_id_temp\', this.value)" value="'+t+'" />'))}function create_datefield_year_type(e,t){var i=jQuery('<label class="fm-field-label">Year field type</label>'),a=jQuery('<input type="radio" id="el_year_field_type_text" name="edit_for_year_field_type" onchange="field_to_text('+e+", 'year')\""+("SELECT"==t?"":' checked="checked"')+" />"),n=jQuery('<label for="el_year_field_type_text">Input</label>'),l=jQuery('<input type="radio" id="el_year_field_type_select" name="edit_for_year_field_type" onchange="field_to_select('+e+", 'year')\""+("SELECT"==t?' checked="checked"':"")+" />"),d=jQuery('<label for="el_year_field_type_select">Select</label>'),_=a;return create_option_container(i,_=(_=(_=_.add(n)).add(l)).add(d))}function create_datefields_year_size(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_year_size">Year field width(px)</label>'),jQuery('<input type="text" class="fm-width-100" id="edit_for_year_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style(\''+e+'_yearform_id_temp\', this.value)" value="'+t+'" />'))}function create_datefields_year_interval(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_year_interval_from">Year interval</label>'),jQuery('<input type="text" class="fm-width-40" id="edit_for_year_interval_from" onKeyPress="return check_isnum(event)" onKeyUp="year_interval('+e+')" value="'+t+'" />-<input type="text" class="fm-width-40" id="edit_for_year_interval_to" onKeyPress="return check_isnum(event)" onKeyUp="year_interval('+e+')" value="'+i+'" />'))}function field_to_select(e,t){switch(t){case"day":w_width=""!=document.getElementById("edit_for_day_size").value?document.getElementById("edit_for_day_size").value:30,w_day=document.getElementById(e+"_dayform_id_temp").value,document.getElementById(e+"_td_date_input1").innerHTML="";var i=document.createElement("select");for(i.setAttribute("id",e+"_dayform_id_temp"),i.setAttribute("name",e+"_dayform_id_temp"),i.setAttribute("onChange","set_select(this)"),i.style.width=w_width+"px",(_=document.createElement("option")).setAttribute("value",""),_.innerHTML="",i.appendChild(_),k=1;k<=31;k++){k<10&&(k="0"+k),(_=document.createElement("option")).setAttribute("value",k),_.innerHTML=k,k==w_day&&_.setAttribute("selected","selected"),i.appendChild(_)}document.getElementById(e+"_td_date_input1").appendChild(i);break;case"month":w_width=""!=document.getElementById("edit_for_month_size").value?document.getElementById("edit_for_month_size").value:60,w_month=document.getElementById(e+"_monthform_id_temp").value,document.getElementById(e+"_td_date_input2").innerHTML="";var a=document.createElement("select");a.setAttribute("id",e+"_monthform_id_temp"),a.setAttribute("name",e+"_monthform_id_temp"),a.setAttribute("onChange","set_select(this)"),a.style.width=w_width+"px",(_=document.createElement("option")).setAttribute("value",""),_.innerHTML="",a.appendChild(_);var n=new Array("\x3c!--repstart--\x3eJanuary\x3c!--repend--\x3e","\x3c!--repstart--\x3eFebruary\x3c!--repend--\x3e","\x3c!--repstart--\x3eMarch\x3c!--repend--\x3e","\x3c!--repstart--\x3eApril\x3c!--repend--\x3e","\x3c!--repstart--\x3eMay\x3c!--repend--\x3e","\x3c!--repstart--\x3eJune\x3c!--repend--\x3e","\x3c!--repstart--\x3eJuly\x3c!--repend--\x3e","\x3c!--repstart--\x3eAugust\x3c!--repend--\x3e","\x3c!--repstart--\x3eSeptember\x3c!--repend--\x3e","\x3c!--repstart--\x3eOctober\x3c!--repend--\x3e","\x3c!--repstart--\x3eNovember\x3c!--repend--\x3e","\x3c!--repstart--\x3eDecember\x3c!--repend--\x3e");for(k=1;k<=12;k++){k<10&&(k="0"+k),(_=document.createElement("option")).setAttribute("value",k),_.innerHTML=n[k-1],k==w_month&&_.setAttribute("selected","selected"),a.appendChild(_)}document.getElementById(e+"_td_date_input2").appendChild(a);break;case"year":w_width=""!=document.getElementById("edit_for_year_size").value?document.getElementById("edit_for_year_size").value:60,w_year=document.getElementById(e+"_yearform_id_temp").value,document.getElementById(e+"_td_date_input3").innerHTML="";var l=document.createElement("select");l.setAttribute("id",e+"_yearform_id_temp"),l.setAttribute("name",e+"_yearform_id_temp"),l.setAttribute("onChange","set_select(this)"),l.style.width=w_width+"px",(_=document.createElement("option")).setAttribute("value",""),_.innerHTML="",l.appendChild(_);var d=new Date;for(from=parseInt(document.getElementById("edit_for_year_interval_from").value),to=""!=document.getElementById("edit_for_year_interval_to").value?parseInt(document.getElementById("edit_for_year_interval_to").value):d.getFullYear(),k=to;k>=from;k--){var _;(_=document.createElement("option")).setAttribute("value",k),_.innerHTML=k,k==w_year&&_.setAttribute("selected","selected"),l.appendChild(_)}l.value=w_year,l.setAttribute("from",from),l.setAttribute("to",to),document.getElementById(e+"_td_date_input3").appendChild(l)}refresh_attr(e,"type_date_fields")}function field_to_text(e,t){switch(t){case"day":w_width=""!=document.getElementById("edit_for_day_size").value?document.getElementById("edit_for_day_size").value:30,w_day=document.getElementById(e+"_dayform_id_temp").value,document.getElementById(e+"_td_date_input1").innerHTML="";var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("value",w_day),i.setAttribute("id",e+"_dayform_id_temp"),i.setAttribute("name",e+"_dayform_id_temp"),i.setAttribute("onBlur","if (this.value=='0') this.value=''; else add_0('"+e+"_dayform_id_temp')"),i.style.width=w_width+"px",document.getElementById(e+"_td_date_input1").appendChild(i);break;case"month":w_width=""!=document.getElementById("edit_for_month_size").value?document.getElementById("edit_for_month_size").value:60,w_month=document.getElementById(e+"_monthform_id_temp").value,document.getElementById(e+"_td_date_input2").innerHTML="";var a=document.createElement("input");a.setAttribute("type","text"),a.setAttribute("value",w_month),a.setAttribute("id",e+"_monthform_id_temp"),a.setAttribute("name",e+"_monthform_id_temp"),a.style.width=w_width+"px",a.setAttribute("onBlur","if (this.value=='0') this.value=''; else add_0('"+e+"_monthform_id_temp')"),document.getElementById(e+"_td_date_input2").appendChild(a);break;case"year":w_width=""!=document.getElementById("edit_for_year_size").value?document.getElementById("edit_for_year_size").value:60,w_year=document.getElementById(e+"_yearform_id_temp").value,document.getElementById(e+"_td_date_input3").innerHTML="";var n=new Date;from=parseInt(document.getElementById("edit_for_year_interval_from").value),to=""!=document.getElementById("edit_for_year_interval_to").value?parseInt(document.getElementById("edit_for_year_interval_to").value):n.getFullYear(),(parseInt(w_year)<from||parseInt(w_year)>to)&&(w_year="");var l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("value",w_year),l.setAttribute("id",e+"_yearform_id_temp"),l.setAttribute("name",e+"_yearform_id_temp"),l.style.width=w_width+"px",l.setAttribute("from",from),l.setAttribute("to",to),document.getElementById(e+"_td_date_input3").appendChild(l)}refresh_attr(e,"type_date_fields")}function set_divider(e,t){document.getElementById(e+"_separator1").innerHTML=t,document.getElementById(e+"_separator2").innerHTML=t}function year_interval(e){var t=new Date;from=parseInt(document.getElementById("edit_for_year_interval_from").value),to=""!=document.getElementById("edit_for_year_interval_to").value?parseInt(document.getElementById("edit_for_year_interval_to").value):t.getFullYear(),to-from<0?(alert("Invalid interval of years."),document.getElementById("edit_for_year_interval_from").value=to):"SELECT"==document.getElementById(e+"_yearform_id_temp").tagName?field_to_select(e,"year"):field_to_text(e,"year")}function go_to_type_date_fields(e){w_attr_name=[],w_attr_value=[];var t=new Date;w_to=t.getFullYear(),type_date_fields(e,"Date of Birth","","top","no","","","","SELECT","SELECT","SELECT","day","month","year","60","100","80","no","wdform_date_fields","1901",w_to,"&nbsp;/&nbsp;",w_attr_name,w_attr_value)}function type_date_fields(i,e,t,a,n,l,d,_,r,o,m,s,u,c,p,f,y,h,b,v,w,g,E,A){current_date=new Date,jQuery("#element_type").val("type_date_fields"),delete_last_child();var j=jQuery("#edit_table"),x=jQuery('<div id="edit_div"></div>');j.append(x);var k=jQuery('<div id="edit_main_table"></div>');x.append(k),k.append(create_field_type("type_date_fields")),k.append(create_label(i,e)),k.append(create_label_position(i,a)),k.append(create_hide_label(i,n)),k.append(create_required(i,h));var I=jQuery('<div class="inside"></div>');k.append(create_advanced_options_container(I)),I.append(create_datefields_separator(i,g)),I.append(create_datefield_day_type(i,r)),I.append(create_datefields_day_size(i,p)),I.append(create_datefield_month_type(i,o)),I.append(create_datefields_month_size(i,f)),I.append(create_datefield_year_type(i,m)),I.append(create_datefields_year_size(i,y)),I.append(create_datefields_year_interval(i,v,w)),I.append(jQuery('<div class="notice notice-info"><p>Leave the second field empty and the current year will be used automatically. For a specific year (other than current) fill out both the start and finish points of the range.</p></div>')),I.append(create_field_label_size(i,t)),I.append(create_class(i,b)),I.append(create_additional_attributes(i,E,"type_date_fields"));var C=document.createElement("br"),B=document.createElement("input");B.setAttribute("type","hidden"),B.setAttribute("value","type_date_fields"),B.setAttribute("name",i+"_typeform_id_temp"),B.setAttribute("id",i+"_typeform_id_temp");var Q=document.createElement("input");Q.setAttribute("type","hidden"),Q.setAttribute("value",h),Q.setAttribute("name",i+"_requiredform_id_temp"),Q.setAttribute("id",i+"_requiredform_id_temp");var T=document.createElement("input");T.setAttribute("type","hidden"),T.setAttribute("value",n),T.setAttribute("name",i+"_hide_labelform_id_temp"),T.setAttribute("id",i+"_hide_labelform_id_temp");var M=document.createTextNode("The labels of the fields are editable. Please, click on the label to edit."),L=document.createElement("div");L.setAttribute("id","main_div");var z=document.createElement("div");z.setAttribute("style","margin-left:4px; color:red;"),z.appendChild(M);var q=document.createElement("div");q.setAttribute("id",i+"_elemet_tableform_id_temp");var H="yes"==n?"none":"table-cell",N=document.createElement("div");N.setAttribute("align","left"),N.style.cssText="display:"+H+"; vertical-align:top; width:"+t+"px",N.setAttribute("id",i+"_label_sectionform_id_temp");var S=document.createElement("div");S.setAttribute("align","left"),S.style.display="table-cell",S.setAttribute("id",i+"_element_sectionform_id_temp");var D=document.createElement("div");D.setAttribute("id",i+"_table_date"),D.style.display="table";var P=document.createElement("div");P.setAttribute("id",i+"_tr_date1"),P.style.display="table-row";var O=document.createElement("div");O.setAttribute("id",i+"_tr_date2"),O.style.display="table-row";var K=document.createElement("div");K.setAttribute("id",i+"_td_date_input1"),K.style.display="table-cell";var U=document.createElement("div");U.setAttribute("id",i+"_td_date_separator1"),U.style.display="table-cell";var F=document.createElement("div");F.setAttribute("id",i+"_td_date_input2"),F.style.display="table-cell";var R=document.createElement("div");R.setAttribute("id",i+"_td_date_separator2"),R.style.display="table-cell";var W=document.createElement("div");W.setAttribute("id",i+"_td_date_input3"),W.style.display="table-cell";var V=document.createElement("div");V.setAttribute("id",i+"_td_date_label1"),V.style.display="table-cell";var $=document.createElement("div");$.style.display="table-cell";var G=document.createElement("div");G.setAttribute("id",i+"_td_date_label2"),G.style.display="table-cell";var Y=document.createElement("div");Y.style.display="table-cell";var Z=document.createElement("div");Z.setAttribute("id",i+"_td_date_label3"),Z.style.display="table-cell";var X=document.createElement("span");X.setAttribute("id",i+"_element_labelform_id_temp"),X.innerHTML=e,X.setAttribute("class","wd_form_label"),X.style.verticalAlign="top";var J=document.createElement("span");J.setAttribute("id",i+"_required_elementform_id_temp"),J.innerHTML="",J.setAttribute("class","required"),J.style.verticalAlign="top","yes"==h&&(J.innerHTML=" *");var ee=document.createElement("input");ee.setAttribute("type","text"),ee.setAttribute("value",l),ee.setAttribute("id",i+"_dayform_id_temp"),ee.setAttribute("name",i+"_dayform_id_temp"),ee.setAttribute("onBlur","if (this.value=='0') this.value=''; else add_0('"+i+"_dayform_id_temp')"),ee.style.width=p+"px";var te=document.createElement("label");te.setAttribute("class","mini_label"),te.setAttribute("id",i+"_day_label"),te.innerHTML=s;var ie=document.createElement("span");ie.setAttribute("id",i+"_separator1"),ie.setAttribute("class","wdform_separator"),ie.innerHTML=g;var ae=document.createElement("input");ae.setAttribute("type","text"),ae.setAttribute("value",d),ae.setAttribute("id",i+"_monthform_id_temp"),ae.setAttribute("name",i+"_monthform_id_temp"),ae.style.width=f+"px",ae.setAttribute("onBlur","if (this.value=='0') this.value=''; else add_0('"+i+"_monthform_id_temp')");var ne=document.createElement("label");ne.setAttribute("class","mini_label"),ne.setAttribute("class","mini_label"),ne.setAttribute("id",i+"_month_label"),ne.innerHTML=u;var le=document.createElement("span");le.setAttribute("id",i+"_separator2"),le.setAttribute("class","wdform_separator"),le.innerHTML=g,""==w&&(w=current_date.getFullYear());var de=document.createElement("input");de.setAttribute("type","text"),de.setAttribute("from",v),de.setAttribute("to",w),de.setAttribute("value",_),de.setAttribute("id",i+"_yearform_id_temp"),de.setAttribute("name",i+"_yearform_id_temp"),de.style.width=y+"px";var _e=document.createElement("label");_e.setAttribute("class","mini_label"),_e.setAttribute("id",i+"_year_label"),_e.innerHTML=c;var re=document.getElementById("show_table");N.appendChild(X),N.appendChild(J),S.appendChild(T),K.appendChild(ee),U.appendChild(ie),F.appendChild(ae),R.appendChild(le),W.appendChild(de),P.appendChild(K),P.appendChild(U),P.appendChild(F),P.appendChild(R),P.appendChild(W),V.appendChild(te),G.appendChild(ne),Z.appendChild(_e),O.appendChild(V),O.appendChild($),O.appendChild(G),O.appendChild(Y),O.appendChild(Z),D.appendChild(P),D.appendChild(O),S.appendChild(B),S.appendChild(Q),S.appendChild(D),q.appendChild(N),q.appendChild(S),L.appendChild(q),L.appendChild(C),L.appendChild(z),re.appendChild(L),jQuery("#main_div").append("<br>"+form_maker.type_date_of_birth_description),"top"==a&&label_top(i),"SELECT"==r&&field_to_select(i,"day"),"SELECT"==o&&field_to_select(i,"month"),"SELECT"==m&&field_to_select(i,"year"),change_class(b,i),refresh_attr(i,"type_date_fields"),jQuery(document).ready(function(t){t("label#"+i+"_day_label").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='day' style='outline:none; border:none; background:none; width:100px;' value=\""+t(this).text()+'">';t(this).html(e),t("input.day").focus(),t("input.day").blur(function(){var e=t(this).val();t("#"+i+"_day_label").text(e)})}}),t("label#"+i+"_month_label").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='month' style='outline:none; border:none; background:none; width:100px;' value=\""+t(this).text()+'">';t(this).html(e),t("input.month").focus(),t("input.month").blur(function(){var e=t(this).val();t("#"+i+"_month_label").text(e)})}}),t("label#"+i+"_year_label").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='year' size='8' style='outline:none; border:none; background:none; width:100px;' value=\""+t(this).text()+'">';t(this).html(e),t("input.year").focus(),t("input.year").blur(function(){var e=t(this).val();t("#"+i+"_year_label").text(e)})}})})}function create_payment_amount_range(e,t,i){return create_option_container(jQuery('<label class="fm-field-label">Range</label>'),jQuery('<input type="text" class="fm-width-40" id="el_range_min1" onKeyPress="return check_isnum(event)" onChange="change_input_range_new(\'min\', '+e+')" value="'+t+'" placeholder="Min" />-<input type="text" class="fm-width-40" id="el_range_max1" onKeyPress="return check_isnum(event)" onChange="change_input_range_new(\'max\', '+e+')" value="'+i+'" placeholder="Max" />'))}function create_hide_payment_currency(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_currency">Hide payment currency</label>'),jQuery('<input type="checkbox" id="el_currency" onchange="hide_currency(this.checked, '+e+')"'+("yes"==t?' checked="checked"':"")+" />"))}function change_input_range_new(e,t){var i="";""!=document.getElementById("el_range_"+e+"1").value&&(i=document.getElementById("el_range_"+e+"1").value),document.getElementById(t+"_range_"+e+"form_id_temp").value=i}function hide_currency(e,t){document.getElementById(t+"_td_name_currency").style.display=e?"none":"table-cell"}function go_to_type_paypal_price_new(e){w_attr_name=[],w_attr_value=[],type_paypal_price_new(e,"Amount","","top","no","","","","no","",w_attr_name,w_attr_value,"","","no","no")}function type_paypal_price_new(e,t,i,a,n,l,d,_,r,o,m,s,u,c,p,f){jQuery("#element_type").val("type_paypal_price_new"),delete_last_child();var y=jQuery("#edit_table"),h=jQuery('<div id="edit_div"></div>');y.append(h);var b=jQuery('<div id="edit_main_table"></div>');h.append(b),b.append(create_field_type("type_paypal_price_new")),b.append(create_label(e,t)),b.append(create_label_position(e,a)),b.append(create_hide_label(e,n)),b.append(create_required(e,r)),b.append(create_readonly(e,p)),b.append(create_field_size(e,_));var v=jQuery('<div class="inside"></div>');b.append(create_advanced_options_container(v)),v.append(create_payment_amount_range(e,u,c)),v.append(create_hide_payment_currency(e,f)),v.append(create_field_label_size(e,i)),v.append(create_class(e,o)),v.append(create_additional_attributes(e,m,"type_paypal_price_new"));var w=document.createElement("input");w.setAttribute("type","hidden"),w.setAttribute("value","type_paypal_price_new"),w.setAttribute("name",e+"_typeform_id_temp"),w.setAttribute("id",e+"_typeform_id_temp");var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value",r),g.setAttribute("name",e+"_requiredform_id_temp"),g.setAttribute("id",e+"_requiredform_id_temp");var E=document.createElement("input");E.setAttribute("type","hidden"),E.setAttribute("value",n),E.setAttribute("name",e+"_hide_labelform_id_temp"),E.setAttribute("id",e+"_hide_labelform_id_temp");var A=document.createElement("input");A.setAttribute("type","hidden"),A.setAttribute("value",p),A.setAttribute("name",e+"_readonlyform_id_temp"),A.setAttribute("id",e+"_readonlyform_id_temp");var j=document.createElement("input");j.setAttribute("type","hidden"),j.setAttribute("value",u),j.setAttribute("name",e+"_range_minform_id_temp"),j.setAttribute("id",e+"_range_minform_id_temp");var x=document.createElement("input");x.setAttribute("type","hidden"),x.setAttribute("value",c),x.setAttribute("name",e+"_range_maxform_id_temp"),x.setAttribute("id",e+"_range_maxform_id_temp");var k=document.createElement("div");k.setAttribute("id","main_div");var I=document.createElement("div");I.setAttribute("id",e+"_elemet_tableform_id_temp");var C="yes"==n?"none":"table-cell",B=document.createElement("div");B.setAttribute("align","left"),B.style.display=C,B.style.width=i+"px",B.setAttribute("id",e+"_label_sectionform_id_temp");var Q=document.createElement("div");Q.setAttribute("align","left"),Q.style.display="table-cell",Q.setAttribute("id",e+"_element_sectionform_id_temp");var T=document.createElement("div");T.setAttribute("id",e+"_table_price"),T.style.display="table";var M=document.createElement("div");M.setAttribute("id",e+"_tr_price1"),M.style.display="table-row";var L=document.createElement("div");L.setAttribute("id",e+"_td_name_currency"),L.style.display="no"==f?"table-cell":"none";var z=document.createElement("div");z.setAttribute("id",e+"_td_name_dollars"),z.style.display="table-cell";var q=document.createElement("div");q.style.display="table-cell";var H=document.createElement("div");H.setAttribute("align","left"),H.style.display="table-cell";var N=document.createElement("div");N.setAttribute("id",e+"_td_name_label_divider"),N.style.display="table-cell";var S=document.createElement("div");S.setAttribute("align","left"),S.setAttribute("id",e+"_td_name_label_cents"),S.style.display="table-cell";var D=document.createElement("span");D.setAttribute("id",e+"_element_labelform_id_temp"),D.innerHTML=t,D.setAttribute("class","label"),D.style.verticalAlign="top";var P=document.createElement("span");P.setAttribute("id",e+"_required_elementform_id_temp"),P.innerHTML="",P.setAttribute("class","required"),P.style.verticalAlign="top","yes"==r&&(P.innerHTML=" *");var O=document.createElement("span");O.setAttribute("class","wdform_colon"),O.style.cssText="font-style:bold; vertical-align:middle",O.innerHTML="\x3c!--repstart--\x3e&nbsp;$&nbsp;\x3c!--repend--\x3e";var K=document.createElement("label");K.setAttribute("class","mini_label");var U=document.createElement("input");U.setAttribute("type","text"),U.style.cssText="width:"+_+"px",U.setAttribute("id",e+"_elementform_id_temp"),U.setAttribute("name",e+"_elementform_id_temp"),U.setAttribute("value",l),U.setAttribute("title",d),U.setAttribute("placeholder",d),"yes"==p&&U.setAttribute("readonly","readonly"),U.setAttribute("onKeyPress","return check_isnum(event)");var F=document.createElement("label");F.setAttribute("class","mini_label"),F.setAttribute("id",e+"_mini_label_dollars");var R=document.getElementById("show_table");B.appendChild(D),B.appendChild(P),Q.appendChild(E),L.appendChild(O),z.appendChild(U),M.appendChild(L),M.appendChild(z),q.appendChild(K),H.appendChild(F),T.appendChild(M),Q.appendChild(w),Q.appendChild(g),Q.appendChild(A),Q.appendChild(j),Q.appendChild(x),Q.appendChild(T),I.appendChild(B),I.appendChild(Q),k.appendChild(I),R.appendChild(k),jQuery("#main_div").append("<br>"+form_maker.type_price_description),"top"==a&&label_top(e),change_class(o,e),refresh_attr(e,"type_text")}function create_paypal_select_options(e,t,i,a,l){var d=jQuery('<label class="fm-field-label">Options</label>'),_=jQuery('<button id="el_choices_add" class="fm-add-option button-secondary" onClick="add_choise_price(\'select\', '+e+'); return false;" title="Add option"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>Option</button>');if(form_maker.is_demo)var r=jQuery('<button class="fm-add-option button-secondary" onClick="alert(\'This feature is disabled in demo.\')" title="Add options from database"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>From Database</button>');else r=jQuery("<button class=\"fm-add-option button-secondary\" onClick=\"tb_show('', 'admin-ajax.php?action=select_data_from_db&nonce="+fm_ajax.ajaxnonce+"&field_id="+e+'&field_type=paypal_select&width=530&height=370&TB_iframe=1\'); return false;" title="Add options from database"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>From Database</button>');var o=jQuery('<div class="fm-width-100 error">IMPORTANT! Check the "Empty value" checkbox only if you want the option to be considered as empty.</div>'),m=jQuery('<div id="choices" class="fm-width-100 ui-sortable"></div>'),s=jQuery('<div class="fm-width-100"><div class="fm-header-label fm-width-40">Product name</div><div class="fm-header-label fm-width-20">Price</div><div class="fm-header-label fm-width-20">Empty value</div><div class="fm-header-label fm-width-10">Delete</div><div class="fm-header-label fm-width-10">Move</div></div>');for(m.append(s),n=t.length,j=0;j<n;j++){var u=jQuery('<div id="'+j+'" class="change_pos fm-width-100"><div class="fm-table-col fm-width-40"><input type="text" class="fm-field-choice" id="el_option'+j+'" value="'+t[j].replace(/"/g,"&quot;")+'" onKeyUp="change_label_price(\''+e+"_option"+j+"', this.value)\""+(i[j]?' disabled="disabled"':"")+' /></div><div class="fm-table-col fm-width-20"><input type="text" class="fm-field-choice" id="el_option_price'+j+'" value="'+a[j]+'" onKeyPress="return check_isnum_point(event)" onKeyUp="change_value_price(\''+e+"_option"+j+"', this.value)\""+(i[j]?' disabled="disabled"':"")+' /></div><div class="fm-table-col fm-width-20"><input type="hidden" id="el_option_params'+j+'" value="'+i[j]+'" /><input type="checkbox" title="Empty value" class="el_option_dis" id="el_option'+j+'_dis" onClick="dis_option_price('+e+","+j+', this.checked)"'+(l[j]?' checked="checked"':"")+' /></div><div class="fm-table-col fm-width-10"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_option'+j+'_remove" onClick="remove_option_price('+j+","+e+')"></span></div><div class="fm-table-col fm-width-10"><span class="fm-move-attribute fm-ico-draggable el_choices_sortable"></span></div></div>');m.append(u)}var c=d;return create_option_container(null,c=(c=(c=(c=c.add(_)).add(r)).add(m)).add(o))}function create_payment_quantity(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="el_quantity">Quantity property</label>'),jQuery('<input type="checkbox" id="el_quantity" value="yes" onchange="add_quantity('+e+","+t+')"'+("yes"==i?' checked="checked"':"")+" />"))}function add_quantity(e,t){if(div_=document.getElementById(e+"_divform_id_temp"),""==form_maker_getElementsByAttribute(div_,"*","id",e+"_element_quantityform_id_temp")){select_=document.createElement("input"),select_.setAttribute("type","text"),select_.setAttribute("value",t),select_.setAttribute("id",e+"_element_quantityform_id_temp"),select_.setAttribute("name",e+"_element_quantityform_id_temp"),select_.setAttribute("onKeyPress","return check_isnum(event)"),select_.style.cssText="width:30px; margin:2px 0px";var i=document.createElement("label");i.innerHTML="\x3c!--repstart--\x3eQuantity\x3c!--repend--\x3e",i.style.cssText="margin-right:5px",i.setAttribute("class","mini_label"),i.setAttribute("id",e+"_element_quantity_label_form_id_temp");var a=document.createElement("span");a.style.cssText="margin-right:15px",a.setAttribute("id",e+"_element_quantity_spanform_id_temp"),a.appendChild(i),a.appendChild(select_),div_.firstChild?div_.insertBefore(a,div_.firstChild):div_.appendChild(a)}else div_.removeChild(document.getElementById(e+"_element_quantity_spanform_id_temp"))}function create_payment_property(e){var t=jQuery('<label class="fm-field-label">Product properties</label>'),i=jQuery("<a class=\"thickbox-preview\" onClick=\"tb_show('', 'admin-ajax.php?action=product_option&nonce="+fm_ajax.ajaxnonce+"&field_id="+e+'&width=530&height=370&TB_iframe=1\')"><span class="fm-add-attribute dashicons dashicons-plus-alt" title="Add"></span></a>'),a=jQuery('<ul id="option_ul" class="fm-width-100"></ul>'),n=t;return create_option_container(null,n=(n=n.add(i)).add(a))}function add_choise_price(e,t){var i=0;document.getElementById(t+"_hor")&&(i=1,flow_ver(t));var a=0;if(jQuery(".change_pos").each(function(){var e=parseInt(jQuery(this)[0].id);a=a<e?e:a}),a+=1,"radio"==e||"checkbox"==e){element="input";var n=document.getElementById(t+"_table_little"),l=document.createElement("div");l.setAttribute("id",t+"_element_tr"+a),l.style.display="table-row";var d=document.createElement("div");d.setAttribute("valign","top"),d.setAttribute("id",t+"_td_little"+a),d.setAttribute("idi",a),d.style.display="table-cell";var _=document.createElement(element);_.setAttribute("type",e),_.setAttribute("value",""),_.setAttribute("id",t+"_elementform_id_temp"+a),"right"==document.getElementById(t+"_option_left_right").value&&(_.style.cssText="float: left !important"),"checkbox"==e&&(_.setAttribute("onClick","set_checked('"+t+"','"+a+"','form_id_temp')"),_.setAttribute("name",t+"_elementform_id_temp"+a)),"radio"==e&&(_.setAttribute("onClick","set_default('"+t+"','"+a+"','form_id_temp')"),_.setAttribute("name",t+"_elementform_id_temp"));var r=document.createElement("label");r.setAttribute("id",t+"_label_element"+a),r.setAttribute("class","ch-rad-label"),r.setAttribute("for",t+"_elementform_id_temp"+a),"right"==document.getElementById(t+"_option_left_right").value&&(r.style.cssText="float: none !important");var o=document.createElement("input");o.setAttribute("type","hidden"),o.setAttribute("id",t+"_elementlabel_form_id_temp"+a),o.setAttribute("name",t+"_elementform_id_temp"+a+"_label"),o.setAttribute("value",""),d.appendChild(_),d.appendChild(r),d.appendChild(o),l.appendChild(d),n.appendChild(l);var m=jQuery("#choices"),s=jQuery('<div id="'+a+'" class="change_pos fm-width-100"><div class="fm-table-col fm-width-60"><input type="text" class="fm-field-choice" id="el_choices'+a+'" value="" onKeyUp="change_label(\''+t+"_label_element"+a+"', this.value); change_label_1('"+t+"_elementlabel_form_id_temp"+a+'\', this.value);" /></div><div class="fm-table-col fm-width-20"><input type="text" class="fm-field-choice" id="el_option_price'+a+'" value="" onKeyPress="return check_isnum_point(event)" onKeyUp="change_value_price(\''+t+"_elementform_id_temp"+a+'\', this.value)" /></div><input type="hidden" id="el_option_params'+a+'" value="" /><div class="fm-table-col fm-width-10"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_option'+a+'_remove" onClick="remove_choise_price('+a+","+t+')"></span></div><div class="fm-table-col fm-width-10"><span class="fm-move-attribute fm-ico-draggable el_choices_sortable"></span></div></div>');m.append(s),refresh_attr(t,"type_checkbox")}if("select"==e){var u=document.getElementById(t+"_elementform_id_temp"),c=document.createElement("option");c.setAttribute("id",t+"_option"+a),u.appendChild(c);m=jQuery("#choices"),s=jQuery('<div id="'+a+'" class="change_pos fm-width-100"><div class="fm-table-col fm-width-40"><input type="text" class="fm-field-choice" id="el_option'+a+'" value="" onKeyUp="change_label_price(\''+t+"_option"+a+'\', this.value)" /></div><div class="fm-table-col fm-width-20"><input type="text" class="fm-field-choice" id="el_option_price'+a+'" value="" onKeyPress="return check_isnum_point(event)" onKeyUp="change_value_price(\''+t+"_option"+a+'\', this.value)" /></div><div class="fm-table-col fm-width-20"><input type="hidden" id="el_option_params'+a+'" value="" /><input type="checkbox" title="Empty value" class="el_option_dis" id="el_option'+a+'_dis" onClick="dis_option_price('+t+","+a+', this.checked)" /></div><div class="fm-table-col fm-width-10"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_option'+a+'_remove" onClick="remove_option_price('+a+","+t+')"></span></div><div class="fm-table-col fm-width-10"><span class="fm-move-attribute fm-ico-draggable el_choices_sortable"></span></div></div>');m.append(s)}1==i&&flow_hor(t)}function flow_hor(e){for(tbody=document.getElementById(e+"_table_little"),td_array=new Array,n=tbody.childNodes.length,k=0;k<n;k++)td_array[k]=tbody.childNodes[k].childNodes[0];for(k=0;k<n;k++)tbody.removeChild(tbody.childNodes[0]);var t=document.createElement("div");for(t.style.display="table-row",t.setAttribute("id",e+"_hor"),tbody.appendChild(t),k=0;k<n;k++)t.appendChild(td_array[k])}function flow_ver(e){for(tbody=document.getElementById(e+"_table_little"),tr=document.getElementById(e+"_hor"),td_array=new Array,n=tr.childNodes.length,k=0;k<n;k++)td_array[k]=tr.childNodes[k];for(tbody.removeChild(tr),k=0;k<n;k++){var t=document.createElement("div");t.setAttribute("id",e+"_element_tr"+td_array[k].getAttribute("idi")),t.style.display="table-row",t.appendChild(td_array[k]),tbody.appendChild(t)}}function change_label_price(e,t){document.getElementById(e).innerHTML=t}function change_value_price(e,t){document.getElementById(e).value=t}function dis_option_price(e,t,i){document.getElementById(e+"_option"+t).value=i?"":document.getElementById("el_option_price"+t).value}function remove_option_price(e,t){var i=document.getElementById(t+"_elementform_id_temp"),a=document.getElementById(t+"_option"+e);i.removeChild(a);var n=document.getElementById("choices"),l=document.getElementById(e);n.removeChild(l)}function add_properties(e,t,a){for(n=t.length,i=0;i<n;i++){for(select_=document.createElement("select"),select_.setAttribute("id",e+"_propertyform_id_temp"+i),select_.setAttribute("name",e+"_propertyform_id_temp"+i),select_.style.cssText="width:auto; margin:2px 0px",k=0;k<a[i].length;k++){var l=document.createElement("option");l.setAttribute("id",e+"_"+i+"_option"+k),l.setAttribute("value",a[i][k]),l.innerHTML=a[i][k],select_.appendChild(l)}var d=document.createElement("label");d.innerHTML=t[i],d.style.cssText="margin-right:5px",d.setAttribute("class","mini_label"),d.setAttribute("id",e+"_property_label_form_id_temp"+i);var _=document.createElement("span");_.style.cssText="margin-right:15px",_.setAttribute("id",e+"_property_"+i),div_=document.getElementById(e+"_divform_id_temp"),_.appendChild(d),_.appendChild(select_),div_.appendChild(_);var r=document.createElement("li");r.setAttribute("id","property_li_"+i);var o=document.createElement("label");o.innerHTML=t[i],o.setAttribute("id","label_property_"+i),o.style.cssText="font-weight:bold; font-size: 13px";var m=document.createElement("a");m.setAttribute("onclick","tb_show('', 'admin-ajax.php?action=product_option&nonce="+fm_ajax.ajaxnonce+"&field_id="+e+"&property_id="+i+"&width=530&height=370&TB_iframe=1')"),m.setAttribute("class","thickbox-preview");var s=document.createElement("span");s.setAttribute("class","fm-edit-attribute fm-ico-edit"),m.appendChild(s);var u=document.createElement("span");u.setAttribute("class","fm-remove-attribute dashicons dashicons-dismiss"),u.setAttribute("onClick","remove_property("+e+","+i+")"),ul_=document.getElementById("option_ul"),r.appendChild(o),r.appendChild(m),r.appendChild(u),ul_.appendChild(r)}}function remove_property(e,t){property_=document.getElementById(e+"_property_"+t),property_.parentNode.removeChild(property_),property_li_=document.getElementById("property_li_"+t),property_li_.parentNode.removeChild(property_li_)}function go_to_type_paypal_select(e){w_choices=["Select product","product 1","product 2"],w_choices_price=["","100","200"],w_choices_checked=["1","0","0"],w_choices_params=["","",""],w_choices_disabled=[!0,!1,!1],w_attr_name=[],w_attr_value=[],w_property=[],w_property_values=[],type_paypal_select(e,"Select Product","","top","no","",w_choices,w_choices_price,w_choices_checked,"no","no","1","wdform_select",w_attr_name,w_attr_value,w_choices_disabled,w_property,w_property_values,w_choices_params)}function type_paypal_select(i,e,t,a,l,d,_,r,o,m,s,u,c,p,f,y,h,b,v){jQuery("#element_type").val("type_paypal_select"),delete_last_child();var w=jQuery("#edit_table"),g=jQuery('<div id="edit_div"></div>');w.append(g);var E=jQuery('<div id="edit_main_table"></div>');g.append(E),E.append(create_field_type("type_paypal_select")),E.append(create_label(i,e)),E.append(create_label_position(i,a)),E.append(create_hide_label(i,l)),E.append(create_required(i,m)),E.append(create_field_size(i,d)),E.append(create_paypal_select_options(i,_,v,r,y));var A=jQuery('<div class="inside"></div>');E.append(create_advanced_options_container(A)),A.append(create_payment_quantity(i,u,s)),A.append(create_payment_property(i)),A.append(create_field_label_size(i,t)),A.append(create_class(i,c)),A.append(create_additional_attributes(i,p,"type_paypal_select"));var x=document.createElement("input");x.setAttribute("type","hidden"),x.setAttribute("value","type_paypal_select"),x.setAttribute("name",i+"_typeform_id_temp"),x.setAttribute("id",i+"_typeform_id_temp");var k=document.createElement("input");k.setAttribute("type","hidden"),k.setAttribute("value",m),k.setAttribute("name",i+"_requiredform_id_temp"),k.setAttribute("id",i+"_requiredform_id_temp");var I=document.createElement("input");I.setAttribute("type","hidden"),I.setAttribute("value",l),I.setAttribute("name",i+"_hide_labelform_id_temp"),I.setAttribute("id",i+"_hide_labelform_id_temp");var C=document.createElement("div");C.setAttribute("id","main_div");var B=document.createElement("div");B.setAttribute("id",i+"_elemet_tableform_id_temp");var Q="yes"==l?"none":"table-cell",T=document.createElement("div");T.setAttribute("align","left"),T.style.display=Q,T.style.width=t+"px",T.setAttribute("id",i+"_label_sectionform_id_temp");var M=document.createElement("div");M.setAttribute("align","left"),M.style.display="table-cell",M.setAttribute("id",i+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var L=document.createElement("br"),z=(document.createElement("br"),document.createElement("div"));z.setAttribute("id",i+"_table_little"),z.style.display="table";var q=document.createElement("div");q.setAttribute("id",i+"_element_tr1"),q.style.display="table-row";var H=document.createElement("div");H.setAttribute("id",i+"_element_tr2"),H.style.display="table-row";var N=document.createElement("div");N.setAttribute("valign","top"),N.setAttribute("id",i+"_td_little1"),N.style.display="table-cell";var S=document.createElement("div");S.setAttribute("valign","top"),S.setAttribute("id",i+"_td_little2"),S.style.display="table-cell";var D=document.createElement("span");D.setAttribute("id",i+"_element_labelform_id_temp"),D.innerHTML=e,D.setAttribute("class","label"),D.style.verticalAlign="top";var P=document.createElement("span");P.setAttribute("id",i+"_required_elementform_id_temp"),P.innerHTML="",P.setAttribute("class","required"),P.style.verticalAlign="top","yes"==m&&(P.innerHTML=" *");var O=document.createElement("select");for(O.setAttribute("id",i+"_elementform_id_temp"),O.setAttribute("name",i+"_elementform_id_temp"),O.style.cssText="width:"+d+"px",O.setAttribute("onchange","set_select(this)"),n=_.length,j=0;j<n;j++){var K=document.createElement("option");K.setAttribute("id",i+"_option"+j),y[j]?K.value="":K.setAttribute("value",r[j]),v[j]&&(w_params=v[j].split("[where_order_by]"),K.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),K.setAttribute("order_by",w_params[0]),K.setAttribute("db_info",w_params[1])),K.setAttribute("onselect","set_select('"+i+"_option"+j+"')"),K.innerHTML=_[j].replace(/"/g,"&quot;"),1==o[j]&&K.setAttribute("selected","selected"),O.appendChild(K)}var U=document.createElement("div");U.setAttribute("id",i+"_divform_id_temp");var F=document.getElementById("show_table");T.appendChild(D),T.appendChild(P),M.appendChild(x),M.appendChild(k),M.appendChild(I),M.appendChild(O),M.appendChild(U),B.appendChild(T),B.appendChild(M),C.appendChild(B),C.appendChild(L),F.appendChild(C),jQuery("#main_div").append(form_maker.type_payment_select_description),"top"==a&&label_top(i),"yes"==s&&add_quantity(i,u),change_class(c,i),refresh_attr(i,"type_text"),add_properties(i,h,b),jQuery(function(){jQuery("#choices").sortable({items:".change_pos",handle:".el_choices_sortable",update:function(e,t){refresh_paypal_fields(i,"select")}})})}function refresh_paypal_fields(d,_){if("radio"==_||"checkbox"==_){var r=document.getElementById(d+"_table_little");r.innerHTML="",jQuery(".change_pos").each(function(){var e=jQuery(this)[0].id,t=document.createElement("div");t.setAttribute("id",d+"_element_tr"+e),t.style.display="table-row";var i=document.createElement("div");i.setAttribute("valign","top"),i.setAttribute("id",d+"_td_little"+e),i.setAttribute("idi",e),i.style.display="table-cell";var a=document.createElement("input");a.setAttribute("type",_),a.setAttribute("id",d+"_elementform_id_temp"+e),a.setAttribute("value",jQuery(this).find(jQuery("#el_option_price"+e))[0].value),"checkbox"==_&&(a.setAttribute("onClick","set_checked('"+d+"','"+e+"','form_id_temp')"),a.setAttribute("name",d+"_elementform_id_temp"+e)),"radio"==_&&(a.setAttribute("onClick","set_default('"+d+"','"+e+"','form_id_temp')"),a.setAttribute("name",d+"_elementform_id_temp"));var n=document.createElement("label");n.setAttribute("id",d+"_label_element"+e),n.setAttribute("class","ch-rad-label"),n.setAttribute("for",d+"_elementform_id_temp"+e),n.innerHTML=jQuery(this).find(jQuery("#el_choices"+e))[0].value,jQuery(this).find(jQuery(".el_option_params")).val()&&(w_params=jQuery(this).find(jQuery(".el_option_params")).val().split("[where_order_by]"),n.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),n.setAttribute("order_by",w_params[0]),n.setAttribute("db_info",w_params[1]));var l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("id",d+"_elementlabel_form_id_temp"+e),l.setAttribute("name",d+"_elementform_id_temp"+e+"_label"),l.setAttribute("value",jQuery(this).find(jQuery("#el_choices"+e))[0].value),i.appendChild(a),i.appendChild(n),i.appendChild(l),t.appendChild(i),r.appendChild(t)}),document.getElementById("edit_for_flow_horizontal").checked&&flow_hor(d)}if("select"==_){var i=document.getElementById(d+"_elementform_id_temp");i.innerHTML="",jQuery(".change_pos").each(function(){var e=jQuery(this)[0].id,t=document.createElement("option");t.setAttribute("id",d+"_option"+e),jQuery(this).find(jQuery("input[type='checkbox']")).prop("checked")?t.value="":t.setAttribute("value",jQuery(this).find(jQuery("#el_option_price"+e))[0].value),jQuery(this).find(jQuery(".el_option_params")).val()&&(w_params=jQuery(this).find(jQuery(".el_option_params")).val().split("[where_order_by]"),t.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),t.setAttribute("order_by",w_params[0]),t.setAttribute("db_info",w_params[1])),t.setAttribute("onselect","set_select('"+d+"_option"+e+"')"),t.innerHTML=jQuery(this).find(jQuery("#el_option"+e))[0].value,i.appendChild(t)})}}function create_payment_relative_position(e,t,i){var a=jQuery('<label class="fm-field-label">Relative Position</label>'),n=jQuery('<input type="radio" id="edit_for_flow_vertical" name="edit_for_flow" value="ver" onchange="flow_ver('+e+')"'+("hor"==t?"":' checked="checked"')+" />"),l=jQuery('<label for="edit_for_flow_vertical">Vertical</label>'),d=jQuery('<input type="radio" id="edit_for_flow_horizontal" name="edit_for_flow" value="hor" onchange="flow_hor('+e+',)"'+("hor"==t?' checked="checked"':"")+" />"),_=jQuery('<label for="edit_for_flow_horizontal">Horizontal</label>'),r=n;return create_option_container(a,r=(r=(r=r.add(l)).add(d)).add(_))}function create_paypal_radio_options(e,t,i,a,l){var d=jQuery('<label class="fm-field-label">Options</label>'),_=jQuery('<button id="el_choices_add" class="fm-add-option button-secondary" onClick="add_choise_price(\''+l+"', "+e+'); return false;" title="Add option"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>Option</button>');if(form_maker.is_demo)var r=jQuery('<button class="fm-add-option button-secondary" onClick="alert(\'This feature is disabled in demo.\')" title="Add options from database"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>From Database</button>');else r=jQuery("<button class=\"fm-add-option button-secondary\" onClick=\"tb_show('', 'admin-ajax.php?action=select_data_from_db&field_id="+e+"&nonce="+fm_ajax.ajaxnonce+"&field_type=paypal_"+l+'&width=530&height=370&TB_iframe=1\'); return false;" title="Add options from database"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>From Database</button>');var o=jQuery('<div id="choices" class="fm-width-100 ui-sortable"></div>'),m=jQuery('<div class="fm-width-100"><div class="fm-header-label fm-width-60">Product name</div><div class="fm-header-label fm-width-20">Price</div><div class="fm-header-label fm-width-10">Delete</div><div class="fm-header-label fm-width-10">Move</div></div>');for(o.append(m),n=t.length,j=0;j<n;j++){var s=jQuery('<div id="'+j+'" class="change_pos fm-width-100"><div class="fm-table-col fm-width-60"><input type="text" class="fm-field-choice" id="el_choices'+j+'" value="'+t[j].replace(/"/g,"&quot;")+'" onKeyUp="change_label(\''+e+"_label_element"+j+"', this.value); change_label_1('"+e+"_elementlabel_form_id_temp"+j+"', this.value);\""+(i[j]?' disabled="disabled"':"")+' /></div><div class="fm-table-col fm-width-20"><input type="text" class="fm-field-choice" id="el_option_price'+j+'" value="'+a[j]+'" onKeyPress="return check_isnum_point(event)" onKeyUp="change_value_price(\''+e+"_elementform_id_temp"+j+"', this.value)\""+(i[j]?' disabled="disabled"':"")+' /></div><input type="hidden" id="el_option_params'+j+'" value="'+i[j]+'" /><div class="fm-table-col fm-width-10"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_option'+j+'_remove" onClick="remove_choise_price('+j+","+e+')"></span></div><div class="fm-table-col fm-width-10"><span class="fm-move-attribute fm-ico-draggable el_choices_sortable"></span></div></div>');o.append(s)}var u=d;return create_option_container(null,u=(u=(u=u.add(_)).add(r)).add(o))}function change_label_1(e,t){document.getElementById(e).value=t}function remove_choise_price(e,t){var i=0;document.getElementById(t+"_hor")&&(i=1,flow_ver(t));var a=document.getElementById(t+"_table_little"),n=document.getElementById(t+"_element_tr"+e);a.removeChild(n);var l=document.getElementById("choices"),d=document.getElementById(e);l.removeChild(d),1==i&&flow_hor(t)}function go_to_type_paypal_radio(e){w_choices=["product 1","product 2"],w_choices_price=["100","200"],w_choices_checked=["0","0"],w_choices_params=["","",""],w_attr_name=[],w_attr_value=[],w_property=[],w_property_values=[],type_paypal_radio(e,"Payment Single Choice","","top","right","no","ver",w_choices,w_choices_price,w_choices_checked,"no","no","no","0","",w_attr_name,w_attr_value,w_property,w_property_values,"no","1",w_choices_params)}function type_paypal_radio(i,e,t,a,l,d,_,r,o,m,s,u,c,p,f,y,h,b,v,w,g,E){jQuery("#element_type").val("type_paypal_radio"),delete_last_child();var A=jQuery("#edit_table"),x=jQuery('<div id="edit_div"></div>');A.append(x);var k=jQuery('<div id="edit_main_table"></div>');x.append(k),k.append(create_field_type("type_paypal_radio")),k.append(create_label(i,e)),k.append(create_label_position(i,a)),k.append(create_hide_label(i,d)),k.append(create_required(i,s)),k.append(create_payment_relative_position(i,_,"radio")),k.append(create_option_label_position(i,l,"radio")),k.append(create_paypal_radio_options(i,r,E,o,"radio"));var I=jQuery('<div class="inside"></div>');k.append(create_advanced_options_container(I)),I.append(create_payment_quantity(i,g,w)),I.append(create_payment_property(i)),I.append(create_field_label_size(i,t)),I.append(create_class(i,f)),I.append(create_additional_attributes(i,y,"type_paypal_radio"));var C=document.createElement("br"),B=document.createElement("input");B.setAttribute("type","hidden"),B.setAttribute("value","type_paypal_radio"),B.setAttribute("name",i+"_typeform_id_temp"),B.setAttribute("id",i+"_typeform_id_temp");var Q=document.createElement("input");Q.setAttribute("type","hidden"),Q.setAttribute("value",s),Q.setAttribute("name",i+"_requiredform_id_temp"),Q.setAttribute("id",i+"_requiredform_id_temp");var T=document.createElement("input");T.setAttribute("type","hidden"),T.setAttribute("value",d),T.setAttribute("name",i+"_hide_labelform_id_temp"),T.setAttribute("id",i+"_hide_labelform_id_temp");var M=document.createElement("input");M.setAttribute("type","hidden"),M.setAttribute("value",u),M.setAttribute("name",i+"_randomizeform_id_temp"),M.setAttribute("id",i+"_randomizeform_id_temp");var L=document.createElement("input");L.setAttribute("type","hidden"),L.setAttribute("value",c),L.setAttribute("name",i+"_allow_otherform_id_temp"),L.setAttribute("id",i+"_allow_otherform_id_temp");var z=document.createElement("input");z.setAttribute("type","hidden"),z.setAttribute("value",l),z.setAttribute("id",i+"_option_left_right");var q=document.createElement("div");q.setAttribute("id","main_div");var H=document.createElement("div");H.setAttribute("id",i+"_elemet_tableform_id_temp");var N="yes"==d?"none":"table-cell",S=document.createElement("div");S.setAttribute("align","left"),S.style.display=N,S.style.width=t+"px",S.setAttribute("id",i+"_label_sectionform_id_temp");var D=document.createElement("div");D.setAttribute("align","left"),D.style.display="table-cell",D.setAttribute("id",i+"_element_sectionform_id_temp");var P=document.createElement("div");P.style.display="table";var O=document.createElement("div");O.setAttribute("id",i+"_table_little"),O.style.display="table-row-group",P.appendChild(O);var K=document.createElement("div");K.setAttribute("id",i+"_element_tr1"),K.style.display="table-row";var U=document.createElement("div");U.setAttribute("id",i+"_element_tr2"),U.style.display="table-row";var F=document.createElement("div");F.setAttribute("valign","top"),F.setAttribute("id",i+"_td_little1"),F.style.display="table-cell";var R=document.createElement("div");R.setAttribute("valign","top"),R.setAttribute("id",i+"_td_little2"),R.style.display="table-cell";var W=document.createElement("span");W.setAttribute("id",i+"_element_labelform_id_temp"),W.innerHTML=e,W.setAttribute("class","wd_form_label"),W.style.verticalAlign="top";var V=document.createElement("span");for(V.setAttribute("id",i+"_required_elementform_id_temp"),V.innerHTML="",V.setAttribute("class","required"),V.style.verticalAlign="top","yes"==s&&(V.innerHTML=" *"),n=r.length,j=0;j<n;j++){var $=document.createElement("div");$.setAttribute("id",i+"_element_tr"+j),$.style.display="table-row";var G=document.createElement("div");G.setAttribute("valign","top"),G.setAttribute("id",i+"_td_little"+j),G.setAttribute("idi",j),G.style.display="table-cell";var Y=document.createElement("input");Y.setAttribute("type","radio"),Y.setAttribute("id",i+"_elementform_id_temp"+j),Y.setAttribute("name",i+"_elementform_id_temp"),Y.setAttribute("value",o[j]),"right"==l&&(Y.style.cssText="float: left !important"),Y.setAttribute("onclick","set_default('"+i+"','"+j+"','form_id_temp')"),"1"==m[j]&&Y.setAttribute("checked","checked");var Z=document.createElement("label");Z.setAttribute("id",i+"_label_element"+j),Z.setAttribute("class","ch-rad-label"),Z.setAttribute("for",i+"_elementform_id_temp"+j),Z.innerHTML=r[j].replace(/"/g,"&quot;"),"right"==l&&(Z.style.cssText="float: none !important"),E[j]&&(w_params=E[j].split("[where_order_by]"),Z.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),Z.setAttribute("order_by",w_params[0]),Z.setAttribute("db_info",w_params[1]));var X=document.createElement("input");X.setAttribute("type","hidden"),X.setAttribute("id",i+"_elementlabel_form_id_temp"+j),X.setAttribute("name",i+"_elementform_id_temp"+j+"_label"),X.setAttribute("value",r[j].replace(/"/g,"&quot;")),G.appendChild(Y),G.appendChild(Z),G.appendChild(X),$.appendChild(G),O.appendChild($)}var J=document.createElement("div");J.setAttribute("id",i+"_divform_id_temp");var ee=document.getElementById("show_table");S.appendChild(W),S.appendChild(V),D.appendChild(B),D.appendChild(Q),D.appendChild(T),D.appendChild(M),D.appendChild(L),D.appendChild(z),D.appendChild(P),D.appendChild(J),H.appendChild(S),H.appendChild(D),q.appendChild(H),q.appendChild(C),ee.appendChild(q),jQuery("#main_div").append(form_maker.type_payment_radio_description),"top"==a&&label_top(i),"hor"==_&&flow_hor(i),"yes"==w&&add_quantity(i,g),change_class(f,i),refresh_attr(i,"type_checkbox"),add_properties(i,b,v),jQuery(function(){jQuery("#choices").sortable({items:".change_pos",handle:".el_choices_sortable",update:function(e,t){refresh_paypal_fields(i,"radio")}})})}function go_to_type_paypal_checkbox(e){w_choices=["product 1","product 2"],w_choices_price=["100","200"],w_choices_checked=["0","0"],w_choices_params=["","",""],w_attr_name=[],w_attr_value=[],w_property=[],w_property_values=[],type_paypal_checkbox(e,"Payment Multiple Choice","","top","right","no","ver",w_choices,w_choices_price,w_choices_checked,"no","no","no","0","",w_attr_name,w_attr_value,w_property,w_property_values,"no","1",w_choices_params)}function type_paypal_checkbox(i,e,t,a,l,d,_,r,o,m,s,u,c,p,f,y,h,b,v,w,g,E){jQuery("#element_type").val("type_paypal_checkbox"),delete_last_child();var A=jQuery("#edit_table"),x=jQuery('<div id="edit_div"></div>');A.append(x);var k=jQuery('<div id="edit_main_table"></div>');x.append(k),k.append(create_field_type("type_paypal_checkbox")),k.append(create_label(i,e)),k.append(create_label_position(i,a)),k.append(create_hide_label(i,d)),k.append(create_required(i,s)),k.append(create_payment_relative_position(i,_,"checkbox")),k.append(create_option_label_position(i,l,"checkbox")),k.append(create_paypal_radio_options(i,r,E,o,"checkbox"));var I=jQuery('<div class="inside"></div>');k.append(create_advanced_options_container(I)),I.append(create_payment_quantity(i,g,w)),I.append(create_payment_property(i)),I.append(create_field_label_size(i,t)),I.append(create_class(i,f)),I.append(create_additional_attributes(i,y,"type_paypal_checkbox")),element="input",type="checkbox";var C=document.createElement("input");C.setAttribute("type","hidden"),C.setAttribute("value","type_paypal_checkbox"),C.setAttribute("name",i+"_typeform_id_temp"),C.setAttribute("id",i+"_typeform_id_temp");var B=document.createElement("input");B.setAttribute("type","hidden"),B.setAttribute("value",s),B.setAttribute("name",i+"_requiredform_id_temp"),B.setAttribute("id",i+"_requiredform_id_temp");var Q=document.createElement("input");Q.setAttribute("type","hidden"),Q.setAttribute("value",d),Q.setAttribute("name",i+"_hide_labelform_id_temp"),Q.setAttribute("id",i+"_hide_labelform_id_temp");var T=document.createElement("input");T.setAttribute("type","hidden"),T.setAttribute("value",u),T.setAttribute("name",i+"_randomizeform_id_temp"),T.setAttribute("id",i+"_randomizeform_id_temp");var M=document.createElement("input");M.setAttribute("type","hidden"),M.setAttribute("value",c),M.setAttribute("name",i+"_allow_otherform_id_temp"),M.setAttribute("id",i+"_allow_otherform_id_temp");var L=document.createElement("input");L.setAttribute("type","hidden"),L.setAttribute("value",p),L.setAttribute("name",i+"_allow_other_numform_id_temp"),L.setAttribute("id",i+"_allow_other_numform_id_temp");var z=document.createElement("input");z.setAttribute("type","hidden"),z.setAttribute("value",l),z.setAttribute("id",i+"_option_left_right");var q=document.createElement("div");q.setAttribute("id","main_div");var H=document.createElement("div");H.setAttribute("id",i+"_elemet_tableform_id_temp");var N="yes"==d?"none":"table-cell",S=document.createElement("div");S.setAttribute("align","left"),S.style.display=N,S.style.width=t+"px",S.setAttribute("id",i+"_label_sectionform_id_temp");var D=document.createElement("div");D.setAttribute("align","left"),D.style.display="table-cell",D.setAttribute("id",i+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var P=document.createElement("br"),O=(document.createElement("br"),document.createElement("div"));O.style.display="table";var K=document.createElement("div");K.setAttribute("id",i+"_table_little"),K.style.display="table-row-group",O.appendChild(K);var U=document.createElement("span");U.setAttribute("id",i+"_element_labelform_id_temp"),U.innerHTML=e,U.setAttribute("class","label"),U.style.verticalAlign="top";var F=document.createElement("span");for(F.setAttribute("id",i+"_required_elementform_id_temp"),F.innerHTML="",F.setAttribute("class","required"),F.style.verticalAlign="top","yes"==s&&(F.innerHTML=" *"),n=r.length,j=0;j<n;j++){var R=document.createElement("div");R.setAttribute("id",i+"_element_tr"+j),R.style.display="table-row";var W=document.createElement("div");W.setAttribute("valign","top"),W.setAttribute("id",i+"_td_little"+j),W.setAttribute("idi",j),W.style.display="table-cell";var V=document.createElement(element);V.setAttribute("type",type),V.setAttribute("id",i+"_elementform_id_temp"+j),V.setAttribute("name",i+"_elementform_id_temp"+j),V.setAttribute("value",o[j]),"right"==l&&(V.style.cssText="float: left !important"),"yes"==c&&j==p?(V.setAttribute("other","1"),V.setAttribute("onclick","if(set_checked('"+i+"','"+j+"','form_id_temp')) show_other_input('"+i+"','form_id_temp');")):V.setAttribute("onclick","set_checked('"+i+"','"+j+"','form_id_temp')"),"1"==m[j]&&V.setAttribute("checked","checked");var $=document.createElement("label");$.setAttribute("id",i+"_label_element"+j),$.setAttribute("class","ch-rad-label"),$.setAttribute("for",i+"_elementform_id_temp"+j),$.innerHTML=r[j].replace(/"/g,"&quot;"),"right"==l&&($.style.cssText="float: none !important"),E[j]&&(w_params=E[j].split("[where_order_by]"),$.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),$.setAttribute("order_by",w_params[0]),$.setAttribute("db_info",w_params[1]));var G=document.createElement("input");G.setAttribute("type","hidden"),G.setAttribute("id",i+"_elementlabel_form_id_temp"+j),G.setAttribute("name",i+"_elementform_id_temp"+j+"_label"),G.setAttribute("value",r[j].replace(/"/g,"&quot;")),W.appendChild(V),W.appendChild($),W.appendChild(G),R.appendChild(W),K.appendChild(R)}var Y=document.createElement("div");Y.setAttribute("id",i+"_divform_id_temp");var Z=document.getElementById("show_table");S.appendChild(U),S.appendChild(F),D.appendChild(C),D.appendChild(B),D.appendChild(Q),D.appendChild(T),D.appendChild(M),D.appendChild(L),D.appendChild(z),D.appendChild(O),D.appendChild(Y),H.appendChild(S),H.appendChild(D),q.appendChild(H),q.appendChild(P),Z.appendChild(q),jQuery("#main_div").append(form_maker.type_payment_checkbox_description),"top"==a&&label_top(i),"hor"==_&&flow_hor(i),change_class(f,i),refresh_attr(i,"type_checkbox"),"yes"==w&&add_quantity(i,g),add_properties(i,b,v),jQuery(function(){jQuery("#choices").sortable({items:".change_pos",handle:".el_choices_sortable",update:function(e,t){refresh_paypal_fields(i,"checkbox")}})})}function go_to_type_paypal_shipping(e){w_choices=["type 1","type 2"],w_choices_price=["100","200"],w_choices_checked=["0","0"],w_choices_params=["","",""],w_attr_name=[],w_attr_value=[],w_property=[],w_property_values=[],type_paypal_shipping(e,"Shipping","","top","right","no","ver",w_choices,w_choices_price,w_choices_checked,"no","no","no","0","",w_attr_name,w_attr_value,w_property,w_property_values,w_choices_params)}function type_paypal_shipping(i,e,t,a,l,d,_,r,o,m,s,u,c,p,f,y,h,b,v,w){jQuery("#element_type").val("type_paypal_shipping"),delete_last_child();var g=jQuery("#edit_table"),E=jQuery('<div id="edit_div"></div>');g.append(E);var A=jQuery('<div id="edit_main_table"></div>');E.append(A),A.append(create_field_type("type_paypal_shipping")),A.append(create_label(i,e)),A.append(create_label_position(i,a)),A.append(create_hide_label(i,d)),A.append(create_required(i,s)),A.append(create_payment_relative_position(i,_,"radio")),A.append(create_option_label_position(i,l,"radio")),A.append(create_paypal_radio_options(i,r,w,o,"radio"));var x=jQuery('<div class="inside"></div>');A.append(create_advanced_options_container(x)),x.append(create_field_label_size(i,t)),x.append(create_class(i,f)),x.append(create_additional_attributes(i,y,"type_paypal_shipping")),element="input",type="radio";var k=document.createElement("input");k.setAttribute("type","hidden"),k.setAttribute("value","type_paypal_shipping"),k.setAttribute("name",i+"_typeform_id_temp"),k.setAttribute("id",i+"_typeform_id_temp");var I=document.createElement("input");I.setAttribute("type","hidden"),I.setAttribute("value",s),I.setAttribute("name",i+"_requiredform_id_temp"),I.setAttribute("id",i+"_requiredform_id_temp");var C=document.createElement("input");C.setAttribute("type","hidden"),C.setAttribute("value",d),C.setAttribute("name",i+"_hide_labelform_id_temp"),C.setAttribute("id",i+"_hide_labelform_id_temp");var B=document.createElement("input");B.setAttribute("type","hidden"),B.setAttribute("value",u),B.setAttribute("name",i+"_randomizeform_id_temp"),B.setAttribute("id",i+"_randomizeform_id_temp");var Q=document.createElement("input");Q.setAttribute("type","hidden"),Q.setAttribute("value",c),Q.setAttribute("name",i+"_allow_otherform_id_temp"),Q.setAttribute("id",i+"_allow_otherform_id_temp");var T=document.createElement("input");T.setAttribute("type","hidden"),T.setAttribute("value",l),T.setAttribute("id",i+"_option_left_right");var M=document.createElement("div");M.setAttribute("id","main_div");var L=document.createElement("div");L.setAttribute("id",i+"_elemet_tableform_id_temp");var z="yes"==d?"none":"table-cell",q=document.createElement("div");q.setAttribute("align","left"),q.style.display=z,q.style.width=t+"px",q.setAttribute("id",i+"_label_sectionform_id_temp");var H=document.createElement("div");H.setAttribute("align","left"),H.style.display="table-cell",H.setAttribute("id",i+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var N=document.createElement("br"),S=(document.createElement("br"),document.createElement("div"));S.style.display="table";var D=document.createElement("div");D.setAttribute("id",i+"_table_little"),D.style.display="table-row-group",S.appendChild(D);var P=document.createElement("div");P.setAttribute("id",i+"_element_tr1"),P.style.display="table-row";var O=document.createElement("div");O.setAttribute("id",i+"_element_tr2"),O.style.display="table-row";var K=document.createElement("div");K.setAttribute("valign","top"),K.setAttribute("id",i+"_td_little1"),K.style.display="table-cell";var U=document.createElement("div");U.setAttribute("valign","top"),U.setAttribute("id",i+"_td_little2"),U.style.display="table-cell";var F=document.createElement("span");F.setAttribute("id",i+"_element_labelform_id_temp"),F.innerHTML=e,F.setAttribute("class","label"),F.style.verticalAlign="top";var R=document.createElement("span");for(R.setAttribute("id",i+"_required_elementform_id_temp"),R.innerHTML="",R.setAttribute("class","required"),R.style.verticalAlign="top","yes"==s&&(R.innerHTML=" *"),n=r.length,j=0;j<n;j++){var W=document.createElement("div");W.setAttribute("id",i+"_element_tr"+j),W.style.display="table-row";var V=document.createElement("td");V.setAttribute("valign","top"),V.setAttribute("id",i+"_td_little"+j),V.setAttribute("idi",j),V.style.display="table-cell";var $=document.createElement(element);$.setAttribute("type",type),$.setAttribute("id",i+"_elementform_id_temp"+j),$.setAttribute("name",i+"_elementform_id_temp"),$.setAttribute("value",o[j]),"right"==l&&($.style.cssText="float: left !important"),$.setAttribute("onclick","set_default('"+i+"','"+j+"','form_id_temp')"),"1"==m[j]&&$.setAttribute("checked","checked");var G=document.createElement("label");G.setAttribute("id",i+"_label_element"+j),G.setAttribute("class","ch-rad-label"),G.setAttribute("for",i+"_elementform_id_temp"+j),G.innerHTML=r[j].replace(/"/g,"&quot;"),"right"==l&&(G.style.cssText="float: none !important"),w[j]&&(w_params=w[j].split("[where_order_by]"),G.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),G.setAttribute("order_by",w_params[0]),G.setAttribute("db_info",w_params[1]));var Y=document.createElement("input");Y.setAttribute("type","hidden"),Y.setAttribute("id",i+"_elementlabel_form_id_temp"+j),Y.setAttribute("name",i+"_elementform_id_temp"+j+"_label"),Y.setAttribute("value",r[j].replace(/"/g,"&quot;")),V.appendChild($),V.appendChild(G),V.appendChild(Y),W.appendChild(V),D.appendChild(W)}var Z=document.createElement("div");Z.setAttribute("id",i+"_divform_id_temp");var X=document.getElementById("show_table");q.appendChild(F),q.appendChild(R),H.appendChild(k),H.appendChild(I),H.appendChild(C),H.appendChild(B),H.appendChild(Q),H.appendChild(T),H.appendChild(S),H.appendChild(Z),L.appendChild(q),L.appendChild(H),M.appendChild(L),M.appendChild(N),X.appendChild(M),jQuery("#main_div").append(form_maker.type_shipping_description),"top"==a&&label_top(i),"hor"==_&&flow_hor(i),change_class(f,i),refresh_attr(i,"type_checkbox"),add_properties(i,b,v),jQuery(function(){jQuery("#choices").sortable({items:".change_pos",handle:".el_choices_sortable",update:function(e,t){refresh_paypal_fields(i,"radio")}})})}function go_to_type_paypal_total(e){type_paypal_total(e,"Total","","top","no","","")}function type_paypal_total(e,t,i,a,n,l,d){jQuery("#element_type").val("type_paypal_total"),delete_last_child();var _=jQuery("#edit_table"),r=jQuery('<div id="edit_div"></div>');_.append(r);var o=jQuery('<div id="edit_main_table"></div>');r.append(o),o.append(create_field_type("type_paypal_total")),o.append(create_label(e,t)),o.append(create_label_position(e,a)),o.append(create_hide_label(e,n));var m=jQuery('<div class="inside"></div>');o.append(create_advanced_options_container(m)),m.append(create_field_label_size(e,i)),m.append(create_class(e,l));var s=document.createElement("input");s.setAttribute("type","hidden"),s.setAttribute("value","type_paypal_total"),s.setAttribute("name",e+"_typeform_id_temp"),s.setAttribute("id",e+"_typeform_id_temp");var u=document.createElement("input");u.setAttribute("type","hidden"),u.setAttribute("value",n),u.setAttribute("name",e+"_hide_labelform_id_temp"),u.setAttribute("id",e+"_hide_labelform_id_temp");var c=document.createElement("div");c.setAttribute("id","main_div");var p=document.createElement("div");p.setAttribute("id",e+"_elemet_tableform_id_temp");var f="yes"==n?"none":"table-cell",y=document.createElement("div");y.setAttribute("align","left"),y.style.display=f,y.style.width=i+"px",y.setAttribute("id",e+"_label_sectionform_id_temp");var h=document.createElement("div");h.setAttribute("align","left"),h.style.display="table-cell",h.setAttribute("id",e+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var b=document.createElement("br"),v=(document.createElement("br"),document.createElement("span"));v.setAttribute("id",e+"_element_labelform_id_temp"),v.innerHTML=t,v.setAttribute("class","label");var w=document.createElement("div");w.setAttribute("id",e+"paypal_totalform_id_temp"),w.setAttribute("class","wdform_paypal_total paypal_totalform_id_temp"),w.style.cssText="width:"+d+"px;";var g=document.createElement("div");g.setAttribute("id",e+"div_totalform_id_temp"),g.setAttribute("class","div_totalform_id_temp"),g.style.cssText="margin-bottom:10px;",g.innerHTML="\x3c!--repstart--\x3e$300\x3c!--repend--\x3e";var E=document.createElement("div");E.setAttribute("id",e+"paypal_productsform_id_temp"),E.setAttribute("class","paypal_productsform_id_temp"),E.style.cssText="border-spacing: 2px;";var A=document.createElement("div");A.style.cssText="border-spacing: 2px;",A.innerHTML="\x3c!--repstart--\x3eproduct 1 $100\x3c!--repend--\x3e";var j=document.createElement("div");j.style.cssText="border-spacing: 2px;",j.innerHTML="\x3c!--repstart--\x3eproduct 2 $200\x3c!--repend--\x3e";var x=document.createElement("div");x.style.cssText="border-spacing: 2px; margin-top:7px;",x.setAttribute("id",e+"paypal_taxform_id_temp"),x.setAttribute("class","paypal_taxform_id_temp");var k=document.createElement("input");k.setAttribute("type","hidden"),k.setAttribute("value",""),k.setAttribute("name",e+"_paypal_totalform_id_temp"),k.setAttribute("class","input_paypal_totalform_id_temp"),w.appendChild(k),E.appendChild(A),E.appendChild(j),w.appendChild(g),w.appendChild(E),w.appendChild(x);var I=document.getElementById("show_table"),C=k=document.createElement("p");C.style.cssText="color: red;";var B=document.createTextNode("This is sample calculation. On front-end you will see the calculation based on your Payment field values.");C.appendChild(B),y.appendChild(v),h.appendChild(u),h.appendChild(s),h.appendChild(w),p.appendChild(y),p.appendChild(h),c.appendChild(p),c.appendChild(b),c.appendChild(C),I.appendChild(c),jQuery("#main_div").append(form_maker.type_total_description),"top"==a&&label_top(e),change_class(l,e)}function create_map_locations(e){var t=jQuery('<label class="fm-field-label">Location</label>'),i=jQuery('<span class="fm-add-attribute dashicons dashicons-plus-alt" title="Add" onClick="add_marker('+e+', -1)"></span>'),a=jQuery('<div class="notice notice-info"><p>Drag the marker to change default marker position.</p></div>'),n=jQuery('<div id="markers" class="fm-width-100"></div>'),l=t;return create_option_container(null,l=(l=(l=l.add(i)).add(a)).add(n))}function add_marker(e,t,i,a,n){var l=jQuery("#markers");if(-1==t){var d=l.children().last();t=0<d.length?parseInt(d.attr("idi"))+1:0,a=i=null,n=""}var _=jQuery('<div class="fm-width-100 fm-fields-set" id="marker_opt'+t+'" idi="'+t+'"></div>'),r=jQuery('<div class="fm-width-90"></div>');r.append(create_markmap_address(e,t)),r.append(create_markmap_longitude(e,i,t)),r.append(create_markmap_latitude(e,a,t)),r.append(create_markmap_info(e,n,t)),_.append(r);var o=jQuery('<div class="fm-width-10 fm-remove-button"><span class="fm-remove-attribute dashicons dashicons-dismiss" onClick="remove_map('+e+","+t+')"></span></div>');_.append(o),l.append(_);var m=document.getElementById(e+"_elementform_id_temp");m.setAttribute("long"+t,i),m.setAttribute("lat"+t,a),m.setAttribute("info"+t,n),add_marker_on_map(e,t,i,a,n,!0)}function remove_map(e,t){table=document.getElementById("marker_opt"+t),table.parentNode.removeChild(table),map=document.getElementById(e+"_elementform_id_temp"),map.removeAttribute("long"+t),map.removeAttribute("lat"+t),map.removeAttribute("info"+t),remove_marker(e,t)}function type_map(e,t,i,a,l,d,_,r,o,m,s,u){jQuery("#element_type").val("type_map"),delete_last_child();var c=jQuery("#edit_table"),p=jQuery('<div id="edit_div"></div>');c.append(p);var f=jQuery('<div id="edit_main_table"></div>');p.append(f),f.append(create_field_type("type_map")),f.append(create_map_locations(e)),f.append(create_markmap_size(e,_,r)),f.append(create_keys(e,"To set up map key click here"));var y=jQuery('<div class="inside"></div>');f.append(create_advanced_options_container(y)),y.append(create_class(e,o)),y.append(create_additional_attributes(e,s,"type_map"));var h=document.createElement("br"),b=document.createElement("input");b.setAttribute("type","hidden"),b.setAttribute("value","type_map"),b.setAttribute("name",e+"_typeform_id_temp"),b.setAttribute("id",e+"_typeform_id_temp");var v=document.createElement("div");v.setAttribute("id",e+"_elementform_id_temp"),v.style.cssText="width:"+_+"px; height: "+r+"px;",v.setAttribute("zoom",d),v.setAttribute("center_x",t),v.setAttribute("center_y",i);var w=document.createElement("span");w.setAttribute("id",e+"_element_labelform_id_temp"),w.innerHTML="map_"+e,w.style.cssText="display:none";var g=document.createElement("div");g.setAttribute("id","main_div");var E=document.createElement("div");E.setAttribute("id",e+"_elemet_tableform_id_temp");var A=document.createElement("div");A.setAttribute("align","left"),A.style.display="table-cell",A.setAttribute("id",e+"_label_sectionform_id_temp");var x=document.createElement("div");x.setAttribute("align","left"),x.style.display="block",x.setAttribute("id",e+"_element_sectionform_id_temp");var k=document.getElementById("show_table");for(A.appendChild(w),x.appendChild(b),x.appendChild(v),E.appendChild(A),E.appendChild(x),g.appendChild(E),g.appendChild(h),k.appendChild(g),jQuery("#main_div").append(form_maker.type_map_description),change_class(o,e),refresh_attr(e,"type_text"),if_gmap_init(e),n=a.length,j=0;j<n;j++)add_marker(e,j,a[j],l[j],m[j])}function create_time_format(e,t){var i=jQuery('<label class="fm-field-label">Time Format</label>'),a=jQuery('<input type="radio" id="el_label_time_type1" name="edit_for_time_type" value="format_24" onchange="format_24('+e+')"'+("24"==t?' checked="checked"':"")+" />"),n=jQuery('<label for="el_label_time_type1">24 hour</label>'),l=jQuery('<input type="radio" id="el_label_time_type2" name="edit_for_time_type" value="format_12" onchange="format_12('+e+", 'am', '', '', '')\""+("24"==t?"":' checked="checked"')+" />"),d=jQuery('<label for="el_label_time_type2">12 hour</label>'),_=a;return create_option_container(i,_=(_=(_=_.add(n)).add(l)).add(d))}function format_24(e){tr_time1=document.getElementById(e+"_tr_time1"),td1=document.getElementById(e+"_am_pm_select"),tr_time2=document.getElementById(e+"_tr_time2"),td2=document.getElementById(e+"_am_pm_label"),tr_time1.removeChild(td1),tr_time2.removeChild(td2),document.getElementById(e+"_hhform_id_temp").value="",document.getElementById(e+"_mmform_id_temp").value="",document.getElementById(e+"_ssform_id_temp")&&(document.getElementById(e+"_ssform_id_temp").value="")}function format_12(t,e,i,a,n){tr_time1=document.getElementById(t+"_tr_time1"),tr_time2=document.getElementById(t+"_tr_time2");var l=document.createElement("div");l.setAttribute("id",t+"_am_pm_select"),l.setAttribute("class","td_am_pm_select"),l.style.display="table-cell";var d=document.createElement("div");d.setAttribute("id",t+"_am_pm_label"),d.setAttribute("class","td_am_pm_select"),d.style.display="table-cell";var _=document.createElement("select");_.setAttribute("class","am_pm_select"),_.setAttribute("name",t+"_am_pmform_id_temp"),_.setAttribute("id",t+"_am_pmform_id_temp"),_.setAttribute("onchange","set_sel_am_pm(this)");var r=document.createElement("option");r.setAttribute("value","am"),r.innerHTML="AM";var o=document.createElement("option");o.setAttribute("value","pm"),o.innerHTML="PM","pm"==e?o.setAttribute("selected","selected"):r.setAttribute("selected","selected");var m=document.createElement("label");m.setAttribute("class","mini_label"),m.setAttribute("id",t+"_mini_label_am_pm"),m.innerHTML=w_mini_labels[3],_.appendChild(r),_.appendChild(o),l.appendChild(_),d.appendChild(m),tr_time1.appendChild(l),tr_time2.appendChild(d),document.getElementById(t+"_hhform_id_temp").value=i,document.getElementById(t+"_mmform_id_temp").value=a,document.getElementById(t+"_ssform_id_temp")&&(document.getElementById(t+"_ssform_id_temp").value=n),refresh_attr(t,"type_time"),jQuery(document).ready(function(){jQuery("label#"+t+"_mini_label_am_pm").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='am_pm' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.am_pm").focus(),jQuery("input.am_pm").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_am_pm").text(e)})}})})}function create_display_seconds(e,t,i){var a=jQuery('<label class="fm-field-label">Display Seconds</label>'),n=jQuery('<input type="radio" id="el_second_yes" name="edit_for_time_second" value="yes" onchange="second_yes('+e+",'"+t+"')\""+("1"==i?' checked="checked"':"")+" />"),l=jQuery('<label for="el_second_yes">Yes</label>'),d=jQuery('<input type="radio" id="el_second_no" name="edit_for_time_second" value="no" onchange="second_no('+e+')"'+("1"==i?"":' checked="checked"')+" />"),_=jQuery('<label for="el_second_no">No</label>'),r=n;return create_option_container(a,r=(r=(r=r.add(l)).add(d)).add(_))}function second_yes(t,e){time_box=document.getElementById(t+"_tr_time1"),text_box=document.getElementById(t+"_tr_time2");var i=document.createElement("div");i.setAttribute("align","center"),i.style.display="table-cell";var a=document.createElement("div");a.setAttribute("id",t+"_td_time_input3"),a.style.display="table-cell";var n=document.createElement("div");n.style.display="table-cell";var l=document.createElement("div");l.setAttribute("id",t+"_td_time_label3"),l.style.display="table-cell";var d=document.createElement("span");d.setAttribute("class","wdform_colon"),d.style.cssText="font-style:bold; vertical-align:middle",d.innerHTML="&nbsp;:&nbsp;",i.appendChild(d);var _=document.createElement("input");_.setAttribute("type","text"),_.setAttribute("value",e),_.setAttribute("class","time_box"),_.setAttribute("id",t+"_ssform_id_temp"),_.setAttribute("name",t+"_ssform_id_temp"),_.setAttribute("onBlur","add_0('"+t+"_ssform_id_temp')");var r=document.createElement("label");r.setAttribute("class","mini_label"),r.innerHTML="SS",r.setAttribute("id",t+"_mini_label_ss"),a.appendChild(_),l.appendChild(r),document.getElementById(t+"_am_pm_select")?(select_=document.getElementById(t+"_am_pm_select"),select_text=document.getElementById(t+"_am_pm_label"),time_box.insertBefore(a,select_),time_box.insertBefore(i,a),text_box.insertBefore(l,select_text),text_box.insertBefore(n,l)):(time_box.appendChild(i),time_box.appendChild(a),text_box.appendChild(n),text_box.appendChild(l)),jQuery(document).ready(function(){jQuery("label#"+t+"_mini_label_ss").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='ss' style='outline:none; border:none; background:none; width:40px;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.ss").focus(),jQuery("input.ss").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_ss").text(e)})}})}),refresh_attr(t,"type_time")}function second_no(e){time_box=document.getElementById(e+"_tr_time1"),text_box=document.getElementById(e+"_tr_time2"),second_box=document.getElementById(e+"_td_time_input3"),second_text=document.getElementById(e+"_td_time_label3"),document.getElementById(e+"_td_time_input2").parentNode.removeChild(document.getElementById(e+"_td_time_input2").nextSibling),time_box.removeChild(second_box),text_box.removeChild(second_text.previousSibling),text_box.removeChild(second_text)}function go_to_type_time(e){w_attr_name=[],w_attr_value=[],w_mini_labels=["HH","MM","SS","AM/PM"],type_time(e,"Time","","top","no","24","0","1","","","",w_mini_labels,"no","",w_attr_name,w_attr_value)}function type_time(t,e,i,a,n,l,d,_,r,o,m,s,u,c,p,f){jQuery("#element_type").val("type_time"),delete_last_child();var y=jQuery("#edit_table"),h=jQuery('<div id="edit_div"></div>');y.append(h);var b=jQuery('<div id="edit_main_table"></div>');h.append(b),b.append(create_field_type("type_time")),b.append(create_label(t,e)),b.append(create_label_position(t,a)),b.append(create_time_format(t,l)),b.append(create_display_seconds(t,m,_)),b.append(create_hide_label(t,n)),b.append(create_required(t,u));var v=jQuery('<div class="inside"></div>');b.append(create_advanced_options_container(v)),v.append(create_field_label_size(t,i)),v.append(create_class(t,c)),v.append(create_additional_attributes(t,p,"type_time"));var w=document.createElement("input");w.setAttribute("type","hidden"),w.setAttribute("value","type_time"),w.setAttribute("name",t+"_typeform_id_temp"),w.setAttribute("id",t+"_typeform_id_temp");var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value",u),g.setAttribute("name",t+"_requiredform_id_temp");var E=document.createElement("input");E.setAttribute("type","hidden"),E.setAttribute("value",n),E.setAttribute("name",t+"_hide_labelform_id_temp"),E.setAttribute("id",t+"_hide_labelform_id_temp"),g.setAttribute("id",t+"_requiredform_id_temp");var A=document.createElement("div");A.setAttribute("id","main_div");var j=document.createElement("div");j.setAttribute("class","fm-editable-label"),edit_labels=document.createTextNode("The labels of the fields are editable. Please, click on the label to edit."),j.appendChild(edit_labels);var x=document.createElement("div");x.setAttribute("id",t+"_elemet_tableform_id_temp");var k="yes"==n?"none":"table-cell",I=document.createElement("div");I.setAttribute("align","left"),I.style.display=k,I.style.width=i+"px",I.setAttribute("id",t+"_label_sectionform_id_temp");var C=document.createElement("div");C.setAttribute("align","left"),C.style.display="table-cell",C.setAttribute("id",t+"_element_sectionform_id_temp");var B=document.createElement("div");B.setAttribute("id",t+"_table_time"),B.style.display="table";var Q=document.createElement("div");Q.setAttribute("id",t+"_tr_time1"),Q.style.display="table-row";var T=document.createElement("div");T.setAttribute("id",t+"_tr_time2"),T.style.display="table-row";var M=document.createElement("div");M.setAttribute("id",t+"_td_time_input1"),M.style.cssText="width:32px",M.style.display="table-cell";var L=document.createElement("div");L.setAttribute("align","center"),L.style.display="table-cell";var z=document.createElement("div");z.setAttribute("id",t+"_td_time_input2"),z.style.cssText="width:32px",z.style.display="table-cell";var q=document.createElement("div");q.setAttribute("align","center"),q.style.display="table-cell";var H=document.createElement("div");H.setAttribute("id",t+"_td_time_input3"),H.style.cssText="width:32px",H.style.display="table-cell";var N=document.createElement("div");N.setAttribute("id",t+"_td_time_label1"),N.style.display="table-cell";var S=document.createElement("div");S.style.display="table-cell";var D=document.createElement("div");D.setAttribute("id",t+"_td_time_label2"),D.style.display="table-cell";var P=document.createElement("div");P.style.display="table-cell";var O=document.createElement("div");O.setAttribute("id",t+"_td_time_label3"),O.style.display="table-cell";document.createElement("br"),document.createElement("br");var K=document.createElement("br"),U=(document.createElement("br"),document.createElement("span"));U.setAttribute("id",t+"_element_labelform_id_temp"),U.innerHTML=e,U.setAttribute("class","label"),U.style.verticalAlign="top";var F=document.createElement("span");F.setAttribute("id",t+"_required_elementform_id_temp"),F.innerHTML="",F.setAttribute("class","required"),F.style.v