Formidable Forms – Form Builder for WordPress - Version 2.03.08

Version Description

  • New: Add frm_label_justify CSS layout class to justify text in long labels
  • Fix: Prevent XSS errors in Chrome when saving a form on the back-end
  • Fix: Remove extra space between textarea and description.
  • Fix: Resolve errors in frm_entries_footer_scripts action call.
  • Fix: Decrease size of file path for automatic updates to avoid hitting file path limits on Windows servers.
  • Fix: Improve checkbox and radio styling with Bootstrap active.
  • Fix: Remove Bootstrap error class with js validation.
  • Pro Version *
  • New: Add unique date/time validation back into plugin.
  • New: Add custom jQuery events that fire before form redirect (frmBeforeFormRedirect) and after deleting/adding a row (frmAfterRemoveRow/frmAfterAddRow).
  • New: Add frm_full_upload CSS Layout Class.
  • Enhancement: Remove deprecated safe_mode references.
  • Enhancement: Allow descriptions to be set in all sub fields.
  • Enhancement: Display a 0 in numeric calculations rather than a blank value.
  • Enhancement: Add [event_date] shortcode in View sidebar.
  • Enhancement: Check required fields before uploading file.
  • Enhancement: Add Parent Entry ID column to entry listing page.
  • Enhancement: Allow Formidable shortcodes as auto_id prefix or suffix.
  • Fix: Improve styling for Other text box in horizontal radio or checkbox field
  • Fix: Switch Cancel Link back to Edit after entry is updated in-place.
  • Fix: Allow quotes in update link value.
  • Fix: Prevent other option from showing when using [input opt=1].
  • Fix: Skip content shortcode checks that have already been run.
  • Fix: Do not treat 0 value as empty in conditional shortcode.
  • Fix: Calculate median properly for stats.
  • Fix: Do not rely on field order to check if a field is conditionally hidden.
  • Fix: Include the html to set a dynamic field to multiple on the form builder page.
  • Fix: Get form and section ID correctly when existing field is dragged into a section.
  • Fix: Do not replace values in fields watching Lookups on edit.
Download this release

Release Info

Developer sswells
Plugin Icon 128x128 Formidable Forms – Form Builder for WordPress
Version 2.03.08
Comparing to
See all releases

Code changes from version 2.03.07 to 2.03.08

Files changed (42) hide show
  1. classes/controllers/FrmAddonsController.php +36 -0
  2. classes/controllers/FrmFormsController.php +26 -3
  3. classes/controllers/FrmHooksController.php +1 -0
  4. classes/helpers/FrmAppHelper.php +1 -1
  5. classes/helpers/FrmEntriesListHelper.php +3 -0
  6. classes/helpers/FrmFieldsHelper.php +4 -0
  7. classes/models/FrmEntryValidate.php +2 -13
  8. classes/models/FrmStyle.php +1 -1
  9. classes/views/frm-entries/form.php +5 -2
  10. classes/views/frm-fields/input.php +1 -1
  11. css/_single_theme.css.php +19 -0
  12. css/custom_theme.css.php +9 -3
  13. formidable.php +1 -1
  14. js/formidable.js +177 -56
  15. js/formidable.min.js +99 -100
  16. js/formidable_admin.js +33 -24
  17. languages/formidable-az_AZ.mo +0 -0
  18. languages/formidable-az_AZ.po +388 -379
  19. languages/formidable-de_DE.mo +0 -0
  20. languages/formidable-de_DE.po +388 -379
  21. languages/formidable-es_ES.mo +0 -0
  22. languages/formidable-es_ES.po +388 -379
  23. languages/formidable-hu_HU.mo +0 -0
  24. languages/formidable-hu_HU.po +388 -379
  25. languages/formidable-it_IT.mo +0 -0
  26. languages/formidable-it_IT.po +388 -379
  27. languages/formidable-ja_JP.mo +0 -0
  28. languages/formidable-ja_JP.po +388 -379
  29. languages/formidable-nb_NO.mo +0 -0
  30. languages/formidable-nb_NO.po +388 -379
  31. languages/formidable-nl_NL.mo +0 -0
  32. languages/formidable-nl_NL.po +396 -385
  33. languages/formidable-pl_PL.mo +0 -0
  34. languages/formidable-pl_PL.po +388 -379
  35. languages/formidable-pt_BR.mo +0 -0
  36. languages/formidable-pt_BR.po +388 -379
  37. languages/formidable-ro_RO.mo +0 -0
  38. languages/formidable-ro_RO.po +388 -379
  39. languages/formidable-sr_RS.mo +0 -0
  40. languages/formidable-sr_RS.po +388 -379
  41. languages/formidable.pot +388 -379
  42. readme.txt +35 -4
classes/controllers/FrmAddonsController.php CHANGED
@@ -235,4 +235,40 @@ class FrmAddonsController {
235
 
236
  return $pro_pricing;
237
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  }
235
 
236
  return $pro_pricing;
237
  }
238
+
239
+ /**
240
+ * Add a filter to shorten the EDD filename for Formidable plugin, and add-on, updates
241
+ *
242
+ * @since 2.03.08
243
+ *
244
+ * @param boolean $return
245
+ * @param string $package
246
+ *
247
+ * @return boolean
248
+ */
249
+ public static function add_shorten_edd_filename_filter( $return, $package ) {
250
+ if ( strpos( $package, '/edd-sl/package_download/' ) !== false && strpos( $package, 'formidableforms.com' ) !== false ) {
251
+ add_filter( 'wp_unique_filename', 'FrmAddonsController::shorten_edd_filename', 10, 2 );
252
+ }
253
+
254
+ return $return;
255
+ }
256
+
257
+ /**
258
+ * Shorten the EDD filename for automatic updates
259
+ * Decreases size of file path so file path limit is not hit on Windows servers
260
+ *
261
+ * @since 2.03.08
262
+ *
263
+ * @param string $filename
264
+ * @param string $ext
265
+ *
266
+ * @return string
267
+ */
268
+ public static function shorten_edd_filename( $filename, $ext ) {
269
+ $filename = substr( $filename, 0, 50 ) . $ext;
270
+ remove_filter( 'wp_unique_filename', 'FrmAddonsController::shorten_edd_filename', 10 );
271
+
272
+ return $filename;
273
+ }
274
  }
classes/controllers/FrmFormsController.php CHANGED
@@ -567,9 +567,16 @@ class FrmFormsController {
567
  );
568
  }
569
 
570
- public static function hidden_columns( $result ) {
571
- return $result;
572
- }
 
 
 
 
 
 
 
573
 
574
  public static function save_per_page( $save, $option, $value ) {
575
  if ( $option == 'formidable_page_formidable_per_page' ) {
@@ -638,6 +645,8 @@ class FrmFormsController {
638
  wp_die(__( 'That template cannot be edited', 'formidable' ));
639
  }
640
 
 
 
641
  $action_controls = FrmFormActionsController::get_form_actions();
642
 
643
  $sections = apply_filters('frm_add_form_settings_section', array(), $values);
@@ -648,6 +657,19 @@ class FrmFormsController {
648
  require( FrmAppHelper::plugin_path() . '/classes/views/frm-forms/settings.php' );
649
  }
650
 
 
 
 
 
 
 
 
 
 
 
 
 
 
651
  public static function mb_tags_box( $form_id, $class = '' ) {
652
  $fields = FrmField::get_all_for_form($form_id, '', 'include');
653
  $linked_forms = array();
@@ -716,6 +738,7 @@ class FrmFormsController {
716
  $entry_shortcodes['editlink location="front" label="Edit" page_id=x'] = __( 'Edit Entry Link', 'formidable' );
717
  $entry_shortcodes['evenodd'] = __( 'Even/Odd', 'formidable' );
718
  $entry_shortcodes['entry_count'] = __( 'Entry Count', 'formidable' );
 
719
  }
720
 
721
  /**
567
  );
568
  }
569
 
570
+ public static function hidden_columns( $hidden_columns ) {
571
+ $type = isset( $_REQUEST['form_type'] ) ? $_REQUEST['form_type'] : '';
572
+
573
+ if ( $type === 'template' ) {
574
+ $hidden_columns[] = 'id';
575
+ $hidden_columns[] = 'form_key';
576
+ }
577
+
578
+ return $hidden_columns;
579
+ }
580
 
581
  public static function save_per_page( $save, $option, $value ) {
582
  if ( $option == 'formidable_page_formidable_per_page' ) {
645
  wp_die(__( 'That template cannot be edited', 'formidable' ));
646
  }
647
 
648
+ self::clean_submit_html( $values );
649
+
650
  $action_controls = FrmFormActionsController::get_form_actions();
651
 
652
  $sections = apply_filters('frm_add_form_settings_section', array(), $values);
657
  require( FrmAppHelper::plugin_path() . '/classes/views/frm-forms/settings.php' );
658
  }
659
 
660
+ /**
661
+ * Replace old Submit Button href with new href to avoid errors in Chrome
662
+ *
663
+ * @since 2.03.08
664
+ *
665
+ * @param array|boolean $values
666
+ */
667
+ private static function clean_submit_html( &$values ) {
668
+ if ( is_array( $values ) && isset( $values['submit_html'] ) ) {
669
+ $values['submit_html'] = str_replace( 'javascript:void(0)', '#', $values['submit_html'] );
670
+ }
671
+ }
672
+
673
  public static function mb_tags_box( $form_id, $class = '' ) {
674
  $fields = FrmField::get_all_for_form($form_id, '', 'include');
675
  $linked_forms = array();
738
  $entry_shortcodes['editlink location="front" label="Edit" page_id=x'] = __( 'Edit Entry Link', 'formidable' );
739
  $entry_shortcodes['evenodd'] = __( 'Even/Odd', 'formidable' );
740
  $entry_shortcodes['entry_count'] = __( 'Entry Count', 'formidable' );
741
+ $entry_shortcodes['event_date format="Y-m-d"'] = __( 'Calendar Date', 'formidable' );
742
  }
743
 
744
  /**
classes/controllers/FrmHooksController.php CHANGED
@@ -90,6 +90,7 @@ class FrmHooksController {
90
 
91
  // Addons Controller
92
  add_action( 'admin_menu', 'FrmAddonsController::menu', 100 );
 
93
 
94
  // Entries Controller
95
  add_action( 'admin_menu', 'FrmEntriesController::menu', 12 );
90
 
91
  // Addons Controller
92
  add_action( 'admin_menu', 'FrmAddonsController::menu', 100 );
93
+ add_filter( 'upgrader_pre_download', 'FrmAddonsController::add_shorten_edd_filename_filter', 10, 4 );
94
 
95
  // Entries Controller
96
  add_action( 'admin_menu', 'FrmEntriesController::menu', 12 );
classes/helpers/FrmAppHelper.php CHANGED
@@ -10,7 +10,7 @@ class FrmAppHelper {
10
  /**
11
  * @since 2.0
12
  */
13
- public static $plug_version = '2.03.07';
14
 
15
  /**
16
  * @since 1.07.02
10
  /**
11
  * @since 2.0
12
  */
13
+ public static $plug_version = '2.03.08';
14
 
15
  /**
16
  * @since 1.07.02
classes/helpers/FrmEntriesListHelper.php CHANGED
@@ -176,6 +176,9 @@ class FrmEntriesListHelper extends FrmListHelper {
176
  $user = get_userdata($item->user_id);
177
  $val = $user ? $user->user_login : '';
178
  break;
 
 
 
179
  default:
180
  $val = apply_filters( 'frm_entries_' . $col_name . '_column', false, compact( 'item' ) );
181
  if ( $val === false ) {
176
  $user = get_userdata($item->user_id);
177
  $val = $user ? $user->user_login : '';
178
  break;
179
+ case 'parent_item_id':
180
+ $val = $item->parent_item_id;
181
+ break;
182
  default:
183
  $val = apply_filters( 'frm_entries_' . $col_name . '_column', false, compact( 'item' ) );
184
  if ( $val === false ) {
classes/helpers/FrmFieldsHelper.php CHANGED
@@ -655,6 +655,10 @@ DEFAULT_HTML;
655
  );
656
 
657
  foreach ( $shortcodes[0] as $short_key => $tag ) {
 
 
 
 
658
  $atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[3][ $short_key ] );
659
 
660
  if ( ! empty( $shortcodes[3][ $short_key ] ) ) {
655
  );
656
 
657
  foreach ( $shortcodes[0] as $short_key => $tag ) {
658
+ if ( empty( $tag ) ) {
659
+ continue;
660
+ }
661
+
662
  $atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[3][ $short_key ] );
663
 
664
  if ( ! empty( $shortcodes[3][ $short_key ] ) ) {
classes/models/FrmEntryValidate.php CHANGED
@@ -21,28 +21,17 @@ class FrmEntryValidate {
21
  // Pass exclude value to validate_field function so it can be used for repeating sections
22
  $args = array( 'exclude' => $exclude );
23
 
24
- $check_later = array();
25
- foreach ( $posted_fields as $posted_field ) {
26
- if ( $posted_field->type == 'file' ) {
27
- $check_later[] = $posted_field;
28
- } else {
29
- self::validate_field( $posted_field, $errors, $values, $args );
30
- }
31
- unset( $posted_field );
32
- }
33
-
34
- // check for spam
35
  self::spam_check( $exclude, $values, $errors );
36
  if ( ! empty( $errors ) ) {
37
  return $errors;
38
  }
39
 
40
- foreach ( $check_later as $posted_field ) {
41
  self::validate_field( $posted_field, $errors, $values, $args );
42
  unset( $posted_field );
43
  }
44
 
45
- $errors = apply_filters( 'frm_validate_entry', $errors, $values, compact('exclude') );
46
 
47
  return $errors;
48
  }
21
  // Pass exclude value to validate_field function so it can be used for repeating sections
22
  $args = array( 'exclude' => $exclude );
23
 
 
 
 
 
 
 
 
 
 
 
 
24
  self::spam_check( $exclude, $values, $errors );
25
  if ( ! empty( $errors ) ) {
26
  return $errors;
27
  }
28
 
29
+ foreach ( $posted_fields as $posted_field ) {
30
  self::validate_field( $posted_field, $errors, $values, $args );
31
  unset( $posted_field );
32
  }
33
 
34
+ $errors = apply_filters( 'frm_validate_entry', $errors, $values, compact( 'exclude' ) );
35
 
36
  return $errors;
37
  }
classes/models/FrmStyle.php CHANGED
@@ -13,7 +13,7 @@ class FrmStyle {
13
  public function get_new() {
14
  $this->id = 0;
15
 
16
- $max_slug_value = pow(36, 6);
17
  $min_slug_value = 37; // we want to have at least 2 characters in the slug
18
  $key = base_convert( rand($min_slug_value, $max_slug_value), 10, 36 );
19
 
13
  public function get_new() {
14
  $this->id = 0;
15
 
16
+ $max_slug_value = 2147483647;
17
  $min_slug_value = 37; // we want to have at least 2 characters in the slug
18
  $key = base_convert( rand($min_slug_value, $max_slug_value), 10, 36 );
19
 
classes/views/frm-entries/form.php CHANGED
@@ -68,8 +68,11 @@ if ( isset($frm_vars['collapse_div']) && $frm_vars['collapse_div'] ) {
68
  echo FrmFormsHelper::replace_shortcodes($values['after_html'], $form);
69
 
70
  if ( FrmForm::show_submit( $form ) ) {
71
- unset($values['fields']);
72
- FrmFormsHelper::get_custom_submit($values['submit_html'], $form, $submit, $form_action, $values);
 
 
 
73
  }
74
  ?>
75
  </fieldset>
68
  echo FrmFormsHelper::replace_shortcodes($values['after_html'], $form);
69
 
70
  if ( FrmForm::show_submit( $form ) ) {
71
+
72
+ $copy_values = $values;
73
+ unset( $copy_values['fields'] );
74
+
75
+ FrmFormsHelper::get_custom_submit( $copy_values['submit_html'], $form, $submit, $form_action, $copy_values );
76
  }
77
  ?>
78
  </fieldset>
classes/views/frm-fields/input.php CHANGED
@@ -81,7 +81,7 @@ do_action('frm_field_input_html', $field);
81
  do_action( 'frm_after_checkbox', array( 'field' => $field, 'field_name' => $field_name, 'type' => $field['type'] ) );
82
  } else if ( $field['options'] ) {
83
  foreach ( $field['options'] as $opt_key => $opt ) {
84
- if ( isset($atts) && isset($atts['opt']) && ($atts['opt'] != $opt_key) ) {
85
  continue;
86
  }
87
 
81
  do_action( 'frm_after_checkbox', array( 'field' => $field, 'field_name' => $field_name, 'type' => $field['type'] ) );
82
  } else if ( $field['options'] ) {
83
  foreach ( $field['options'] as $opt_key => $opt ) {
84
+ if ( isset($atts) && isset($atts['opt']) && ($atts['opt'] !== $opt_key) ) {
85
  continue;
86
  }
87
 
css/_single_theme.css.php CHANGED
@@ -302,6 +302,10 @@ $arrow_icons = FrmStylesHelper::arrow_icons();
302
  margin-bottom:0<?php echo esc_html( $important ) ?>;
303
  }
304
 
 
 
 
 
305
  .<?php echo esc_html( $style_class ) ?> input[type=text],
306
  .<?php echo esc_html( $style_class ) ?> input[type=password],
307
  .<?php echo esc_html( $style_class ) ?> input[type=email],
@@ -398,6 +402,10 @@ $arrow_icons = FrmStylesHelper::arrow_icons();
398
  margin-left:5px <?php echo esc_html( $important ) ?>;
399
  }
400
 
 
 
 
 
401
  .<?php echo esc_html( $style_class ) ?> .frm_full input.frm_other_input:not(.frm_other_full){
402
  margin-left:0 <?php echo esc_html( $important ) ?>;
403
  margin-top:8px;
@@ -637,6 +645,12 @@ if ( ! $submit_style ) { ?>
637
  white-space:normal;
638
  }
639
 
 
 
 
 
 
 
640
  .<?php echo esc_html( $style_class ) ?> .frm_blank_field input[type=text],
641
  .<?php echo esc_html( $style_class ) ?> .frm_blank_field input[type=password],
642
  .<?php echo esc_html( $style_class ) ?> .frm_blank_field input[type=url],
@@ -915,6 +929,11 @@ if ( ! $submit_style ) { ?>
915
  font-size:<?php echo esc_html( $field_font_size . $important ) ?>;
916
  }
917
 
 
 
 
 
 
918
  .<?php echo esc_html( $style_class ) ?> .chosen-container-single .chosen-single{
919
  height:<?php echo esc_html( ( $field_height == 'auto' || $field_height == '' ) ? '25px' : $field_height ) ?>;
920
  line-height:1.3<?php echo esc_html( $important ) ?>;
302
  margin-bottom:0<?php echo esc_html( $important ) ?>;
303
  }
304
 
305
+ .<?php echo esc_html( $style_class ) ?> textarea{
306
+ vertical-align:top;
307
+ }
308
+
309
  .<?php echo esc_html( $style_class ) ?> input[type=text],
310
  .<?php echo esc_html( $style_class ) ?> input[type=password],
311
  .<?php echo esc_html( $style_class ) ?> input[type=email],
402
  margin-left:5px <?php echo esc_html( $important ) ?>;
403
  }
404
 
405
+ .<?php echo esc_html( $style_class ) ?> .horizontal_radio input.frm_other_input:not(.frm_other_full):not(.frm_pos_none) {
406
+ display:inline-block<?php echo esc_html( $important ) ?>;
407
+ }
408
+
409
  .<?php echo esc_html( $style_class ) ?> .frm_full input.frm_other_input:not(.frm_other_full){
410
  margin-left:0 <?php echo esc_html( $important ) ?>;
411
  margin-top:8px;
645
  white-space:normal;
646
  }
647
 
648
+ .<?php echo esc_html( $style_class ) ?> .frm_radio input[type=radio],
649
+ .<?php echo esc_html( $style_class ) ?> .frm_checkbox input[type=checkbox] {
650
+ font-size: <?php echo esc_html( $check_font_size . $important ) ?>;
651
+ position: static<?php echo esc_html( $important ) ?>;;
652
+ }
653
+
654
  .<?php echo esc_html( $style_class ) ?> .frm_blank_field input[type=text],
655
  .<?php echo esc_html( $style_class ) ?> .frm_blank_field input[type=password],
656
  .<?php echo esc_html( $style_class ) ?> .frm_blank_field input[type=url],
929
  font-size:<?php echo esc_html( $field_font_size . $important ) ?>;
930
  }
931
 
932
+ .<?php echo esc_html( $style_class ) ?> .chosen-container .chosen-results li,
933
+ .<?php echo esc_html( $style_class ) ?> .chosen-container .chosen-results li span{
934
+ color:<?php echo esc_html( $text_color . $important ) ?>;
935
+ }
936
+
937
  .<?php echo esc_html( $style_class ) ?> .chosen-container-single .chosen-single{
938
  height:<?php echo esc_html( ( $field_height == 'auto' || $field_height == '' ) ? '25px' : $field_height ) ?>;
939
  line-height:1.3<?php echo esc_html( $important ) ?>;
css/custom_theme.css.php CHANGED
@@ -825,9 +825,11 @@ select.frm_loading_lookup{
825
  }
826
 
827
  .frm_form_field .frm_checkbox,
828
- .frm_form_field .frm_radio{
829
- margin-top: 0;
830
- margin-bottom: 0;
 
 
831
  }
832
 
833
  .frm_form_field.frm_three_col .frm_radio,
@@ -932,6 +934,10 @@ select.frm_loading_lookup{
932
  margin-right:4px;
933
  }
934
 
 
 
 
 
935
  .frm_form_field.frm_capitalize input,
936
  .frm_form_field.frm_capitalize select,
937
  .frm_form_field.frm_capitalize .frm_opt_container label{
825
  }
826
 
827
  .frm_form_field .frm_checkbox,
828
+ .frm_form_field .frm_checkbox + .frm_checkbox,
829
+ .frm_form_field .frm_radio,
830
+ .frm_form_field .frm_radio + .frm_radio{
831
+ margin-top: 0;
832
+ margin-bottom: 0;
833
  }
834
 
835
  .frm_form_field.frm_three_col .frm_radio,
934
  margin-right:4px;
935
  }
936
 
937
+ .frm_form_field.frm_label_justify label.frm_primary_label{
938
+ text-align:justify !important;
939
+ }
940
+
941
  .frm_form_field.frm_capitalize input,
942
  .frm_form_field.frm_capitalize select,
943
  .frm_form_field.frm_capitalize .frm_opt_container label{
formidable.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Formidable Forms
4
  Description: Quickly and easily create drag-and-drop forms
5
- Version: 2.03.07
6
  Plugin URI: https://formidableforms.com/
7
  Author URI: https://formidableforms.com/
8
  Author: Strategy11
2
  /*
3
  Plugin Name: Formidable Forms
4
  Description: Quickly and easily create drag-and-drop forms
5
+ Version: 2.03.08
6
  Plugin URI: https://formidableforms.com/
7
  Author URI: https://formidableforms.com/
8
  Author: Strategy11
js/formidable.js CHANGED
@@ -55,6 +55,7 @@ function frmFrontFormJS(){
55
 
56
  function loadDateFields() {
57
  jQuery(document).on( 'focusin', '.frm_date', triggerDateField );
 
58
  }
59
 
60
  function triggerDateField() {
@@ -161,7 +162,11 @@ function frmFrontFormJS(){
161
  init: function() {
162
  this.on('sending', function(file, xhr, formData) {
163
 
164
- if ( isSpam() ) {
 
 
 
 
165
  this.removeFile(file);
166
  alert('Oops. That file looks like Spam.');
167
  return false;
@@ -244,14 +249,26 @@ function frmFrontFormJS(){
244
  }
245
 
246
  function isSpam() {
247
- var val = document.getElementById('frm_verify').value;
248
- if ( val !== '' || isHeadless() ) {
249
  return true;
250
  } else {
251
  return false;
252
  }
253
  }
254
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  function isHeadless() {
256
  return (
257
  window._phantom || window.callPhantom || //phantomjs
@@ -262,6 +279,55 @@ function frmFrontFormJS(){
262
  );
263
  }
264
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  function getHiddenUploadHTML( field, mediaID, fieldName ) {
266
  return '<input name="'+ fieldName +'[]" type="hidden" value="'+ mediaID +'" data-frmfile="'+ field.fieldID +'" />';
267
  }
@@ -2719,7 +2785,7 @@ function frmFrontFormJS(){
2719
  }
2720
  }
2721
 
2722
- if ( totalField.val() != total ) {
2723
  totalField.val(total);
2724
  triggerChange( totalField, field_key );
2725
  }
@@ -3405,6 +3471,7 @@ function frmFrontFormJS(){
3405
  }
3406
 
3407
  if ( typeof response.redirect != 'undefined' ) {
 
3408
  window.location = response.redirect;
3409
  } else if ( response.content !== '' ) {
3410
  // the form or success message was returned
@@ -3425,11 +3492,6 @@ function frmFrontFormJS(){
3425
  frmThemeOverride_frmAfterSubmit(formReturned, pageOrder, response.content, object);
3426
  }
3427
 
3428
- var entryIdField = jQuery(object).find('input[name="id"]');
3429
- if(entryIdField.length){
3430
- jQuery(document.getElementById('frm_edit_'+ entryIdField.val())).find('a').addClass('frm_ajax_edited').click();
3431
- }
3432
-
3433
  afterFormSubmitted( object, response );
3434
 
3435
  } else if ( Object.keys(response.errors).length ) {
@@ -3548,6 +3610,7 @@ function frmFrontFormJS(){
3548
 
3549
  // if the success message is showing, run the logic
3550
  checkConditionalLogic( 'pageLoad' );
 
3551
  } else {
3552
  jQuery(document).trigger( 'frmPageChanged', [ object, response ] );
3553
  }
@@ -3566,12 +3629,12 @@ function frmFrontFormJS(){
3566
  }
3567
 
3568
  function removeFieldError( $fieldCont ) {
3569
- $fieldCont.removeClass('frm_blank_field');
3570
  $fieldCont.find('.frm_error').remove();
3571
  }
3572
 
3573
  function removeAllErrors() {
3574
- jQuery('.form-field').removeClass('frm_blank_field');
3575
  jQuery('.form-field .frm_error').replaceWith('');
3576
  jQuery('.frm_error_style').remove();
3577
  }
@@ -3863,6 +3926,8 @@ function frmFrontFormJS(){
3863
  if(typeof(frmThemeOverride_frmRemoveRow) == 'function'){
3864
  frmThemeOverride_frmRemoveRow(id, thisRow);
3865
  }
 
 
3866
  });
3867
 
3868
  return false;
@@ -3945,6 +4010,8 @@ function frmFrontFormJS(){
3945
  frmThemeOverride_frmAddRow(id, r);
3946
  }
3947
 
 
 
3948
  currentlyAddingRow = false;
3949
  },
3950
  error: function() {
@@ -3995,19 +4062,29 @@ function frmFrontFormJS(){
3995
 
3996
  function cancelEdit(){
3997
  /*jshint validthis:true */
3998
- var $edit = jQuery(this);
3999
- var entry_id = $edit.data('entryid');
4000
- var prefix = $edit.data('prefix');
4001
- var label = $edit.data('edit');
4002
 
4003
- if(!$edit.hasClass('frm_ajax_edited')){
4004
- var $cont = jQuery(document.getElementById(prefix+entry_id));
4005
- $cont.children('.frm_forms').replaceWith('');
4006
- $cont.children('.frm_orig_content').fadeIn('slow').removeClass('frm_orig_content');
4007
- }
4008
- $edit.removeClass('frm_cancel_edit').addClass('frm_inplace_edit');
4009
- $edit.html(label);
4010
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4011
  }
4012
 
4013
  function deleteEntry(){
@@ -4038,6 +4115,62 @@ function frmFrontFormJS(){
4038
  return false;
4039
  }
4040
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4041
  /**********************************************
4042
  * General Helpers
4043
  *********************************************/
@@ -4541,8 +4674,27 @@ function frmFrontFormJS(){
4541
  },
4542
 
4543
  removeUsedTimes: function( obj, timeField ) {
4544
- /* Time fields */
4545
- console.warn('DEPRECATED: function frmFrontForm.removeUsedTimes v2.03');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4546
  },
4547
 
4548
  escapeHtml: function(text){
@@ -4596,37 +4748,6 @@ function frmUpdateField(entry_id,field_id,value,message,num){
4596
  });
4597
  }
4598
 
4599
- function frmEditEntry(entry_id,prefix,post_id,form_id,cancel,hclass){
4600
- console.warn('DEPRECATED: function frmEditEntry in v2.0.13 use frmFrontForm.editEntry');
4601
- var $edit = jQuery(document.getElementById('frm_edit_'+entry_id));
4602
- var label = $edit.html();
4603
- var $cont = jQuery(document.getElementById(prefix+entry_id));
4604
- var orig = $cont.html();
4605
- $cont.html('<span class="frm-loading-img" id="'+prefix+entry_id+'"></span><div class="frm_orig_content" style="display:none">'+orig+'</div>');
4606
- jQuery.ajax({
4607
- type:'POST',url:frm_js.ajax_url,dataType:'html',
4608
- data:{action:'frm_entries_edit_entry_ajax', post_id:post_id, entry_id:entry_id, id:form_id, nonce:frm_js.nonce},
4609
- success:function(html){
4610
- $cont.children('.frm-loading-img').replaceWith(html);
4611
- $edit.replaceWith('<span id="frm_edit_'+entry_id+'"><a onclick="frmCancelEdit('+entry_id+',\''+prefix+'\',\''+ frmFrontForm.escapeHtml(label) +'\','+post_id+','+form_id+',\''+hclass+'\')" class="'+hclass+'">'+cancel+'</a></span>');
4612
- }
4613
- });
4614
- }
4615
-
4616
- function frmCancelEdit(entry_id,prefix,label,post_id,form_id,hclass){
4617
- console.warn('DEPRECATED: function frmCancelEdit in v2.0.13 use frmFrontForm.cancelEdit');
4618
- var $edit = jQuery(document.getElementById('frm_edit_'+entry_id));
4619
- var $link = $edit.find('a');
4620
- var cancel = $link.html();
4621
-
4622
- if(!$link.hasClass('frm_ajax_edited')){
4623
- var $cont = jQuery(document.getElementById(prefix+entry_id));
4624
- $cont.children('.frm_forms').replaceWith('');
4625
- $cont.children('.frm_orig_content').fadeIn('slow').removeClass('frm_orig_content');
4626
- }
4627
- $edit.replaceWith('<a id="frm_edit_'+entry_id+'" class="frm_edit_link '+hclass+'" href="javascript:frmEditEntry('+entry_id+',\''+prefix+'\','+post_id+','+form_id+',\''+ frmFrontForm.escapeHtml(cancel) +'\',\''+hclass+'\')">'+label+'</a>');
4628
- }
4629
-
4630
  function frmDeleteEntry(entry_id,prefix){
4631
  console.warn('DEPRECATED: function frmDeleteEntry in v2.0.13 use frmFrontForm.deleteEntry');
4632
  jQuery(document.getElementById('frm_delete_'+entry_id)).replaceWith('<span class="frm-loading-img" id="frm_delete_'+entry_id+'"></span>');
55
 
56
  function loadDateFields() {
57
  jQuery(document).on( 'focusin', '.frm_date', triggerDateField );
58
+ loadUniqueTimeFields();
59
  }
60
 
61
  function triggerDateField() {
162
  init: function() {
163
  this.on('sending', function(file, xhr, formData) {
164
 
165
+ if ( ! anyPrecedingRequiredFieldsCompleted( uploadFields[i] ) ) {
166
+ this.removeFile(file);
167
+ alert('Please complete the preceding required fields before uploading a file.');
168
+ return false;
169
+ } else if ( isSpam() ) {
170
  this.removeFile(file);
171
  alert('Oops. That file looks like Spam.');
172
  return false;
249
  }
250
 
251
  function isSpam() {
252
+ if ( isHoneypotSpam() || isHeadless() ) {
 
253
  return true;
254
  } else {
255
  return false;
256
  }
257
  }
258
 
259
+ /**
260
+ * Check if submission is Honeypot spam
261
+ *
262
+ * @since 2.03.08
263
+ *
264
+ * @returns {boolean}
265
+ */
266
+ function isHoneypotSpam() {
267
+ var val = document.getElementById('frm_verify').value;
268
+
269
+ return val !== '';
270
+ }
271
+
272
  function isHeadless() {
273
  return (
274
  window._phantom || window.callPhantom || //phantomjs
279
  );
280
  }
281
 
282
+ /**
283
+ * Check that at least one preceding required field is complete
284
+ *
285
+ * @since 2.03.08
286
+ *
287
+ * @param {object} uploadField
288
+ * @param {string} uploadField.htmlID
289
+ * @param {string} uploadField.fieldID
290
+ * @returns {boolean}
291
+ */
292
+ function anyPrecedingRequiredFieldsCompleted( uploadField ) {
293
+ var fileSelector = uploadField.htmlID + '_dropzone';
294
+ var dropzoneDiv = jQuery( '#' + fileSelector );
295
+ var form = dropzoneDiv.closest( 'form' );
296
+
297
+ if ( form.length < 1 ) {
298
+ return false;
299
+ }
300
+
301
+ var requiredFields = jQuery(form).find(
302
+ '.frm_required_field:visible input, .frm_required_field:visible select, .frm_required_field:visible textarea, #' + fileSelector
303
+ );
304
+
305
+ if ( requiredFields.length < 1 ) {
306
+ return true;
307
+ } else {
308
+ var fieldsComplete = true;
309
+
310
+ for ( var r = 0, rl = requiredFields.length; r < rl; r++ ) {
311
+ if ( requiredFields[r].id === fileSelector ) {
312
+ break;
313
+ }
314
+
315
+ if ( requiredFields[r].className.indexOf( 'frm_optional' ) > -1 || requiredFields[r].getAttribute( 'data-frmfile' ) !== null ) {
316
+ continue;
317
+ }
318
+
319
+ if ( checkRequiredField( requiredFields[r], [] ).length < 1 ) {
320
+ fieldsComplete = true;
321
+ break;
322
+ } else {
323
+ fieldsComplete = false;
324
+ }
325
+ }
326
+ }
327
+
328
+ return fieldsComplete;
329
+ }
330
+
331
  function getHiddenUploadHTML( field, mediaID, fieldName ) {
332
  return '<input name="'+ fieldName +'[]" type="hidden" value="'+ mediaID +'" data-frmfile="'+ field.fieldID +'" />';
333
  }
2785
  }
2786
  }
2787
 
2788
+ if ( totalField.val() !== total ) {
2789
  totalField.val(total);
2790
  triggerChange( totalField, field_key );
2791
  }
3471
  }
3472
 
3473
  if ( typeof response.redirect != 'undefined' ) {
3474
+ jQuery(document).trigger( 'frmBeforeFormRedirect', [ object, response ] );
3475
  window.location = response.redirect;
3476
  } else if ( response.content !== '' ) {
3477
  // the form or success message was returned
3492
  frmThemeOverride_frmAfterSubmit(formReturned, pageOrder, response.content, object);
3493
  }
3494
 
 
 
 
 
 
3495
  afterFormSubmitted( object, response );
3496
 
3497
  } else if ( Object.keys(response.errors).length ) {
3610
 
3611
  // if the success message is showing, run the logic
3612
  checkConditionalLogic( 'pageLoad' );
3613
+ doEditInPlaceCleanUp( object );
3614
  } else {
3615
  jQuery(document).trigger( 'frmPageChanged', [ object, response ] );
3616
  }
3629
  }
3630
 
3631
  function removeFieldError( $fieldCont ) {
3632
+ $fieldCont.removeClass('frm_blank_field has-error');
3633
  $fieldCont.find('.frm_error').remove();
3634
  }
3635
 
3636
  function removeAllErrors() {
3637
+ jQuery('.form-field').removeClass('frm_blank_field has-error');
3638
  jQuery('.form-field .frm_error').replaceWith('');
3639
  jQuery('.frm_error_style').remove();
3640
  }
3926
  if(typeof(frmThemeOverride_frmRemoveRow) == 'function'){
3927
  frmThemeOverride_frmRemoveRow(id, thisRow);
3928
  }
3929
+
3930
+ jQuery(document).trigger( 'frmAfterRemoveRow' );
3931
  });
3932
 
3933
  return false;
4010
  frmThemeOverride_frmAddRow(id, r);
4011
  }
4012
 
4013
+ jQuery(document).trigger( 'frmAfterAddRow' );
4014
+
4015
  currentlyAddingRow = false;
4016
  },
4017
  error: function() {
4062
 
4063
  function cancelEdit(){
4064
  /*jshint validthis:true */
 
 
 
 
4065
 
4066
+ var $cancelLink = jQuery(this);
4067
+ var prefix = $cancelLink.data('prefix');
4068
+ var entry_id = $cancelLink.data('entryid');
4069
+
4070
+ var $cont = jQuery(document.getElementById(prefix+entry_id));
4071
+ $cont.children('.frm_forms').replaceWith('');
4072
+ $cont.children('.frm_orig_content').fadeIn('slow').removeClass('frm_orig_content');
4073
+
4074
+ switchCancelToEdit( $cancelLink );
4075
+ }
4076
+
4077
+ /**
4078
+ * Switch a Cancel Link back to Edit
4079
+ *
4080
+ * @since 2.03.08
4081
+ *
4082
+ * @param {object} $link
4083
+ */
4084
+ function switchCancelToEdit( $link ) {
4085
+ var label = $link.data('edit');
4086
+ $link.removeClass('frm_cancel_edit').addClass('frm_inplace_edit');
4087
+ $link.html(label);
4088
  }
4089
 
4090
  function deleteEntry(){
4115
  return false;
4116
  }
4117
 
4118
+ /**
4119
+ * Switch Cancel link back to Edit link after entry is updated in-place
4120
+ *
4121
+ * @since 2.03.08
4122
+ *
4123
+ * @param {object} form
4124
+ */
4125
+ function doEditInPlaceCleanUp( form ) {
4126
+ var entryIdField = jQuery( form ).find( 'input[name="id"]' );
4127
+
4128
+ if ( entryIdField.length ) {
4129
+ var link = document.getElementById( 'frm_edit_' + entryIdField.val() );
4130
+
4131
+ if ( isCancelLink( link ) ) {
4132
+ switchCancelToEdit( jQuery( link ) );
4133
+ }
4134
+ }
4135
+ }
4136
+
4137
+ /**
4138
+ * Check if a link is a cancel link
4139
+ *
4140
+ * @since 2.03.08
4141
+ *
4142
+ * @param {object} link
4143
+ * @returns {boolean}
4144
+ */
4145
+ function isCancelLink( link ) {
4146
+ return ( link !== null && link.className.indexOf( 'frm_cancel_edit' ) > -1 );
4147
+ }
4148
+
4149
+ /**********************************************
4150
+ * Ajax time field unique check
4151
+ *********************************************/
4152
+
4153
+ function loadUniqueTimeFields() {
4154
+ if ( typeof __frmUniqueTimes === 'undefined' ) {
4155
+ return;
4156
+ }
4157
+
4158
+ var timeFields = __frmUniqueTimes;
4159
+ for ( var i = 0; i < timeFields.length; i++ ) {
4160
+ jQuery( document.getElementById( timeFields[i].dateID ) ).change( maybeTriggerUniqueTime );
4161
+ }
4162
+ }
4163
+
4164
+ function maybeTriggerUniqueTime() {
4165
+ /*jshint validthis:true */
4166
+ var timeFields = __frmUniqueTimes;
4167
+ for ( var i = 0; i < timeFields.length; i++ ) {
4168
+ if ( timeFields[i].dateID == this.id ) {
4169
+ frmFrontForm.removeUsedTimes( this, timeFields[i].timeID );
4170
+ }
4171
+ }
4172
+ }
4173
+
4174
  /**********************************************
4175
  * General Helpers
4176
  *********************************************/
4674
  },
4675
 
4676
  removeUsedTimes: function( obj, timeField ) {
4677
+ var e = jQuery(obj).parents('form:first').find('input[name="id"]');
4678
+ jQuery.ajax({
4679
+ type:'POST',
4680
+ url:frm_js.ajax_url,
4681
+ dataType:'json',
4682
+ data:{
4683
+ action:'frm_fields_ajax_time_options',
4684
+ time_field:timeField, date_field:obj.id,
4685
+ entry_id: (e ? e.val() : ''), date: jQuery(obj).val(),
4686
+ nonce:frm_js.nonce
4687
+ },
4688
+ success:function(opts){
4689
+ var $timeField = jQuery(document.getElementById(timeField));
4690
+ $timeField.find('option').removeAttr('disabled');
4691
+ if ( opts.length > 0 ){
4692
+ for ( var i=0, l=opts.length; i<l; i++ ) {
4693
+ $timeField.find('option[value="'+opts[i]+'"]').attr('disabled', 'disabled');
4694
+ }
4695
+ }
4696
+ }
4697
+ });
4698
  },
4699
 
4700
  escapeHtml: function(text){
4748
  });
4749
  }
4750
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4751
  function frmDeleteEntry(entry_id,prefix){
4752
  console.warn('DEPRECATED: function frmDeleteEntry in v2.0.13 use frmFrontForm.deleteEntry');
4753
  jQuery(document.getElementById('frm_delete_'+entry_id)).replaceWith('<span class="frm-loading-img" id="frm_delete_'+entry_id+'"></span>');
js/formidable.min.js CHANGED
@@ -1,101 +1,100 @@
1
- function frmFrontFormJS(){function l(a){var b=jQuery(this),c=b.attr("type");"submit"!==c&&a.preventDefault();a=b.parents("form:first");var d="",e="",f=this.name;"frm_prev_page"===f||-1!==this.className.indexOf("frm_prev_page")?d=jQuery(a).find(".frm_next_page").attr("id").replace("frm_next_p_",""):"frm_save_draft"===f||-1!==this.className.indexOf("frm_save_draft")?e=1:-1!==this.className.indexOf("frm_page_skip")?(b=b.data("page"),f=jQuery(a).find('input[name="form_id"]').val(),f=jQuery(a).find('input[name="frm_page_order_'+
2
- f+'"]'),jQuery(a).append('<input name="frm_last_page" type="hidden" value="'+f.val()+'" />'),""===b?f.remove():f.val(b)):-1!==this.className.indexOf("frm_page_back")&&(d=b.data("page"));jQuery(".frm_next_page").val(d);jQuery(".frm_saving_draft").val(e);"submit"!==c&&a.trigger("submit")}function m(){jQuery(this).parent().children(".frm_toggle_container").slideToggle("fast");jQuery(this).toggleClass("active").children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s").toggleClass("ui-icon-triangle-1-s ui-icon-triangle-1-e")}
3
- function q(){if(-1===this.className.indexOf("frm_custom_date")&&"undefined"!==typeof __frmDatepicker){var a=__frmDatepicker,b=this.id,c=b.split("-"),c=H(this.name)?'input[id^="'+c[0]+'"]':'input[id^="'+c.join("-")+'"]';jQuery.datepicker.setDefaults(jQuery.datepicker.regional[""]);for(var d=0,e=0;e<a.length;e++)if(a[e].triggerID=="#"+b||a[e].triggerID==c){d=e;break}""!==a[d].options.defaultDate&&(a[d].options.defaultDate=new Date(a[d].options.defaultDate));jQuery(this).datepicker(jQuery.extend(jQuery.datepicker.regional[a[d].locale],
4
- a[d].options))}}function t(a){if("undefined"!==typeof __frmDropzone)for(var b=__frmDropzone,c=0;c<b.length;c++)y(c,a)}function y(a,b){var c=__frmDropzone,d="#"+c[a].htmlID+"_dropzone",e=c[a].fieldName;"undefined"!==typeof b&&-1!==d.indexOf("-0_dropzone")&&(d=d.replace("-0_dropzone","-"+b+"_dropzone"),e=e.replace("[0]","["+b+"]"),delete c[a].mockFiles);d=jQuery(d);if(!(1>d.length||d.hasClass("dz-clickable"))){var f=c[a].maxFiles;if("undefined"!==typeof c[a].mockFiles){var h=c[a].mockFiles.length;0<
5
- f&&(f-=h)}var g=d.closest("form"),h="#"+g.attr("id");"#undefined"==h&&(h="form."+g.attr("class").replace(" ","."));d.dropzone({url:frm_js.ajax_url,addRemoveLinks:!0,paramName:d.attr("id").replace("_dropzone",""),maxFilesize:c[a].maxFilesize,maxFiles:f,uploadMultiple:c[a].uploadMultiple,hiddenInputContainer:h,dictDefaultMessage:c[a].defaultMessage,dictFallbackMessage:c[a].fallbackMessage,dictFallbackText:c[a].fallbackText,dictFileTooBig:c[a].fileTooBig,dictInvalidFileType:c[a].invalidFileType,dictResponseError:c[a].responseError,
6
- dictCancelUpload:c[a].cancel,dictCancelUploadConfirmation:c[a].cancelConfirm,dictRemoveFile:c[a].remove,dictMaxFilesExceeded:c[a].maxFilesExceeded,fallback:function(){jQuery(this.element).closest("form").removeClass("frm_ajax_submit")},init:function(){this.on("sending",function(b,d,e){d=""!==document.getElementById("frm_verify").value||window._phantom||window.callPhantom||window.__phantomas||window.Buffer||window.emit||window.spawn?!0:!1;if(d)return this.removeFile(b),alert("Oops. That file looks like Spam."),
7
- !1;e.append("action","frm_submit_dropzone");e.append("field_id",c[a].fieldID);e.append("form_id",c[a].formID);e.append("nonce",frm_js.nonce)});this.on("success",function(b,d){for(var f=jQuery.parseJSON(d),g=0;g<f.length;g++)!0!==c[a].uploadMultiple&&jQuery('input[name="'+e+'"]').val(f[g])});this.on("successmultiple",function(b,d){for(var f=jQuery.parseJSON(d),g=0;g<b.length;g++)jQuery(b[g].previewElement).append(z(c[a],f[g],e))});this.on("complete",function(b){if("undefined"!==typeof b.mediaID){c[a].uploadMultiple&&
8
- jQuery(b.previewElement).append(z(c[a],b.mediaID,e));for(var d=b.previewElement.querySelectorAll("[data-dz-name]"),f=0,g=d.length;f<g;f++)d[f].innerHTML='<a href="'+b.url+'">'+b.name+"</a>"}});this.on("addedfile",function(){S(g)});this.on("queuecomplete",function(){I(g,"enable")});this.on("removedfile",function(b){!1!==b.accepted&&!0!==c[a].uploadMultiple&&jQuery('input[name="'+e+'"]').val("");!1!==b.accepted&&"undefined"!==typeof b.mediaID&&(jQuery(b.previewElement).remove(),this.options.maxFiles=
9
- c[a].maxFiles-this.files.length)});if("undefined"!==typeof c[a].mockFiles)for(var b=0;b<c[a].mockFiles.length;b++){var d={name:c[a].mockFiles[b].name,size:c[a].mockFiles[b].size,url:c[a].mockFiles[b].file_url,mediaID:c[a].mockFiles[b].id};this.emit("addedfile",d);this.emit("thumbnail",d,c[a].mockFiles[b].url);this.emit("complete",d);this.files.push(d)}}})}}function z(a,b,c){return'<input name="'+c+'[]" type="hidden" value="'+b+'" data-frmfile="'+a.fieldID+'" />'}function B(){var a=jQuery(this).data("frm-remove");
10
- bb(jQuery(this).parent(".dz-preview"));a=jQuery('input[name="'+a+'"]');a.length&&a.val("")}function w(){var a=this.type,b=!1,c=!1;if("select-one"===a)c=!0,"frm_other_trigger"===this.options[this.selectedIndex].className&&(b=!0);else if("select-multiple"===a)for(var c=!0,d=this.options,b=!1,e=0;e<d.length;e++)if("frm_other_trigger"===d[e].className&&d[e].selected){b=!0;break}c?(a=jQuery(this).parent().children(".frm_other_input"),a.length&&(b?a[0].className=a[0].className.replace("frm_pos_none",""):
11
- (1>a[0].className.indexOf("frm_pos_none")&&(a[0].className+=" frm_pos_none"),a[0].value=""))):"radio"===a?jQuery(this).is(":checked")&&(jQuery(this).closest(".frm_radio").children(".frm_other_input").removeClass("frm_pos_none"),jQuery(this).closest(".frm_radio").siblings().children(".frm_other_input").addClass("frm_pos_none").val("")):"checkbox"===a&&(this.checked?jQuery(this).closest(".frm_checkbox").children(".frm_other_input").removeClass("frm_pos_none"):jQuery(this).closest(".frm_checkbox").children(".frm_other_input").addClass("frm_pos_none").val(""))}
12
- function A(a){var b=p(this,!1);if(b&&"undefined"!==typeof b&&(!a.frmTriggered||a.frmTriggered!=b)&&(la(b,jQuery(this)),a="undefined"!==typeof a.originalEvent||-1<a.currentTarget.className.indexOf("frm_chzn")?"value changed":"other",ma(b,jQuery(this),a),T(b,jQuery(this)),jQuery(this).closest("form").hasClass("frm_js_validate"))){b=[];a=jQuery(this).closest(".frm_form_field");a.hasClass("frm_required_field")&&!jQuery(this).hasClass("frm_optional")&&(b=na(this,b));if(1>b.length)if("email"==this.type)var c=
13
- jQuery(this).closest("form").find("input[type=email]"),b=oa(this,b,c);else"number"==this.type?b=pa(this,b):null!==this.pattern&&(b=qa(this,b));a.removeClass("frm_blank_field");a.find(".frm_error").remove();if(0<Object.keys(b).length)for(var d in b)U(a,d,b)}}function p(a,b){var c="",c=a instanceof jQuery?a.attr("name"):a.name;if(""===c)return c=a instanceof jQuery?a.data("name"):a.getAttribute("data-name"),""!==c&&c?c:0;c=c.replace("item_meta[","").replace("[]","").split("]");if(1>c.length)return 0;
14
- var c=c.filter(function(a){return""!==a}),d=c[0],e=!1;if(1===c.length)return d;if("[form"===c[1]||"[row_ids"===c[1])return 0;jQuery('input[name="item_meta['+d+'][form]"]').length&&(d=c[2].replace("[",""),e=!0);"other"===d&&(d=e?c[3].replace("[",""):c[1].replace("[",""));!0===b&&(d=d===c[0]?d+"-"+c[1].replace("[",""):d+"-"+c[0]+"-"+c[1].replace("[",""));return d}function la(a,b){if(!("undefined"===typeof __FRMRULES||"undefined"===typeof __FRMRULES[a]||1>__FRMRULES[a].dependents.length||null===b||"undefined"===
15
- typeof b))for(var c=__FRMRULES[a],d=J(b[0].name),e=0,f=c.dependents.length;e<f;e++)K(c.dependents[e],d)}function K(a,b){var c=V(a);if(!(!1===c||1>c.conditions.length)){var d;d=[];if(c.isRepeating)if(""!==b.repeatingSection){var e="frm_field_"+c.fieldId+"-",e=e+(b.repeatingSection+"-"+b.repeatRow+"_container");d.push(e)}else if(d=L(c),null!==document.getElementById("frm_field_"+d+"_container")){d=[];for(var e=document.querySelectorAll(".frm_field_"+c.fieldId+"_container"),f=0,h=e.length;f<h;f++)d.push(e[f].id)}else{d=
16
- [];for(var f=L(c),e="frm_field_"+c.fieldId+"-"+f+"-",f=document.querySelectorAll('[name="item_meta['+f+'][row_ids][]"]'),h=0,g=f.length;h<g;h++)""!==f[h].value&&d.push(e+f[h].value+"_container");1>d.length&&d.push(e+"0_container")}else d.push("frm_field_"+c.fieldId+"_container");e=d.length;for(f=0;f<e;f++)c.containerId=d[f],ra(c,d[f]),sa(c)}}function L(a){var b="";"0"!==a.inEmbedForm?b=a.inEmbedForm:"0"!==a.inSection&&(b=a.inSection);return b}function ra(a,b){if(a.isRepeating){var c=b.replace("_container",
17
- "").split("-");a.repeatRow=c[2]}else a.repeatRow=""}function sa(a){for(var b=[],c=a.conditions.length,d=0;d<c;d++)b.push(cb(a.conditions[d],a));c=D="any"==a.anyAll?-1<b.indexOf(!0)?a.showHide:ta(a.showHide):-1<b.indexOf(!1)?ta(a.showHide):a.showHide;b=null!==document.getElementById(a.containerId);"show"==c?"data"==a.fieldType&&a.hasOwnProperty("dataLogic")?(a={fieldId:a.fieldId,fieldKey:a.fieldKey,formId:a.formId,containerId:a.containerId,repeatRow:a.repeatRow,dataLogic:{actualValue:a.dataLogic.actualValue,
18
- fieldId:a.dataLogic.fieldId},children:"",inputType:a.inputType},"data"==a.inputType?db(a,b):b&&eb(a)):!1!==C(a.containerId,a.formId)&&(E(a.containerId,a.formId),b?(b=ua(a.containerId),va(b,"divider"==a.fieldType||"form"==a.fieldType,a.formId),jQuery("#"+a.containerId).show()):(b=wa(a),va(b,"divider"==a.fieldType||"form"==a.fieldType,a.formId))):W(a,b)}function V(a){return"undefined"===typeof __FRMRULES||"undefined"===typeof __FRMRULES[a]?!1:__FRMRULES[a]}function cb(a,b){var c=V(a.fieldId),d=xa(c,
19
- b);"data"==b.fieldType&&"data"==c.fieldType?(c=""===a.value?""===d||1==d.length&&""===d[0]?!1:!0:X(a.operator,a.value,d),b.dataLogic=a,b.dataLogic.actualValue=d,d=c):d=X(a.operator,a.value,d);return d}function xa(a,b){var c;if("radio"==a.inputType||"checkbox"==a.inputType)c=ya(a,b),c=document.querySelectorAll('input[name^="'+c+'"]'),c="checkbox"==a.inputType?M(c):Y(c);else if(!0===a.isMultiSelect){c=ya(a,b);var d=document.querySelectorAll('[name^="'+c+'"]');1==d.length&&"hidden"!=d[0].type?(c=jQuery('[name^="'+
20
- c+'"]').val(),null===c&&(c="")):c=M(d)}else if(c="field_"+a.fieldKey,a.isRepeating&&(c+="-"+b.repeatRow),d=document.getElementById(c),null===d){d="";if("time"==a.fieldType){var e=document.getElementById(c+"_H");null!==e&&(d=document.getElementById(c+"_m"),d=e.value+":"+d.value,c=document.getElementById(c+"_A"),":"==d?d="":null!==c&&(d+=" "+c.value))}c=d}else c=d.value;"undefined"===typeof c?c="":"string"===typeof c&&(c=c.trim());return c}function ya(a,b){return a.isRepeating?"item_meta["+("0"!==b.inEmbedForm?
21
- b.inEmbedForm:b.inSection)+"]["+b.repeatRow+"]["+a.fieldId+"]":"item_meta["+a.fieldId+"]"}function M(a){for(var b=[],c=0,d=a.length;c<d;c++)("hidden"==a[c].type||a[c].checked)&&b.push(a[c].value);0===b.length&&(b=!1);return b}function X(a,b,c){b=fb(b);c=gb(b,c);return"string"===typeof b&&"-1"!=b.indexOf("&quot;")&&X(a,b.replace("&quot;",'"'),c)?!0:{"==":function(a,b){return a==b},"!=":function(a,b){return a!=b},"<":function(a,b){return a>b},">":function(a,b){return a<b},LIKE:function(a,b){if(!b)return!1;
22
- a=Z(a);b=za(a,b);return-1!=b.indexOf(a)},"not LIKE":function(a,b){if(!b)return!0;a=Z(a);b=za(a,b);return-1==b.indexOf(a)}}[a](b,c)}function fb(a){-1!==String(a).search(/^\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*$/)?a=parseFloat(a):"string"===typeof a&&(a=a.trim());return a}function gb(a,b){"undefined"===typeof b&&(b="");jQuery.isArray(b)&&-1<jQuery.inArray(String(a),b)&&(b=a);"number"===typeof a&&"string"===typeof b&&(b=parseFloat(b));"string"===typeof b&&(b=b.trim());return b}function za(a,b){b=Z(b);
23
- var c;if(jQuery.isArray(b))for(var d=0,e=b.length;d<e;d++)if(c=b[d].toLowerCase(),-1<c.indexOf(a)){b=a;break}return b}function Z(a){"string"===typeof a?a=a.toLowerCase():"number"===typeof a&&(a=a.toString());return a}function ta(a){return"show"==a?"hide":"show"}function ua(a){return document.getElementById(a).querySelectorAll('select[name^="item_meta"], textarea[name^="item_meta"], input[name^="item_meta"]')}function wa(a){if("divider"==a.fieldType){var b=[];"divider"==a.fieldType&&(b=document.querySelectorAll('[data-sectionid="'+
24
- a.fieldId+'"]'));a=b}else"form"==a.fieldType?a=document.querySelectorAll('[id^="field_'+a.fieldKey+'-"]'):(a=a.isRepeating?"item_meta["+L(a)+"]["+a.repeatRow+"]["+a.fieldId+"]":"item_meta["+a.fieldId+"]",a=document.querySelectorAll('[name^="'+a+'"]'));return a}function va(a,b,c){if(a.length)for(var d,e=["checkbox","radio"],f=0;f<a.length;f++)if(!(0<f&&"undefined"!==typeof d&&d.name==a[f].name&&-1<e.indexOf(d.type)||b&&N(a[f],c))){d=a[f];var h=jQuery(d),g=h.data("frmval");if("undefined"!==typeof g){if("checkbox"==
25
- d.type||"radio"==d.type)Aa(d.name,g);else if(-1<d.name.indexOf("[]")){var k=document.getElementsByName(d.name);if(jQuery.isArray(g))for(var n=0,l=g.length;n<l;n++)n in k&&(k[n].value=g[n]);else null!==k[0]&&(k[0].value=g)}else g.constructor===Object&&(k=d.getAttribute("name").split("[").slice(-1)[0],null!==k&&(k=k.replace("]",""),g=g[k],"undefined"==typeof g&&(g=""))),d.value=g;"SELECT"==d.tagName&&O(d);v(h)}d=a[f];h=p(d,!1);h=aa(h);!1!==h&&"lookup"!=h.fieldType&&Ba(h,d,"value changed");d=a[f];if(h=
26
- "undefined"!==typeof __FRMCALC){h=d.type;g=!1;if("text"==h||"hidden"==h||"number"==h)g=!0;h=g}if(h){h=__FRMCALC;g=d.name;k=d.id.replace("field_","");if(H(g))for(g=k.split("-"),k="",n=0;n<g.length-1;n++)k=""===k?g[n]:k+"-"+g[n];g=k;k=null;H(d.name)&&(k="hidden"!=d.type?jQuery(d).closest(".frm_form_field"):jQuery(d));d=k;void 0!==h.calc[g]&&ba(h,g,[],d)}d=a[f]}}function N(a,b){var c=p(a,!0);return C("frm_field_"+c+"_container",b)}function W(a,b){if(!C(a.containerId,a.formId)){if(b){jQuery("#"+a.containerId).hide();
27
- var c=ua(a.containerId)}else c=wa(a);ca(c);Ca(a.containerId,a.formId)}}function ca(a){if(!(1>a.length)){for(var b,c=!0,d=0,e=a.length;d<e;d++)-1<a[d].className.indexOf("frm_dnc")||(0<d&&b.name!=a[d].name&&!0===c&&v(jQuery(b)),c=!0,"radio"==a[d].type||"checkbox"==a[d].type?a[d].checked=!1:"SELECT"==a[d].tagName?(0===a[d].selectedIndex?c=!1:a[d].selectedIndex=0,b=a[d].id.replace(/[^\w]/g,"_"),null!==document.getElementById(b+"_chosen")&&jQuery(a[d]).trigger("chosen:updated")):a[d].value=""),b=a[d];
28
- !0===c&&v(jQuery(b))}}function C(a,b){var c=!1;-1<F(b).indexOf(a)&&(c=!0);return c}function Ca(a,b){var c=F(b);if(!(-1<c.indexOf(a))){c.push(a);var c=JSON.stringify(c),d=document.getElementById("frm_hide_fields_"+b);null!==d&&(d.value=c)}}function F(a){var b=[];a=document.getElementById("frm_hide_fields_"+a);return null===a?b:b=(b=a.value)?JSON.parse(b):[]}function Aa(a,b){for(var c=document.getElementsByName(a),d=0,e=c.length;d<e;d++)if("hidden"==c[d].type)jQuery.isArray(b)&&null!==b[d]?c[d].value=
29
- b[d]:c[d].value=b;else if(c[d].value==b||jQuery.isArray(b)&&-1<b.indexOf(c[d].value))if(c[d].checked=!0,"radio"==c[d].type)break}function E(a,b){var c=F(b),d=c.indexOf(a);-1<d&&(c.splice(d,1),c=JSON.stringify(c),document.getElementById("frm_hide_fields_"+b).value=c)}function ma(a,b,c){if(!("undefined"===typeof __FRMLOOKUP||"undefined"===typeof __FRMLOOKUP[a]||1>__FRMLOOKUP[a].dependents.length||null===b||"undefined"===typeof b)){a=__FRMLOOKUP[a];b=J(b[0].name);for(var d=0,e=a.dependents.length;d<
30
- e;d++)da(a.dependents[d],b,c)}}function da(a,b,c){a=aa(a);if(!(!1===a||1>a.parents.length))if("lookup"==a.fieldType){if(""!==b.repeatRow){c=[];var d="frm_field_"+a.fieldId+"-",d=d+(b.repeatingSection+"-"+b.repeatRow+"_container");b=document.getElementById(d);null!==b&&c.push(b);b=c}else b=[],a.isRepeating?b=document.querySelectorAll(".frm_field_"+a.fieldId+"_container"):(c=document.getElementById("frm_field_"+a.fieldId+"_container"),null!==c&&b.push(c));c=0;for(d=b.length;c<d;c++){ra(a,b[c].id);var e=
31
- a,f=b[c];e.parentVals=Da(e);if("select"==e.inputType)hb(e,f);else if("radio"==e.inputType||"checkbox"==e.inputType)if(!1===e.parentVals){var h=f.getElementsByTagName("input");Ea(e,f);ca(h)}else ib(e,f)}}else if("value changed"===c)for(c="field_"+a.fieldKey,c=a.isRepeating?""!==b.repeatingSection?'[id="'+c+"-"+b.repeatRow+'"]':'[id^="'+c+'-"]':'[id="'+c+'"]',b=document.querySelectorAll(c),c=0,d=b.length;c<d;c++)e=a,f=J(b[c].name),e.repeatRow=""!==f.repeatRow?f.repeatRow:"",Ba(a,b[c])}function aa(a){return"undefined"===
32
- typeof __FRMLOOKUP||"undefined"===typeof __FRMLOOKUP[a]?!1:__FRMLOOKUP[a]}function Ba(a,b){a.parentVals=Da(a);var c=b.id;c in r&&0<r[c].length?Fa(a,b):(Fa(a,b),Ga(a,b))}function Da(a){for(var b=[],c=a.parents,d,e=0,f=c.length;e<f;e++){d=aa(c[e]);d=xa(d,a);if(""===d||!1===d){b=!1;break}b[e]=d}return b}function Y(a){for(var b=!1,c=a.length,d=0;d<c;d++)if("hidden"==a[d].type||a[d].checked){b=a[d].value;break}return b}function hb(a,b){var c=b.getElementsByTagName("SELECT")[0];if(null!==c){var d=c.value;
33
- !1===a.parentVals?(c.options.length=1,c.value="",O(c),""!==d&&v(jQuery(c),a.fieldKey)):(jb(c),ea(a.formId),jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_replace_lookup_field_options",parent_fields:a.parents,parent_vals:a.parentVals,field_id:a.fieldId,nonce:frm_js.nonce},success:function(d){var e=c.value;d=JSON.parse(d);for(var h=c.options.length;0<h;h--)c.remove(h);for(var g=d.length,h=0;h<g;h++)c.options[h+1]=new Option(d[h],d[h],!1,!1);c.value=e;""===c.value&&(d=c.getAttribute("data-frmval"),
34
- null!==d&&(c.value=d));!1===a.isReadOnly&&(c.disabled=!1);c.className=c.className.replace(" frm_loading_lookup","");O(c);c.value!=e&&v(jQuery(c),a.fieldKey);Ha(jQuery(b));fa(a.formId)}}))}}function O(a){-1<a.className.indexOf("frm_chzn")&&jQuery().chosen&&jQuery(a).trigger("chosen:updated")}function jb(a){a.className+=" frm_loading_lookup";a.disabled=!0;O(a)}function ea(a){P++;1>=P&&(a=Ia(a),null!==a&&S(jQuery(a)))}function fa(a){P--;0>=P&&(a=Ia(a),null!==a&&I(jQuery(a),"enable"))}function Ia(a){return document.querySelector("#frm_form_"+
35
- a+"_container form")}function ib(a,b){var c=b.getElementsByClassName("frm_opt_container")[0],d=c.getElementsByTagName("input");kb(b,c);var e="",e="radio"==a.inputType?Y(d):M(d),f=jQuery(d[0]).data("frmval");ea(a.formId);jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_replace_cb_radio_lookup_options",parent_fields:a.parents,parent_vals:a.parentVals,field_id:a.fieldId,container_field_id:L(a),row_index:a.repeatRow,current_value:e,default_value:f,nonce:frm_js.nonce},success:function(e){c.innerHTML=
36
- e;e=b.getElementsByClassName("frm-loading-img")[0];null!==e&&void 0!==e&&e.parentNode.removeChild(e);c.style.display="block";1==d.length&&""===d[0].value?Ea(a,b):(!1!==C(b.id,a.formId)&&(e=V(a.fieldId),!1===e||1>e.conditions.length?(E(b.id,a.formId),jQuery("#"+b.id).show()):(e.containerId=b.id,e.repeatRow=a.repeatRow,sa(e))),void 0!==f&&(!1!==("radio"==a.inputType?Y(d):M(d))||1>d.length||Aa(d[0].name,f)));v(jQuery(d[0]),a.fieldKey);Ha(jQuery(b));fa(a.formId)}})}function Ha(a){a.trigger("frmLookupOptionsLoaded")}
37
- function Ea(a,b){C(b.id,a.formId)||(jQuery("#"+b.id).hide(),Ca(b.id,a.formId))}function Ga(a,b){if(N(b,a.formId))ga(b.id);else if(!1===a.parentVals){var c=b.getAttribute("data-frmval");null===c&&(c="");Ja(a,b,c);ga(b.id)}else ea(a.formId),jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_get_lookup_text_value",parent_fields:a.parents,parent_vals:a.parentVals,field_id:a.fieldId,nonce:frm_js.nonce},success:function(c){N(b,a.formId)||b.value==c||Ja(a.fieldKey,b,c);fa(a.formId);ga(b.id)}})}
38
- function Fa(a,b){var c=b.id;c in r?2<=r[c].length&&(r[c]=r[c].slice(0,1)):r[c]=[];r[c].push({childFieldArgs:a,childInput:b})}function ga(a){r[a].shift();a in r&&0<r[a].length&&Ga(r[a][0].childFieldArgs,r[a][0].childInput)}function Ja(a,b,c){c=c.replace(/&amp;/g,"&");b.value=c;v(jQuery(b),a)}function db(a,b){if(b){var c=jQuery("#"+a.containerId);Ka(c)}jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_fields_ajax_get_data",entry_id:a.dataLogic.actualValue,current_field:a.fieldId,hide_id:a.containerId,
39
- on_current_page:b,nonce:frm_js.nonce},success:function(d){if(b){var e=c.find(".frm_opt_container");e.html(d);var f=e.children("input"),h=f.val();La(e);""===d||""===h?W(a,!0):Ma(a,c,f,!0)}else e="field_"+a.fieldKey,""!==a.repeatRow&&(e+="-"+a.repeatRow),e=document.getElementById(e),e.value=d,C(a.containerId,a.formId)&&E(a.containerId,a.formId),v(jQuery(e))}})}function eb(a,b){var c=jQuery("#"+a.containerId),d=c.find('select[name^="item_meta"], input[name^="item_meta"]'),e=Na(d),d=d.data("frmval"),
40
- f=c.closest("form").find('input[name="id"]').val();Ka(c);jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_fields_ajax_data_options",trigger_field_id:a.dataLogic.fieldId,entry_id:a.dataLogic.actualValue,field_id:a.fieldId,default_value:d,container_id:a.containerId,editing_entry:f,prev_val:e,nonce:frm_js.nonce},success:function(b){var d=c.find(".frm_opt_container");d.html(b);var f=d.find('select, input[type="checkbox"], input[type="radio"]');La(d);""===b||1>f.length?W(a,!0):(b=Na(f),Ma(a,
41
- c,f,e!==b))}})}function Ka(a){var b=a.html();-1<b.indexOf("frm-loading-img")||(a.html(b+'<span class="frm-loading-img"></span>'),a.find(".frm_opt_container").hide())}function kb(a,b){if(!(-1<a.innerHTML.indexOf("frm-loading-img"))){b.style.display="none";var c=document.createElement("span");c.setAttribute("class","frm-loading-img");a.insertBefore(c,b.nextSibling)}}function La(a){a.parent().children(".frm-loading-img").remove();a.show()}function Na(a){var b=[],c="";a.each(function(){c=this.value;"radio"===
42
- this.type||"checkbox"===this.type?!0===this.checked&&b.push(c):""!==c&&b.push(c)});0===b.length&&(b="");return b}function Ma(a,b,c,d){C(a.containerId,a.formId)&&(E(a.containerId,a.formId),b.show());c.hasClass("frm_chzn")&&ha();!0===d&&v(c)}function T(a,b){if("undefined"!==typeof __FRMCALC){var c=__FRMCALC,d=c.fields[a];if("undefined"!==typeof d)for(var d=d.total,e=[],f=0,h=d.length;f<h;f++){var g;g=c.calc[d[f]];var k=b.attr("name"),n=!1,l=g.field_id,m=F(g.form_id);1>m.length||("0"===g.inSection&&
43
- "0"===g.inEmbedForm?n=Q(l,m):(k=J(k),Q(l,m)?n=!0:Oa(l,k,m)?n=!0:"0"!==g.inSection&&"0"!==g.inEmbedForm?n=Oa(g.inSection,k,m):"0"!==g.inSection?n=Q(g.inSection,m):"0"!==g.inEmbedForm&&(n=Q(g.inEmbedForm,m))));g=n;!1===g&&ba(c,d[f],e,b)}}}function Q(a,b){return-1<b.indexOf("frm_field_"+a+"_container")}function Oa(a,b,c){var d=!1;b.repeatingSection&&(a="frm_field_"+a+"-"+b.repeatingSection,a+="-"+b.repeatRow+"_container",d=-1<c.indexOf(a));return d}function ba(a,b,c,d){var e=a.calc[b],f=e.calc,h=jQuery(document.getElementById("field_"+
44
- b)),g={triggerField:d,inSection:!1,thisFieldCall:'input[id^="field_'+b+'-"]'};1>h.length&&"undefined"!==typeof d&&(g.inSection=!0,g.thisFieldId=lb(a.fieldsWithCalc,b),h=Pa(g));if(!(null===h||1>h.length)){f=mb(e,f,a,c,g);if("text"!=e.calc_type){a=e.calc_dec;-1<f.indexOf(").toFixed(")&&(c=f.split(").toFixed("),Qa(c[1])&&(a=c[1],f=f.replace(").toFixed("+a,"")));f=nb(f);f=parseFloat(eval(f));if("undefined"===typeof f||isNaN(f))f=0;Qa(a)&&(f=f.toFixed(a))}h.val()!=f&&(h.val(f),v(h,b))}}function mb(a,b,
45
- c,d,e){for(var f=0,h=a.fields.length;f<h;f++){var g={triggerField:e.triggerField,thisFieldId:a.fields[f],inSection:e.inSection,valKey:e.inSection+""+a.fields[f],thisField:c.fields[a.fields[f]],thisFieldCall:"input"+c.fieldKeys[a.fields[f]]},k=c;"checkbox"==g.thisField.type||"radio"==g.thisField.type||"scale"==g.thisField.type?g.thisFieldCall=g.thisFieldCall+":checked,"+g.thisFieldCall+"[type=hidden]":"select"==g.thisField.type||"time"==g.thisField.type?g.thisFieldCall="select"+k.fieldKeys[g.thisFieldId]+
46
- " option:selected,"+g.thisFieldCall+"[type=hidden]":"textarea"==g.thisField.type&&(g.thisFieldCall=g.thisFieldCall+",textarea"+k.fieldKeys[g.thisFieldId]);if("text"==a.calc_type)g.valKey="text"+g.valKey,d=ob(g,d),"undefined"===typeof d[g.valKey]&&(d[g.valKey]="");else{g.valKey="num"+g.valKey;d=pb(g,c,d);if("undefined"===typeof d[g.valKey]||isNaN(d[g.valKey]))d[g.valKey]=0;"date"==g.thisField.type&&0===d[g.valKey]&&(b="")}k="["+g.thisFieldId+"]";k=k.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1");b=
47
- b.replace(new RegExp(k,"g"),d[g.valKey])}return b}function nb(a){var b=a.charAt(a.length-1);if("+"===b||"-"===b)a=a.substr(0,a.length-1);return a}function H(a){return 3<=a.split("][").length}function pb(a,b,c){if("undefined"!==typeof c[a.valKey]&&0!==c[a.valKey])return c;c[a.valKey]=0;var d=Ra(a);if(!1===d)return c;d.each(function(){var d=Sa(a.thisField,this);if("date"==a.thisField.type){var f;f=b.date;var h=0;if(d)if("undefined"===typeof jQuery.datepicker){h="-";-1<f.indexOf("/")&&(h="/");f=f.split(h);
48
- var d=d.split(h),g,k;g=h=k="";for(var n=0;n<f.length;n++)if("y"==f[n])g=((new Date).getFullYear()+15).toString().substr(2,2),g=d[n]>g?"19"+d[n]:"20"+d[n];else if("yy"==f[n])g=d[n];else if("m"==f[n]||"mm"==f[n])h=d[n],2>h.length&&(h="0"+h);else if("d"==f[n]||"dd"==f[n])k=d[n],2>k.length&&(k="0"+k);h=Date.parse(g+"-"+h+"-"+k)}else h=jQuery.datepicker.parseDate(f,d);f=h;null!==f&&(c[a.valKey]=Math.ceil(f/864E5))}else{f=d;""!==f&&0!==f&&(f=f.trim(),f=parseFloat(f.replace(/,/g,"").match(/-?[\d\.]+$/)));
49
- if("undefined"===typeof f||isNaN(f)||""===f)f=0;c[a.valKey]+=f}});return c}function ob(a,b){if("undefined"!==typeof b[a.valKey]&&""!==b[a.valKey])return b;b[a.valKey]="";var c=Ra(a);if(!1===c)return b;var d=0,e="";c.each(function(){var c=Sa(a.thisField,this),c=c.trim();0<d&&("time"==a.thisField.type?1==d?e=":":2==d&&(e=" "):e=", ");""!==c&&(b[a.valKey]+=e+c,d++)});return b}function Ra(a){var b;if(!1===a.inSection)b=jQuery(a.thisFieldCall);else if(b=Pa(a),null===b||"undefined"===typeof b)b=jQuery(a.thisFieldCall);
50
- if(null===b||"undefined"===typeof b||1>b.length)b=!1;return b}function Pa(a){if("undefined"===typeof a.triggerField)return null;var b=a.triggerField.closest(".frm_repeat_sec, .frm_repeat_inline, .frm_repeat_grid");return b.length?(a=a.thisFieldCall.replace("[id=","[id^="),b.find(a)):null}function Sa(a,b){var c;c=!1;if("hidden"==b.type)""!==ia(b)&&(c=!0);else if("select"==a.type){var d=b.className;d&&-1<d.indexOf("frm_other_trigger")&&(c=!0)}else("checkbox"==a.type||"radio"==a.type)&&-1<b.id.indexOf("-other_")&&
51
- 0>b.id.indexOf("-otext")&&(c=!0);c?(c=0,"select"==a.type?"hidden"==b.type?(d=!1,2<b.name.split("[").length&&(d=!0),d||(c=ia(b))):c=jQuery(b).closest(".frm_other_container").find(".frm_other_input").val():"checkbox"!=a.type&&"radio"!=a.type||"hidden"==b.type||(c=ia(b))):c="checkbox"!==b.type&&"radio"!==b.type||!b.checked?jQuery(b).val():b.value;"undefined"===typeof c&&(c="");return c}function ia(a){var b="";a=document.getElementById(a.id+"-otext");null!==a&&""!==a.value&&(b=a.value);return b}function Ta(a){var b=
52
- !1;a=jQuery(a).find(".frm_saving_draft");a.length&&(b=a.val());return b}function Ua(a){var b=!1,c=jQuery(a).find(".frm_next_page");if(c.length&&c.val()){var d=jQuery(a).find('input[name="form_id"]').val();a=jQuery(a).find('input[name="frm_page_order_'+d+'"]');a=a.length?a.val():0;if(!a||c.val()<a)b=!0}return b}function na(a,b){var c=a.getAttribute("data-frmfile");if("hidden"==a.type&&null===c)return b;var d="",e="";if("checkbox"==a.type||"radio"==a.type)c=jQuery('input[name="'+a.name+'"]').closest(".frm_required_field").find("input:checked"),
53
- jQuery(c).each(function(){d=this.value});else if("file"==a.type||c)"undefined"===typeof c&&(c=p(a,!0),c=c.replace("file","")),"undefined"===typeof b[c]&&(d=qb(c)),e=c;else{c=a.className;if(-1!==c.indexOf("frm_pos_none"))return b;d=jQuery(a).val();if(null===d)d="";else if("string"!==typeof d)for(var e=d,d="",f=0;f<e.length;f++)""!==e[f]&&(d=e[f]);e=-1===c.indexOf("frm_other_input")?p(a,!0):p(a,!1);-1!==c.indexOf("frm_time_select")&&(e=e.replace("-H","").replace("-m",""))}""===d&&(""===e&&(e=p(a,!0)),
54
- e in b||(b[e]=G(a,"data-reqmsg")));return b}function qb(a){var b="";jQuery('input[name="file'+a+'"], input[name="file'+a+'[]"], input[name^="item_meta['+a+']"]').each(function(){""===b&&(b=this.value)});return b}function oa(a,b,c){var d=a.value,e=p(a,!0);if(e in b)return b;var f=0===e.indexOf("conf_");if(""!==d||f){var h=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i,g=G(a,"data-invmsg");""!==
55
- d&&!1===h.test(d)?(b[e]=g,f&&(b[e.replace("conf_","")]="")):f&&(a=a.name.replace("conf_",""),c.filter('[name="'+a+'"]').val()!==d&&(b[e]="",b[e.replace("conf_","")]=""))}return b}function pa(a,b){var c=a.value;""!==c&&!1!==isNaN(c/1)&&(c=p(a,!0),c in b||(b[c]=G(a,"data-invmsg")));return b}function qa(a,b){var c=a.value,d=G(a,"pattern");if(""!==d&&""!==c){var e=p(a,!0);e in b||(d=new RegExp("^"+d+"$","i"),!1===d.test(c)&&(b[e]=G(a,"data-invmsg")))}return b}function G(a,b){var c=a.getAttribute(b);null===
56
- c&&(c="");return c}function rb(a,b){"undefined"==typeof b&&jQuery(a).find('input[name="frm_action"]').val();var c=jQuery(a).find(".frm_form_field");c.addClass("frm_doing_ajax");jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:jQuery(a).serialize()+"&action=frm_entries_"+b+"&nonce="+frm_js.nonce,success:function(b){var d={content:"",errors:{},pass:!1};null===b&&(b=d);b=b.replace(/^\s+|\s+$/g,"");b=0===b.indexOf("{")?jQuery.parseJSON(b):d;if("undefined"!=typeof b.redirect)window.location=b.redirect;
57
- else if(""!==b.content){I(jQuery(a));-1!=frm_js.offset&&frmFrontForm.scrollMsg(jQuery(a),!1);var f=jQuery(a).find('input[name="form_id"]').val();b.content=b.content.replace(/ frm_pro_form /g," frm_pro_form frm_no_hide ");jQuery(a).closest(".frm_forms").replaceWith(b.content);d=b;if(history.pushState&&"undefined"!=typeof d.page){var h,g=d.page;h=encodeURI("frm_page");for(var g=encodeURI(g),k=document.location.search.substr(1).split("&"),n=k.length,l;n--;)if(l=k[n].split("="),l[0]==h){l[1]=g;k[n]=l.join("=");
58
- break}0>n&&(k[k.length]=[h,g].join("="));h=k.join("&");window.history.pushState({html:d.html},"","?"+h)}"function"==typeof frmThemeOverride_frmAfterSubmit&&(f=jQuery('input[name="frm_page_order_'+f+'"]').val(),d=jQuery(b.content).find('input[name="form_id"]').val(),frmThemeOverride_frmAfterSubmit(d,f,b.content,a));f=jQuery(a).find('input[name="id"]');f.length&&jQuery(document.getElementById("frm_edit_"+f.val())).find("a").addClass("frm_ajax_edited").click();jQuery(b.content).find(".frm_message").length?
59
- (jQuery(document).trigger("frmFormComplete",[a,b]),ja("pageLoad")):jQuery(document).trigger("frmPageChanged",[a,b]);ka()}else if(Object.keys(b.errors).length){I(jQuery(a),"enable");d=!0;Va();h=!1;for(f in b.errors)g=jQuery(a).find("#frm_field_"+f+"_container"),g.length&&(g.is(":visible")||(k=g.closest(".frm_toggle_container"),k.length&&(k=k.prev(),k.hasClass("frm_trigger")||(k=k.prev(".frm_trigger")),k.click())),g.is(":visible")&&(U(g,f,b.errors),d=!1,g=jQuery(a).find("#frm_field_"+f+"_container .frm-g-recaptcha, #frm_field_"+
60
- f+"_container .g-recaptcha"),g.length&&(h=!0,g=g.data("rid"),jQuery().grecaptcha&&(g?grecaptcha.reset(g):grecaptcha.reset()))));jQuery(document).trigger("frmFormErrors",[a,b]);c.removeClass("frm_doing_ajax");Wa(a);!0!==h&&Xa(a,!1);d?a.submit():jQuery(a).prepend(b.error_message)}else sb(a),Xa(a,!0),a.submit()},error:function(){jQuery(a).find('input[type="submit"], input[type="button"]').removeAttr("disabled");a.submit()}})}function U(a,b,c){a.length&&a.is(":visible")&&(a.addClass("frm_blank_field"),
61
- "function"==typeof frmThemeOverride_frmPlaceError?frmThemeOverride_frmPlaceError(b,c):a.append('<div class="frm_error">'+c[b]+"</div>"))}function Va(){jQuery(".form-field").removeClass("frm_blank_field");jQuery(".form-field .frm_error").replaceWith("");jQuery(".frm_error_style").remove()}function Wa(a){var b=jQuery(a).find(".frm_blank_field:first");b.length&&frmFrontForm.scrollMsg(b,a,!0)}function S(a){a.hasClass("frm_loading_form")||a.addClass("frm_loading_form");a.find('input[type="submit"], input[type="button"], button[type="submit"]').attr("disabled",
62
- "disabled")}function I(a,b){a.removeClass("frm_loading_form");"enable"==b&&a.find('input[type="submit"], input[type="button"], button[type="submit"]').removeAttr("disabled")}function sb(a){var b=document.getElementById("frm_loading");null!==b&&(a=jQuery(a).find("input[type=file]").val(),"undefined"!=typeof a&&""!==a&&setTimeout(function(){jQuery(b).fadeIn("slow")},2E3))}function Xa(a,b){var c=jQuery(a).find(".frm-g-recaptcha, .g-recaptcha");c.length&&(!b||1>jQuery(a).find(".frm_next_page").length||
63
- 1>jQuery(a).find(".frm_next_page").val())&&c.closest(".frm_form_field").replaceWith('<input type="hidden" name="recaptcha_checked" value="'+frm_js.nonce+'">')}function tb(){Ya(jQuery(this),"clear")}function ub(){Ya(jQuery(this),"replace")}function Ya(a,b){var c=a.data("frmval").replace(/(\n|\r\n)/g,"\r");if(""===c||"undefined"==typeof c)return!1;var d=a.val().replace(/(\n|\r\n)/g,"\r");"replace"==b?""===d&&a.addClass("frm_default").val(c):d==c&&a.removeClass("frm_default").val("")}function vb(){var a=
64
- jQuery(this),b=a.data("eid"),c=a.data("fid");a.append('<span class="spinner" style="display:inline"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_send_email",entry_id:b,form_id:c,nonce:frm_js.nonce},success:function(b){a.replaceWith(b)}});return!1}function wb(a,b){google.load("visualization","1.0",{packages:[b],callback:function(){var b=new google.visualization.DataTable,d=!1;-1!==jQuery.inArray("id",a.options.fields)&&(d=!0,b.addColumn("number",frm_js.id));for(var e=
65
- a.fields.length,f,h=0,g=e;h<g;h++){var k=a.fields[h];f=Za(k);b.addColumn(f,k.name)}h=!1;a.options.edit_link&&(h=!0,b.addColumn("string",a.options.edit_link));g=!1;a.options.delete_link&&(g=!0,b.addColumn("string",a.options.delete_link));if(null!==a.entries){var l=a.entries.length;b.addRows(l);for(var m=0,q=0;q<l;q++){var k=0,p=a.entries[q];d&&(b.setCell(m,k,p.id),k++);for(var r=0,t=e;r<t;r++){var u=a.fields[r];f=Za(u);u=p.metas[u.id];"number"!=f||null!==u&&""!==u?"boolean"==f&&(u=null===u||"false"==
66
- u||!1===u?!1:!0):u=0;b.setCell(m,k,u);k++}h&&("undefined"!==typeof p.editLink?b.setCell(m,k,'<a href="'+p.editLink+'">'+a.options.edit_link+"</a>"):b.setCell(m,k,""),k++);g&&("undefined"!==typeof p.deleteLink?b.setCell(m,k,'<a href="'+p.deleteLink+'" class="frm_delete_link" data-frmconfirm="'+a.options.confirm+'">'+a.options.delete_link+"</a>"):b.setCell(m,k,""));m++}}else for(b.addRows(1),h=k=0,g=e;h<g;h++)0<k?b.setCell(0,k,""):b.setCell(0,k,a.options.no_entries),k++;(new google.visualization.Table(document.getElementById("frm_google_table_"+
67
- a.options.form_id))).draw(b,a.graphOpts)}})}function xb(a){google.load("visualization","1.0",{packages:[a["package"]],callback:function(){var b;new google.visualization.DataTable;b=google.visualization.arrayToDataTable(a.data);var c=document.getElementById("chart_"+a.graph_id);if(null!==c){var d=a.type.charAt(0).toUpperCase()+a.type.slice(1);"Histogram"!==d&&"Table"!==d&&(d+="Chart");c=new google.visualization[d](c);c.draw(b,a.options);jQuery(document).trigger("frmDrawChart",[c,"chart_"+a.graph_id,
68
- b])}}})}function Za(a){var b="string";if("number"==a.type)b="number";else if("checkbox"==a.type||"select"==a.type){var c=a.options.length;"select"==a.type&&""===a.options[0]&&(c="post_status"==a.field_options.post_field?3:c-1);1==c&&(b="boolean")}return b}function yb(){var a=jQuery(this).data("key"),b=jQuery(this).data("parent"),c="frm_section_"+b+"-"+a,d=jQuery(document.getElementById(c)),e=d.find("input, select, textarea"),f=jQuery(this).closest("form").find('input[name="form_id"]').val();d.fadeOut("slow",
69
- function(){d.remove();e.each(function(){var c=p(this,!1);"file"!=this.type&&T(c,jQuery(this));E("frm_field_"+c+"-"+b+"-"+a+"_container",f)});"function"==typeof frmThemeOverride_frmRemoveRow&&frmThemeOverride_frmRemoveRow(c,d)});return!1}function zb(){if(!0===R)return!1;R=!0;var a=jQuery(this).data("parent"),b=0;if(0<jQuery(".frm_repeat_"+a).length)var c=jQuery(".frm_repeat_"+a+":last").attr("id").replace("frm_section_"+a+"-",""),b=-1<c.indexOf("i")?1:1+parseInt(c);jQuery.ajax({type:"POST",url:frm_js.ajax_url,
70
- dataType:"json",data:{action:"frm_add_form_row",field_id:a,i:b,nonce:frm_js.nonce},success:function(c){var d=c.html,f=jQuery(d).hide().fadeIn("slow");jQuery(".frm_repeat_"+a+":last").after(f);var h=["other"],g,k,l={repeatingSection:a.toString(),repeatRow:b.toString()};jQuery(d).find("input, select, textarea").each(function(){if("file"!=this.type){if(""===this.name)return!0;g=this.name.replace("item_meta[","").split("]")[2].replace("[","");-1==jQuery.inArray(g,h)&&!1!==this.id&&""!==this.id&&(k=jQuery("#"+
71
- this.id),h.push(g),K(g,l),da(g,l,"value changed"),la(g,k),ma(g,k,"value changed"),T(g,k))}});t(l.repeatRow);$a();ha();"function"==typeof frmThemeOverride_frmAddRow&&frmThemeOverride_frmAddRow(a,c);R=!1},error:function(){R=!1}});return!1}function Ab(){var a=jQuery(this),b=a.data("entryid"),c=a.data("prefix"),d=a.data("pageid"),e=a.data("formid"),f=a.data("cancel"),h=a.data("fields"),g=a.data("excludefields"),k=jQuery(document.getElementById(c+b)),l=k.html();k.html('<span class="frm-loading-img" id="'+
72
- c+b+'"></span><div class="frm_orig_content" style="display:none">'+l+"</div>");jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"html",data:{action:"frm_entries_edit_entry_ajax",post_id:d,entry_id:b,id:e,nonce:frm_js.nonce,fields:h,exclude_fields:g},success:function(d){k.children(".frm-loading-img").replaceWith(d);a.removeClass("frm_inplace_edit").addClass("frm_cancel_edit");a.html(f);ja("editInPlace");jQuery(document).on("change",'.frm-show-form input[name^="item_meta"], .frm-show-form select[name^="item_meta"], .frm-show-form textarea[name^="item_meta"]',
73
- A);ka(c+b)}});return!1}function Bb(){var a=jQuery(this),b=a.data("entryid"),c=a.data("prefix"),d=a.data("edit");a.hasClass("frm_ajax_edited")||(b=jQuery(document.getElementById(c+b)),b.children(".frm_forms").replaceWith(""),b.children(".frm_orig_content").fadeIn("slow").removeClass("frm_orig_content"));a.removeClass("frm_cancel_edit").addClass("frm_inplace_edit");a.html(d);return!1}function Cb(){var a=jQuery(this),b=a.data("deleteconfirm");if(confirm(b)){var c=a.data("entryid"),d=a.data("prefix");
74
- a.replaceWith('<span class="frm-loading-img" id="frm_delete_'+c+'"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_destroy",entry:c,nonce:frm_js.nonce},success:function(a){if("success"==a.replace(/^\s+|\s+$/g,"")){var b=jQuery(document.getElementById(d+c));b.fadeOut("slow",function(){b.remove()});jQuery(document.getElementById("frm_delete_"+c)).fadeOut("slow")}else jQuery(document.getElementById("frm_delete_"+c)).replaceWith(a)}})}return!1}function ka(a){"undefined"!==
75
- typeof __frmHideFields&&frmFrontForm.hidePreviouslyHiddenFields();jQuery(document).on("focusin",".frm_date",q);if("undefined"!==typeof __frmMasks)for(var b=__frmMasks,c=0;c<b.length;c++)jQuery(b[c].trigger).attr("data-frmmask",b[c].mask);$a();ha(a);"undefined"!==typeof __frmDepDynamicFields&&frmFrontForm.checkDependentDynamicFields(__frmDepDynamicFields);"undefined"!==typeof __frmDepLookupFields&&frmFrontForm.checkDependentLookupFields(__frmDepLookupFields);if("undefined"!==typeof __FRMCALC){(a=__FRMCALC.triggers)&&
76
- jQuery(a.join()).trigger({type:"change",selfTriggered:!0});a=__FRMCALC.calc;var b=[],d;for(d in a)1>a[d].fields.length&&(c=document.getElementById("field_"+d),null===c||N(c,a[d].form_id)||ba(__FRMCALC,d,b))}t()}function ha(a){if(jQuery().chosen){var b={allow_single_deselect:!0,no_results_text:frm_js.no_results};"undefined"!==typeof __frmChosen&&(b="{"+__frmChosen+"}");"undefined"!==typeof a?jQuery("#"+a).find(".frm_chzn").chosen(b):jQuery(".frm_chzn").chosen(b)}}function $a(){if(jQuery().rating){var a=
77
- jQuery(".star");a.length&&a.rating()}}function ja(a){"undefined"!==typeof __frmHideOrShowFields?frmFrontForm.hideOrShowFields(__frmHideOrShowFields,a):ab()}function ab(){jQuery(".frm_pro_form").fadeIn("slow")}function v(a,b){"undefined"===typeof b&&(b="dependent");1<a.length&&(a=a.eq(0));a.trigger({type:"change",selfTriggered:!0,frmTriggered:b})}function J(a){var b={repeatingSection:"",repeatRow:""};"undefined"!==typeof a&&H(a)&&(a=a.split("]["),b.repeatingSection=a[0].replace("item_meta[",""),b.repeatRow=
78
- a[1]);return b}function bb(a){a.fadeOut("slow",function(){a.remove()})}function Db(){var a=jQuery(this).data("frmconfirm");return confirm(a)}function Eb(){var a=jQuery(this).data("frmtoggle");jQuery(a).is(":visible")?jQuery(a).slideUp("fast"):jQuery(a).slideDown("fast");return!1}function lb(a,b){for(var c in a)if(a.hasOwnProperty(c)&&a[c]===b)return c;return null}function Qa(a){return!jQuery.isArray(a)&&0<=a-parseFloat(a)+1}function Fb(){Array.prototype.indexOf||(Array.prototype.indexOf=function(a,
79
- b){var c=this.length>>>0,d=Number(b)||0,d=0>d?Math.ceil(d):Math.floor(d);for(0>d&&(d+=c);d<c;d++)if(d in this&&this[d]===a)return d;return-1})}function Gb(){"function"!==typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")})}function Hb(){Array.prototype.filter||(Array.prototype.filter=function(a,b){if(void 0===this||null===this)throw new TypeError;var c=Object(this),d=c.length>>>0;if("function"!==typeof a)throw new TypeError;for(var e=[],f=0;f<d;f++)if(f in
80
- c){var h=c[f];a.call(b,h,f,c)&&e.push(h)}return e})}function Ib(){Object.keys||(Object.keys=function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b})}var R=!1,D="",x=[],P=0,r={};return{init:function(){jQuery(document).off("submit.formidable",".frm-show-form");jQuery(document).on("submit.formidable",".frm-show-form",frmFrontForm.submitForm);jQuery(document).on("click",".frm_trigger",m);var a=jQuery(".frm_blank_field");a.length&&a.closest(".frm_toggle_container").prev(".frm_trigger").click();
81
- jQuery.isFunction(jQuery.fn.placeholder)?jQuery(".frm-show-form input, .frm-show-form textarea").placeholder():jQuery(".frm-show-form input[onblur], .frm-show-form textarea[onblur]").each(function(){""===jQuery(this).val()&&jQuery(this).blur()});jQuery(document).on("focus",".frm_toggle_default",tb);jQuery(document).on("blur",".frm_toggle_default",ub);jQuery(".frm_toggle_default").blur();jQuery(document.getElementById("frm_resend_email")).click(vb);jQuery(document).on("click",".frm_remove_link",B);
82
- jQuery(document).on("focusin","input[data-frmmask]",function(){jQuery(this).mask(jQuery(this).data("frmmask").toString())});jQuery(document).on("change",'.frm-show-form input[name^="item_meta"], .frm-show-form select[name^="item_meta"], .frm-show-form textarea[name^="item_meta"]',A);jQuery(document).on("click",'.frm-show-form input[type="submit"], .frm-show-form input[name="frm_prev_page"], .frm_page_back, .frm_page_skip, .frm-show-form .frm_save_draft, .frm_prev_page, .frm_button_submit',l);jQuery(document).on("change",
83
- '.frm_other_container input[type="checkbox"], .frm_other_container input[type="radio"], .frm_other_container select',w);jQuery(document).on("click",".frm_remove_form_row",yb);jQuery(document).on("click",".frm_add_form_row",zb);jQuery(document).on("click","a[data-frmconfirm]",Db);jQuery("a[data-frmtoggle]").click(Eb);jQuery(".frm_edit_link_container").on("click","a.frm_inplace_edit",Ab);jQuery(".frm_edit_link_container").on("click","a.frm_cancel_edit",Bb);jQuery(document).on("click",".frm_ajax_delete",
84
- Cb);jQuery(".frm_month_heading, .frm_year_heading").click(function(){var a=jQuery(this).children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s");a.hasClass("ui-icon-triangle-1-e")?(a.addClass("ui-icon-triangle-1-s").removeClass("ui-icon-triangle-1-e"),jQuery(this).next(".frm_toggle_container").fadeIn("slow")):(a.addClass("ui-icon-triangle-1-e").removeClass("ui-icon-triangle-1-s"),jQuery(this).next(".frm_toggle_container").hide())});ja("pageLoad");ka();Fb();Gb();Hb();Ib()},submitForm:function(a){frmFrontForm.submitFormManual(a,
85
- this)},submitFormManual:function(a,b){var c=b.className.trim().split(/\s+/gi);if((!c||-1<c.indexOf("frm_pro_form"))&&!jQuery("body").hasClass("wp-admin")){a.preventDefault();var d=frmFrontForm.validateFormSubmit(b);0===Object.keys(d).length&&(S(jQuery(b)),-1<c.indexOf("frm_ajax_submit")?1>jQuery(b).find('input[type="file"]').filter(function(){return!!this.value}).length?(D=jQuery(b).find('input[name="frm_action"]').val(),frmFrontForm.checkFormErrors(b,D)):b.submit():b.submit())}},validateFormSubmit:function(a){"undefined"!=
86
- typeof tinyMCE&&jQuery(a).find(".wp-editor-wrap").length&&tinyMCE.triggerSave();x=[];var b=jQuery(a).hasClass("frm_js_validate");b&&(Ta(a)||Ua(a))&&(b=!1);b&&(frmFrontForm.getAjaxFormErrors(a),Object.keys(x).length&&frmFrontForm.addAjaxFormErrors(a));return x},getAjaxFormErrors:function(a){var b=[],c=jQuery(a).find(".frm_required_field:visible input, .frm_required_field:visible select, .frm_required_field:visible textarea").filter(":not(.frm_optional)");if(c.length)for(var d=0,e=c.length;d<e;d++)b=
87
- na(c[d],b);c=jQuery(a).find("input[type=email]").filter(":visible");d=jQuery(a).find("input,select,textarea");if(d.length)for(var e=0,f=d.length;e<f;e++){var h=d[e];""!==h.value&&"hidden"!=h.type&&("number"==h.type?b=pa(h,b):"email"==h.type?b=oa(h,b,c):null!==h.pattern&&(b=qa(h,b)))}c=jQuery(a).find(".frm-g-recaptcha");c.length&&(d=c.data("rid"),0===grecaptcha.getResponse(d).length&&(c=c.closest(".frm_form_field").attr("id").replace("frm_field_","").replace("_container",""),b[c]=""));x=b;if("function"==
88
- typeof frmThemeOverride_jsErrors&&(D=jQuery(a).find('input[name="frm_action"]').val(),a=frmThemeOverride_jsErrors(D,a),Object.keys(a).length))for(var g in a)x[g]=a[g];return x},addAjaxFormErrors:function(a){Va();for(var b in x){var c=jQuery(a).find("#frm_field_"+b+"_container");c.length?U(c,b,x):delete x[b]}Wa(a)},checkFormErrors:function(a,b){rb(a,b)},scrollToID:function(a){a=jQuery(document.getElementById(a));frmFrontForm.scrollMsg(a,!1)},scrollMsg:function(a,b,c){if("undefined"==typeof b){if(a=
 
 
89
  jQuery(document.getElementById("frm_form_"+a+"_container")),1>a.length)return}else a="string"==typeof a?jQuery(b).find("#frm_field_"+a+"_container"):a;if(a=a.offset().top){a-=frm_js.offset;b=jQuery("html").css("margin-top");var d=jQuery("body").css("margin-top");if(b||d)a=a-parseInt(b)-parseInt(d);if(a&&window.innerHeight&&(b=document.documentElement.scrollTop||document.body.scrollTop,a>b+window.innerHeight||a<b))return"undefined"===typeof c?jQuery(window).scrollTop(a):jQuery("html,body").animate({scrollTop:a},
90
- 500),!1}},savingDraft:function(a){return Ta(a)},goingToPreviousPage:function(a){return Ua(a)},hideOrShowFields:function(a,b){if("pageLoad"===b){var c=document.querySelectorAll('[id^="frm_hide_fields_"]');ca(c)}for(var c={repeatingSection:"",repeatRow:""},d=0,e=a.length;d<e;d++)K(a[d],c),d==e-1&&ab()},hidePreviouslyHiddenFields:function(){var a;a=[];for(var b=document.querySelectorAll('*[id^="frm_hide_fields_"]'),c=b.length,d,e=0;e<c;e++)d=b[e].id.replace("frm_hide_fields_",""),a=a.concat(F(d));b=
91
- 0;for(c=a.length;b<c;b++)d=document.getElementById(a[b]),null!==d&&(d.style.display="none")},checkDependentDynamicFields:function(a){for(var b={repeatingSection:"",repeatRow:""},c=0,d=a.length;c<d;c++)K(a[c],b)},checkDependentLookupFields:function(a){for(var b,c={repeatingSection:"",repeatRow:""},d=0,e=a.length;d<e;d++)b=a[d],da(b,c,"value changed")},loadGoogle:function(){if("undefined"!==typeof google&&google&&google.load)for(var a=__FRMTABLES,b=Object.keys(a),c=0;c<b.length;c++)if("graphs"===b[c])for(var d=
92
- a[b[c]],e=0,f=d.length;e<f;e++)xb(d[e]);else for(d=a[b[c]],e=b[c],f=0;f<d.length;f++)wb(d[f],e);else setTimeout(frmFrontForm.loadGoogle,30)},removeUsedTimes:function(a,b){console.warn("DEPRECATED: function frmFrontForm.removeUsedTimes v2.03")},escapeHtml:function(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},invisible:function(a){jQuery(a).css("visibility","hidden")},visible:function(a){jQuery(a).css("visibility","visible")}}}
93
- var frmFrontForm=frmFrontFormJS();jQuery(document).ready(function(l){frmFrontForm.init()});function frmRecaptcha(){for(var l=jQuery(".frm-g-recaptcha"),m=0,q=l.length;m<q;m++){var t=grecaptcha.render(l[m].id,{sitekey:l[m].getAttribute("data-sitekey"),size:l[m].getAttribute("data-size"),theme:l[m].getAttribute("data-theme")});l[m].setAttribute("data-rid",t)}}
94
- function frmUpdateField(l,m,q,t,y){jQuery(document.getElementById("frm_update_field_"+l+"_"+m)).html('<span class="frm-loading-img"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_update_field_ajax",entry_id:l,field_id:m,value:q,nonce:frm_js.nonce},success:function(){""===t.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById("frm_update_field_"+l+"_"+m+"_"+y)).fadeOut("slow"):jQuery(document.getElementById("frm_update_field_"+l+"_"+m+"_"+y)).replaceWith(t)}})}
95
- function frmEditEntry(l,m,q,t,y,z){console.warn("DEPRECATED: function frmEditEntry in v2.0.13 use frmFrontForm.editEntry");var B=jQuery(document.getElementById("frm_edit_"+l)),w=B.html(),A=jQuery(document.getElementById(m+l)),p=A.html();A.html('<span class="frm-loading-img" id="'+m+l+'"></span><div class="frm_orig_content" style="display:none">'+p+"</div>");jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"html",data:{action:"frm_entries_edit_entry_ajax",post_id:q,entry_id:l,id:t,nonce:frm_js.nonce},
96
- success:function(p){A.children(".frm-loading-img").replaceWith(p);B.replaceWith('<span id="frm_edit_'+l+'"><a onclick="frmCancelEdit('+l+",'"+m+"','"+frmFrontForm.escapeHtml(w)+"',"+q+","+t+",'"+z+'\')" class="'+z+'">'+y+"</a></span>")}})}
97
- function frmCancelEdit(l,m,q,t,y,z){console.warn("DEPRECATED: function frmCancelEdit in v2.0.13 use frmFrontForm.cancelEdit");var B=jQuery(document.getElementById("frm_edit_"+l)),w=B.find("a"),A=w.html();w.hasClass("frm_ajax_edited")||(w=jQuery(document.getElementById(m+l)),w.children(".frm_forms").replaceWith(""),w.children(".frm_orig_content").fadeIn("slow").removeClass("frm_orig_content"));B.replaceWith('<a id="frm_edit_'+l+'" class="frm_edit_link '+z+'" href="javascript:frmEditEntry('+l+",'"+
98
- m+"',"+t+","+y+",'"+frmFrontForm.escapeHtml(A)+"','"+z+"')\">"+q+"</a>")}
99
- function frmDeleteEntry(l,m){console.warn("DEPRECATED: function frmDeleteEntry in v2.0.13 use frmFrontForm.deleteEntry");jQuery(document.getElementById("frm_delete_"+l)).replaceWith('<span class="frm-loading-img" id="frm_delete_'+l+'"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_destroy",entry:l,nonce:frm_js.nonce},success:function(q){"success"==q.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById(m+l)).fadeOut("slow"):jQuery(document.getElementById("frm_delete_"+
100
- l)).replaceWith(q)}})}function frmOnSubmit(l){console.warn("DEPRECATED: function frmOnSubmit in v2.0 use frmFrontForm.submitForm");frmFrontForm.submitForm(l,this)}
101
- function frm_resend_email(l,m){console.warn("DEPRECATED: function frm_resend_email in v2.0");$link=jQuery(document.getElementById("frm_resend_email"));$link.append('<span class="spinner" style="display:inline"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_send_email",entry_id:l,form_id:m,nonce:frm_js.nonce},success:function(l){$link.replaceWith(l)}})};
1
+ function frmFrontFormJS(){function m(a){var b=jQuery(this),c=b.attr("type");"submit"!==c&&a.preventDefault();a=b.parents("form:first");var d="",f="",e=this.name;"frm_prev_page"===e||-1!==this.className.indexOf("frm_prev_page")?d=jQuery(a).find(".frm_next_page").attr("id").replace("frm_next_p_",""):"frm_save_draft"===e||-1!==this.className.indexOf("frm_save_draft")?f=1:-1!==this.className.indexOf("frm_page_skip")?(b=b.data("page"),e=jQuery(a).find('input[name="form_id"]').val(),e=jQuery(a).find('input[name="frm_page_order_'+
2
+ e+'"]'),jQuery(a).append('<input name="frm_last_page" type="hidden" value="'+e.val()+'" />'),""===b?e.remove():e.val(b)):-1!==this.className.indexOf("frm_page_back")&&(d=b.data("page"));jQuery(".frm_next_page").val(d);jQuery(".frm_saving_draft").val(f);"submit"!==c&&a.trigger("submit")}function n(){jQuery(this).parent().children(".frm_toggle_container").slideToggle("fast");jQuery(this).toggleClass("active").children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s").toggleClass("ui-icon-triangle-1-s ui-icon-triangle-1-e")}
3
+ function t(){if(-1===this.className.indexOf("frm_custom_date")&&"undefined"!==typeof __frmDatepicker){var a=__frmDatepicker,b=this.id,c=b.split("-"),c=C(this.name)?'input[id^="'+c[0]+'"]':'input[id^="'+c.join("-")+'"]';jQuery.datepicker.setDefaults(jQuery.datepicker.regional[""]);for(var d=0,f=0;f<a.length;f++)if(a[f].triggerID=="#"+b||a[f].triggerID==c){d=f;break}""!==a[d].options.defaultDate&&(a[d].options.defaultDate=new Date(a[d].options.defaultDate));jQuery(this).datepicker(jQuery.extend(jQuery.datepicker.regional[a[d].locale],
4
+ a[d].options))}}function w(a){if("undefined"!==typeof __frmDropzone)for(var b=__frmDropzone,c=0;c<b.length;c++)D(c,a)}function D(a,b){var c=__frmDropzone,d="#"+c[a].htmlID+"_dropzone",f=c[a].fieldName;"undefined"!==typeof b&&-1!==d.indexOf("-0_dropzone")&&(d=d.replace("-0_dropzone","-"+b+"_dropzone"),f=f.replace("[0]","["+b+"]"),delete c[a].mockFiles);d=jQuery(d);if(!(1>d.length||d.hasClass("dz-clickable"))){var e=c[a].maxFiles;if("undefined"!==typeof c[a].mockFiles){var g=c[a].mockFiles.length;0<
5
+ e&&(e-=g)}var h=d.closest("form"),g="#"+h.attr("id");"#undefined"==g&&(g="form."+h.attr("class").replace(" ","."));d.dropzone({url:frm_js.ajax_url,addRemoveLinks:!0,paramName:d.attr("id").replace("_dropzone",""),maxFilesize:c[a].maxFilesize,maxFiles:e,uploadMultiple:c[a].uploadMultiple,hiddenInputContainer:g,dictDefaultMessage:c[a].defaultMessage,dictFallbackMessage:c[a].fallbackMessage,dictFallbackText:c[a].fallbackText,dictFileTooBig:c[a].fileTooBig,dictInvalidFileType:c[a].invalidFileType,dictResponseError:c[a].responseError,
6
+ dictCancelUpload:c[a].cancel,dictCancelUploadConfirmation:c[a].cancelConfirm,dictRemoveFile:c[a].remove,dictMaxFilesExceeded:c[a].maxFilesExceeded,fallback:function(){jQuery(this.element).closest("form").removeClass("frm_ajax_submit")},init:function(){this.on("sending",function(b,d,f){d=c[a].htmlID+"_dropzone";var e=jQuery("#"+d).closest("form");if(1>e.length)d=!1;else{var g=jQuery(e).find(".frm_required_field:visible input, .frm_required_field:visible select, .frm_required_field:visible textarea, #"+
7
+ d);if(1>g.length)d=!0;else{e=!0;for(var h=0,k=g.length;h<k&&g[h].id!==d;h++)if(!(-1<g[h].className.indexOf("frm_optional")||null!==g[h].getAttribute("data-frmfile")))if(1>O(g[h],[]).length){e=!0;break}else e=!1;d=e}}if(d){d=""!==document.getElementById("frm_verify").value||window._phantom||window.callPhantom||window.__phantomas||window.Buffer||window.emit||window.spawn?!0:!1;if(d)return this.removeFile(b),alert("Oops. That file looks like Spam."),!1;f.append("action","frm_submit_dropzone");f.append("field_id",
8
+ c[a].fieldID);f.append("form_id",c[a].formID);f.append("nonce",frm_js.nonce)}else return this.removeFile(b),alert("Please complete the preceding required fields before uploading a file."),!1});this.on("success",function(b,d){for(var e=jQuery.parseJSON(d),g=0;g<e.length;g++)!0!==c[a].uploadMultiple&&jQuery('input[name="'+f+'"]').val(e[g])});this.on("successmultiple",function(b,d){for(var e=jQuery.parseJSON(d),g=0;g<b.length;g++)jQuery(b[g].previewElement).append(ia(c[a],e[g],f))});this.on("complete",
9
+ function(b){if("undefined"!==typeof b.mediaID){c[a].uploadMultiple&&jQuery(b.previewElement).append(ia(c[a],b.mediaID,f));for(var d=b.previewElement.querySelectorAll("[data-dz-name]"),e=0,g=d.length;e<g;e++)d[e].innerHTML='<a href="'+b.url+'">'+b.name+"</a>"}});this.on("addedfile",function(){P(h)});this.on("queuecomplete",function(){E(h,"enable")});this.on("removedfile",function(b){!1!==b.accepted&&!0!==c[a].uploadMultiple&&jQuery('input[name="'+f+'"]').val("");!1!==b.accepted&&"undefined"!==typeof b.mediaID&&
10
+ (jQuery(b.previewElement).remove(),this.options.maxFiles=c[a].maxFiles-this.files.length)});if("undefined"!==typeof c[a].mockFiles)for(var b=0;b<c[a].mockFiles.length;b++){var d={name:c[a].mockFiles[b].name,size:c[a].mockFiles[b].size,url:c[a].mockFiles[b].file_url,mediaID:c[a].mockFiles[b].id};this.emit("addedfile",d);this.emit("thumbnail",d,c[a].mockFiles[b].url);this.emit("complete",d);this.files.push(d)}}})}}function ia(a,b,c){return'<input name="'+c+'[]" type="hidden" value="'+b+'" data-frmfile="'+
11
+ a.fieldID+'" />'}function ab(){var a=jQuery(this).data("frm-remove");bb(jQuery(this).parent(".dz-preview"));a=jQuery('input[name="'+a+'"]');a.length&&a.val("")}function cb(){var a=this.type,b=!1,c=!1;if("select-one"===a)c=!0,"frm_other_trigger"===this.options[this.selectedIndex].className&&(b=!0);else if("select-multiple"===a)for(var c=!0,d=this.options,b=!1,f=0;f<d.length;f++)if("frm_other_trigger"===d[f].className&&d[f].selected){b=!0;break}c?(a=jQuery(this).parent().children(".frm_other_input"),
12
+ a.length&&(b?a[0].className=a[0].className.replace("frm_pos_none",""):(1>a[0].className.indexOf("frm_pos_none")&&(a[0].className+=" frm_pos_none"),a[0].value=""))):"radio"===a?jQuery(this).is(":checked")&&(jQuery(this).closest(".frm_radio").children(".frm_other_input").removeClass("frm_pos_none"),jQuery(this).closest(".frm_radio").siblings().children(".frm_other_input").addClass("frm_pos_none").val("")):"checkbox"===a&&(this.checked?jQuery(this).closest(".frm_checkbox").children(".frm_other_input").removeClass("frm_pos_none"):
13
+ jQuery(this).closest(".frm_checkbox").children(".frm_other_input").addClass("frm_pos_none").val(""))}function ja(a){var b=q(this,!1);if(b&&"undefined"!==typeof b&&(!a.frmTriggered||a.frmTriggered!=b)&&(ka(b,jQuery(this)),a="undefined"!==typeof a.originalEvent||-1<a.currentTarget.className.indexOf("frm_chzn")?"value changed":"other",la(b,jQuery(this),a),Q(b,jQuery(this)),jQuery(this).closest("form").hasClass("frm_js_validate"))){b=[];a=jQuery(this).closest(".frm_form_field");a.hasClass("frm_required_field")&&
14
+ !jQuery(this).hasClass("frm_optional")&&(b=O(this,b));if(1>b.length)if("email"==this.type)var c=jQuery(this).closest("form").find("input[type=email]"),b=ma(this,b,c);else"number"==this.type?b=na(this,b):null!==this.pattern&&(b=oa(this,b));a.removeClass("frm_blank_field has-error");a.find(".frm_error").remove();if(0<Object.keys(b).length)for(var d in b)R(a,d,b)}}function q(a,b){var c="",c=a instanceof jQuery?a.attr("name"):a.name;if(""===c)return c=a instanceof jQuery?a.data("name"):a.getAttribute("data-name"),
15
+ ""!==c&&c?c:0;c=c.replace("item_meta[","").replace("[]","").split("]");if(1>c.length)return 0;var c=c.filter(function(a){return""!==a}),d=c[0],f=!1;if(1===c.length)return d;if("[form"===c[1]||"[row_ids"===c[1])return 0;jQuery('input[name="item_meta['+d+'][form]"]').length&&(d=c[2].replace("[",""),f=!0);"other"===d&&(d=f?c[3].replace("[",""):c[1].replace("[",""));!0===b&&(d=d===c[0]?d+"-"+c[1].replace("[",""):d+"-"+c[0]+"-"+c[1].replace("[",""));return d}function ka(a,b){if(!("undefined"===typeof __FRMRULES||
16
+ "undefined"===typeof __FRMRULES[a]||1>__FRMRULES[a].dependents.length||null===b||"undefined"===typeof b))for(var c=__FRMRULES[a],d=F(b[0].name),f=0,e=c.dependents.length;f<e;f++)G(c.dependents[f],d)}function G(a,b){var c=S(a);if(!(!1===c||1>c.conditions.length)){var d=[];if(c.isRepeating)if(""!==b.repeatingSection){var f="frm_field_"+c.fieldId+"-",f=f+(b.repeatingSection+"-"+b.repeatRow+"_container");d.push(f)}else if(d=H(c),null!==document.getElementById("frm_field_"+d+"_container")){d=[];for(var f=
17
+ document.querySelectorAll(".frm_field_"+c.fieldId+"_container"),e=0,g=f.length;e<g;e++)d.push(f[e].id)}else{d=[];for(var e=H(c),f="frm_field_"+c.fieldId+"-"+e+"-",e=document.querySelectorAll('[name="item_meta['+e+'][row_ids][]"]'),g=0,h=e.length;g<h;g++)""!==e[g].value&&d.push(f+e[g].value+"_container");1>d.length&&d.push(f+"0_container")}else d.push("frm_field_"+c.fieldId+"_container");f=d.length;for(e=0;e<f;e++)c.containerId=d[e],pa(c,d[e]),qa(c)}}function H(a){var b="";"0"!==a.inEmbedForm?b=a.inEmbedForm:
18
+ "0"!==a.inSection&&(b=a.inSection);return b}function pa(a,b){if(a.isRepeating){var c=b.replace("_container","").split("-");a.repeatRow=c[2]}else a.repeatRow=""}function qa(a){for(var b=[],c=a.conditions.length,d=0;d<c;d++)b.push(db(a.conditions[d],a));c=y="any"==a.anyAll?-1<b.indexOf(!0)?a.showHide:ra(a.showHide):-1<b.indexOf(!1)?ra(a.showHide):a.showHide;b=null!==document.getElementById(a.containerId);"show"==c?"data"==a.fieldType&&a.hasOwnProperty("dataLogic")?(a={fieldId:a.fieldId,fieldKey:a.fieldKey,
19
+ formId:a.formId,containerId:a.containerId,repeatRow:a.repeatRow,dataLogic:{actualValue:a.dataLogic.actualValue,fieldId:a.dataLogic.fieldId},children:"",inputType:a.inputType},"data"==a.inputType?eb(a,b):b&&fb(a)):!1!==x(a.containerId,a.formId)&&(z(a.containerId,a.formId),b?(b=sa(a.containerId),ta(b,"divider"==a.fieldType||"form"==a.fieldType,a.formId),jQuery("#"+a.containerId).show()):(b=ua(a),ta(b,"divider"==a.fieldType||"form"==a.fieldType,a.formId))):T(a,b)}function S(a){return"undefined"===typeof __FRMRULES||
20
+ "undefined"===typeof __FRMRULES[a]?!1:__FRMRULES[a]}function db(a,b){var c=S(a.fieldId),d=va(c,b);"data"==b.fieldType&&"data"==c.fieldType?(c=""===a.value?""===d||1==d.length&&""===d[0]?!1:!0:U(a.operator,a.value,d),b.dataLogic=a,b.dataLogic.actualValue=d,d=c):d=U(a.operator,a.value,d);return d}function va(a,b){if("radio"==a.inputType||"checkbox"==a.inputType){var c=wa(a,b);c=document.querySelectorAll('input[name^="'+c+'"]');c="checkbox"==a.inputType?I(c):V(c)}else if(!0===a.isMultiSelect){c=wa(a,
21
+ b);var d=document.querySelectorAll('[name^="'+c+'"]');1==d.length&&"hidden"!=d[0].type?(c=jQuery('[name^="'+c+'"]').val(),null===c&&(c="")):c=I(d)}else if(c="field_"+a.fieldKey,a.isRepeating&&(c+="-"+b.repeatRow),d=document.getElementById(c),null===d){d="";if("time"==a.fieldType){var f=document.getElementById(c+"_H");null!==f&&(d=document.getElementById(c+"_m"),d=f.value+":"+d.value,c=document.getElementById(c+"_A"),":"==d?d="":null!==c&&(d+=" "+c.value))}c=d}else c=d.value;"undefined"===typeof c?
22
+ c="":"string"===typeof c&&(c=c.trim());return c}function wa(a,b){return a.isRepeating?"item_meta["+("0"!==b.inEmbedForm?b.inEmbedForm:b.inSection)+"]["+b.repeatRow+"]["+a.fieldId+"]":"item_meta["+a.fieldId+"]"}function I(a){for(var b=[],c=0,d=a.length;c<d;c++)("hidden"==a[c].type||a[c].checked)&&b.push(a[c].value);0===b.length&&(b=!1);return b}function U(a,b,c){b=gb(b);c=hb(b,c);return"string"===typeof b&&"-1"!=b.indexOf("&quot;")&&U(a,b.replace("&quot;",'"'),c)?!0:{"==":function(a,b){return a==b},
23
+ "!=":function(a,b){return a!=b},"<":function(a,b){return a>b},">":function(a,b){return a<b},LIKE:function(a,b){if(!b)return!1;a=W(a);b=xa(a,b);return-1!=b.indexOf(a)},"not LIKE":function(a,b){if(!b)return!0;a=W(a);b=xa(a,b);return-1==b.indexOf(a)}}[a](b,c)}function gb(a){-1!==String(a).search(/^\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*$/)?a=parseFloat(a):"string"===typeof a&&(a=a.trim());return a}function hb(a,b){"undefined"===typeof b&&(b="");jQuery.isArray(b)&&-1<jQuery.inArray(String(a),b)&&(b=a);"number"===
24
+ typeof a&&"string"===typeof b&&(b=parseFloat(b));"string"===typeof b&&(b=b.trim());return b}function xa(a,b){b=W(b);if(jQuery.isArray(b))for(var c=0,d=b.length;c<d;c++){var f=b[c].toLowerCase();if(-1<f.indexOf(a)){b=a;break}}return b}function W(a){"string"===typeof a?a=a.toLowerCase():"number"===typeof a&&(a=a.toString());return a}function ra(a){return"show"==a?"hide":"show"}function sa(a){return document.getElementById(a).querySelectorAll('select[name^="item_meta"], textarea[name^="item_meta"], input[name^="item_meta"]')}
25
+ function ua(a){if("divider"==a.fieldType){var b=[];"divider"==a.fieldType&&(b=document.querySelectorAll('[data-sectionid="'+a.fieldId+'"]'));a=b}else"form"==a.fieldType?a=document.querySelectorAll('[id^="field_'+a.fieldKey+'-"]'):(a=a.isRepeating?"item_meta["+H(a)+"]["+a.repeatRow+"]["+a.fieldId+"]":"item_meta["+a.fieldId+"]",a=document.querySelectorAll('[name^="'+a+'"]'));return a}function ta(a,b,c){if(a.length)for(var d,f=["checkbox","radio"],e=0;e<a.length;e++)if(!(0<e&&"undefined"!==typeof d&&
26
+ d.name==a[e].name&&-1<f.indexOf(d.type)||b&&J(a[e],c))){d=a[e];var g=jQuery(d),h=g.data("frmval");if("undefined"!==typeof h){if("checkbox"==d.type||"radio"==d.type)ya(d.name,h);else if(-1<d.name.indexOf("[]")){var k=document.getElementsByName(d.name);if(jQuery.isArray(h))for(var l=0,m=h.length;l<m;l++)l in k&&(k[l].value=h[l]);else null!==k[0]&&(k[0].value=h)}else h.constructor===Object&&(k=d.getAttribute("name").split("[").slice(-1)[0],null!==k&&(k=k.replace("]",""),h=h[k],"undefined"==typeof h&&
27
+ (h=""))),d.value=h;"SELECT"==d.tagName&&K(d);u(g)}d=a[e];g=q(d,!1);g=X(g);!1!==g&&"lookup"!=g.fieldType&&za(g,d,"value changed");d=a[e];if(g="undefined"!==typeof __FRMCALC){g=d.type;h=!1;if("text"==g||"hidden"==g||"number"==g)h=!0;g=h}if(g){g=__FRMCALC;h=d.name;k=d.id.replace("field_","");if(C(h))for(h=k.split("-"),k="",l=0;l<h.length-1;l++)k=""===k?h[l]:k+"-"+h[l];h=k;k=null;C(d.name)&&(k="hidden"!=d.type?jQuery(d).closest(".frm_form_field"):jQuery(d));d=k;void 0!==g.calc[h]&&Y(g,h,[],d)}d=a[e]}}
28
+ function J(a,b){var c=q(a,!0);return x("frm_field_"+c+"_container",b)}function T(a,b){if(!x(a.containerId,a.formId)){if(b){jQuery("#"+a.containerId).hide();var c=sa(a.containerId)}else c=ua(a);Z(c);Aa(a.containerId,a.formId)}}function Z(a){if(!(1>a.length)){for(var b,c=!0,d=0,f=a.length;d<f;d++)-1<a[d].className.indexOf("frm_dnc")||(0<d&&b.name!=a[d].name&&!0===c&&u(jQuery(b)),c=!0,"radio"==a[d].type||"checkbox"==a[d].type?a[d].checked=!1:"SELECT"==a[d].tagName?(0===a[d].selectedIndex?c=!1:a[d].selectedIndex=
29
+ 0,b=a[d].id.replace(/[^\w]/g,"_"),null!==document.getElementById(b+"_chosen")&&jQuery(a[d]).trigger("chosen:updated")):a[d].value=""),b=a[d];!0===c&&u(jQuery(b))}}function x(a,b){var c=!1;-1<A(b).indexOf(a)&&(c=!0);return c}function Aa(a,b){var c=A(b);if(!(-1<c.indexOf(a))){c.push(a);var c=JSON.stringify(c),d=document.getElementById("frm_hide_fields_"+b);null!==d&&(d.value=c)}}function A(a){var b=[];a=document.getElementById("frm_hide_fields_"+a);return null===a?b:b=(b=a.value)?JSON.parse(b):[]}function ya(a,
30
+ b){for(var c=document.getElementsByName(a),d=0,f=c.length;d<f;d++)if("hidden"==c[d].type)jQuery.isArray(b)&&null!==b[d]?c[d].value=b[d]:c[d].value=b;else if(c[d].value==b||jQuery.isArray(b)&&-1<b.indexOf(c[d].value))if(c[d].checked=!0,"radio"==c[d].type)break}function z(a,b){var c=A(b),d=c.indexOf(a);-1<d&&(c.splice(d,1),c=JSON.stringify(c),document.getElementById("frm_hide_fields_"+b).value=c)}function la(a,b,c){if(!("undefined"===typeof __FRMLOOKUP||"undefined"===typeof __FRMLOOKUP[a]||1>__FRMLOOKUP[a].dependents.length||
31
+ null===b||"undefined"===typeof b)){a=__FRMLOOKUP[a];b=F(b[0].name);for(var d=0,f=a.dependents.length;d<f;d++)aa(a.dependents[d],b,c)}}function aa(a,b,c){a=X(a);if(!(!1===a||1>a.parents.length))if("lookup"==a.fieldType){if(""!==b.repeatRow){c=[];var d="frm_field_"+a.fieldId+"-",d=d+(b.repeatingSection+"-"+b.repeatRow+"_container");b=document.getElementById(d);null!==b&&c.push(b);b=c}else b=[],a.isRepeating?b=document.querySelectorAll(".frm_field_"+a.fieldId+"_container"):(c=document.getElementById("frm_field_"+
32
+ a.fieldId+"_container"),null!==c&&b.push(c));c=0;for(d=b.length;c<d;c++){pa(a,b[c].id);var f=a,e=b[c];f.parentVals=Ba(f);if("select"==f.inputType)ib(f,e);else if("radio"==f.inputType||"checkbox"==f.inputType)if(!1===f.parentVals){var g=e.getElementsByTagName("input");Ca(f,e);Z(g)}else jb(f,e)}}else if("value changed"===c)for(c="field_"+a.fieldKey,c=a.isRepeating?""!==b.repeatingSection?'[id="'+c+"-"+b.repeatRow+'"]':'[id^="'+c+'-"]':'[id="'+c+'"]',b=document.querySelectorAll(c),c=0,d=b.length;c<d;c++)f=
33
+ a,e=F(b[c].name),f.repeatRow=""!==e.repeatRow?e.repeatRow:"",za(a,b[c])}function X(a){return"undefined"===typeof __FRMLOOKUP||"undefined"===typeof __FRMLOOKUP[a]?!1:__FRMLOOKUP[a]}function za(a,b){a.parentVals=Ba(a);var c=b.id;c in p&&0<p[c].length?Da(a,b):(Da(a,b),Ea(a,b))}function Ba(a){for(var b=[],c=a.parents,d,f=0,e=c.length;f<e;f++){d=X(c[f]);d=va(d,a);if(""===d||!1===d){b=!1;break}b[f]=d}return b}function V(a){for(var b=!1,c=a.length,d=0;d<c;d++)if("hidden"==a[d].type||a[d].checked){b=a[d].value;
34
+ break}return b}function ib(a,b){var c=b.getElementsByTagName("SELECT")[0];if(null!==c){var d=c.value;!1===a.parentVals?(c.options.length=1,c.value="",K(c),""!==d&&u(jQuery(c),a.fieldKey)):(kb(c),ba(a.formId),jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_replace_lookup_field_options",parent_fields:a.parents,parent_vals:a.parentVals,field_id:a.fieldId,nonce:frm_js.nonce},success:function(d){var f=c.value;d=JSON.parse(d);for(var g=c.options.length;0<g;g--)c.remove(g);for(var h=d.length,
35
+ g=0;g<h;g++)c.options[g+1]=new Option(d[g],d[g],!1,!1);c.value=f;""===c.value&&(d=c.getAttribute("data-frmval"),null!==d&&(c.value=d));!1===a.isReadOnly&&(c.disabled=!1);c.className=c.className.replace(" frm_loading_lookup","");K(c);c.value!=f&&u(jQuery(c),a.fieldKey);Fa(jQuery(b));ca(a.formId)}}))}}function K(a){-1<a.className.indexOf("frm_chzn")&&jQuery().chosen&&jQuery(a).trigger("chosen:updated")}function kb(a){a.className+=" frm_loading_lookup";a.disabled=!0;K(a)}function ba(a){L++;1>=L&&(a=
36
+ Ga(a),null!==a&&P(jQuery(a)))}function ca(a){L--;0>=L&&(a=Ga(a),null!==a&&E(jQuery(a),"enable"))}function Ga(a){return document.querySelector("#frm_form_"+a+"_container form")}function jb(a,b){var c=b.getElementsByClassName("frm_opt_container")[0],d=c.getElementsByTagName("input");lb(b,c);var f="",f="radio"==a.inputType?V(d):I(d),e=jQuery(d[0]).data("frmval");ba(a.formId);jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_replace_cb_radio_lookup_options",parent_fields:a.parents,parent_vals:a.parentVals,
37
+ field_id:a.fieldId,container_field_id:H(a),row_index:a.repeatRow,current_value:f,default_value:e,nonce:frm_js.nonce},success:function(f){c.innerHTML=f;f=b.getElementsByClassName("frm-loading-img")[0];null!==f&&void 0!==f&&f.parentNode.removeChild(f);c.style.display="block";1==d.length&&""===d[0].value?Ca(a,b):(!1!==x(b.id,a.formId)&&(f=S(a.fieldId),!1===f||1>f.conditions.length?(z(b.id,a.formId),jQuery("#"+b.id).show()):(f.containerId=b.id,f.repeatRow=a.repeatRow,qa(f))),void 0!==e&&(!1!==("radio"==
38
+ a.inputType?V(d):I(d))||1>d.length||ya(d[0].name,e)));u(jQuery(d[0]),a.fieldKey);Fa(jQuery(b));ca(a.formId)}})}function Fa(a){a.trigger("frmLookupOptionsLoaded")}function Ca(a,b){x(b.id,a.formId)||(jQuery("#"+b.id).hide(),Aa(b.id,a.formId))}function Ea(a,b){if(J(b,a.formId))da(b.id);else if(!1===a.parentVals){var c=b.getAttribute("data-frmval");null===c&&(c="");Ha(a,b,c);da(b.id)}else ba(a.formId),jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_get_lookup_text_value",parent_fields:a.parents,
39
+ parent_vals:a.parentVals,field_id:a.fieldId,nonce:frm_js.nonce},success:function(c){J(b,a.formId)||b.value==c||Ha(a.fieldKey,b,c);ca(a.formId);da(b.id)}})}function Da(a,b){var c=b.id;c in p?2<=p[c].length&&(p[c]=p[c].slice(0,1)):p[c]=[];p[c].push({childFieldArgs:a,childInput:b})}function da(a){p[a].shift();a in p&&0<p[a].length&&Ea(p[a][0].childFieldArgs,p[a][0].childInput)}function Ha(a,b,c){c=c.replace(/&amp;/g,"&");b.value=c;u(jQuery(b),a)}function eb(a,b){if(b){var c=jQuery("#"+a.containerId);
40
+ Ia(c)}jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_fields_ajax_get_data",entry_id:a.dataLogic.actualValue,current_field:a.fieldId,hide_id:a.containerId,on_current_page:b,nonce:frm_js.nonce},success:function(d){if(b){var f=c.find(".frm_opt_container");f.html(d);var e=f.children("input"),g=e.val();Ja(f);""===d||""===g?T(a,!0):Ka(a,c,e,!0)}else f="field_"+a.fieldKey,""!==a.repeatRow&&(f+="-"+a.repeatRow),f=document.getElementById(f),f.value=d,x(a.containerId,a.formId)&&z(a.containerId,
41
+ a.formId),u(jQuery(f))}})}function fb(a,b){var c=jQuery("#"+a.containerId),d=c.find('select[name^="item_meta"], input[name^="item_meta"]'),f=La(d),d=d.data("frmval"),e=c.closest("form").find('input[name="id"]').val();Ia(c);jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_fields_ajax_data_options",trigger_field_id:a.dataLogic.fieldId,entry_id:a.dataLogic.actualValue,field_id:a.fieldId,default_value:d,container_id:a.containerId,editing_entry:e,prev_val:f,nonce:frm_js.nonce},success:function(b){var d=
42
+ c.find(".frm_opt_container");d.html(b);var e=d.find('select, input[type="checkbox"], input[type="radio"]');Ja(d);""===b||1>e.length?T(a,!0):(b=La(e),Ka(a,c,e,f!==b))}})}function Ia(a){var b=a.html();-1<b.indexOf("frm-loading-img")||(a.html(b+'<span class="frm-loading-img"></span>'),a.find(".frm_opt_container").hide())}function lb(a,b){if(!(-1<a.innerHTML.indexOf("frm-loading-img"))){b.style.display="none";var c=document.createElement("span");c.setAttribute("class","frm-loading-img");a.insertBefore(c,
43
+ b.nextSibling)}}function Ja(a){a.parent().children(".frm-loading-img").remove();a.show()}function La(a){var b=[],c="";a.each(function(){c=this.value;"radio"===this.type||"checkbox"===this.type?!0===this.checked&&b.push(c):""!==c&&b.push(c)});0===b.length&&(b="");return b}function Ka(a,b,c,d){x(a.containerId,a.formId)&&(z(a.containerId,a.formId),b.show());c.hasClass("frm_chzn")&&ea();!0===d&&u(c)}function Q(a,b){if("undefined"!==typeof __FRMCALC){var c=__FRMCALC,d=c.fields[a];if("undefined"!==typeof d)for(var d=
44
+ d.total,f=[],e=0,g=d.length;e<g;e++){var h=c.calc[d[e]];var k=b.attr("name"),l=!1,m=h.field_id,n=A(h.form_id);1>n.length||("0"===h.inSection&&"0"===h.inEmbedForm?l=M(m,n):(k=F(k),M(m,n)?l=!0:Ma(m,k,n)?l=!0:"0"!==h.inSection&&"0"!==h.inEmbedForm?l=Ma(h.inSection,k,n):"0"!==h.inSection?l=M(h.inSection,n):"0"!==h.inEmbedForm&&(l=M(h.inEmbedForm,n))));h=l;!1===h&&Y(c,d[e],f,b)}}}function M(a,b){return-1<b.indexOf("frm_field_"+a+"_container")}function Ma(a,b,c){var d=!1;b.repeatingSection&&(a="frm_field_"+
45
+ a+"-"+b.repeatingSection,a+="-"+b.repeatRow+"_container",d=-1<c.indexOf(a));return d}function Y(a,b,c,d){var f=a.calc[b],e=f.calc,g=jQuery(document.getElementById("field_"+b)),h={triggerField:d,inSection:!1,thisFieldCall:'input[id^="field_'+b+'-"]'};1>g.length&&"undefined"!==typeof d&&(h.inSection=!0,h.thisFieldId=mb(a.fieldsWithCalc,b),g=Na(h));if(!(null===g||1>g.length)){e=nb(f,e,a,c,h);if("text"!=f.calc_type){a=f.calc_dec;-1<e.indexOf(").toFixed(")&&(c=e.split(").toFixed("),Oa(c[1])&&(a=c[1],e=
46
+ e.replace(").toFixed("+a,"")));e=ob(e);e=parseFloat(eval(e));if("undefined"===typeof e||isNaN(e))e=0;Oa(a)&&(e=e.toFixed(a))}g.val()!==e&&(g.val(e),u(g,b))}}function nb(a,b,c,d,f){for(var e=0,g=a.fields.length;e<g;e++){var h={triggerField:f.triggerField,thisFieldId:a.fields[e],inSection:f.inSection,valKey:f.inSection+""+a.fields[e],thisField:c.fields[a.fields[e]],thisFieldCall:"input"+c.fieldKeys[a.fields[e]]},k=c;"checkbox"==h.thisField.type||"radio"==h.thisField.type||"scale"==h.thisField.type?
47
+ h.thisFieldCall=h.thisFieldCall+":checked,"+h.thisFieldCall+"[type=hidden]":"select"==h.thisField.type||"time"==h.thisField.type?h.thisFieldCall="select"+k.fieldKeys[h.thisFieldId]+" option:selected,"+h.thisFieldCall+"[type=hidden]":"textarea"==h.thisField.type&&(h.thisFieldCall=h.thisFieldCall+",textarea"+k.fieldKeys[h.thisFieldId]);if("text"==a.calc_type)h.valKey="text"+h.valKey,d=pb(h,d),"undefined"===typeof d[h.valKey]&&(d[h.valKey]="");else{h.valKey="num"+h.valKey;d=qb(h,c,d);if("undefined"===
48
+ typeof d[h.valKey]||isNaN(d[h.valKey]))d[h.valKey]=0;"date"==h.thisField.type&&0===d[h.valKey]&&(b="")}k="["+h.thisFieldId+"]";k=k.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1");b=b.replace(new RegExp(k,"g"),d[h.valKey])}return b}function ob(a){var b=a.charAt(a.length-1);if("+"===b||"-"===b)a=a.substr(0,a.length-1);return a}function C(a){return 3<=a.split("][").length}function qb(a,b,c){if("undefined"!==typeof c[a.valKey]&&0!==c[a.valKey])return c;c[a.valKey]=0;var d=Pa(a);if(!1===d)return c;d.each(function(){var d=
49
+ Qa(a.thisField,this);if("date"==a.thisField.type){var e=b.date;var g=0;if(d)if("undefined"===typeof jQuery.datepicker){g="-";-1<e.indexOf("/")&&(g="/");e=e.split(g);var d=d.split(g),h;var k=g=h="";for(var l=0;l<e.length;l++)if("y"==e[l])k=((new Date).getFullYear()+15).toString().substr(2,2),k=d[l]>k?"19"+d[l]:"20"+d[l];else if("yy"==e[l])k=d[l];else if("m"==e[l]||"mm"==e[l])g=d[l],2>g.length&&(g="0"+g);else if("d"==e[l]||"dd"==e[l])h=d[l],2>h.length&&(h="0"+h);g=Date.parse(k+"-"+g+"-"+h)}else g=jQuery.datepicker.parseDate(e,
50
+ d);e=g;null!==e&&(c[a.valKey]=Math.ceil(e/864E5))}else{e=d;""!==e&&0!==e&&(e=e.trim(),e=parseFloat(e.replace(/,/g,"").match(/-?[\d\.]+$/)));if("undefined"===typeof e||isNaN(e)||""===e)e=0;c[a.valKey]+=e}});return c}function pb(a,b){if("undefined"!==typeof b[a.valKey]&&""!==b[a.valKey])return b;b[a.valKey]="";var c=Pa(a);if(!1===c)return b;var d=0,f="";c.each(function(){var c=Qa(a.thisField,this),c=c.trim();0<d&&("time"==a.thisField.type?1==d?f=":":2==d&&(f=" "):f=", ");""!==c&&(b[a.valKey]+=f+c,d++)});
51
+ return b}function Pa(a){if(!1===a.inSection)var b=jQuery(a.thisFieldCall);else if(b=Na(a),null===b||"undefined"===typeof b)b=jQuery(a.thisFieldCall);if(null===b||"undefined"===typeof b||1>b.length)b=!1;return b}function Na(a){if("undefined"===typeof a.triggerField)return null;var b=a.triggerField.closest(".frm_repeat_sec, .frm_repeat_inline, .frm_repeat_grid");return b.length?(a=a.thisFieldCall.replace("[id=","[id^="),b.find(a)):null}function Qa(a,b){var c=!1;if("hidden"==b.type)""!==fa(b)&&(c=!0);
52
+ else if("select"==a.type){var d=b.className;d&&-1<d.indexOf("frm_other_trigger")&&(c=!0)}else("checkbox"==a.type||"radio"==a.type)&&-1<b.id.indexOf("-other_")&&0>b.id.indexOf("-otext")&&(c=!0);c?(c=0,"select"==a.type?"hidden"==b.type?(d=!1,2<b.name.split("[").length&&(d=!0),d||(c=fa(b))):c=jQuery(b).closest(".frm_other_container").find(".frm_other_input").val():"checkbox"!=a.type&&"radio"!=a.type||"hidden"==b.type||(c=fa(b))):c="checkbox"!==b.type&&"radio"!==b.type||!b.checked?jQuery(b).val():b.value;
53
+ "undefined"===typeof c&&(c="");return c}function fa(a){var b="";a=document.getElementById(a.id+"-otext");null!==a&&""!==a.value&&(b=a.value);return b}function Ra(a){var b=!1;a=jQuery(a).find(".frm_saving_draft");a.length&&(b=a.val());return b}function Sa(a){var b=!1,c=jQuery(a).find(".frm_next_page");if(c.length&&c.val()){var d=jQuery(a).find('input[name="form_id"]').val();a=jQuery(a).find('input[name="frm_page_order_'+d+'"]');a=a.length?a.val():0;if(!a||c.val()<a)b=!0}return b}function O(a,b){var c=
54
+ a.getAttribute("data-frmfile");if("hidden"==a.type&&null===c)return b;var d="",f="";if("checkbox"==a.type||"radio"==a.type)c=jQuery('input[name="'+a.name+'"]').closest(".frm_required_field").find("input:checked"),jQuery(c).each(function(){d=this.value});else if("file"==a.type||c)"undefined"===typeof c&&(c=q(a,!0),c=c.replace("file","")),"undefined"===typeof b[c]&&(d=rb(c)),f=c;else{c=a.className;if(-1!==c.indexOf("frm_pos_none"))return b;d=jQuery(a).val();if(null===d)d="";else if("string"!==typeof d)for(var f=
55
+ d,d="",e=0;e<f.length;e++)""!==f[e]&&(d=f[e]);f=-1===c.indexOf("frm_other_input")?q(a,!0):q(a,!1);-1!==c.indexOf("frm_time_select")&&(f=f.replace("-H","").replace("-m",""))}""===d&&(""===f&&(f=q(a,!0)),f in b||(b[f]=B(a,"data-reqmsg")));return b}function rb(a){var b="";jQuery('input[name="file'+a+'"], input[name="file'+a+'[]"], input[name^="item_meta['+a+']"]').each(function(){""===b&&(b=this.value)});return b}function ma(a,b,c){var d=a.value,f=q(a,!0);if(f in b)return b;var e=0===f.indexOf("conf_");
56
+ if(""!==d||e){var g=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i,h=B(a,"data-invmsg");""!==d&&!1===g.test(d)?(b[f]=h,e&&(b[f.replace("conf_","")]="")):e&&(a=a.name.replace("conf_",""),c.filter('[name="'+a+'"]').val()!==d&&(b[f]="",b[f.replace("conf_","")]=""))}return b}function na(a,b){var c=a.value;""!==c&&!1!==isNaN(c/1)&&(c=q(a,!0),c in b||(b[c]=B(a,"data-invmsg")));return b}function oa(a,
57
+ b){var c=a.value,d=B(a,"pattern");if(""!==d&&""!==c){var f=q(a,!0);f in b||(d=new RegExp("^"+d+"$","i"),!1===d.test(c)&&(b[f]=B(a,"data-invmsg")))}return b}function B(a,b){var c=a.getAttribute(b);null===c&&(c="");return c}function sb(a,b){"undefined"==typeof b&&jQuery(a).find('input[name="frm_action"]').val();var c=jQuery(a).find(".frm_form_field");c.addClass("frm_doing_ajax");jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:jQuery(a).serialize()+"&action=frm_entries_"+b+"&nonce="+frm_js.nonce,success:function(b){var d=
58
+ {content:"",errors:{},pass:!1};null===b&&(b=d);b=b.replace(/^\s+|\s+$/g,"");b=0===b.indexOf("{")?jQuery.parseJSON(b):d;if("undefined"!=typeof b.redirect)jQuery(document).trigger("frmBeforeFormRedirect",[a,b]),window.location=b.redirect;else if(""!==b.content){E(jQuery(a));-1!=frm_js.offset&&frmFrontForm.scrollMsg(jQuery(a),!1);var e=jQuery(a).find('input[name="form_id"]').val();b.content=b.content.replace(/ frm_pro_form /g," frm_pro_form frm_no_hide ");jQuery(a).closest(".frm_forms").replaceWith(b.content);
59
+ d=b;if(history.pushState&&"undefined"!=typeof d.page){var g=d.page;var h=encodeURI("frm_page");for(var g=encodeURI(g),k=document.location.search.substr(1).split("&"),l=k.length,m;l--;)if(m=k[l].split("="),m[0]==h){m[1]=g;k[l]=m.join("=");break}0>l&&(k[k.length]=[h,g].join("="));h=k.join("&");window.history.pushState({html:d.html},"","?"+h)}"function"==typeof frmThemeOverride_frmAfterSubmit&&(e=jQuery('input[name="frm_page_order_'+e+'"]').val(),d=jQuery(b.content).find('input[name="form_id"]').val(),
60
+ frmThemeOverride_frmAfterSubmit(d,e,b.content,a));jQuery(b.content).find(".frm_message").length?(jQuery(document).trigger("frmFormComplete",[a,b]),ga("pageLoad"),b=jQuery(a).find('input[name="id"]'),b.length&&(b=document.getElementById("frm_edit_"+b.val()),null!==b&&-1<b.className.indexOf("frm_cancel_edit")&&Ta(jQuery(b)))):jQuery(document).trigger("frmPageChanged",[a,b]);ha()}else if(Object.keys(b.errors).length){E(jQuery(a),"enable");d=!0;Ua();h=!1;for(e in b.errors)g=jQuery(a).find("#frm_field_"+
61
+ e+"_container"),g.length&&(g.is(":visible")||(k=g.closest(".frm_toggle_container"),k.length&&(k=k.prev(),k.hasClass("frm_trigger")||(k=k.prev(".frm_trigger")),k.click())),g.is(":visible")&&(R(g,e,b.errors),d=!1,g=jQuery(a).find("#frm_field_"+e+"_container .frm-g-recaptcha, #frm_field_"+e+"_container .g-recaptcha"),g.length&&(h=!0,g=g.data("rid"),jQuery().grecaptcha&&(g?grecaptcha.reset(g):grecaptcha.reset()))));jQuery(document).trigger("frmFormErrors",[a,b]);c.removeClass("frm_doing_ajax");Va(a);
62
+ !0!==h&&Wa(a,!1);d?a.submit():jQuery(a).prepend(b.error_message)}else tb(a),Wa(a,!0),a.submit()},error:function(){jQuery(a).find('input[type="submit"], input[type="button"]').removeAttr("disabled");a.submit()}})}function R(a,b,c){a.length&&a.is(":visible")&&(a.addClass("frm_blank_field"),"function"==typeof frmThemeOverride_frmPlaceError?frmThemeOverride_frmPlaceError(b,c):a.append('<div class="frm_error">'+c[b]+"</div>"))}function Ua(){jQuery(".form-field").removeClass("frm_blank_field has-error");
63
+ jQuery(".form-field .frm_error").replaceWith("");jQuery(".frm_error_style").remove()}function Va(a){var b=jQuery(a).find(".frm_blank_field:first");b.length&&frmFrontForm.scrollMsg(b,a,!0)}function P(a){a.hasClass("frm_loading_form")||a.addClass("frm_loading_form");a.find('input[type="submit"], input[type="button"], button[type="submit"]').attr("disabled","disabled")}function E(a,b){a.removeClass("frm_loading_form");"enable"==b&&a.find('input[type="submit"], input[type="button"], button[type="submit"]').removeAttr("disabled")}
64
+ function tb(a){var b=document.getElementById("frm_loading");null!==b&&(a=jQuery(a).find("input[type=file]").val(),"undefined"!=typeof a&&""!==a&&setTimeout(function(){jQuery(b).fadeIn("slow")},2E3))}function Wa(a,b){var c=jQuery(a).find(".frm-g-recaptcha, .g-recaptcha");c.length&&(!b||1>jQuery(a).find(".frm_next_page").length||1>jQuery(a).find(".frm_next_page").val())&&c.closest(".frm_form_field").replaceWith('<input type="hidden" name="recaptcha_checked" value="'+frm_js.nonce+'">')}function ub(){Xa(jQuery(this),
65
+ "clear")}function vb(){Xa(jQuery(this),"replace")}function Xa(a,b){var c=a.data("frmval").replace(/(\n|\r\n)/g,"\r");if(""===c||"undefined"==typeof c)return!1;var d=a.val().replace(/(\n|\r\n)/g,"\r");"replace"==b?""===d&&a.addClass("frm_default").val(c):d==c&&a.removeClass("frm_default").val("")}function wb(){var a=jQuery(this),b=a.data("eid"),c=a.data("fid");a.append('<span class="spinner" style="display:inline"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_send_email",
66
+ entry_id:b,form_id:c,nonce:frm_js.nonce},success:function(b){a.replaceWith(b)}});return!1}function xb(a,b){google.load("visualization","1.0",{packages:[b],callback:function(){var b=new google.visualization.DataTable,d=!1;-1!==jQuery.inArray("id",a.options.fields)&&(d=!0,b.addColumn("number",frm_js.id));for(var f=a.fields.length,e,g=0,h=f;g<h;g++){var k=a.fields[g];e=Ya(k);b.addColumn(e,k.name)}g=!1;a.options.edit_link&&(g=!0,b.addColumn("string",a.options.edit_link));h=!1;a.options.delete_link&&(h=
67
+ !0,b.addColumn("string",a.options.delete_link));if(null!==a.entries){var l=a.entries.length;b.addRows(l);for(var m=0,n=0;n<l;n++){var k=0,p=a.entries[n];d&&(b.setCell(m,k,p.id),k++);for(var q=0,t=f;q<t;q++){var r=a.fields[q];e=Ya(r);r=p.metas[r.id];"number"!=e||null!==r&&""!==r?"boolean"==e&&(r=null===r||"false"==r||!1===r?!1:!0):r=0;b.setCell(m,k,r);k++}g&&("undefined"!==typeof p.editLink?b.setCell(m,k,'<a href="'+p.editLink+'">'+a.options.edit_link+"</a>"):b.setCell(m,k,""),k++);h&&("undefined"!==
68
+ typeof p.deleteLink?b.setCell(m,k,'<a href="'+p.deleteLink+'" class="frm_delete_link" data-frmconfirm="'+a.options.confirm+'">'+a.options.delete_link+"</a>"):b.setCell(m,k,""));m++}}else for(b.addRows(1),g=k=0,h=f;g<h;g++)0<k?b.setCell(0,k,""):b.setCell(0,k,a.options.no_entries),k++;(new google.visualization.Table(document.getElementById("frm_google_table_"+a.options.form_id))).draw(b,a.graphOpts)}})}function yb(a){google.load("visualization","1.0",{packages:[a["package"]],callback:function(){new google.visualization.DataTable;
69
+ var b=google.visualization.arrayToDataTable(a.data);var c=document.getElementById("chart_"+a.graph_id);if(null!==c){var d=a.type.charAt(0).toUpperCase()+a.type.slice(1);"Histogram"!==d&&"Table"!==d&&(d+="Chart");c=new google.visualization[d](c);c.draw(b,a.options);jQuery(document).trigger("frmDrawChart",[c,"chart_"+a.graph_id,b])}}})}function Ya(a){var b="string";if("number"==a.type)b="number";else if("checkbox"==a.type||"select"==a.type){var c=a.options.length;"select"==a.type&&""===a.options[0]&&
70
+ (c="post_status"==a.field_options.post_field?3:c-1);1==c&&(b="boolean")}return b}function zb(){var a=jQuery(this).data("key"),b=jQuery(this).data("parent"),c="frm_section_"+b+"-"+a,d=jQuery(document.getElementById(c)),f=d.find("input, select, textarea"),e=jQuery(this).closest("form").find('input[name="form_id"]').val();d.fadeOut("slow",function(){d.remove();f.each(function(){var c=q(this,!1);"file"!=this.type&&Q(c,jQuery(this));z("frm_field_"+c+"-"+b+"-"+a+"_container",e)});"function"==typeof frmThemeOverride_frmRemoveRow&&
71
+ frmThemeOverride_frmRemoveRow(c,d);jQuery(document).trigger("frmAfterRemoveRow")});return!1}function Ab(){if(!0===N)return!1;N=!0;var a=jQuery(this).data("parent"),b=0;if(0<jQuery(".frm_repeat_"+a).length)var c=jQuery(".frm_repeat_"+a+":last").attr("id").replace("frm_section_"+a+"-",""),b=-1<c.indexOf("i")?1:1+parseInt(c);jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"json",data:{action:"frm_add_form_row",field_id:a,i:b,nonce:frm_js.nonce},success:function(c){var d=c.html,e=jQuery(d).hide().fadeIn("slow");
72
+ jQuery(".frm_repeat_"+a+":last").after(e);var g=["other"],h,k,l={repeatingSection:a.toString(),repeatRow:b.toString()};jQuery(d).find("input, select, textarea").each(function(){if("file"!=this.type){if(""===this.name)return!0;h=this.name.replace("item_meta[","").split("]")[2].replace("[","");-1==jQuery.inArray(h,g)&&!1!==this.id&&""!==this.id&&(k=jQuery("#"+this.id),g.push(h),G(h,l),aa(h,l,"value changed"),ka(h,k),la(h,k,"value changed"),Q(h,k))}});w(l.repeatRow);Za();ea();"function"==typeof frmThemeOverride_frmAddRow&&
73
+ frmThemeOverride_frmAddRow(a,c);jQuery(document).trigger("frmAfterAddRow");N=!1},error:function(){N=!1}});return!1}function Bb(){var a=jQuery(this),b=a.data("entryid"),c=a.data("prefix"),d=a.data("pageid"),f=a.data("formid"),e=a.data("cancel"),g=a.data("fields"),h=a.data("excludefields"),k=jQuery(document.getElementById(c+b)),l=k.html();k.html('<span class="frm-loading-img" id="'+c+b+'"></span><div class="frm_orig_content" style="display:none">'+l+"</div>");jQuery.ajax({type:"POST",url:frm_js.ajax_url,
74
+ dataType:"html",data:{action:"frm_entries_edit_entry_ajax",post_id:d,entry_id:b,id:f,nonce:frm_js.nonce,fields:g,exclude_fields:h},success:function(d){k.children(".frm-loading-img").replaceWith(d);a.removeClass("frm_inplace_edit").addClass("frm_cancel_edit");a.html(e);ga("editInPlace");jQuery(document).on("change",'.frm-show-form input[name^="item_meta"], .frm-show-form select[name^="item_meta"], .frm-show-form textarea[name^="item_meta"]',ja);ha(c+b)}});return!1}function Cb(){var a=jQuery(this),
75
+ b=a.data("prefix"),c=a.data("entryid"),b=jQuery(document.getElementById(b+c));b.children(".frm_forms").replaceWith("");b.children(".frm_orig_content").fadeIn("slow").removeClass("frm_orig_content");Ta(a)}function Ta(a){var b=a.data("edit");a.removeClass("frm_cancel_edit").addClass("frm_inplace_edit");a.html(b)}function Db(){var a=jQuery(this),b=a.data("deleteconfirm");if(confirm(b)){var c=a.data("entryid"),d=a.data("prefix");a.replaceWith('<span class="frm-loading-img" id="frm_delete_'+c+'"></span>');
76
+ jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_destroy",entry:c,nonce:frm_js.nonce},success:function(a){if("success"==a.replace(/^\s+|\s+$/g,"")){var b=jQuery(document.getElementById(d+c));b.fadeOut("slow",function(){b.remove()});jQuery(document.getElementById("frm_delete_"+c)).fadeOut("slow")}else jQuery(document.getElementById("frm_delete_"+c)).replaceWith(a)}})}return!1}function Eb(){for(var a=__frmUniqueTimes,b=0;b<a.length;b++)a[b].dateID==this.id&&frmFrontForm.removeUsedTimes(this,
77
+ a[b].timeID)}function ha(a){"undefined"!==typeof __frmHideFields&&frmFrontForm.hidePreviouslyHiddenFields();jQuery(document).on("focusin",".frm_date",t);if("undefined"!==typeof __frmUniqueTimes)for(var b=__frmUniqueTimes,c=0;c<b.length;c++)jQuery(document.getElementById(b[c].dateID)).change(Eb);if("undefined"!==typeof __frmMasks)for(b=__frmMasks,c=0;c<b.length;c++)jQuery(b[c].trigger).attr("data-frmmask",b[c].mask);Za();ea(a);"undefined"!==typeof __frmDepDynamicFields&&frmFrontForm.checkDependentDynamicFields(__frmDepDynamicFields);
78
+ "undefined"!==typeof __frmDepLookupFields&&frmFrontForm.checkDependentLookupFields(__frmDepLookupFields);if("undefined"!==typeof __FRMCALC){(a=__FRMCALC.triggers)&&jQuery(a.join()).trigger({type:"change",selfTriggered:!0});a=__FRMCALC.calc;var b=[],d;for(d in a)1>a[d].fields.length&&(c=document.getElementById("field_"+d),null===c||J(c,a[d].form_id)||Y(__FRMCALC,d,b))}w()}function ea(a){if(jQuery().chosen){var b={allow_single_deselect:!0,no_results_text:frm_js.no_results};"undefined"!==typeof __frmChosen&&
79
+ (b="{"+__frmChosen+"}");"undefined"!==typeof a?jQuery("#"+a).find(".frm_chzn").chosen(b):jQuery(".frm_chzn").chosen(b)}}function Za(){if(jQuery().rating){var a=jQuery(".star");a.length&&a.rating()}}function ga(a){"undefined"!==typeof __frmHideOrShowFields?frmFrontForm.hideOrShowFields(__frmHideOrShowFields,a):$a()}function $a(){jQuery(".frm_pro_form").fadeIn("slow")}function u(a,b){"undefined"===typeof b&&(b="dependent");1<a.length&&(a=a.eq(0));a.trigger({type:"change",selfTriggered:!0,frmTriggered:b})}
80
+ function F(a){var b={repeatingSection:"",repeatRow:""};"undefined"!==typeof a&&C(a)&&(a=a.split("]["),b.repeatingSection=a[0].replace("item_meta[",""),b.repeatRow=a[1]);return b}function bb(a){a.fadeOut("slow",function(){a.remove()})}function Fb(){var a=jQuery(this).data("frmconfirm");return confirm(a)}function Gb(){var a=jQuery(this).data("frmtoggle");jQuery(a).is(":visible")?jQuery(a).slideUp("fast"):jQuery(a).slideDown("fast");return!1}function mb(a,b){for(var c in a)if(a.hasOwnProperty(c)&&a[c]===
81
+ b)return c;return null}function Oa(a){return!jQuery.isArray(a)&&0<=a-parseFloat(a)+1}function Hb(){Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c=this.length>>>0,d=Number(b)||0,d=0>d?Math.ceil(d):Math.floor(d);for(0>d&&(d+=c);d<c;d++)if(d in this&&this[d]===a)return d;return-1})}function Ib(){"function"!==typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")})}function Jb(){Array.prototype.filter||(Array.prototype.filter=function(a,
82
+ b){if(void 0===this||null===this)throw new TypeError;var c=Object(this),d=c.length>>>0;if("function"!==typeof a)throw new TypeError;for(var f=[],e=0;e<d;e++)if(e in c){var g=c[e];a.call(b,g,e,c)&&f.push(g)}return f})}function Kb(){Object.keys||(Object.keys=function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b})}var N=!1,y="",v=[],L=0,p={};return{init:function(){jQuery(document).off("submit.formidable",".frm-show-form");jQuery(document).on("submit.formidable",".frm-show-form",frmFrontForm.submitForm);
83
+ jQuery(document).on("click",".frm_trigger",n);var a=jQuery(".frm_blank_field");a.length&&a.closest(".frm_toggle_container").prev(".frm_trigger").click();jQuery.isFunction(jQuery.fn.placeholder)?jQuery(".frm-show-form input, .frm-show-form textarea").placeholder():jQuery(".frm-show-form input[onblur], .frm-show-form textarea[onblur]").each(function(){""===jQuery(this).val()&&jQuery(this).blur()});jQuery(document).on("focus",".frm_toggle_default",ub);jQuery(document).on("blur",".frm_toggle_default",
84
+ vb);jQuery(".frm_toggle_default").blur();jQuery(document.getElementById("frm_resend_email")).click(wb);jQuery(document).on("click",".frm_remove_link",ab);jQuery(document).on("focusin","input[data-frmmask]",function(){jQuery(this).mask(jQuery(this).data("frmmask").toString())});jQuery(document).on("change",'.frm-show-form input[name^="item_meta"], .frm-show-form select[name^="item_meta"], .frm-show-form textarea[name^="item_meta"]',ja);jQuery(document).on("click",'.frm-show-form input[type="submit"], .frm-show-form input[name="frm_prev_page"], .frm_page_back, .frm_page_skip, .frm-show-form .frm_save_draft, .frm_prev_page, .frm_button_submit',
85
+ m);jQuery(document).on("change",'.frm_other_container input[type="checkbox"], .frm_other_container input[type="radio"], .frm_other_container select',cb);jQuery(document).on("click",".frm_remove_form_row",zb);jQuery(document).on("click",".frm_add_form_row",Ab);jQuery(document).on("click","a[data-frmconfirm]",Fb);jQuery("a[data-frmtoggle]").click(Gb);jQuery(".frm_edit_link_container").on("click","a.frm_inplace_edit",Bb);jQuery(".frm_edit_link_container").on("click","a.frm_cancel_edit",Cb);jQuery(document).on("click",
86
+ ".frm_ajax_delete",Db);jQuery(".frm_month_heading, .frm_year_heading").click(function(){var a=jQuery(this).children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s");a.hasClass("ui-icon-triangle-1-e")?(a.addClass("ui-icon-triangle-1-s").removeClass("ui-icon-triangle-1-e"),jQuery(this).next(".frm_toggle_container").fadeIn("slow")):(a.addClass("ui-icon-triangle-1-e").removeClass("ui-icon-triangle-1-s"),jQuery(this).next(".frm_toggle_container").hide())});ga("pageLoad");ha();Hb();Ib();Jb();Kb()},submitForm:function(a){frmFrontForm.submitFormManual(a,
87
+ this)},submitFormManual:function(a,b){var c=b.className.trim().split(/\s+/gi);if((!c||-1<c.indexOf("frm_pro_form"))&&!jQuery("body").hasClass("wp-admin")){a.preventDefault();var d=frmFrontForm.validateFormSubmit(b);0===Object.keys(d).length&&(P(jQuery(b)),-1<c.indexOf("frm_ajax_submit")?1>jQuery(b).find('input[type="file"]').filter(function(){return!!this.value}).length?(y=jQuery(b).find('input[name="frm_action"]').val(),frmFrontForm.checkFormErrors(b,y)):b.submit():b.submit())}},validateFormSubmit:function(a){"undefined"!=
88
+ typeof tinyMCE&&jQuery(a).find(".wp-editor-wrap").length&&tinyMCE.triggerSave();v=[];var b=jQuery(a).hasClass("frm_js_validate");b&&(Ra(a)||Sa(a))&&(b=!1);b&&(frmFrontForm.getAjaxFormErrors(a),Object.keys(v).length&&frmFrontForm.addAjaxFormErrors(a));return v},getAjaxFormErrors:function(a){var b=[],c=jQuery(a).find(".frm_required_field:visible input, .frm_required_field:visible select, .frm_required_field:visible textarea").filter(":not(.frm_optional)");if(c.length)for(var d=0,f=c.length;d<f;d++)b=
89
+ O(c[d],b);c=jQuery(a).find("input[type=email]").filter(":visible");d=jQuery(a).find("input,select,textarea");if(d.length)for(var f=0,e=d.length;f<e;f++){var g=d[f];""!==g.value&&"hidden"!=g.type&&("number"==g.type?b=na(g,b):"email"==g.type?b=ma(g,b,c):null!==g.pattern&&(b=oa(g,b)))}c=jQuery(a).find(".frm-g-recaptcha");c.length&&(d=c.data("rid"),0===grecaptcha.getResponse(d).length&&(c=c.closest(".frm_form_field").attr("id").replace("frm_field_","").replace("_container",""),b[c]=""));v=b;if("function"==
90
+ typeof frmThemeOverride_jsErrors&&(y=jQuery(a).find('input[name="frm_action"]').val(),a=frmThemeOverride_jsErrors(y,a),Object.keys(a).length))for(var h in a)v[h]=a[h];return v},addAjaxFormErrors:function(a){Ua();for(var b in v){var c=jQuery(a).find("#frm_field_"+b+"_container");c.length?R(c,b,v):delete v[b]}Va(a)},checkFormErrors:function(a,b){sb(a,b)},scrollToID:function(a){a=jQuery(document.getElementById(a));frmFrontForm.scrollMsg(a,!1)},scrollMsg:function(a,b,c){if("undefined"==typeof b){if(a=
91
  jQuery(document.getElementById("frm_form_"+a+"_container")),1>a.length)return}else a="string"==typeof a?jQuery(b).find("#frm_field_"+a+"_container"):a;if(a=a.offset().top){a-=frm_js.offset;b=jQuery("html").css("margin-top");var d=jQuery("body").css("margin-top");if(b||d)a=a-parseInt(b)-parseInt(d);if(a&&window.innerHeight&&(b=document.documentElement.scrollTop||document.body.scrollTop,a>b+window.innerHeight||a<b))return"undefined"===typeof c?jQuery(window).scrollTop(a):jQuery("html,body").animate({scrollTop:a},
92
+ 500),!1}},savingDraft:function(a){return Ra(a)},goingToPreviousPage:function(a){return Sa(a)},hideOrShowFields:function(a,b){if("pageLoad"===b){var c=document.querySelectorAll('[id^="frm_hide_fields_"]');Z(c)}for(var c={repeatingSection:"",repeatRow:""},d=0,f=a.length;d<f;d++)G(a[d],c),d==f-1&&$a()},hidePreviouslyHiddenFields:function(){var a=[];for(var b=document.querySelectorAll('*[id^="frm_hide_fields_"]'),c=b.length,d,f=0;f<c;f++)d=b[f].id.replace("frm_hide_fields_",""),a=a.concat(A(d));b=0;for(c=
93
+ a.length;b<c;b++)d=document.getElementById(a[b]),null!==d&&(d.style.display="none")},checkDependentDynamicFields:function(a){for(var b={repeatingSection:"",repeatRow:""},c=0,d=a.length;c<d;c++)G(a[c],b)},checkDependentLookupFields:function(a){for(var b,c={repeatingSection:"",repeatRow:""},d=0,f=a.length;d<f;d++)b=a[d],aa(b,c,"value changed")},loadGoogle:function(){if("undefined"!==typeof google&&google&&google.load)for(var a=__FRMTABLES,b=Object.keys(a),c=0;c<b.length;c++)if("graphs"===b[c])for(var d=
94
+ a[b[c]],f=0,e=d.length;f<e;f++)yb(d[f]);else for(d=a[b[c]],f=b[c],e=0;e<d.length;e++)xb(d[e],f);else setTimeout(frmFrontForm.loadGoogle,30)},removeUsedTimes:function(a,b){var c=jQuery(a).parents("form:first").find('input[name="id"]');jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"json",data:{action:"frm_fields_ajax_time_options",time_field:b,date_field:a.id,entry_id:c?c.val():"",date:jQuery(a).val(),nonce:frm_js.nonce},success:function(a){var c=jQuery(document.getElementById(b));c.find("option").removeAttr("disabled");
95
+ if(0<a.length)for(var d=0,g=a.length;d<g;d++)c.find('option[value="'+a[d]+'"]').attr("disabled","disabled")}})},escapeHtml:function(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},invisible:function(a){jQuery(a).css("visibility","hidden")},visible:function(a){jQuery(a).css("visibility","visible")}}}var frmFrontForm=frmFrontFormJS();jQuery(document).ready(function(m){frmFrontForm.init()});
96
+ function frmRecaptcha(){for(var m=jQuery(".frm-g-recaptcha"),n=0,t=m.length;n<t;n++){var w=grecaptcha.render(m[n].id,{sitekey:m[n].getAttribute("data-sitekey"),size:m[n].getAttribute("data-size"),theme:m[n].getAttribute("data-theme")});m[n].setAttribute("data-rid",w)}}
97
+ function frmUpdateField(m,n,t,w,D){jQuery(document.getElementById("frm_update_field_"+m+"_"+n)).html('<span class="frm-loading-img"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_update_field_ajax",entry_id:m,field_id:n,value:t,nonce:frm_js.nonce},success:function(){""===w.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById("frm_update_field_"+m+"_"+n+"_"+D)).fadeOut("slow"):jQuery(document.getElementById("frm_update_field_"+m+"_"+n+"_"+D)).replaceWith(w)}})}
98
+ function frmDeleteEntry(m,n){console.warn("DEPRECATED: function frmDeleteEntry in v2.0.13 use frmFrontForm.deleteEntry");jQuery(document.getElementById("frm_delete_"+m)).replaceWith('<span class="frm-loading-img" id="frm_delete_'+m+'"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_destroy",entry:m,nonce:frm_js.nonce},success:function(t){"success"==t.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById(n+m)).fadeOut("slow"):jQuery(document.getElementById("frm_delete_"+
99
+ m)).replaceWith(t)}})}function frmOnSubmit(m){console.warn("DEPRECATED: function frmOnSubmit in v2.0 use frmFrontForm.submitForm");frmFrontForm.submitForm(m,this)}
100
+ function frm_resend_email(m,n){console.warn("DEPRECATED: function frm_resend_email in v2.0");$link=jQuery(document.getElementById("frm_resend_email"));$link.append('<span class="spinner" style="display:inline"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_send_email",entry_id:m,form_id:n,nonce:frm_js.nonce},success:function(m){$link.replaceWith(m)}})};
 
 
 
js/formidable_admin.js CHANGED
@@ -217,23 +217,17 @@ function frmAdminBuildJS(){
217
 
218
  closeOpenDropdown( ui.item );
219
 
220
- // Get the current field or button's HTML ID
221
- var fieldHTMLId = ui.item.attr('id');
222
- if ( typeof fieldHTMLId == 'undefined' ) {
223
  return;
224
- }
225
-
226
- var section = getSectionForFieldPlacement( this, ui.item );
227
- var formId = getFormIdForFieldPlacement( section );
228
- var sectionId = getSectionIdForFieldPlacement( section );
229
-
230
- // An existing field was dragged and dropped into, out of, or between sections
231
- if ( fieldHTMLId.indexOf( 'frm_field_id') !== -1 ) {
232
- updateFieldAfterMovingBetweenSections( fieldHTMLId, formId, sectionId );
233
  return;
 
 
 
234
  }
235
 
236
- insertNewFieldByDragging( fieldHTMLId, formId, sectionId, opts );
237
  },
238
  change:function(event, ui){
239
  // don't allow some field types inside section
@@ -275,12 +269,7 @@ function frmAdminBuildJS(){
275
  }
276
 
277
  // Get the section where a field is dropped
278
- function getSectionForFieldPlacement( selectedItem, uiItem ){
279
- var currentItem = jQuery(selectedItem).data().uiSortable.currentItem;
280
- if ( typeof currentItem == 'undefined' ) {
281
- currentItem = uiItem;
282
- }
283
-
284
  var section = '';
285
  if ( typeof currentItem !== 'undefined' ) {
286
  section = currentItem.closest('.edit_field_type_divider');
@@ -318,9 +307,16 @@ function frmAdminBuildJS(){
318
  return sectionId;
319
  }
320
 
321
- // Update a field after it is dragged and dropped into, out of, or between sections
322
- function updateFieldAfterMovingBetweenSections( fieldHTMLId, formId, sectionId ) {
323
- var fieldId = fieldHTMLId.replace('frm_field_id_', '');
 
 
 
 
 
 
 
324
 
325
  jQuery.ajax({
326
  type: 'POST', url: ajaxurl,
@@ -343,8 +339,21 @@ function frmAdminBuildJS(){
343
  document.getElementById( 'frm_in_section_' + fieldId ).value = sectionId;
344
  }
345
 
346
- // Add a new field by dragging and dropping it from the Fields sidebar
347
- function insertNewFieldByDragging( fieldType, formId, sectionId, opts ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
348
  jQuery('#new_fields .frmbutton.frm_t' + fieldType).replaceWith('<img class="frmbutton frmbutton_loadingnow" id="' + fieldType + '" src="' + frm_js.images_url + '/ajax_loader.gif" alt="' + frm_js.loading + '" />');
349
  jQuery.ajax({
350
  type: 'POST', url: ajaxurl,
217
 
218
  closeOpenDropdown( ui.item );
219
 
220
+ if ( typeof ui.item.attr('id') == 'undefined' ) {
 
 
221
  return;
222
+ } else if ( ui.item.attr('id').indexOf('frm_field_id') > -1 ) {
223
+ // An existing field was dragged and dropped into, out of, or between sections
224
+ updateFieldAfterMovingBetweenSections(ui.item);
 
 
 
 
 
 
225
  return;
226
+ } else {
227
+ // A new field was dragged into the form
228
+ insertNewFieldByDragging(this, ui.item, opts);
229
  }
230
 
 
231
  },
232
  change:function(event, ui){
233
  // don't allow some field types inside section
269
  }
270
 
271
  // Get the section where a field is dropped
272
+ function getSectionForFieldPlacement( currentItem ){
 
 
 
 
 
273
  var section = '';
274
  if ( typeof currentItem !== 'undefined' ) {
275
  section = currentItem.closest('.edit_field_type_divider');
307
  return sectionId;
308
  }
309
 
310
+ /**
311
+ * Update a field after it is dragged and dropped into, out of, or between sections
312
+ *
313
+ * @param {object} currentItem
314
+ */
315
+ function updateFieldAfterMovingBetweenSections( currentItem ) {
316
+ var fieldId = currentItem.attr('id').replace('frm_field_id_', '');
317
+ var section = getSectionForFieldPlacement( currentItem );
318
+ var formId = getFormIdForFieldPlacement( section );
319
+ var sectionId = getSectionIdForFieldPlacement( section );
320
 
321
  jQuery.ajax({
322
  type: 'POST', url: ajaxurl,
339
  document.getElementById( 'frm_in_section_' + fieldId ).value = sectionId;
340
  }
341
 
342
+ /**
343
+ * Add a new field by dragging and dropping it from the Fields sidebar
344
+ *
345
+ * @param {object} selectedItem
346
+ * @param {object} fieldButton
347
+ * @param {object} opts
348
+ */
349
+ function insertNewFieldByDragging( selectedItem, fieldButton, opts ) {
350
+ var fieldType = fieldButton.attr('id');
351
+ var currentItem = jQuery(selectedItem).data().uiSortable.currentItem;
352
+ var section = getSectionForFieldPlacement( currentItem );
353
+ var formId = getFormIdForFieldPlacement( section );
354
+ var sectionId = getSectionIdForFieldPlacement( section );
355
+
356
+
357
  jQuery('#new_fields .frmbutton.frm_t' + fieldType).replaceWith('<img class="frmbutton frmbutton_loadingnow" id="' + fieldType + '" src="' + frm_js.images_url + '/ajax_loader.gif" alt="' + frm_js.loading + '" />');
358
  jQuery.ajax({
359
  type: 'POST', url: ajaxurl,
languages/formidable-az_AZ.mo CHANGED
Binary file
languages/formidable-az_AZ.po CHANGED
@@ -1,9 +1,9 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: Formidable v2.03.07\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: 2016-09-01 03:07+0000\n"
6
- "PO-Revision-Date: Fri Apr 21 2017 15:06:53 GMT-0700 (PDT)\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
9
  "Language: Azerbaijani (Azerbaijan)\n"
@@ -77,9 +77,9 @@ msgid "Documentation on Entries"
77
  msgstr ""
78
 
79
  #: ../classes/controllers/FrmEntriesController.php:72 ..
80
- #: classes/controllers/FrmFormsController.php:696 ../classes/views/frm-
81
  #: entries/form.php:46 ../classes/views/frm-entries/sidebar-shared.php:29 ..
82
- #: pro/classes/helpers/FrmProFieldsHelper.php:2592 ..
83
  #: pro/classes/views/xml/map_csv_fields.php:57 ..
84
  #: pro/classes/views/xml/map_csv_fields.php:57
85
  msgid "Entry Key"
@@ -104,7 +104,7 @@ msgstr ""
104
  #: ../classes/controllers/FrmEntriesController.php:82 ..
105
  #: pro/classes/helpers/FrmProEntriesListHelper.php:61 ..
106
  #: pro/classes/helpers/FrmProEntriesListHelper.php:72 ..
107
- #: pro/classes/helpers/FrmProFieldsHelper.php:2595 ..
108
  #: pro/classes/views/displays/_calendar_options.php:4 ..
109
  #: pro/classes/views/displays/_calendar_options.php:16 ..
110
  #: pro/classes/views/displays/order_row.php:4 ..
@@ -113,7 +113,7 @@ msgid "Entry creation date"
113
  msgstr ""
114
 
115
  #: ../classes/controllers/FrmEntriesController.php:83 ..
116
- #: pro/classes/helpers/FrmProFieldsHelper.php:2596 ..
117
  #: pro/classes/views/displays/_calendar_options.php:5 ..
118
  #: pro/classes/views/displays/_calendar_options.php:17 ..
119
  #: pro/classes/views/displays/order_row.php:5
@@ -162,7 +162,7 @@ msgid "Settings Successfully Updated"
162
  msgstr ""
163
 
164
  #: ../classes/controllers/FrmFormsController.php:213 ..
165
- #: classes/controllers/FrmFormsController.php:609
166
  msgid "Form was Successfully Updated"
167
  msgstr ""
168
 
@@ -240,49 +240,49 @@ msgstr ""
240
  msgid "Shortcodes"
241
  msgstr ""
242
 
243
- #: ../classes/controllers/FrmFormsController.php:586
244
  msgid "You are trying to edit a form that does not exist."
245
  msgstr ""
246
 
247
- #: ../classes/controllers/FrmFormsController.php:590
248
  #, php-format
249
  msgid "You are trying to edit a child form. Please edit from %1$shere%2$s"
250
  msgstr ""
251
 
252
- #: ../classes/controllers/FrmFormsController.php:611
253
  msgid "Template was Successfully Updated"
254
  msgstr ""
255
 
256
- #: ../classes/controllers/FrmFormsController.php:617 ..
257
- #: classes/controllers/FrmFormsController.php:638
258
  msgid "That template cannot be edited"
259
  msgstr ""
260
 
261
- #: ../classes/controllers/FrmFormsController.php:673
262
  msgid "Separator"
263
  msgstr ""
264
 
265
- #: ../classes/controllers/FrmFormsController.php:674
266
  msgid "Use a different separator for checkbox fields"
267
  msgstr ""
268
 
269
- #: ../classes/controllers/FrmFormsController.php:677
270
  msgid "Field Label"
271
  msgstr ""
272
 
273
- #: ../classes/controllers/FrmFormsController.php:679
274
  msgid "No Auto P"
275
  msgstr ""
276
 
277
- #: ../classes/controllers/FrmFormsController.php:680
278
  msgid "Do not automatically add any paragraphs or line breaks"
279
  msgstr ""
280
 
281
- #: ../classes/controllers/FrmFormsController.php:695 ../classes/views/frm-
282
  #: entries/sidebar-shared.php:23 ../pro/classes/controllers/FrmProFormsController.
283
  #: php:574 ../pro/classes/helpers/FrmProEntriesListHelper.php:62 ..
284
  #: pro/classes/helpers/FrmProEntriesListHelper.php:73 ..
285
- #: pro/classes/helpers/FrmProFieldsHelper.php:2591 ..
286
  #: pro/classes/views/displays/order_row.php:3 ..
287
  #: pro/classes/views/displays/where_row.php:6 ..
288
  #: pro/classes/views/xml/map_csv_fields.php:56 ..
@@ -290,66 +290,70 @@ msgstr ""
290
  msgid "Entry ID"
291
  msgstr ""
292
 
293
- #: ../classes/controllers/FrmFormsController.php:698 ..
294
- #: pro/classes/helpers/FrmProFieldsHelper.php:2594
295
  msgid "User IP"
296
  msgstr ""
297
 
298
- #: ../classes/controllers/FrmFormsController.php:699
299
  msgid "Entry created"
300
  msgstr ""
301
 
302
- #: ../classes/controllers/FrmFormsController.php:700
303
  msgid "Entry updated"
304
  msgstr ""
305
 
306
- #: ../classes/controllers/FrmFormsController.php:703 ..
307
- #: pro/classes/helpers/FrmProFieldsHelper.php:2652
308
  msgid "Site Name"
309
  msgstr ""
310
 
311
- #: ../classes/controllers/FrmFormsController.php:711
312
  msgid "Default Msg"
313
  msgstr ""
314
 
315
- #: ../classes/controllers/FrmFormsController.php:712
316
  msgid "Default HTML"
317
  msgstr ""
318
 
319
- #: ../classes/controllers/FrmFormsController.php:713
320
  msgid "Default Plain"
321
  msgstr ""
322
 
323
- #: ../classes/controllers/FrmFormsController.php:715
324
  msgid "Detail Link"
325
  msgstr ""
326
 
327
- #: ../classes/controllers/FrmFormsController.php:716
328
  msgid "Edit Entry Link"
329
  msgstr ""
330
 
331
- #: ../classes/controllers/FrmFormsController.php:717
332
  msgid "Even/Odd"
333
  msgstr ""
334
 
335
- #: ../classes/controllers/FrmFormsController.php:718
336
  msgid "Entry Count"
337
  msgstr ""
338
 
339
- #: ../classes/controllers/FrmFormsController.php:797
 
 
 
 
340
  msgid "No forms were specified"
341
  msgstr ""
342
 
343
- #: ../classes/controllers/FrmFormsController.php:944
344
  msgid "Abnormal HTML characters prevented your form from saving correctly"
345
  msgstr ""
346
 
347
- #: ../classes/controllers/FrmFormsController.php:990 ..
348
- #: classes/controllers/FrmFormsController.php:993
349
  msgid "Edit Forms"
350
  msgstr ""
351
 
352
- #: ../classes/controllers/FrmFormsController.php:1002 ..
353
  #: classes/helpers/FrmFormsHelper.php:60 ../classes/helpers/FrmFormsHelper.php:
354
  #: 115 ../classes/helpers/FrmFormsHelper.php:597 ..
355
  #: classes/helpers/FrmFormsListHelper.php:149 ..
@@ -362,8 +366,8 @@ msgstr ""
362
  msgid "(no title)"
363
  msgstr ""
364
 
365
- #: ../classes/controllers/FrmFormsController.php:1042 ..
366
- #: classes/controllers/FrmFormsController.php:1054
367
  msgid "Please select a valid form"
368
  msgstr ""
369
 
@@ -476,7 +480,7 @@ msgid "Add/Edit Views"
476
  msgstr ""
477
 
478
  #: ../classes/helpers/FrmAppHelper.php:1072 ../classes/helpers/FrmFieldsHelper.
479
- #: php:175 ../pro/classes/controllers/FrmProFieldsController.php:1515
480
  #, php-format
481
  msgid "%s is invalid"
482
  msgstr ""
@@ -631,22 +635,22 @@ msgid "(no label)"
631
  msgstr ""
632
 
633
  #: ../classes/helpers/FrmAppHelper.php:1761 ../classes/helpers/FrmFieldsHelper.
634
- #: php:1120
635
  msgid "Clear default value when typing"
636
  msgstr ""
637
 
638
  #: ../classes/helpers/FrmAppHelper.php:1762 ../classes/helpers/FrmFieldsHelper.
639
- #: php:1120
640
  msgid "Do not clear default value when typing"
641
  msgstr ""
642
 
643
  #: ../classes/helpers/FrmAppHelper.php:1763 ../classes/helpers/FrmFieldsHelper.
644
- #: php:1129
645
  msgid "Default value will pass form validation"
646
  msgstr ""
647
 
648
  #: ../classes/helpers/FrmAppHelper.php:1764 ../classes/helpers/FrmFieldsHelper.
649
- #: php:1129
650
  msgid "Default value will NOT pass form validation"
651
  msgstr ""
652
 
@@ -915,7 +919,7 @@ msgid "IP"
915
  msgstr ""
916
 
917
  #: ../classes/helpers/FrmEntriesListHelper.php:57 ..
918
- #: pro/classes/controllers/FrmProEntriesController.php:1694 ..
919
  #: pro/classes/helpers/FrmProDisplaysHelper.php:59
920
  msgid "No Entries Found"
921
  msgstr ""
@@ -929,7 +933,7 @@ msgstr ""
929
  msgid "Filter"
930
  msgstr ""
931
 
932
- #: ../classes/helpers/FrmEntriesListHelper.php:213
933
  msgid "Are you sure you want to delete that?"
934
  msgstr ""
935
 
@@ -949,7 +953,7 @@ msgid "Option 2"
949
  msgstr ""
950
 
951
  #: ../classes/helpers/FrmFieldsHelper.php:146 ../classes/helpers/FrmFieldsHelper.
952
- #: php:175 ../pro/classes/models/FrmProFileField.php:306
953
  msgid "This field is invalid"
954
  msgstr ""
955
 
@@ -963,152 +967,152 @@ msgstr ""
963
  msgid "Please add options from the WordPress \"%1$s\" page"
964
  msgstr ""
965
 
966
- #: ../classes/helpers/FrmFieldsHelper.php:1208
967
  msgid "Congo"
968
  msgstr ""
969
 
970
- #: ../classes/helpers/FrmFieldsHelper.php:1209
971
  msgid "C&ocirc;te d'Ivoire"
972
  msgstr ""
973
 
974
- #: ../classes/helpers/FrmFieldsHelper.php:1212
975
  msgid "East Timor"
976
  msgstr ""
977
 
978
- #: ../classes/helpers/FrmFieldsHelper.php:1246
979
  msgid "Russia"
980
  msgstr ""
981
 
982
- #: ../classes/helpers/FrmFieldsHelper.php:1249
983
  msgid "Sao Tome and Principe"
984
  msgstr ""
985
 
986
- #: ../classes/helpers/FrmFieldsHelper.php:1250
987
  msgid "Serbia and Montenegro"
988
  msgstr ""
989
 
990
- #: ../classes/helpers/FrmFieldsHelper.php:1263
991
  msgid "Vatican City"
992
  msgstr ""
993
 
994
- #: ../classes/helpers/FrmFieldsHelper.php:1264
995
  msgid "Virgin Islands, British"
996
  msgstr ""
997
 
998
- #: ../classes/helpers/FrmFieldsHelper.php:1265
999
  msgid "Virgin Islands, U.S."
1000
  msgstr ""
1001
 
1002
- #: ../classes/helpers/FrmFieldsHelper.php:1271
1003
  msgid "Countries"
1004
  msgstr ""
1005
 
1006
- #: ../classes/helpers/FrmFieldsHelper.php:1276
1007
  msgid "U.S. State Abbreviations"
1008
  msgstr ""
1009
 
1010
- #: ../classes/helpers/FrmFieldsHelper.php:1280
1011
  msgid "U.S. States"
1012
  msgstr ""
1013
 
1014
- #: ../classes/helpers/FrmFieldsHelper.php:1283
1015
  msgid "Age"
1016
  msgstr ""
1017
 
1018
- #: ../classes/helpers/FrmFieldsHelper.php:1284
1019
  msgid "Under 18"
1020
  msgstr ""
1021
 
1022
- #: ../classes/helpers/FrmFieldsHelper.php:1284
1023
  msgid "18-24"
1024
  msgstr ""
1025
 
1026
- #: ../classes/helpers/FrmFieldsHelper.php:1284
1027
  msgid "25-34"
1028
  msgstr ""
1029
 
1030
- #: ../classes/helpers/FrmFieldsHelper.php:1285
1031
  msgid "35-44"
1032
  msgstr ""
1033
 
1034
- #: ../classes/helpers/FrmFieldsHelper.php:1285
1035
  msgid "45-54"
1036
  msgstr ""
1037
 
1038
- #: ../classes/helpers/FrmFieldsHelper.php:1285
1039
  msgid "55-64"
1040
  msgstr ""
1041
 
1042
- #: ../classes/helpers/FrmFieldsHelper.php:1286
1043
  msgid "65 or Above"
1044
  msgstr ""
1045
 
1046
- #: ../classes/helpers/FrmFieldsHelper.php:1286
1047
  msgid "Prefer Not to Answer"
1048
  msgstr ""
1049
 
1050
- #: ../classes/helpers/FrmFieldsHelper.php:1289
1051
  msgid "Satisfaction"
1052
  msgstr ""
1053
 
1054
- #: ../classes/helpers/FrmFieldsHelper.php:1290
1055
  msgid "Very Satisfied"
1056
  msgstr ""
1057
 
1058
- #: ../classes/helpers/FrmFieldsHelper.php:1290
1059
  msgid "Satisfied"
1060
  msgstr ""
1061
 
1062
- #: ../classes/helpers/FrmFieldsHelper.php:1290 ../classes/helpers/FrmFieldsHelper.
1063
- #: php:1295 ../classes/helpers/FrmFieldsHelper.php:1300
1064
  msgid "Neutral"
1065
  msgstr ""
1066
 
1067
- #: ../classes/helpers/FrmFieldsHelper.php:1291
1068
  msgid "Unsatisfied"
1069
  msgstr ""
1070
 
1071
- #: ../classes/helpers/FrmFieldsHelper.php:1291
1072
  msgid "Very Unsatisfied"
1073
  msgstr ""
1074
 
1075
- #: ../classes/helpers/FrmFieldsHelper.php:1294
1076
  msgid "Importance"
1077
  msgstr ""
1078
 
1079
- #: ../classes/helpers/FrmFieldsHelper.php:1295
1080
  msgid "Very Important"
1081
  msgstr ""
1082
 
1083
- #: ../classes/helpers/FrmFieldsHelper.php:1295
1084
  msgid "Important"
1085
  msgstr ""
1086
 
1087
- #: ../classes/helpers/FrmFieldsHelper.php:1296
1088
  msgid "Somewhat Important"
1089
  msgstr ""
1090
 
1091
- #: ../classes/helpers/FrmFieldsHelper.php:1296
1092
  msgid "Not at all Important"
1093
  msgstr ""
1094
 
1095
- #: ../classes/helpers/FrmFieldsHelper.php:1299
1096
  msgid "Agreement"
1097
  msgstr ""
1098
 
1099
- #: ../classes/helpers/FrmFieldsHelper.php:1300
1100
  msgid "Strongly Agree"
1101
  msgstr ""
1102
 
1103
- #: ../classes/helpers/FrmFieldsHelper.php:1300
1104
  msgid "Agree"
1105
  msgstr ""
1106
 
1107
- #: ../classes/helpers/FrmFieldsHelper.php:1301
1108
  msgid "Disagree"
1109
  msgstr ""
1110
 
1111
- #: ../classes/helpers/FrmFieldsHelper.php:1301
1112
  msgid "Strongly Disagree"
1113
  msgstr ""
1114
 
@@ -1595,28 +1599,28 @@ msgstr ""
1595
  msgid "You do not have permission to do that"
1596
  msgstr ""
1597
 
1598
- #: ../classes/models/FrmEntryValidate.php:171
1599
  msgid "Please select a higher number"
1600
  msgstr ""
1601
 
1602
- #: ../classes/models/FrmEntryValidate.php:173
1603
  msgid "Please select a lower number"
1604
  msgstr ""
1605
 
1606
- #: ../classes/models/FrmEntryValidate.php:260
1607
  msgid "The captcha is missing from this form"
1608
  msgstr ""
1609
 
1610
- #: ../classes/models/FrmEntryValidate.php:280
1611
  msgid "There was a problem verifying your recaptcha"
1612
  msgstr ""
1613
 
1614
- #: ../classes/models/FrmEntryValidate.php:298 ../classes/models/FrmEntryValidate.
1615
- #: php:307
1616
  msgid "Your entry appears to be spam!"
1617
  msgstr ""
1618
 
1619
- #: ../classes/models/FrmEntryValidate.php:302
1620
  msgid "Your entry appears to be blacklist spam!"
1621
  msgstr ""
1622
 
@@ -1631,20 +1635,20 @@ msgstr ""
1631
 
1632
  #: ../classes/models/FrmField.php:15 ..
1633
  #: pro/classes/controllers/FrmProLookupFieldsController.php:14 ..
1634
- #: pro/classes/helpers/FrmProFieldsHelper.php:3698
1635
  msgid "Checkboxes"
1636
  msgstr ""
1637
 
1638
  #: ../classes/models/FrmField.php:16 ../classes/views/styles/_sample_form.php:58 .
1639
  #: ./pro/classes/controllers/FrmProLookupFieldsController.php:13 ..
1640
- #: pro/classes/helpers/FrmProFieldsHelper.php:3697 ..
1641
  #: pro/classes/views/styles/_sample_form.php:14
1642
  msgid "Radio Buttons"
1643
  msgstr ""
1644
 
1645
  #: ../classes/models/FrmField.php:17 ..
1646
  #: pro/classes/controllers/FrmProLookupFieldsController.php:12 ..
1647
- #: pro/classes/helpers/FrmProFieldsHelper.php:3696
1648
  msgid "Dropdown"
1649
  msgstr ""
1650
 
@@ -1657,7 +1661,7 @@ msgid "End Section"
1657
  msgstr ""
1658
 
1659
  #: ../classes/models/FrmField.php:32 ../pro/classes/helpers/FrmProFieldsHelper.
1660
- #: php:3684
1661
  msgid "Section"
1662
  msgstr ""
1663
 
@@ -1682,7 +1686,7 @@ msgid "Scale"
1682
  msgstr ""
1683
 
1684
  #: ../classes/models/FrmField.php:42 ../pro/classes/helpers/FrmProFieldsHelper.
1685
- #: php:3694
1686
  msgid "Dynamic Field"
1687
  msgstr ""
1688
 
@@ -1941,7 +1945,8 @@ msgstr ""
1941
  msgid "Entry"
1942
  msgstr ""
1943
 
1944
- #: ../classes/views/frm-entries/show.php:57
 
1945
  msgid "Parent Entry ID"
1946
  msgstr ""
1947
 
@@ -1973,10 +1978,10 @@ msgid "Entry Actions"
1973
  msgstr ""
1974
 
1975
  #: ../classes/views/frm-entries/sidebar-show.php:22 ..
1976
- #: pro/classes/controllers/FrmProEntriesController.php:1695 ..
1977
- #: pro/classes/controllers/FrmProEntriesController.php:2080 ..
1978
- #: pro/classes/controllers/FrmProEntriesController.php:2154 ..
1979
- #: pro/classes/controllers/FrmProEntriesController.php:2548
1980
  msgid "Are you sure you want to delete that entry?"
1981
  msgstr ""
1982
 
@@ -2865,7 +2870,7 @@ msgid "Fields from your form"
2865
  msgstr ""
2866
 
2867
  #: ../classes/views/shared/mb_adv_info.php:68 ..
2868
- #: pro/classes/helpers/FrmProFieldsHelper.php:2640
2869
  msgid "Helpers"
2870
  msgstr ""
2871
 
@@ -3273,19 +3278,19 @@ msgid "Line 2"
3273
  msgstr ""
3274
 
3275
  #: ../pro/classes/controllers/FrmProAddressesController.php:142 ..
3276
- #: pro/classes/controllers/FrmProAddressesController.php:166
3277
  msgid "Country"
3278
  msgstr ""
3279
 
3280
- #: ../pro/classes/controllers/FrmProAddressesController.php:163
3281
  msgid "City"
3282
  msgstr ""
3283
 
3284
- #: ../pro/classes/controllers/FrmProAddressesController.php:164
3285
  msgid "State/Province"
3286
  msgstr ""
3287
 
3288
- #: ../pro/classes/controllers/FrmProAddressesController.php:165
3289
  msgid "Zip/Postal"
3290
  msgstr ""
3291
 
@@ -3305,19 +3310,19 @@ msgstr ""
3305
  msgid "Year"
3306
  msgstr ""
3307
 
3308
- #: ../pro/classes/controllers/FrmProCreditCardsController.php:106
3309
  msgid "Expiration Month"
3310
  msgstr ""
3311
 
3312
- #: ../pro/classes/controllers/FrmProCreditCardsController.php:107
3313
  msgid "Expiration Year"
3314
  msgstr ""
3315
 
3316
- #: ../pro/classes/controllers/FrmProCreditCardsController.php:130
3317
  msgid "Card number"
3318
  msgstr ""
3319
 
3320
- #: ../pro/classes/controllers/FrmProCreditCardsController.php:131
3321
  msgid "CVC"
3322
  msgstr ""
3323
 
@@ -3487,31 +3492,35 @@ msgstr ""
3487
  msgid "You are trying to access an entry that does not exist."
3488
  msgstr ""
3489
 
3490
- #: ../pro/classes/controllers/FrmProEntriesController.php:1710
3491
  msgid ""
3492
  "There are no matching fields. Please check your formresults shortcode to "
3493
  "make sure you are using the correct form and field IDs."
3494
  msgstr ""
3495
 
3496
- #: ../pro/classes/controllers/FrmProEntriesController.php:2586 ..
3497
- #: pro/classes/controllers/FrmProEntriesController.php:2957
 
 
 
 
3498
  msgid "Your entry was successfully deleted"
3499
  msgstr ""
3500
 
3501
- #: ../pro/classes/controllers/FrmProEntriesController.php:2626
3502
  msgid "You are missing options in your shortcode. field_id is required."
3503
  msgstr ""
3504
 
3505
- #: ../pro/classes/controllers/FrmProEntriesController.php:2973
3506
  msgid "There was an error deleting that entry"
3507
  msgstr ""
3508
 
3509
- #: ../pro/classes/controllers/FrmProEntriesController.php:3035
3510
  #, php-format
3511
  msgid "Resent to %s"
3512
  msgstr ""
3513
 
3514
- #: ../pro/classes/controllers/FrmProEntriesController.php:3040
3515
  msgid "Resent to No one! You do not have permission"
3516
  msgstr ""
3517
 
@@ -3529,12 +3538,12 @@ msgstr ""
3529
  msgid "Select a taxonomy on the Form Actions tab of the Form Settings page"
3530
  msgstr ""
3531
 
3532
- #: ../pro/classes/controllers/FrmProFieldsController.php:1172 ..
3533
- #: pro/classes/controllers/FrmProFieldsController.php:1178
3534
  msgid "Show form uploads"
3535
  msgstr ""
3536
 
3537
- #: ../pro/classes/controllers/FrmProFieldsController.php:1177
3538
  msgid "Hide form uploads"
3539
  msgstr ""
3540
 
@@ -3611,7 +3620,7 @@ msgstr ""
3611
 
3612
  #: ../pro/classes/controllers/FrmProFormsController.php:79 ..
3613
  #: pro/classes/controllers/FrmProFormsController.php:300 ..
3614
- #: pro/classes/models/FrmProField.php:36 ../pro/classes/models/FrmProForm.php:276
3615
  msgid "User ID"
3616
  msgstr ""
3617
 
@@ -4019,7 +4028,7 @@ msgid "Display format"
4019
  msgstr ""
4020
 
4021
  #: ../pro/classes/controllers/FrmProFormsController.php:535 ..
4022
- #: pro/classes/helpers/FrmProFieldsHelper.php:3699
4023
  msgid "List"
4024
  msgstr ""
4025
 
@@ -4311,72 +4320,72 @@ msgstr ""
4311
  msgid "No Categories"
4312
  msgstr ""
4313
 
4314
- #: ../pro/classes/helpers/FrmProFieldsHelper.php:2115
4315
  msgid "Confirm"
4316
  msgstr ""
4317
 
4318
- #: ../pro/classes/helpers/FrmProFieldsHelper.php:2311
4319
  msgid "Edit Uploaded File"
4320
  msgstr ""
4321
 
4322
- #: ../pro/classes/helpers/FrmProFieldsHelper.php:2589 ../pro/classes/views/frmpro-
4323
  #: fields/back-end/calculations.php:18
4324
  msgid "Select a value to insert into the box below"
4325
  msgstr ""
4326
 
4327
- #: ../pro/classes/helpers/FrmProFieldsHelper.php:2598
4328
  msgid "Form Fields"
4329
  msgstr ""
4330
 
4331
- #: ../pro/classes/helpers/FrmProFieldsHelper.php:2615
4332
  msgid "Thumbnail"
4333
  msgstr ""
4334
 
4335
- #: ../pro/classes/helpers/FrmProFieldsHelper.php:2616
4336
  msgid "Medium"
4337
  msgstr ""
4338
 
4339
- #: ../pro/classes/helpers/FrmProFieldsHelper.php:2617
4340
  msgid "Large"
4341
  msgstr ""
4342
 
4343
- #: ../pro/classes/helpers/FrmProFieldsHelper.php:2618
4344
  msgid "Full Size"
4345
  msgstr ""
4346
 
4347
- #: ../pro/classes/helpers/FrmProFieldsHelper.php:2641
4348
  msgid "Admin link to edit the entry"
4349
  msgstr ""
4350
 
4351
- #: ../pro/classes/helpers/FrmProFieldsHelper.php:2643
4352
  msgid "Link to view single page if showing dynamic entries"
4353
  msgstr ""
4354
 
4355
- #: ../pro/classes/helpers/FrmProFieldsHelper.php:2647
4356
  msgid "Add a rotating 'even' or 'odd' class"
4357
  msgstr ""
4358
 
4359
- #: ../pro/classes/helpers/FrmProFieldsHelper.php:2649
4360
  msgid "Default Email Message"
4361
  msgstr ""
4362
 
4363
- #: ../pro/classes/helpers/FrmProFieldsHelper.php:3686
4364
  msgid "Heading"
4365
  msgstr ""
4366
 
4367
- #: ../pro/classes/helpers/FrmProFieldsHelper.php:3687 ../pro/classes/views/frmpro-
4368
  #: fields/options-form-top.php:11 ../pro/classes/views/styles/_section-fields.php:7
4369
  msgid "Collapsible"
4370
  msgstr ""
4371
 
4372
- #: ../pro/classes/helpers/FrmProFieldsHelper.php:3688 ../pro/classes/views/frmpro-
4373
  #: fields/options-form-top.php:20 ../pro/classes/views/styles/_section-fields.php:
4374
  #: 10
4375
  msgid "Repeatable"
4376
  msgstr ""
4377
 
4378
- #: ../pro/classes/helpers/FrmProFormsHelper.php:387 ..
4379
- #: pro/classes/helpers/FrmProFormsHelper.php:630
4380
  msgid "Your draft has been saved."
4381
  msgstr ""
4382
 
@@ -4436,8 +4445,8 @@ msgid ""
4436
  msgstr ""
4437
 
4438
  #: ../pro/classes/models/FrmProFileField.php:41 ..
4439
- #: pro/classes/models/FrmProFileField.php:198 ..
4440
- #: pro/classes/models/FrmProFileField.php:209
4441
  #, php-format
4442
  msgid "That file is too big. It must be less than %sMB."
4443
  msgstr ""
@@ -4461,20 +4470,20 @@ msgid "Remove file"
4461
  msgstr ""
4462
 
4463
  #: ../pro/classes/models/FrmProFileField.php:47 ..
4464
- #: pro/classes/models/FrmProFileField.php:239
4465
  #, php-format
4466
  msgid "You have uploaded too many files. You may only include %d file(s)."
4467
  msgstr ""
4468
 
4469
- #: ../pro/classes/models/FrmProFileField.php:307
4470
  msgid "is invalid"
4471
  msgstr ""
4472
 
4473
- #: ../pro/classes/models/FrmProFileField.php:310
4474
  msgid "Sorry, this file type is not permitted."
4475
  msgstr ""
4476
 
4477
- #: ../pro/classes/models/FrmProFileField.php:408
4478
  msgid "File upload failed"
4479
  msgstr ""
4480
 
@@ -5042,13 +5051,13 @@ msgid "Dynamic Values"
5042
  msgstr ""
5043
 
5044
  #: ../pro/classes/views/frmpro-fields/back-end/field-data.php:4 ..
5045
- #: pro/classes/views/frmpro-fields/back-end/field-data.php:16 ..
5046
- #: pro/classes/views/frmpro-fields/back-end/field-data.php:50
5047
  msgid "This data is dynamic on change"
5048
  msgstr ""
5049
 
5050
- #: ../pro/classes/views/frmpro-