Formidable Forms – Form Builder for WordPress - Version 2.02.06

Version Description

  • Prevent styling conflict with field buttons on form builder
  • Pro Features *
  • Add styling for left and right labels in combo fields
  • Fix PHP 5.2 error in graphs controller
  • Add taxonomy support to graphs and stats
  • A couple other graph fixes
  • Fix entry_id and created_at issue with stats
  • Fix lowercase text sorting in Lookup fields
  • Make sure conditional logic works on embedded form fields when editing
  • Fix conditional logic dependent on hidden embedded form field
  • Make sure time field displays correctly by default with frm-field-value shortcode
  • Add Format option to Text fields
Download this release

Release Info

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

Code changes from version 2.02.05 to 2.02.06

classes/controllers/FrmFieldsController.php CHANGED
@@ -681,13 +681,6 @@ class FrmFieldsController {
681
  $invalid_message = FrmFieldsHelper::get_error_msg( $field, 'invalid' );
682
  $add_html['data-invmsg'] = 'data-invmsg="' . esc_attr( $invalid_message ) . '"';
683
  }
684
-
685
- if ( $field['type'] == 'tel' ) {
686
- $format = FrmEntryValidate::phone_format( $field );
687
- $format = substr( $format, 2, -1 );
688
- $key = 'pattern';
689
- $add_html[ $key ] = $key . '="' . esc_attr( $format ) . '"';
690
- }
691
  }
692
 
693
  private static function add_shortcodes_to_html( $field, array &$add_html ) {
681
  $invalid_message = FrmFieldsHelper::get_error_msg( $field, 'invalid' );
682
  $add_html['data-invmsg'] = 'data-invmsg="' . esc_attr( $invalid_message ) . '"';
683
  }
 
 
 
 
 
 
 
684
  }
685
 
686
  private static function add_shortcodes_to_html( $field, array &$add_html ) {
classes/helpers/FrmAppHelper.php CHANGED
@@ -10,7 +10,7 @@ class FrmAppHelper {
10
  /**
11
  * @since 2.0
12
  */
13
- public static $plug_version = '2.02.05';
14
 
15
  /**
16
  * @since 1.07.02
@@ -177,7 +177,8 @@ class FrmAppHelper {
177
  * Check if value contains blank value or empty array
178
  *
179
  * @since 2.0
180
- * @param $value - value to check
 
181
  * @return boolean
182
  */
183
  public static function is_empty_value( $value, $empty = '' ) {
@@ -262,6 +263,7 @@ class FrmAppHelper {
262
  * @param string $param
263
  * @param mixed $default
264
  * @param string $sanitize
 
265
  */
266
  public static function get_post_param( $param, $default = '', $sanitize = '' ) {
267
  return self::get_simple_request( array( 'type' => 'post', 'param' => $param, 'default' => $default, 'sanitize' => $sanitize ) );
@@ -273,6 +275,7 @@ class FrmAppHelper {
273
  * @param string $param
274
  * @param string $sanitize
275
  * @param string $default
 
276
  */
277
  public static function simple_get( $param, $sanitize = 'sanitize_text_field', $default = '' ) {
278
  return self::get_simple_request( array( 'type' => 'get', 'param' => $param, 'default' => $default, 'sanitize' => $sanitize ) );
@@ -282,6 +285,8 @@ class FrmAppHelper {
282
  * Get a GET/POST/REQUEST value and sanitize it
283
  *
284
  * @since 2.0.6
 
 
285
  */
286
  public static function get_simple_request( $args ) {
287
  $defaults = array(
@@ -356,6 +361,9 @@ class FrmAppHelper {
356
  /**
357
  * Sanitize the value, and allow some HTML
358
  * @since 2.0
 
 
 
359
  */
360
  public static function kses( $value, $allowed = array() ) {
361
  $html = array(
10
  /**
11
  * @since 2.0
12
  */
13
+ public static $plug_version = '2.02.06';
14
 
15
  /**
16
  * @since 1.07.02
177
  * Check if value contains blank value or empty array
178
  *
179
  * @since 2.0
180
+ * @param mixed $value - value to check
181
+ * @param string
182
  * @return boolean
183
  */
184
  public static function is_empty_value( $value, $empty = '' ) {
263
  * @param string $param
264
  * @param mixed $default
265
  * @param string $sanitize
266
+ * @return string|array
267
  */
268
  public static function get_post_param( $param, $default = '', $sanitize = '' ) {
269
  return self::get_simple_request( array( 'type' => 'post', 'param' => $param, 'default' => $default, 'sanitize' => $sanitize ) );
275
  * @param string $param
276
  * @param string $sanitize
277
  * @param string $default
278
+ * @return string|array
279
  */
280
  public static function simple_get( $param, $sanitize = 'sanitize_text_field', $default = '' ) {
281
  return self::get_simple_request( array( 'type' => 'get', 'param' => $param, 'default' => $default, 'sanitize' => $sanitize ) );
285
  * Get a GET/POST/REQUEST value and sanitize it
286
  *
287
  * @since 2.0.6
288
+ * @param array $args
289
+ * @return string|array
290
  */
291
  public static function get_simple_request( $args ) {
292
  $defaults = array(
361
  /**
362
  * Sanitize the value, and allow some HTML
363
  * @since 2.0
364
+ * @param string $value
365
+ * @param array $allowed
366
+ * @return string
367
  */
368
  public static function kses( $value, $allowed = array() ) {
369
  $html = array(
classes/models/FrmEntryMeta.php CHANGED
@@ -13,7 +13,7 @@ class FrmEntryMeta {
13
 
14
  if ( FrmAppHelper::is_empty_value( $meta_value ) ) {
15
  // don't save blank fields
16
- return;
17
  }
18
 
19
  $new_values = array(
13
 
14
  if ( FrmAppHelper::is_empty_value( $meta_value ) ) {
15
  // don't save blank fields
16
+ return 0;
17
  }
18
 
19
  $new_values = array(
classes/models/FrmEntryValidate.php CHANGED
@@ -154,14 +154,13 @@ class FrmEntryValidate {
154
  }
155
 
156
  public static function validate_phone_field( &$errors, $field, $value, $args ) {
157
- if ( $field->type != 'phone' ) {
158
- return;
159
- }
160
 
161
- $pattern = self::phone_format( $field );
162
 
163
- if ( ! preg_match( $pattern, $value ) ) {
164
- $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $field, 'invalid' );
 
165
  }
166
  }
167
 
154
  }
155
 
156
  public static function validate_phone_field( &$errors, $field, $value, $args ) {
157
+ if ( $field->type == 'phone' || ( $field->type == 'text' && FrmField::is_option_true_in_object( $field, 'format' ) ) ) {
 
 
158
 
159
+ $pattern = self::phone_format( $field );
160
 
161
+ if ( ! preg_match( $pattern, $value ) ) {
162
+ $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $field, 'invalid' );
163
+ }
164
  }
165
  }
166
 
classes/models/FrmField.php CHANGED
@@ -159,7 +159,7 @@ class FrmField {
159
  $values['required'] = (int) $values['required'];
160
  }
161
 
162
- self::preserve_phone_format_backslashes( $values );
163
 
164
  if ( isset( $values['type'] ) ) {
165
  $values = apply_filters( 'frm_clean_' . $values['type'] . '_field_options_before_update', $values );
@@ -202,7 +202,7 @@ class FrmField {
202
  * @since 2.0.8
203
  * @param $values array - pass by reference
204
  */
205
- private static function preserve_phone_format_backslashes( &$values ) {
206
  if ( isset( $values['field_options']['format'] ) ) {
207
  $values['field_options']['format'] = FrmAppHelper::preserve_backslashes( $values['field_options']['format'] );
208
  }
159
  $values['required'] = (int) $values['required'];
160
  }
161
 
162
+ self::preserve_format_option_backslashes( $values );
163
 
164
  if ( isset( $values['type'] ) ) {
165
  $values = apply_filters( 'frm_clean_' . $values['type'] . '_field_options_before_update', $values );
202
  * @since 2.0.8
203
  * @param $values array - pass by reference
204
  */
205
+ private static function preserve_format_option_backslashes( &$values ) {
206
  if ( isset( $values['field_options']['format'] ) ) {
207
  $values['field_options']['format'] = FrmAppHelper::preserve_backslashes( $values['field_options']['format'] );
208
  }
css/_single_theme.css.php CHANGED
@@ -241,6 +241,13 @@ if ( ! isset( $center_form ) ) {
241
  max-width:62%<?php echo esc_html( $important ) ?>;
242
  }
243
 
 
 
 
 
 
 
 
244
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .frm_opt_container,
245
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm_opt_container,
246
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .g-recaptcha,
@@ -250,25 +257,19 @@ if ( ! isset( $center_form ) ) {
250
  display:inline-block<?php echo esc_html( $important ) ?>;
251
  }
252
 
253
- .<?php echo esc_html( $style_class ) ?> .frm_left_container p.description,
254
- .<?php echo esc_html( $style_class ) ?> .frm_left_container div.description,
255
- .<?php echo esc_html( $style_class ) ?> .frm_left_container div.frm_description,
256
- .<?php echo esc_html( $style_class ) ?> .frm_left_container .frm_error{
257
- margin-left:<?php echo esc_html( $label_margin ) ?>px;
258
- max-width:62%<?php echo esc_html( $important ) ?>;
259
- }
260
-
261
- .<?php echo esc_html( $style_class ) ?> .frm_right_container p.description,
262
- .<?php echo esc_html( $style_class ) ?> .frm_right_container div.description,
263
- .<?php echo esc_html( $style_class ) ?> .frm_right_container div.frm_description,
264
- .<?php echo esc_html( $style_class ) ?> .frm_right_container .frm_error{
265
- margin-right:<?php echo esc_html( $label_margin ) ?>px<?php echo esc_html( $important ) ?>;
266
- max-width:62%<?php echo esc_html( $important ) ?>;
267
- }
268
-
269
- .<?php echo esc_html( $style_class ) ?> .frm_left_container .attachment-thumbnail{
270
- clear:both;
271
- margin-left:<?php echo esc_html( $label_margin ) ?>px<?php echo esc_html( $important ) ?>;
272
  }
273
 
274
  .<?php echo esc_html( $style_class ) ?> .frm_left_container.frm_inline label.frm_primary_label{
@@ -899,26 +900,6 @@ if ( ! $submit_style ) { ?>
899
  /* End Chosen */
900
 
901
  /* Responsive CSS */
902
- <?php if ( $change_margin !== false ) { ?>
903
- @media only screen and (max-width: <?php echo esc_html( $change_margin ) ?>){
904
- .<?php echo esc_html( $style_class ) ?> .frm_left_container p.description,
905
- .<?php echo esc_html( $style_class ) ?> .frm_left_container div.description,
906
- .<?php echo esc_html( $style_class ) ?> .frm_left_container div.frm_description,
907
- .<?php echo esc_html( $style_class ) ?> .frm_left_container .frm_error,
908
- .<?php echo esc_html( $style_class ) ?> .frm_left_container .attachment-thumbnail{
909
- margin-left:33%<?php echo esc_html( $important ) ?>;
910
- padding-left:10px<?php echo esc_html( $important ) ?>;
911
- }
912
- .<?php echo esc_html( $style_class ) ?> .frm_right_container p.description,
913
- .<?php echo esc_html( $style_class ) ?> .frm_right_container div.description,
914
- .<?php echo esc_html( $style_class ) ?> .frm_right_container div.frm_description,
915
- .<?php echo esc_html( $style_class ) ?> .frm_right_container .frm_error{
916
- margin-right:33%<?php echo esc_html( $important ) ?>;
917
- padding-right:10px<?php echo esc_html( $important ) ?>;
918
- }
919
- }
920
- <?php } ?>
921
-
922
  @media only screen and (max-width: 600px){
923
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_left_container input:not([type=radio]):not([type=checkbox]),
924
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_left_container select,
@@ -997,35 +978,29 @@ if ( ! $submit_style ) { ?>
997
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm_opt_container,
998
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm-g-recaptcha,
999
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .g-recaptcha,
1000
- .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .chosen-container,
1001
- .<?php echo esc_html( $style_class ) ?> .frm_left_container p.description,
1002
- .<?php echo esc_html( $style_class ) ?> .frm_left_container div.description,
1003
- .<?php echo esc_html( $style_class ) ?> .frm_left_container div.frm_description,
1004
- .<?php echo esc_html( $style_class ) ?> .frm_left_container .frm_error,
1005
- .<?php echo esc_html( $style_class ) ?> .frm_left_container .attachment-thumbnail,
1006
- .<?php echo esc_html( $style_class ) ?> .frm_right_container p.description,
1007
- .<?php echo esc_html( $style_class ) ?> .frm_right_container div.description,
1008
- .<?php echo esc_html( $style_class ) ?> .frm_right_container div.frm_description,
1009
- .<?php echo esc_html( $style_class ) ?> .frm_right_container .frm_error{
1010
  max-width:100%<?php echo esc_html( $important ) ?>;
1011
  }
1012
- .<?php echo esc_html( $style_class ) ?> .frm_left_container p.description,
1013
- .<?php echo esc_html( $style_class ) ?> .frm_left_container div.description,
1014
- .<?php echo esc_html( $style_class ) ?> .frm_left_container div.frm_description,
1015
- .<?php echo esc_html( $style_class ) ?> .frm_left_container .frm_error,
1016
- .<?php echo esc_html( $style_class ) ?> .frm_left_container .attachment-thumbnail,
1017
- .<?php echo esc_html( $style_class ) ?> .frm_right_container p.description,
1018
- .<?php echo esc_html( $style_class ) ?> .frm_right_container div.description,
1019
- .<?php echo esc_html( $style_class ) ?> .frm_right_container div.frm_description,
1020
- .<?php echo esc_html( $style_class ) ?> .frm_right_container .frm_error,
 
 
 
1021
  .<?php echo esc_html( $style_class ) ?> .frm_left_container label.frm_primary_label,
1022
  .<?php echo esc_html( $style_class ) ?> .frm_right_container label.frm_primary_label{
1023
  width:100%<?php echo esc_html( $important ) ?>;
1024
  max-width:100%<?php echo esc_html( $important ) ?>;
1025
- margin-right:0px<?php echo esc_html( $important ) ?>;
1026
- margin-left:0px<?php echo esc_html( $important ) ?>;
1027
- padding-right:0px<?php echo esc_html( $important ) ?>;
1028
- padding-left:0px<?php echo esc_html( $important ) ?>;
1029
  }
1030
  }
1031
  /* End Responsive CSS*/
241
  max-width:62%<?php echo esc_html( $important ) ?>;
242
  }
243
 
244
+ .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .frm_combo_inputs_container .frm_form_field input,
245
+ .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .frm_combo_inputs_container .frm_form_field select,
246
+ .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm_combo_inputs_container .frm_form_field input,
247
+ .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm_combo_inputs_container .frm_form_field select{
248
+ max-width:100%<?php echo esc_html( $important ) ?>;
249
+ }
250
+
251
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .frm_opt_container,
252
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm_opt_container,
253
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .g-recaptcha,
257
  display:inline-block<?php echo esc_html( $important ) ?>;
258
  }
259
 
260
+ .<?php echo esc_html( $style_class ) ?> .frm_left_container > p.description::before,
261
+ .<?php echo esc_html( $style_class ) ?> .frm_left_container > div.description::before,
262
+ .<?php echo esc_html( $style_class ) ?> .frm_left_container > div.frm_description::before,
263
+ .<?php echo esc_html( $style_class ) ?> .frm_left_container > .frm_error::before,
264
+ .<?php echo esc_html( $style_class ) ?> .frm_right_container > p.description::after,
265
+ .<?php echo esc_html( $style_class ) ?> .frm_right_container > div.description::after,
266
+ .<?php echo esc_html( $style_class ) ?> .frm_right_container > div.frm_description::after,
267
+ .<?php echo esc_html( $style_class ) ?> .frm_right_container > .frm_error::after{
268
+ content:''<?php echo esc_html( $important ) ?>;
269
+ display:inline-block<?php echo esc_html( $important ) ?>;
270
+ width:<?php echo esc_html( $width . $important ) ?>;
271
+ max-width:33%<?php echo esc_html( $important ) ?>;
272
+ margin-right:10px<?php echo esc_html( $important ) ?>;
 
 
 
 
 
 
273
  }
274
 
275
  .<?php echo esc_html( $style_class ) ?> .frm_left_container.frm_inline label.frm_primary_label{
900
  /* End Chosen */
901
 
902
  /* Responsive CSS */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
903
  @media only screen and (max-width: 600px){
904
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_left_container input:not([type=radio]):not([type=checkbox]),
905
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_left_container select,
978
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm_opt_container,
979
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm-g-recaptcha,
980
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .g-recaptcha,
981
+ .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .chosen-container{
 
 
 
 
 
 
 
 
 
982
  max-width:100%<?php echo esc_html( $important ) ?>;
983
  }
984
+
985
+ .<?php echo esc_html( $style_class ) ?> .frm_left_container > p.description::before,
986
+ .<?php echo esc_html( $style_class ) ?> .frm_left_container > div.description::before,
987
+ .<?php echo esc_html( $style_class ) ?> .frm_left_container > div.frm_description::before,
988
+ .<?php echo esc_html( $style_class ) ?> .frm_left_container > .frm_error::before,
989
+ .<?php echo esc_html( $style_class ) ?> .frm_right_container > p.description::after,
990
+ .<?php echo esc_html( $style_class ) ?> .frm_right_container > div.description::after,
991
+ .<?php echo esc_html( $style_class ) ?> .frm_right_container > div.frm_description::after,
992
+ .<?php echo esc_html( $style_class ) ?> .frm_right_container > .frm_error::after{
993
+ display:none<?php echo esc_html( $important ) ?>;
994
+ }
995
+
996
  .<?php echo esc_html( $style_class ) ?> .frm_left_container label.frm_primary_label,
997
  .<?php echo esc_html( $style_class ) ?> .frm_right_container label.frm_primary_label{
998
  width:100%<?php echo esc_html( $important ) ?>;
999
  max-width:100%<?php echo esc_html( $important ) ?>;
1000
+ margin-right:0<?php echo esc_html( $important ) ?>;
1001
+ margin-left:0<?php echo esc_html( $important ) ?>;
1002
+ padding-right:0<?php echo esc_html( $important ) ?>;
1003
+ padding-left:0<?php echo esc_html( $important ) ?>;
1004
  }
1005
  }
1006
  /* End Responsive CSS*/
css/custom_theme.css.php CHANGED
@@ -89,7 +89,7 @@ legend.frm_hidden{
89
  }
90
 
91
  .with_frm_style .frm_section_heading.frm_hide_section{
92
- margin-top:0px !important;
93
  }
94
 
95
  .with_frm_style .frm_hidden_container label.frm_primary_label,
@@ -641,6 +641,7 @@ table.frmcal-calendar .frmcal-today .frmcal_date{
641
  .frm_form_field.frm_left_container .frm-g-recaptcha,
642
  .frm_form_field.frm_left_container .g-recaptcha,
643
  .frm_form_field.frm_left_container .chosen-container,
 
644
  .frm_form_field.frm_right_container input:not([type=radio]):not([type=checkbox]),
645
  .frm_form_field.frm_right_container:not(.frm_dynamic_select_container) select,
646
  .frm_form_field.frm_right_container textarea,
@@ -649,13 +650,24 @@ table.frmcal-calendar .frmcal-today .frmcal_date{
649
  .frm_form_field.frm_right_container .frm_dropzone,
650
  .frm_form_field.frm_right_container .frm-g-recaptcha,
651
  .frm_form_field.frm_right_container .g-recaptcha,
652
- .frm_form_field.frm_right_container .chosen-container{
 
653
  max-width:62%;
654
  }
655
 
 
 
 
 
 
 
 
656
  .frm_form_field.frm_left_container .frm_opt_container,
657
  .frm_form_field.frm_right_container .frm_opt_container,
658
  .frm_form_field.frm_inline_container .frm_opt_container,
 
 
 
659
  .frm_form_field.frm_left_container .wp-editor-wrap,
660
  .frm_form_field.frm_right_container .wp-editor-wrap,
661
  .frm_form_field.frm_inline_container .wp-editor-wrap,
@@ -671,14 +683,6 @@ table.frmcal-calendar .frmcal-today .frmcal_date{
671
  display:inline-block;
672
  }
673
 
674
- .frm_left_container p.description,
675
- .frm_left_container div.description,
676
- .frm_left_container div.frm_description,
677
- .frm_left_container .frm_error{
678
- margin-left:33%;
679
- max-width:62%;
680
- }
681
-
682
  .frm_form_field.frm_left_half.frm_left_container .frm_primary_label,
683
  .frm_form_field.frm_right_half.frm_left_container .frm_primary_label,
684
  .frm_form_field.frm_left_half.frm_right_container .frm_primary_label,
@@ -1245,7 +1249,7 @@ html[xmlns] .frm_clearfix{
1245
  }
1246
 
1247
  .with_frm_style .chosen-container-single .chosen-single div b{
1248
- background:url('<?php echo FrmAppHelper::relative_plugin_url() ?>/pro/images/chosen-sprite.png') no-repeat 0px 2px;
1249
  display:block;
1250
  width:100%;
1251
  height:100%;
89
  }
90
 
91
  .with_frm_style .frm_section_heading.frm_hide_section{
92
+ margin-top:0 !important;
93
  }
94
 
95
  .with_frm_style .frm_hidden_container label.frm_primary_label,
641
  .frm_form_field.frm_left_container .frm-g-recaptcha,
642
  .frm_form_field.frm_left_container .g-recaptcha,
643
  .frm_form_field.frm_left_container .chosen-container,
644
+ .frm_form_field.frm_left_container .frm_combo_inputs_container,
645
  .frm_form_field.frm_right_container input:not([type=radio]):not([type=checkbox]),
646
  .frm_form_field.frm_right_container:not(.frm_dynamic_select_container) select,
647
  .frm_form_field.frm_right_container textarea,
650
  .frm_form_field.frm_right_container .frm_dropzone,
651
  .frm_form_field.frm_right_container .frm-g-recaptcha,
652
  .frm_form_field.frm_right_container .g-recaptcha,
653
+ .frm_form_field.frm_right_container .chosen-container,
654
+ .frm_form_field.frm_right_container .frm_combo_inputs_container{
655
  max-width:62%;
656
  }
657
 
658
+ .frm_form_field.frm_left_container .frm_combo_inputs_container input,
659
+ .frm_form_field.frm_left_container .frm_combo_inputs_container select,
660
+ .frm_form_field.frm_right_container .frm_combo_inputs_container input,
661
+ .frm_form_field.frm_right_container .frm_combo_inputs_container select{
662
+ max-width:100%;
663
+ }
664
+
665
  .frm_form_field.frm_left_container .frm_opt_container,
666
  .frm_form_field.frm_right_container .frm_opt_container,
667
  .frm_form_field.frm_inline_container .frm_opt_container,
668
+ .frm_form_field.frm_left_container .frm_combo_inputs_container,
669
+ .frm_form_field.frm_right_container .frm_combo_inputs_container,
670
+ .frm_form_field.frm_inline_container .frm_combo_inputs_container,
671
  .frm_form_field.frm_left_container .wp-editor-wrap,
672
  .frm_form_field.frm_right_container .wp-editor-wrap,
673
  .frm_form_field.frm_inline_container .wp-editor-wrap,
683
  display:inline-block;
684
  }
685
 
 
 
 
 
 
 
 
 
686
  .frm_form_field.frm_left_half.frm_left_container .frm_primary_label,
687
  .frm_form_field.frm_right_half.frm_left_container .frm_primary_label,
688
  .frm_form_field.frm_left_half.frm_right_container .frm_primary_label,
1249
  }
1250
 
1251
  .with_frm_style .chosen-container-single .chosen-single div b{
1252
+ background:url('<?php echo FrmAppHelper::relative_plugin_url() ?>/pro/images/chosen-sprite.png') no-repeat 0 2px;
1253
  display:block;
1254
  width:100%;
1255
  height:100%;
css/frm_admin.css CHANGED
@@ -671,8 +671,17 @@ label input[type="checkbox"], label input[type="radio"] {vertical-align:inherit;
671
  }
672
  #postbox-container-1 #taxonomy-linkcategory #frm-html-tags{display:none;max-height:none;padding-right:0;}
673
  #postbox-container-1 .frm_field_list #frm-insert-fields .button{
674
- text-align:center;width:46%;float:left;padding-left:0;padding-right:0;font-size:11px !important; margin-bottom:6px;
675
- border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;
 
 
 
 
 
 
 
 
 
676
  }
677
  .frm_field_list #frm-insert-fields .button a{
678
  display:block;
671
  }
672
  #postbox-container-1 #taxonomy-linkcategory #frm-html-tags{display:none;max-height:none;padding-right:0;}
673
  #postbox-container-1 .frm_field_list #frm-insert-fields .button{
674
+ text-align:center;
675
+ width:46%;
676
+ float:left;
677
+ padding-left:0;
678
+ padding-right:0;
679
+ font-size:11px !important;
680
+ margin-bottom:6px;
681
+ border-radius:5px;
682
+ -moz-border-radius:5px;
683
+ -webkit-border-radius:5px;
684
+ position:relative;
685
  }
686
  .frm_field_list #frm-insert-fields .button a{
687
  display:block;
css/frm_grids.css CHANGED
@@ -159,32 +159,6 @@
159
  width:auto;
160
  }
161
 
162
-
163
-
164
- .with_frm_style .frm_form_field.frm_first_half.frm_right_container div.frm_description,
165
- .with_frm_style .frm_form_field.frm_first_half.frm_right_container .frm_error,
166
- .with_frm_style .frm_form_field.frm_first_half .frm_right_container div.frm_description,
167
- .with_frm_style .frm_form_field.frm_first_half .frm_right_container .frm_error,
168
- .with_frm_style .frm_form_field.frm_last_half.frm_right_container div.frm_description,
169
- .with_frm_style .frm_form_field.frm_last_half.frm_right_container .frm_error,
170
- .with_frm_style .frm_form_field.frm_half.frm_right_container div.frm_description,
171
- .with_frm_style .frm_form_field.frm_half.frm_right_container .frm_error{
172
- margin-right:33%;
173
- padding-right:12px;
174
- }
175
-
176
- .with_frm_style .frm_form_field.frm_first_half.frm_left_container div.frm_description,
177
- .with_frm_style .frm_form_field.frm_first_half.frm_left_container .frm_error,
178
- .with_frm_style .frm_form_field.frm_first_half .frm_left_container div.frm_description,
179
- .with_frm_style .frm_form_field.frm_first_half .frm_left_container .frm_error,
180
- .with_frm_style .frm_form_field.frm_last_half.frm_left_container div.frm_description,
181
- .with_frm_style .frm_form_field.frm_last_half.frm_left_container .frm_error,
182
- .with_frm_style .frm_form_field.frm_half.frm_left_container div.frm_description,
183
- .with_frm_style .frm_form_field.frm_half.frm_left_container .frm_error{
184
- margin-left:33%;
185
- padding-left:12px;
186
- }
187
-
188
  .frm_full,
189
  .frm_full .wp-editor-wrap,
190
  .frm_full input:not([type='checkbox']):not([type='radio']):not([type='button']),
159
  width:auto;
160
  }
161
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  .frm_full,
163
  .frm_full .wp-editor-wrap,
164
  .frm_full input:not([type='checkbox']):not([type='radio']):not([type='button']),
formidable.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Formidable
4
  Description: Quickly and easily create drag-and-drop forms
5
- Version: 2.02.05
6
  Plugin URI: http://formidablepro.com/
7
  Author URI: http://strategy11.com
8
  Author: Strategy11
2
  /*
3
  Plugin Name: Formidable
4
  Description: Quickly and easily create drag-and-drop forms
5
+ Version: 2.02.06
6
  Plugin URI: http://formidablepro.com/
7
  Author URI: http://strategy11.com
8
  Author: Strategy11
js/formidable.js CHANGED
@@ -376,7 +376,7 @@ function frmFrontFormJS(){
376
  var field_id = nameParts[0];
377
  var isRepeating = false;
378
 
379
- if ( nameParts.length === 1 || nameParts[1] == '[form' || nameParts[1] == '[id' ) {
380
  return field_id;
381
  }
382
 
@@ -452,12 +452,12 @@ function frmFrontFormJS(){
452
  return;
453
  }
454
 
455
- var childFieldDivs = getAllFieldDivs( depFieldArgs, triggerFieldRepeatArgs );
456
 
457
- var childFieldNum = childFieldDivs.length;
458
  for ( var i = 0; i<childFieldNum; i++ ) {
459
- depFieldArgs.containerId = childFieldDivs[i];
460
- addRepeatRow( depFieldArgs, childFieldDivs[i] );
461
  hideOrShowSingleField( depFieldArgs );
462
  }
463
  }
@@ -474,7 +474,7 @@ function frmFrontFormJS(){
474
  * @param {string} depFieldArgs.inEmbedForm
475
  * @returns {Array}
476
  */
477
- function getAllFieldDivs( depFieldArgs, triggerFieldArgs ) {
478
  var childFieldDivs = [];
479
 
480
  if ( depFieldArgs.isRepeating ) {
@@ -485,11 +485,7 @@ function frmFrontFormJS(){
485
  childFieldDivs.push( container );
486
  } else {
487
  // If trigger field is not repeating/embedded, get all repeating/embedded field divs
488
- if ( depFieldArgs.inEmbedForm !== '0' ) {
489
- childFieldDivs = getEmbeddedFieldDivs( depFieldArgs );
490
- } else {
491
- childFieldDivs = getAllRepeatingFieldDivs(depFieldArgs);
492
- }
493
  }
494
  } else {
495
  childFieldDivs.push( 'frm_field_' + depFieldArgs.fieldId + '_container' );
@@ -499,45 +495,39 @@ function frmFrontFormJS(){
499
  }
500
 
501
  /**
502
- * Get the field div for an embedded field
503
  *
 
504
  * @param {Object} depFieldArgs
505
  * @param {string} depFieldArgs.fieldId
506
- * @returns {Array}
507
- */
508
- function getEmbeddedFieldDivs( depFieldArgs ) {
509
  var containerFieldId = getContainerFieldId( depFieldArgs );
510
- var fieldDiv = 'frm_field_' + depFieldArgs.fieldId + '-' + containerFieldId + '-';
511
 
512
- var childFieldDivs = [ fieldDiv + '0_container' ];
513
 
514
- return childFieldDivs;
 
 
 
 
515
 
 
516
  }
517
 
518
  /**
519
- * Get all instances of a repeating field
520
  *
521
- * @since 2.01.0
522
- * @param {Object} depFieldArgs
523
- * @param {string} depFieldArgs.fieldId
524
  */
525
- function getAllRepeatingFieldDivs( depFieldArgs ) {
526
  var childFieldDivs = [];
527
- var containerFieldId = getContainerFieldId( depFieldArgs );
528
-
529
- // TODO: what if section is inside embedded form?
530
-
531
- // Check if we're on the current page
532
- var sectionOnPage = document.getElementById( 'frm_field_' + containerFieldId + '_container' );
533
- if ( sectionOnPage !== null ) {
534
- // On the current page
535
- var childFields = document.querySelectorAll( '.frm_field_' + depFieldArgs.fieldId + '_container' );
536
- for ( var i = 0, l=childFields.length; i<l; i++ ) {
537
- childFieldDivs.push( childFields[i].id );
538
- }
539
- } else {
540
- childFieldDivs = getRepeatingFieldDivsAcrossPage( depFieldArgs );
541
  }
542
 
543
  return childFieldDivs;
@@ -548,32 +538,23 @@ function frmFrontFormJS(){
548
  *
549
  * @param {Object} depFieldArgs
550
  * @param {string} depFieldArgs.fieldId
551
- * @param {string} depFieldArgs.inSectionKey
552
  * @returns {Array}
553
- * TODO: Maybe improve this by inserting hidden fields for each field in a repeating section, even if section is on pg 2
554
  */
555
- function getRepeatingFieldDivsAcrossPage( depFieldArgs ) {
556
  var childFieldDivs = [];
557
  var containerFieldId = getContainerFieldId( depFieldArgs );
558
  var fieldDiv = 'frm_field_' + depFieldArgs.fieldId + '-' + containerFieldId + '-';
559
 
560
- var allRows = document.querySelectorAll( '[id^="field_' + depFieldArgs.inSectionKey + '-rowid-"]' );
561
-
562
- // If no rows have been added to the repeating section yet, assume just one row
563
- if ( allRows.length < 1 ) {
564
- childFieldDivs.push( fieldDiv + '0_container' );
565
- return childFieldDivs;
566
- }
567
 
568
- var currentIdParts = [];
569
- for ( var i = 0, l = allRows.length; i<l; i++ ) {
570
- currentIdParts = allRows[i].id.split( '-' );
571
-
572
- if ( currentIdParts.length != 3 ) {
573
- continue;
574
- }
575
 
576
- childFieldDivs.push(fieldDiv + currentIdParts[2] + '_container');
 
577
  }
578
 
579
  return childFieldDivs;
@@ -1108,7 +1089,8 @@ function frmFrontFormJS(){
1108
  var name = '';
1109
  if ( depFieldArgs.isRepeating ) {
1110
  //item_meta[section-id][row-id][field-id]
1111
- name = 'item_meta[' + depFieldArgs.inSection +'][' + depFieldArgs.repeatRow + '][' + depFieldArgs.fieldId + ']';
 
1112
  } else {
1113
  // item_meta[field-id]
1114
  name = 'item_meta[' + depFieldArgs.fieldId + ']';
@@ -3418,93 +3400,25 @@ function frmFrontFormJS(){
3418
  chart.draw(data, graphData.options);
3419
  }
3420
 
3421
- function getGraphType(field){
3422
- var type = 'string';
3423
- if ( field.type == 'number' ){
3424
- type = 'number';
3425
- } else if ( field.type == 'checkbox' || field.type == 'select' ) {
3426
- var optCount = field.options.length;
3427
- if ( field.type == 'select' && field.options[0] === '' ) {
3428
- if ( field.field_options.post_field == 'post_status' ) {
3429
- optCount = 3;
3430
- } else {
3431
- optCount = optCount - 1;
3432
- }
3433
- }
3434
- if ( optCount == 1 ) {
3435
- type = 'boolean';
3436
- }
3437
- }
3438
- return type;
3439
- }
3440
-
3441
- function compileGraph(opts){
3442
- var data = new google.visualization.DataTable();
3443
- var useSepCol = false;
3444
- var useTooltip = false;
3445
-
3446
- // add the rows
3447
- var rowCount = opts.rows.length;
3448
- if ( rowCount > 0 ) {
3449
- if ( opts.type == 'table' ) {
3450
- useSepCol = true;
3451
- var lastRow = opts.rows[rowCount - 1];
3452
- var count = lastRow[0] + 1;
3453
- data.addRows(count);
3454
-
3455
- for ( var r = 0, len = rowCount; r < len; r++ ) {
3456
- data.setCell( opts.rows[r] ); //data.setCell(0, 0, 'Mike');
3457
- }
3458
- }else{
3459
- var firstRow = opts.rows[0];
3460
- if ( typeof firstRow.tooltip != 'undefined' ) {
3461
- useSepCol = true;
3462
- useTooltip = true;
3463
-
3464
- // reset the tooltip key to numeric
3465
- for ( var row = 0, rc = rowCount; row < rc; row++ ) {
3466
- var tooltip = opts.rows[row].tooltip;
3467
- delete opts.rows[row].tooltip;
3468
-
3469
- var rowArray = Object.keys(opts.rows[row]).map( function(k){
3470
- return opts.rows[row][k];
3471
- } );
3472
-
3473
- opts.rows[row] = rowArray;
3474
- opts.rows[row].push(tooltip);
3475
- }
3476
- }
3477
- }
3478
- }
3479
-
3480
- // add the columns
3481
- var colCount = opts.cols.length;
3482
- if ( useSepCol ) {
3483
- if ( colCount > 0 ) {
3484
- for ( var i = 0, l = colCount; i < l; i++ ) {
3485
- var col = opts.cols[i];
3486
- data.addColumn(col.type, col.name);
3487
- }
3488
- }
3489
- if ( useTooltip ) {
3490
- data.addColumn({type:'string',role:'tooltip'});
3491
- data.addRows(opts.rows);
3492
  }
3493
- } else {
3494
- var graphData = [];
3495
- graphData[0] = [];
3496
- for ( var c = 0, cur = colCount; c < cur; c++ ) {
3497
- graphData[0].push(opts.cols[c].name);
3498
- }
3499
- graphData = graphData.concat(opts.rows);
3500
- data = google.visualization.arrayToDataTable(graphData);
3501
- }
3502
-
3503
- var type = (opts.type.charAt(0).toUpperCase() + opts.type.slice(1)) + 'Chart';
3504
- var chart = new google.visualization[type](document.getElementById('chart_'+ opts.graph_id));
3505
-
3506
- chart.draw(data, opts.options);
3507
- }
3508
 
3509
  /* Repeating Fields */
3510
  function removeRow(){
376
  var field_id = nameParts[0];
377
  var isRepeating = false;
378
 
379
+ if ( nameParts.length === 1 || nameParts[1] == '[form' || nameParts[1] == '[row_ids' ) {
380
  return field_id;
381
  }
382
 
452
  return;
453
  }
454
 
455
+ var childFieldDivIds = getAllFieldDivIds( depFieldArgs, triggerFieldRepeatArgs );
456
 
457
+ var childFieldNum = childFieldDivIds.length;
458
  for ( var i = 0; i<childFieldNum; i++ ) {
459
+ depFieldArgs.containerId = childFieldDivIds[i];
460
+ addRepeatRow( depFieldArgs, childFieldDivIds[i] );
461
  hideOrShowSingleField( depFieldArgs );
462
  }
463
  }
474
  * @param {string} depFieldArgs.inEmbedForm
475
  * @returns {Array}
476
  */
477
+ function getAllFieldDivIds( depFieldArgs, triggerFieldArgs ) {
478
  var childFieldDivs = [];
479
 
480
  if ( depFieldArgs.isRepeating ) {
485
  childFieldDivs.push( container );
486
  } else {
487
  // If trigger field is not repeating/embedded, get all repeating/embedded field divs
488
+ childFieldDivs = getAllRepeatingFieldDivIds(depFieldArgs);
 
 
 
 
489
  }
490
  } else {
491
  childFieldDivs.push( 'frm_field_' + depFieldArgs.fieldId + '_container' );
495
  }
496
 
497
  /**
498
+ * Get all instances of a repeating field
499
  *
500
+ * @since 2.01.0
501
  * @param {Object} depFieldArgs
502
  * @param {string} depFieldArgs.fieldId
503
+ */
504
+ function getAllRepeatingFieldDivIds( depFieldArgs ) {
505
+ var childFieldDivs = [];
506
  var containerFieldId = getContainerFieldId( depFieldArgs );
 
507
 
508
+ // TODO: what if section is inside embedded form?
509
 
510
+ if ( isFieldDivOnPage( 'frm_field_' + containerFieldId + '_container' ) ) {
511
+ childFieldDivs = getRepeatingFieldDivIdsOnCurrentPage( depFieldArgs.fieldId );
512
+ } else {
513
+ childFieldDivs = getRepeatingFieldDivIdsAcrossPage( depFieldArgs );
514
+ }
515
 
516
+ return childFieldDivs;
517
  }
518
 
519
  /**
520
+ * Get all repeating field divs on the current page
521
  *
522
+ * @since 2.02.06
523
+ * @param string fieldId
524
+ * @returns {Array}
525
  */
526
+ function getRepeatingFieldDivIdsOnCurrentPage( fieldId ) {
527
  var childFieldDivs = [];
528
+ var childFields = document.querySelectorAll( '.frm_field_' + fieldId + '_container' );
529
+ for ( var i = 0, l=childFields.length; i<l; i++ ) {
530
+ childFieldDivs.push( childFields[i].id );
 
 
 
 
 
 
 
 
 
 
 
531
  }
532
 
533
  return childFieldDivs;
538
  *
539
  * @param {Object} depFieldArgs
540
  * @param {string} depFieldArgs.fieldId
 
541
  * @returns {Array}
 
542
  */
543
+ function getRepeatingFieldDivIdsAcrossPage( depFieldArgs ) {
544
  var childFieldDivs = [];
545
  var containerFieldId = getContainerFieldId( depFieldArgs );
546
  var fieldDiv = 'frm_field_' + depFieldArgs.fieldId + '-' + containerFieldId + '-';
547
 
548
+ var allRows = document.querySelectorAll( '[name="item_meta[' + containerFieldId + '][row_ids][]"]' );
 
 
 
 
 
 
549
 
550
+ for ( var i = 0, l = allRows.length; i<l; i++ ) {
551
+ if ( allRows[i].value !== '' ) {
552
+ childFieldDivs.push(fieldDiv + allRows[i].value + '_container');
553
+ }
554
+ }
 
 
555
 
556
+ if ( childFieldDivs.length < 1 ) {
557
+ childFieldDivs.push( fieldDiv + '0_container' );
558
  }
559
 
560
  return childFieldDivs;
1089
  var name = '';
1090
  if ( depFieldArgs.isRepeating ) {
1091
  //item_meta[section-id][row-id][field-id]
1092
+ var containerFieldId = getContainerFieldId( depFieldArgs );
1093
+ name = 'item_meta[' + containerFieldId +'][' + depFieldArgs.repeatRow + '][' + depFieldArgs.fieldId + ']';
1094
  } else {
1095
  // item_meta[field-id]
1096
  name = 'item_meta[' + depFieldArgs.fieldId + ']';
3400
  chart.draw(data, graphData.options);
3401
  }
3402
 
3403
+ function getGraphType(field){
3404
+ var type = 'string';
3405
+ if ( field.type == 'number' ){
3406
+ type = 'number';
3407
+ } else if ( field.type == 'checkbox' || field.type == 'select' ) {
3408
+ var optCount = field.options.length;
3409
+ if ( field.type == 'select' && field.options[0] === '' ) {
3410
+ if ( field.field_options.post_field == 'post_status' ) {
3411
+ optCount = 3;
3412
+ } else {
3413
+ optCount = optCount - 1;
3414
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3415
  }
3416
+ if ( optCount == 1 ) {
3417
+ type = 'boolean';
3418
+ }
3419
+ }
3420
+ return type;
3421
+ }
 
 
 
 
 
 
 
 
 
3422
 
3423
  /* Repeating Fields */
3424
  function removeRow(){
js/formidable.min.js CHANGED
@@ -10,82 +10,81 @@ function frmFrontFormJS(){function l(a){var b=jQuery(this),c=b.attr("type");"sub
10
  (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(""))}function F(a){var b=q(this,!1);if(b&&"undefined"!==typeof b&&(!a.frmTriggered||
11
  a.frmTriggered!=b)&&(ea(b,jQuery(this)),a="undefined"!==typeof a.originalEvent||-1<a.currentTarget.className.indexOf("frm_chzn")?"value changed":"other",fa(b,jQuery(this),a),L(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=ga(this,b));if(1>b.length)if("email"==this.type)var c=jQuery(this).closest("form").find("input[type=email]"),b=ha(this,b,c);else"number"==
12
  this.type?b=ia(this,b):null!==this.pattern&&(b=ja(this,b));a.removeClass("frm_blank_field");a.find(".frm_error").remove();if(0<Object.keys(b).length)for(var d in b)M(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"),""!==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],e=!1;if(1===c.length||"[form"==c[1]||
13
- "[id"==c[1])return d;if(jQuery('input[name="item_meta['+d+'][form]"]').length){if(2===c.length&&"[0"==c[1])return 0;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 ea(a,b){if(!("undefined"===typeof __FRMRULES||"undefined"===typeof __FRMRULES[a]||1>__FRMRULES[a].dependents.length||null===b||"undefined"===typeof b))for(var c=__FRMRULES[a],d=G(b[0].name),e=0,
14
- f=c.dependents.length;e<f;e++)H(c.dependents[e],d)}function H(a,b){var c=N(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("0"!==c.inEmbedForm)d=O(c),d=["frm_field_"+c.fieldId+"-"+d+"-0_container"];else if(d=[],e=O(c),null!==document.getElementById("frm_field_"+e+"_container"))for(var e=document.querySelectorAll(".frm_field_"+c.fieldId+"_container"),
15
- f=0,h=e.length;f<h;f++)d.push(e[f].id);else if(d=[],e=O(c),e="frm_field_"+c.fieldId+"-"+e+"-",f=document.querySelectorAll('[id^="field_'+c.inSectionKey+'-rowid-"]'),1>f.length)d.push(e+"0_container");else for(var g=0,k=f.length;g<k;g++)h=f[g].id.split("-"),3==h.length&&d.push(e+h[2]+"_container");else d.push("frm_field_"+c.fieldId+"_container");e=d.length;for(f=0;f<e;f++)c.containerId=d[f],ka(c,d[f]),la(c)}}function O(a){var b="";"0"!==a.inEmbedForm?b=a.inEmbedForm:"0"!==a.inSection&&(b=a.inSection);
16
- return b}function ka(a,b){if(a.isRepeating){var c=b.replace("_container","").split("-");a.repeatRow=c[2]}else a.repeatRow=""}function la(a){for(var b=[],c=a.conditions.length,d=0;d<c;d++)b.push(Qa(a.conditions[d],a));c=C="any"==a.anyAll?-1<b.indexOf(!0)?a.showHide:ma(a.showHide):-1<b.indexOf(!1)?ma(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,
17
- repeatRow:a.repeatRow,dataLogic:{actualValue:a.dataLogic.actualValue,fieldId:a.dataLogic.fieldId},children:"",inputType:a.inputType},"data"==a.inputType?Ra(a,b):b&&Sa(a)):!1!==B(a.containerId,a.formId)&&(I(a.containerId,a.formId),b?(b=na(a.containerId),oa(b,"divider"==a.fieldType||"form"==a.fieldType,a.formId),jQuery("#"+a.containerId).show()):(b=pa(a),oa(b,"divider"==a.fieldType||"form"==a.fieldType,a.formId))):P(a,b)}function N(a){return"undefined"===typeof __FRMRULES||"undefined"===typeof __FRMRULES[a]?
18
- !1:__FRMRULES[a]}function Qa(a,b){var c=N(a.fieldId),d=qa(c,b);"data"==b.fieldType&&"data"==c.fieldType?(c=""===a.value?""===d||1==d.length&&""===d[0]?!1:!0:Q(a.operator,a.value,d),b.dataLogic=a,b.dataLogic.actualValue=d,d=c):d=Q(a.operator,a.value,d);return d}function qa(a,b){var c;if("radio"==a.inputType||"checkbox"==a.inputType)c=ra(a,b),c=document.querySelectorAll('input[name^="'+c+'"]'),c="checkbox"==a.inputType?R(c):sa(c);else if(c="",!0===a.isMultiSelect){c=ra(a,b);var d=document.querySelectorAll('[name^="'+
19
- c+'"]');1==d.length&&"hidden"!=d[0].type?(c=jQuery('[name^="'+c+'"]').val(),null===c&&(c="")):c=R(d)}else d="field_"+a.fieldKey,a.isRepeating&&(d+="-"+b.repeatRow),d=document.getElementById(d),null!==d&&(c=d.value);"undefined"===typeof c?c="":"string"===typeof c&&(c=c.trim());return c}function ra(a,b){return a.isRepeating?"item_meta["+("0"!==b.inEmbedForm?b.inEmbedForm:b.inSection)+"]["+b.repeatRow+"]["+a.fieldId+"]":"item_meta["+a.fieldId+"]"}function R(a){for(var b=[],c=0,d=a.length;c<d;c++)("hidden"==
20
- a[c].type||a[c].checked)&&b.push(a[c].value);0===b.length&&(b="");return b}function Q(a,b,c){b=Ta(b);c=Ua(b,c);return"string"===typeof b&&"-1"!=b.indexOf("&quot;")&&Q(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;a=S(a);b=ta(a,b);return-1!=b.indexOf(a)},"not LIKE":function(a,b){if(!b)return!0;a=S(a);b=ta(a,b);return-1==b.indexOf(a)}}[a](b,c)}function Ta(a){-1!==
21
- String(a).search(/^\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*$/)?a=parseFloat(a):"string"===typeof a&&(a=a.trim());return a}function Ua(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 ta(a,b){b=S(b);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 S(a){"string"===typeof a?
22
- a=a.toLowerCase():"number"===typeof a&&(a=a.toString());return a}function ma(a){return"show"==a?"hide":"show"}function na(a){return document.getElementById(a).querySelectorAll('select[name^="item_meta"], textarea[name^="item_meta"], input[name^="item_meta"]')}function pa(a){if("divider"==a.fieldType){var b=[];"divider"==a.fieldType&&(b=document.querySelectorAll('[data-sectionid="'+a.fieldId+'"]'));a=b}else a="form"==a.fieldType?document.querySelectorAll('[id^="field_'+a.fieldKey+'-"]'):document.querySelectorAll('[name^="'+
23
- (a.isRepeating?"item_meta["+a.inSection+"]["+a.repeatRow+"]["+a.fieldId+"]":"item_meta["+a.fieldId+"]")+'"]');return a}function oa(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&&T(a[f],c))){d=a[f];var h=jQuery(d),g=h.data("frmval");if("undefined"!==typeof g){if("checkbox"==d.type||"radio"==d.type)for(var k=document.getElementsByName(d.name),m=0,l=k.length;m<l;m++)if("hidden"==k[m].type)jQuery.isArray(g)&&
24
- null!==g[m]?k[m].value=g[m]:k[m].value=g;else{if(k[m].value==g||jQuery.isArray(g)&&-1<g.indexOf(k[m].value))if(k[m].checked=!0,"radio"==k[m].type)break}else if(-1<d.name.indexOf("[]"))if(k=document.getElementsByName(d.name),jQuery.isArray(g))for(m=0,l=g.length;m<l;m++)m in k&&(k[m].value=g[m]);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&&
25
- U(d);u(h)}d=a[f];h=q(d,!1);h=V(h);!1!==h&&"lookup"!=h.fieldType&&(h.parentVals=W(h),ua(h,d));d=a[f];if(h="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(3<=g.split("][").length)for(g=k.split("-"),k="",m=0;m<g.length-1;m++)k=""===k?g[m]:k+"-"+g[m];g=k;k=null;3<=d.name.split("][").length&&(k="hidden"!=d.type?jQuery(d).closest(".frm_form_field"):jQuery(d));d=k;void 0!==h.calc[g]&&X(h,g,[],d)}d=a[f]}}
26
- function T(a,b){var c=q(a,!0);return B("frm_field_"+c+"_container",b)}function P(a,b){if(!B(a.containerId,a.formId)){if(b){jQuery("#"+a.containerId).hide();var c=na(a.containerId)}else c=pa(a);Y(c);va(a.containerId,a.formId)}}function Y(a){if(!(1>a.length)){for(var b,c=!0,d=0,e=a.length;d<e;d++)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=0,null!==document.getElementById(a[d].id+
27
- "_chosen")&&jQuery(a[d]).trigger("chosen:updated")):a[d].value="",b=a[d];!0===c&&u(jQuery(b))}}function B(a,b){var c=!1;-1<D(b).indexOf(a)&&(c=!0);return c}function va(a,b){var c=D(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 D(a){var b=[];a=document.getElementById("frm_hide_fields_"+a);return null===a?b:b=(b=a.value)?JSON.parse(b):[]}function I(a,b){var c=D(b),d=c.indexOf(a);-1<d&&(c.splice(d,1),c=JSON.stringify(c),
28
- document.getElementById("frm_hide_fields_"+b).value=c)}function fa(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=G(b[0].name);for(var d=0,e=a.dependents.length;d<e;d++)Z(a.dependents[d],b,c)}}function Z(a,b,c){a=V(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+
29
- "_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++){ka(a,b[c].id);var e=a,f=b[c];e.parentVals=W(e);if("select"==e.inputType)Va(e,f);else if("radio"==e.inputType||"checkbox"==e.inputType)if(!1===e.parentVals){var h=f.getElementsByTagName("input");wa(e,f);Y(h)}else Wa(e,f)}}else if("value changed"===
30
- 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=G(b[c].name),e.repeatRow=""!==f.repeatRow?f.repeatRow:"",e=a,f=b[c],e.parentVals=W(e),ua(e,f)}function V(a){return"undefined"===typeof __FRMLOOKUP||"undefined"===typeof __FRMLOOKUP[a]?!1:__FRMLOOKUP[a]}function W(a){for(var b=[],c=a.parents,d,e=0,f=c.length;e<f;e++){d=V(c[e]);d=qa(d,a);if(""===d||!1===d){b=!1;
31
- break}b[e]=d}return b}function sa(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 Va(a,b){var c=b.getElementsByTagName("SELECT")[0];if(null!==c){var d=c.value;!1===a.parentVals?(c.options.length=1,""!==d&&(c.value="",U(c),u(jQuery(c),a.fieldKey))):(Xa(c),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},
32
- success:function(b){var d=a.fieldKey,h=c.value;b=JSON.parse(b);for(var g=c.options.length;0<g;g--)c.remove(g);for(var k=b.length,g=0;g<k;g++)c.options[g+1]=new Option(b[g],b[g],!1,!1);c.value=h;""===c.value&&(b=c.getAttribute("data-frmval"),null!==b&&(c.value=b));U(c);c.value!=h&&u(jQuery(c),d)}}))}}function U(a){-1<a.className.indexOf("frm_chzn")&&jQuery().chosen&&jQuery(a).trigger("chosen:updated")}function Xa(a){a.value||(a.options.length=1,a.options[1]=new Option(frm_js.loading,"",!1,!1))}function Wa(a,
33
- b){var c=b.getElementsByClassName("frm_opt_container")[0],d=c.getElementsByTagName("input");Ya(b,c);var e="",e="radio"==a.inputType?sa(d):R(d);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,row_index:a.repeatRow,current_value:e,nonce:frm_js.nonce},success:function(e){c.innerHTML=e;e=b.getElementsByClassName("frm-loading-img")[0];null!==e&&void 0!==e&&e.parentNode.removeChild(e);c.style.display=
34
- "block";1==d.length&&""===d[0].value?wa(a,b):!1!==B(b.id,a.formId)&&(e=N(a.fieldId),!1===e||1>e.conditions.length?(I(b.id,a.formId),jQuery("#"+b.id).show()):(e.containerId=b.id,e.repeatRow=a.repeatRow,la(e)));u(jQuery(d[0]),a.fieldKey)}})}function wa(a,b){B(b.id,a.formId)||(jQuery("#"+b.id).hide(),va(b.id,a.formId))}function ua(a,b){if(!T(b,a.formId))if(!1===a.parentVals){var c=b.getAttribute("data-frmval");null===c&&(c="");xa(a,b,c)}else jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_get_lookup_text_value",
35
- parent_fields:a.parents,parent_vals:a.parentVals,field_id:a.fieldId,nonce:frm_js.nonce},success:function(c){b.value!=c&&xa(a.fieldKey,b,c)}})}function xa(a,b,c){b.value=c;u(jQuery(b),a)}function Ra(a,b){if(b){var c=jQuery("#"+a.containerId);ya(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,nonce:frm_js.nonce},success:function(d){if(b){var e=c.find(".frm_opt_container");e.html(d);
36
- var f=e.children("input"),h=f.val();za(e);""===d||""===h?P(a,!0):Aa(a,c,f,!0)}else e="field_"+a.fieldKey,""!==a.repeatRow&&(e+="-"+a.repeatRow),e=document.getElementById(e),e.value=d,B(a.containerId,a.formId)&&I(a.containerId,a.formId),u(jQuery(e))}})}function Sa(a,b){var c=jQuery("#"+a.containerId),d=c.find('select[name^="item_meta"], input[name^="item_meta"]'),e=Ba(d),d=d.data("frmval");ya(c);jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_fields_ajax_data_options",trigger_field_id:a.dataLogic.fieldId,
37
- entry_id:a.dataLogic.actualValue,field_id:a.fieldId,default_value:d,container_id:a.containerId,prev_val:e,nonce:frm_js.nonce},success:function(b){var d=c.find(".frm_opt_container");d.html(b);var g=d.find('select, input[type="checkbox"], input[type="radio"]');za(d);""===b||1>g.length?P(a,!0):(b=Ba(g),Aa(a,c,g,e!==b))}})}function ya(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 Ya(a,b){if(!(-1<a.innerHTML.indexOf("frm-loading-img"))){b.style.display=
38
- "none";var c=document.createElement("span");c.setAttribute("class","frm-loading-img");a.insertBefore(c,b.nextSibling)}}function za(a){a.parent().children(".frm-loading-img").remove();a.show()}function Ba(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 Aa(a,b,c,d){B(a.containerId,a.formId)&&(I(a.containerId,a.formId),b.show());c.hasClass("frm_chzn")&&aa();!0===d&&u(c)}
39
- function L(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"),m=!1,l=g.field_id,n=D(g.form_id);1>n.length||("0"===g.inSection&&"0"===g.inEmbedForm?m=J(l,n):(k=G(k),J(l,n)?m=!0:Ca(l,k,n)?m=!0:"0"!==g.inSection&&"0"!==g.inEmbedForm?m=Ca(g.inSection,k,n):"0"!==g.inSection?m=J(g.inSection,n):"0"!==g.inEmbedForm&&(m=J(g.inEmbedForm,n))));g=m;!1===g&&X(c,d[f],e,b)}}}function J(a,
40
- b){return-1<b.indexOf("frm_field_"+a+"_container")}function Ca(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 X(a,b,c,d){var e=a.calc[b],f=e.calc,h=jQuery(document.getElementById("field_"+b)),g={triggerField:d,inSection:!1,thisFieldCall:'input[id^="field_'+b+'-"]'};1>h.length&&"undefined"!==typeof d&&(g.inSection=!0,g.thisFieldId=Za(a.fieldsWithCalc,b),h=Da(g));if(!(1>h.length)){f=$a(e,f,a,c,g);if("text"!=
41
- e.calc_type){a=e.calc_dec;f.indexOf(").toFixed(")&&(c=f.split(").toFixed("),Ea(c[1])&&(a=c[1],f=f.replace(").toFixed("+a,"")));f=parseFloat(eval(f));if("undefined"===typeof f||isNaN(f))f=0;Ea(a)&&(f=f.toFixed(a))}h.val()!=f&&(h.val(f),u(h,b))}}function $a(a,b,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]]},
42
- 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]+" 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=ab(g,d),"undefined"===typeof d[g.valKey]&&
43
- (d[g.valKey]="");else{g.valKey="num"+g.valKey;d=bb(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=b.replace(new RegExp(k,"g"),d[g.valKey])}return b}function bb(a,b,c){if("undefined"!==typeof c[a.valKey]&&0!==c[a.valKey])return c;c[a.valKey]=0;var d=Fa(a);if(!1===d)return c;d.each(function(){var d=Ga(a.thisField,this);if("date"==a.thisField.type){var f;
44
- f=b.date;var h=0;if(d)if("undefined"===typeof jQuery.datepicker){h="-";-1<f.indexOf("/")&&(h="/");f=f.split(h);var d=d.split(h),g,k;g=h=k="";for(var m=0;m<f.length;m++)if("y"==f[m])g=((new Date).getFullYear()+15).toString().substr(2,2),g=d[m]>g?"19"+d[m]:"20"+d[m];else if("yy"==f[m])g=d[m];else if("m"==f[m]||"mm"==f[m])h=d[m],2>h.length&&(h="0"+h);else if("d"==f[m]||"dd"==f[m])k=d[m],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]=
45
- Math.ceil(f/864E5))}else{f=d;""!==f&&0!==f&&(f=f.trim(),f=parseFloat(f.replace(/,/g,"").match(/-?[\d\.]+$/)));if("undefined"===typeof f||isNaN(f)||""===f)f=0;c[a.valKey]+=f}});return c}function ab(a,b){if("undefined"!==typeof b[a.valKey]&&""!==b[a.valKey])return b;b[a.valKey]="";var c=Fa(a);if(!1===c)return b;c.each(function(){var c=Ga(a.thisField,this),c=c.trim();b[a.valKey]+=c});return b}function Fa(a){var b;if(!1===a.inSection)b=jQuery(a.thisFieldCall);else if(b=Da(a),null===b||"undefined"===typeof b)b=
46
- jQuery(a.thisFieldCall);if(null===b||"undefined"===typeof b||1>b.length)b=!1;return b}function Da(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 Ga(a,b){var c;c=!1;if("hidden"==b.type)""!==ba(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"==
47
- 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=ba(b))):c=jQuery(b).closest(".frm_other_container").find(".frm_other_input").val():"checkbox"!=a.type&&"radio"!=a.type||"hidden"==b.type||(c=ba(b))):c="checkbox"!==b.type&&"radio"!==b.type||!b.checked?jQuery(b).val():b.value;"undefined"===typeof c&&(c="");return c}function ba(a){var b="";a=document.getElementById(a.id+"-otext");null!==a&&""!==
48
- a.value&&(b=a.value);return b}function Ha(a){var b=!1;a=jQuery(a).find(".frm_saving_draft");a.length&&(b=a.val());return b}function Ia(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 ga(a,b){var c=a.getAttribute("data-frmfile");if("hidden"==a.type&&null===c)return b;var d="",e="";if("checkbox"==a.type||"radio"==
49
- 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=cb(c)),e=c;else{e=a.className;if(-1!==e.indexOf("frm_pos_none"))return b;d=jQuery(a).val();if("string"!==typeof d)for(var c=d,d="",f=0;f<c.length;f++)""!==c[f]&&(d=c[f]);e=-1===e.indexOf("frm_other_input")?q(a,!0):q(a,!1)}""===d&&(""===e&&(e=q(a,!0)),
50
- e in b||(b[e]=E(a,"data-reqmsg")));return b}function cb(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 ha(a,b,c){var d=a.value,e=q(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=E(a,"data-invmsg");""!==
51
- 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 ia(a,b){var c=a.value;""!==c&&!1!==isNaN(c/1)&&(c=q(a,!0),c in b||(b[c]=E(a,"data-invmsg")));return b}function ja(a,b){var c=a.value,d=E(a,"pattern");if(""!==d&&""!==c){var e=q(a,!0);e in b||(d=new RegExp("^"+d+"$","i"),!1===d.test(c)&&(b[e]=E(a,"data-invmsg")))}return b}function E(a,b){var c=a.getAttribute(b);null===
52
- c&&(c="");return c}function db(a,b){jQuery(a).find('input[type="submit"], input[type="button"]').attr("disabled","disabled");"undefined"==typeof b&&jQuery(a).find('input[name="frm_action"]').val();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=
53
- b.redirect;else if(""!==b.content){jQuery(a).find(".frm_ajax_loading").removeClass("frm_loading_now");var e=jQuery(a).find('input[name="form_id"]').val();jQuery(a).closest("#frm_form_"+e+"_container").replaceWith(b.content);frmFrontForm.scrollMsg(e);"function"==typeof frmThemeOverride_frmAfterSubmit&&(e=jQuery('input[name="frm_page_order_'+e+'"]').val(),d=jQuery(b.content).find('input[name="form_id"]').val(),frmThemeOverride_frmAfterSubmit(d,e,b.content,a));e=jQuery(a).find('input[name="id"]');e.length&&
54
- jQuery(document.getElementById("frm_edit_"+e.val())).find("a").addClass("frm_ajax_edited").click();jQuery(b.content).find(".frm_message").length&&ca("pageLoad");da()}else if(Object.keys(b.errors).length){jQuery(a).find('input[type="submit"], input[type="button"]').removeAttr("disabled");jQuery(a).find(".frm_ajax_loading").removeClass("frm_loading_now");d=!0;Ja();var f=!1,h;for(e in b.errors)if(h=jQuery(a).find("#frm_field_"+e+"_container"),h.length){if(!h.is(":visible")){var g=h.closest(".frm_toggle_container");
55
- g.length&&(g=g.prev(),g.hasClass("frm_trigger")||(g=g.prev(".frm_trigger")),g.click())}h.is(":visible")&&(M(h,e,b.errors),d=!1,h=jQuery(a).find("#frm_field_"+e+"_container .frm-g-recaptcha, #frm_field_"+e+"_container .g-recaptcha"),h.length&&(f=!0,h=h.data("rid"),jQuery().grecaptcha&&(h?grecaptcha.reset(h):grecaptcha.reset())))}Ka(a);!0!==f&&La(a,!1);d?a.submit():jQuery(a).prepend(b.error_message)}else eb(a),La(a,!0),a.submit()},error:function(){jQuery(a).find('input[type="submit"], input[type="button"]').removeAttr("disabled");
56
- a.submit()}})}function M(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 Ja(){jQuery(".form-field").removeClass("frm_blank_field");jQuery(".form-field .frm_error").replaceWith("");jQuery(".frm_error_style").remove()}function Ka(a){var b=jQuery(a).find(".frm_blank_field:first");b.length&&frmFrontForm.scrollMsg(b,a,!0)}function eb(a){var b=
57
- 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 La(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 fb(){Ma(jQuery(this),"clear")}
58
- function gb(){Ma(jQuery(this),"replace")}function Ma(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 hb(){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",
59
- entry_id:b,form_id:c,nonce:frm_js.nonce},success:function(b){a.replaceWith(b)}});return!1}function ib(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=a.fields.length,f,h=0,g=e;h<g;h++){var k=a.fields[h];f=Na(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=
60
- !0,b.addColumn("string",a.options.delete_link));if(null!==a.entries){var m=a.entries.length;b.addRows(m);for(var l=0,n=0;n<m;n++){var k=0,p=a.entries[n];d&&(b.setCell(l,k,p.id),k++);for(var q=0,r=e;q<r;q++){var t=a.fields[q];f=Na(t);t=p.metas[t.id];"number"!=f||null!==t&&""!==t?"boolean"==f&&(t=null===t||"false"==t||!1===t?!1:!0):t=0;b.setCell(l,k,t);k++}h&&("undefined"!==typeof p.editLink?b.setCell(l,k,'<a href="'+p.editLink+'">'+a.options.edit_link+"</a>"):b.setCell(l,k,""),k++);g&&("undefined"!==
61
- typeof p.deleteLink?b.setCell(l,k,'<a href="'+p.deleteLink+'" class="frm_delete_link" data-frmconfirm="'+a.options.confirm+'">'+a.options.delete_link+"</a>"):b.setCell(l,k,""));l++}}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_"+a.options.form_id))).draw(b,a.graphOpts)}})}function jb(a){google.load("visualization","1.0",{packages:[a["package"]],callback:function(){var b;
62
- 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");(new google.visualization[d](c)).draw(b,a.options)}}})}function Na(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?
63
- 3:c-1);1==c&&(b="boolean")}return b}function kb(){var a="frm_section_"+jQuery(this).data("parent")+"-"+jQuery(this).data("key"),b=jQuery(document.getElementById(a)),c=b.find("input, select, textarea");b.fadeOut("slow",function(){b.remove();c.each(function(){if("file"!=this.type){var a=q(this,!1);L(a,jQuery(this))}});"function"==typeof frmThemeOverride_frmRemoveRow&&frmThemeOverride_frmRemoveRow(a,b)});return!1}function lb(){if(!0===K)return!1;K=!0;var a=jQuery(this).data("parent"),b=0;if(0<jQuery(".frm_repeat_"+
64
- 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 e=c.html,f=jQuery(e).hide().fadeIn("slow");jQuery(".frm_repeat_"+a+":last").after(f);var h=["other"],g,k,m={repeatingSection:a.toString(),repeatRow:b.toString()};jQuery(e).find("input, select, textarea").each(function(){if("file"!=
65
- 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("#"+this.id),h.push(g),H(g,m),Z(g,m,"value changed"),ea(g,k),fa(g,k,"value changed"),L(g,k))}});v(m.repeatRow);Oa();aa();"function"==typeof frmThemeOverride_frmAddRow&&frmThemeOverride_frmAddRow(a,c);K=!1},error:function(){K=!1}});return!1}function mb(){var a=jQuery(this),b=a.data("entryid"),c=a.data("prefix"),d=a.data("pageid"),e=
66
- a.data("formid"),f=a.data("cancel"),h=a.data("fields"),g=a.data("excludefields"),k=jQuery(document.getElementById(c+b)),m=k.html();k.html('<span class="frm-loading-img" id="'+c+b+'"></span><div class="frm_orig_content" style="display:none">'+m+"</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(b){k.children(".frm-loading-img").replaceWith(b);a.removeClass("frm_inplace_edit").addClass("frm_cancel_edit");
67
- a.html(f);ca("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"]',F);da()}});return!1}function nb(){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");
68
- a.html(d);return!1}function ob(){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>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_destroy",entry:c,nonce:frm_js.nonce},success:function(a){"success"==a.replace(/^\s+|\s+$/g,"")?(jQuery(document.getElementById(d+c)).fadeOut("slow"),jQuery(document.getElementById("frm_delete_"+c)).fadeOut("slow")):jQuery(document.getElementById("frm_delete_"+
69
- c)).replaceWith(a)}})}return!1}function da(){"undefined"!==typeof __frmHideFields&&frmFrontForm.hidePreviouslyHiddenFields();jQuery(document).on("focusin",".frm_date",r);if("undefined"!==typeof __frmUniqueTimes)for(var a=__frmUniqueTimes,b=0;b<a.length;b++)jQuery(document.getElementById(a[b].dateID)).change(p);if("undefined"!==typeof __frmMasks)for(a=__frmMasks,b=0;b<a.length;b++)jQuery(a[b].trigger).attr("data-frmmask",a[b].mask);Oa();aa();"undefined"!==typeof __frmDepDynamicFields&&frmFrontForm.checkDependentDynamicFields(__frmDepDynamicFields);
70
- "undefined"!==typeof __frmDepLookupFields&&frmFrontForm.checkDependentLookupFields(__frmDepLookupFields);if("undefined"!==typeof __FRMCALC){(a=__FRMCALC.triggers)&&jQuery(a.join()).trigger({type:"change",selfTriggered:!0});var a=__FRMCALC.calc,b=[],c;for(c in a)if(1>a[c].fields.length){var d=document.getElementById("field_"+c);null===d||T(d,a[c].form_id)||X(__FRMCALC,c,b)}}v()}function aa(){if(jQuery().chosen){var a={allow_single_deselect:!0};"undefined"!==typeof __frmChosen&&(a="{"+__frmChosen+"}");
71
- jQuery(".frm_chzn").chosen(a)}}function Oa(){if(jQuery().rating){var a=jQuery(".star");a.length&&a.rating()}}function ca(a){"undefined"!==typeof __frmHideOrShowFields&&frmFrontForm.hideOrShowFields(__frmHideOrShowFields,a)}function u(a,b){"undefined"===typeof b&&(b="dependent");1<a.length&&(a=a.eq(0));a.trigger({type:"change",selfTriggered:!0,frmTriggered:b})}function G(a){var b={repeatingSection:"",repeatRow:""};"undefined"!==typeof a&&3<=a.split("][").length&&(a=a.split("]["),b.repeatingSection=
72
- a[0].replace("item_meta[",""),b.repeatRow=a[1]);return b}function Pa(a){a.fadeOut("slow",function(){a.remove()})}function pb(){var a=jQuery(this).data("frmconfirm");return confirm(a)}function qb(){var a=jQuery(this).data("frmtoggle");jQuery(a).is(":visible")?jQuery(a).slideUp("fast"):jQuery(a).slideDown("fast");return!1}function Za(a,b){for(var c in a)if(a.hasOwnProperty(c)&&a[c]===b)return c;return null}function Ea(a){return!jQuery.isArray(a)&&0<=a-parseFloat(a)+1}function rb(){Array.prototype.indexOf||
73
- (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 sb(){"function"!==typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")})}function tb(){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;
74
- for(var e=[],f=0;f<d;f++)if(f in c){var h=c[f];a.call(b,h,f,c)&&e.push(h)}return e})}function ub(){Object.keys||(Object.keys=function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b})}var K=!1,C="",x=[];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",n);var a=jQuery(".frm_blank_field");a.length&&a.closest(".frm_toggle_container").prev(".frm_trigger").click();
75
- 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",fb);jQuery(document).on("blur",".frm_toggle_default",gb);jQuery(".frm_toggle_default").blur();jQuery(document.getElementById("frm_resend_email")).click(hb);jQuery(document).on("click",".frm_remove_link",w);
76
- 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"]',F);jQuery(document).on("click",'.frm-show-form input[type="submit"], .frm-show-form input[name="frm_prev_page"], .frm-show-form .frm_save_draft',l);jQuery(document).on("change",'.frm_other_container input[type="checkbox"], .frm_other_container input[type="radio"], .frm_other_container select',
77
- A);jQuery(document).on("click",".frm_remove_form_row",kb);jQuery(document).on("click",".frm_add_form_row",lb);jQuery(document).on("click","a[data-frmconfirm]",pb);jQuery("a[data-frmtoggle]").click(qb);jQuery(".frm_edit_link_container").on("click","a.frm_inplace_edit",mb);jQuery(".frm_edit_link_container").on("click","a.frm_cancel_edit",nb);jQuery(document).on("click",".frm_ajax_delete",ob);jQuery(".frm_month_heading, .frm_year_heading").click(function(){var a=jQuery(this).children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s");
78
- 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())});ca("pageLoad");da();rb();sb();tb();ub()},submitForm:function(a){frmFrontForm.submitFormManual(a,this)},submitFormManual:function(a,b){var c=b.className.trim().split(/\s+/gi);if((!c||-1<c.indexOf("frm_pro_form"))&&
79
- !jQuery("body").hasClass("wp-admin")){a.preventDefault();var d=frmFrontForm.validateFormSubmit(b);0===Object.keys(d).length&&(jQuery(b).find(".frm_ajax_loading").addClass("frm_loading_now"),-1<c.indexOf("frm_ajax_submit")?1>jQuery(b).find('input[type="file"]').length?(C=jQuery(b).find('input[name="frm_action"]').val(),frmFrontForm.checkFormErrors(b,C)):b.submit():b.submit())}},validateFormSubmit:function(a){"undefined"!=typeof tinyMCE&&jQuery(this).find(".wp-editor-wrap").length&&tinyMCE.triggerSave();
80
- x=[];var b=jQuery(a).hasClass("frm_js_validate");b&&(Ha(a)||Ia(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=ga(c[d],b);c=jQuery(a).find("input[type=email]").filter(":visible");d=jQuery(a).find("input,select,textarea");
81
- 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=ia(h,b):"email"==h.type?b=ha(h,b,c):null!==h.pattern&&(b=ja(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"==typeof frmThemeOverride_jsErrors&&(C=jQuery(a).find('input[name="frm_action"]').val(),a=frmThemeOverride_jsErrors(C,
82
- a),Object.keys(a).length))for(var g in a)x[g]=a[g];return x},addAjaxFormErrors:function(a){Ja();for(var b in x){var c=jQuery(a).find("#frm_field_"+b+"_container");c.length?M(c,b,x):delete x[b]}Ka(a)},checkFormErrors:function(a,b){db(a,b)},scrollToID:function(a){a=jQuery(document.getElementById(a));frmFrontForm.scrollMsg(a,!1)},scrollMsg:function(a,b,c){if(a=("undefined"==typeof b?jQuery(document.getElementById("frm_form_"+a+"_container")):"string"==typeof a?jQuery(b).find("#frm_field_"+a+"_container"):
83
- 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},500),!1}},savingDraft:function(a){return Ha(a)},goingToPreviousPage:function(a){return Ia(a)},hideOrShowFields:function(a,b){if("pageLoad"===
84
- b){var c=document.querySelectorAll('[id^="frm_hide_fields_"]');Y(c)}for(var c={repeatingSection:"",repeatRow:""},d=0,e=a.length;d<e;d++)H(a[d],c)},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(D(d));b=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:"",
85
- repeatRow:""},c=0,d=a.length;c<d;c++)H(a[c],b)},checkDependentLookupFields:function(a){for(var b,c={repeatingSection:"",repeatRow:""},d=0,e=a.length;d<e;d++)b=a[d],Z(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=a[b[c]],e=0,f=d.length;e<f;e++)jb(d[e]);else for(d=a[b[c]],e=b[c],f=0;f<d.length;f++)ib(d[f],e);else setTimeout(frmFrontForm.loadGoogle,30)},removeUsedTimes:function(a,
86
- 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");if(a&&""!==a)for(var f in a)c.find('option[value="'+f+'"]').attr("disabled","disabled")}})},escapeHtml:function(a){return a.replace(/&/g,
87
- "&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(l){frmFrontForm.init()});
88
- function frmRecaptcha(){for(var l=jQuery(".frm-g-recaptcha"),n=0,p=l.length;n<p;n++){var r=grecaptcha.render(l[n].id,{sitekey:l[n].getAttribute("data-sitekey"),size:l[n].getAttribute("data-size"),theme:l[n].getAttribute("data-theme")});l[n].setAttribute("data-rid",r)}}
89
  function frmUpdateField(l,n,p,r,v){jQuery(document.getElementById("frm_update_field_"+l+"_"+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:l,field_id:n,value:p,nonce:frm_js.nonce},success:function(){""===r.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById("frm_update_field_"+l+"_"+n+"_"+v)).fadeOut("slow"):jQuery(document.getElementById("frm_update_field_"+l+"_"+n+"_"+v)).replaceWith(r)}})}
90
  function frmEditEntry(l,n,p,r,v,z){console.warn("DEPRECATED: function frmEditEntry in v2.0.13 use frmFrontForm.editEntry");var y=jQuery(document.getElementById("frm_edit_"+l)),w=y.html(),A=jQuery(document.getElementById(n+l)),F=A.html();A.html('<span class="frm-loading-img" id="'+n+l+'"></span><div class="frm_orig_content" style="display:none">'+F+"</div>");jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"html",data:{action:"frm_entries_edit_entry_ajax",post_id:p,entry_id:l,id:r,nonce:frm_js.nonce},
91
  success:function(q){A.children(".frm-loading-img").replaceWith(q);y.replaceWith('<span id="frm_edit_'+l+'"><a onclick="frmCancelEdit('+l+",'"+n+"','"+frmFrontForm.escapeHtml(w)+"',"+p+","+r+",'"+z+'\')" class="'+z+'">'+v+"</a></span>")}})}
10
  (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(""))}function F(a){var b=q(this,!1);if(b&&"undefined"!==typeof b&&(!a.frmTriggered||
11
  a.frmTriggered!=b)&&(ea(b,jQuery(this)),a="undefined"!==typeof a.originalEvent||-1<a.currentTarget.className.indexOf("frm_chzn")?"value changed":"other",fa(b,jQuery(this),a),L(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=ga(this,b));if(1>b.length)if("email"==this.type)var c=jQuery(this).closest("form").find("input[type=email]"),b=ha(this,b,c);else"number"==
12
  this.type?b=ia(this,b):null!==this.pattern&&(b=ja(this,b));a.removeClass("frm_blank_field");a.find(".frm_error").remove();if(0<Object.keys(b).length)for(var d in b)M(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"),""!==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],e=!1;if(1===c.length||"[form"==c[1]||
13
+ "[row_ids"==c[1])return d;if(jQuery('input[name="item_meta['+d+'][form]"]').length){if(2===c.length&&"[0"==c[1])return 0;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 ea(a,b){if(!("undefined"===typeof __FRMRULES||"undefined"===typeof __FRMRULES[a]||1>__FRMRULES[a].dependents.length||null===b||"undefined"===typeof b))for(var c=__FRMRULES[a],d=G(b[0].name),
14
+ e=0,f=c.dependents.length;e<f;e++)H(c.dependents[e],d)}function H(a,b){var c=N(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=O(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=[];for(var f=O(c),e="frm_field_"+
15
+ 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],ka(c,d[f]),la(c)}}function O(a){var b="";"0"!==a.inEmbedForm?b=a.inEmbedForm:"0"!==a.inSection&&(b=a.inSection);return b}function ka(a,b){if(a.isRepeating){var c=b.replace("_container","").split("-");a.repeatRow=
16
+ c[2]}else a.repeatRow=""}function la(a){for(var b=[],c=a.conditions.length,d=0;d<c;d++)b.push(Qa(a.conditions[d],a));c=C="any"==a.anyAll?-1<b.indexOf(!0)?a.showHide:ma(a.showHide):-1<b.indexOf(!1)?ma(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,fieldId:a.dataLogic.fieldId},
17
+ children:"",inputType:a.inputType},"data"==a.inputType?Ra(a,b):b&&Sa(a)):!1!==B(a.containerId,a.formId)&&(I(a.containerId,a.formId),b?(b=na(a.containerId),oa(b,"divider"==a.fieldType||"form"==a.fieldType,a.formId),jQuery("#"+a.containerId).show()):(b=pa(a),oa(b,"divider"==a.fieldType||"form"==a.fieldType,a.formId))):P(a,b)}function N(a){return"undefined"===typeof __FRMRULES||"undefined"===typeof __FRMRULES[a]?!1:__FRMRULES[a]}function Qa(a,b){var c=N(a.fieldId),d=qa(c,b);"data"==b.fieldType&&"data"==
18
+ c.fieldType?(c=""===a.value?""===d||1==d.length&&""===d[0]?!1:!0:Q(a.operator,a.value,d),b.dataLogic=a,b.dataLogic.actualValue=d,d=c):d=Q(a.operator,a.value,d);return d}function qa(a,b){var c;if("radio"==a.inputType||"checkbox"==a.inputType)c=ra(a,b),c=document.querySelectorAll('input[name^="'+c+'"]'),c="checkbox"==a.inputType?R(c):sa(c);else if(c="",!0===a.isMultiSelect){c=ra(a,b);var d=document.querySelectorAll('[name^="'+c+'"]');1==d.length&&"hidden"!=d[0].type?(c=jQuery('[name^="'+c+'"]').val(),
19
+ null===c&&(c="")):c=R(d)}else d="field_"+a.fieldKey,a.isRepeating&&(d+="-"+b.repeatRow),d=document.getElementById(d),null!==d&&(c=d.value);"undefined"===typeof c?c="":"string"===typeof c&&(c=c.trim());return c}function ra(a,b){return a.isRepeating?"item_meta["+("0"!==b.inEmbedForm?b.inEmbedForm:b.inSection)+"]["+b.repeatRow+"]["+a.fieldId+"]":"item_meta["+a.fieldId+"]"}function R(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="");return b}
20
+ function Q(a,b,c){b=Ta(b);c=Ua(b,c);return"string"===typeof b&&"-1"!=b.indexOf("&quot;")&&Q(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;a=S(a);b=ta(a,b);return-1!=b.indexOf(a)},"not LIKE":function(a,b){if(!b)return!0;a=S(a);b=ta(a,b);return-1==b.indexOf(a)}}[a](b,c)}function Ta(a){-1!==String(a).search(/^\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*$/)?a=parseFloat(a):
21
+ "string"===typeof a&&(a=a.trim());return a}function Ua(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 ta(a,b){b=S(b);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 S(a){"string"===typeof a?a=a.toLowerCase():"number"===typeof a&&(a=a.toString());return a}function ma(a){return"show"==
22
+ a?"hide":"show"}function na(a){return document.getElementById(a).querySelectorAll('select[name^="item_meta"], textarea[name^="item_meta"], input[name^="item_meta"]')}function pa(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["+O(a)+"]["+a.repeatRow+"]["+a.fieldId+"]":"item_meta["+a.fieldId+"]",a=document.querySelectorAll('[name^="'+
23
+ a+'"]'));return a}function oa(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&&T(a[f],c))){d=a[f];var h=jQuery(d),g=h.data("frmval");if("undefined"!==typeof g){if("checkbox"==d.type||"radio"==d.type)for(var k=document.getElementsByName(d.name),m=0,l=k.length;m<l;m++)if("hidden"==k[m].type)jQuery.isArray(g)&&null!==g[m]?k[m].value=g[m]:k[m].value=g;else{if(k[m].value==g||jQuery.isArray(g)&&-1<g.indexOf(k[m].value))if(k[m].checked=
24
+ !0,"radio"==k[m].type)break}else if(-1<d.name.indexOf("[]"))if(k=document.getElementsByName(d.name),jQuery.isArray(g))for(m=0,l=g.length;m<l;m++)m in k&&(k[m].value=g[m]);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&&U(d);u(h)}d=a[f];h=q(d,!1);h=V(h);!1!==h&&"lookup"!=h.fieldType&&(h.parentVals=W(h),ua(h,d));d=a[f];if(h="undefined"!==
25
+ 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(3<=g.split("][").length)for(g=k.split("-"),k="",m=0;m<g.length-1;m++)k=""===k?g[m]:k+"-"+g[m];g=k;k=null;3<=d.name.split("][").length&&(k="hidden"!=d.type?jQuery(d).closest(".frm_form_field"):jQuery(d));d=k;void 0!==h.calc[g]&&X(h,g,[],d)}d=a[f]}}function T(a,b){var c=q(a,!0);return B("frm_field_"+c+"_container",b)}function P(a,b){if(!B(a.containerId,a.formId)){if(b){jQuery("#"+
26
+ a.containerId).hide();var c=na(a.containerId)}else c=pa(a);Y(c);va(a.containerId,a.formId)}}function Y(a){if(!(1>a.length)){for(var b,c=!0,d=0,e=a.length;d<e;d++)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=0,null!==document.getElementById(a[d].id+"_chosen")&&jQuery(a[d]).trigger("chosen:updated")):a[d].value="",b=a[d];!0===c&&u(jQuery(b))}}function B(a,b){var c=!1;
27
+ -1<D(b).indexOf(a)&&(c=!0);return c}function va(a,b){var c=D(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 D(a){var b=[];a=document.getElementById("frm_hide_fields_"+a);return null===a?b:b=(b=a.value)?JSON.parse(b):[]}function I(a,b){var c=D(b),d=c.indexOf(a);-1<d&&(c.splice(d,1),c=JSON.stringify(c),document.getElementById("frm_hide_fields_"+b).value=c)}function fa(a,b,c){if(!("undefined"===typeof __FRMLOOKUP||
28
+ "undefined"===typeof __FRMLOOKUP[a]||1>__FRMLOOKUP[a].dependents.length||null===b||"undefined"===typeof b)){a=__FRMLOOKUP[a];b=G(b[0].name);for(var d=0,e=a.dependents.length;d<e;d++)Z(a.dependents[d],b,c)}}function Z(a,b,c){a=V(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_"+
29
+ 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++){ka(a,b[c].id);var e=a,f=b[c];e.parentVals=W(e);if("select"==e.inputType)Va(e,f);else if("radio"==e.inputType||"checkbox"==e.inputType)if(!1===e.parentVals){var h=f.getElementsByTagName("input");wa(e,f);Y(h)}else Wa(e,f)}}else if("value changed"===c)for(c="field_"+a.fieldKey,c=a.isRepeating?""!==b.repeatingSection?'[id="'+c+"-"+b.repeatRow+'"]':'[id^="'+c+'-"]':'[id="'+
30
+ c+'"]',b=document.querySelectorAll(c),c=0,d=b.length;c<d;c++)e=a,f=G(b[c].name),e.repeatRow=""!==f.repeatRow?f.repeatRow:"",e=a,f=b[c],e.parentVals=W(e),ua(e,f)}function V(a){return"undefined"===typeof __FRMLOOKUP||"undefined"===typeof __FRMLOOKUP[a]?!1:__FRMLOOKUP[a]}function W(a){for(var b=[],c=a.parents,d,e=0,f=c.length;e<f;e++){d=V(c[e]);d=qa(d,a);if(""===d||!1===d){b=!1;break}b[e]=d}return b}function sa(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;
31
+ break}return b}function Va(a,b){var c=b.getElementsByTagName("SELECT")[0];if(null!==c){var d=c.value;!1===a.parentVals?(c.options.length=1,""!==d&&(c.value="",U(c),u(jQuery(c),a.fieldKey))):(Xa(c),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(b){var d=a.fieldKey,h=c.value;b=JSON.parse(b);for(var g=c.options.length;0<g;g--)c.remove(g);for(var k=b.length,
32
+ g=0;g<k;g++)c.options[g+1]=new Option(b[g],b[g],!1,!1);c.value=h;""===c.value&&(b=c.getAttribute("data-frmval"),null!==b&&(c.value=b));U(c);c.value!=h&&u(jQuery(c),d)}}))}}function U(a){-1<a.className.indexOf("frm_chzn")&&jQuery().chosen&&jQuery(a).trigger("chosen:updated")}function Xa(a){a.value||(a.options.length=1,a.options[1]=new Option(frm_js.loading,"",!1,!1))}function Wa(a,b){var c=b.getElementsByClassName("frm_opt_container")[0],d=c.getElementsByTagName("input");Ya(b,c);var e="",e="radio"==
33
+ a.inputType?sa(d):R(d);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,row_index:a.repeatRow,current_value:e,nonce:frm_js.nonce},success:function(e){c.innerHTML=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?wa(a,b):!1!==B(b.id,a.formId)&&(e=N(a.fieldId),!1===e||1>e.conditions.length?
34
+ (I(b.id,a.formId),jQuery("#"+b.id).show()):(e.containerId=b.id,e.repeatRow=a.repeatRow,la(e)));u(jQuery(d[0]),a.fieldKey)}})}function wa(a,b){B(b.id,a.formId)||(jQuery("#"+b.id).hide(),va(b.id,a.formId))}function ua(a,b){if(!T(b,a.formId))if(!1===a.parentVals){var c=b.getAttribute("data-frmval");null===c&&(c="");xa(a,b,c)}else 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},
35
+ success:function(c){b.value!=c&&xa(a.fieldKey,b,c)}})}function xa(a,b,c){b.value=c;u(jQuery(b),a)}function Ra(a,b){if(b){var c=jQuery("#"+a.containerId);ya(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,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();za(e);""===d||""===h?P(a,!0):Aa(a,c,f,!0)}else e="field_"+
36
+ a.fieldKey,""!==a.repeatRow&&(e+="-"+a.repeatRow),e=document.getElementById(e),e.value=d,B(a.containerId,a.formId)&&I(a.containerId,a.formId),u(jQuery(e))}})}function Sa(a,b){var c=jQuery("#"+a.containerId),d=c.find('select[name^="item_meta"], input[name^="item_meta"]'),e=Ba(d),d=d.data("frmval");ya(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,
37
+ prev_val:e,nonce:frm_js.nonce},success:function(b){var d=c.find(".frm_opt_container");d.html(b);var g=d.find('select, input[type="checkbox"], input[type="radio"]');za(d);""===b||1>g.length?P(a,!0):(b=Ba(g),Aa(a,c,g,e!==b))}})}function ya(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 Ya(a,b){if(!(-1<a.innerHTML.indexOf("frm-loading-img"))){b.style.display="none";var c=document.createElement("span");
38
+ c.setAttribute("class","frm-loading-img");a.insertBefore(c,b.nextSibling)}}function za(a){a.parent().children(".frm-loading-img").remove();a.show()}function Ba(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 Aa(a,b,c,d){B(a.containerId,a.formId)&&(I(a.containerId,a.formId),b.show());c.hasClass("frm_chzn")&&aa();!0===d&&u(c)}function L(a,b){if("undefined"!==typeof __FRMCALC){var c=
39
+ __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"),m=!1,l=g.field_id,n=D(g.form_id);1>n.length||("0"===g.inSection&&"0"===g.inEmbedForm?m=J(l,n):(k=G(k),J(l,n)?m=!0:Ca(l,k,n)?m=!0:"0"!==g.inSection&&"0"!==g.inEmbedForm?m=Ca(g.inSection,k,n):"0"!==g.inSection?m=J(g.inSection,n):"0"!==g.inEmbedForm&&(m=J(g.inEmbedForm,n))));g=m;!1===g&&X(c,d[f],e,b)}}}function J(a,b){return-1<b.indexOf("frm_field_"+a+"_container")}
40
+ function Ca(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 X(a,b,c,d){var e=a.calc[b],f=e.calc,h=jQuery(document.getElementById("field_"+b)),g={triggerField:d,inSection:!1,thisFieldCall:'input[id^="field_'+b+'-"]'};1>h.length&&"undefined"!==typeof d&&(g.inSection=!0,g.thisFieldId=Za(a.fieldsWithCalc,b),h=Da(g));if(!(1>h.length)){f=$a(e,f,a,c,g);if("text"!=e.calc_type){a=e.calc_dec;f.indexOf(").toFixed(")&&
41
+ (c=f.split(").toFixed("),Ea(c[1])&&(a=c[1],f=f.replace(").toFixed("+a,"")));f=parseFloat(eval(f));if("undefined"===typeof f||isNaN(f))f=0;Ea(a)&&(f=f.toFixed(a))}h.val()!=f&&(h.val(f),u(h,b))}}function $a(a,b,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||
42
+ "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]+" 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=ab(g,d),"undefined"===typeof d[g.valKey]&&(d[g.valKey]="");else{g.valKey="num"+g.valKey;d=
43
+ bb(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=b.replace(new RegExp(k,"g"),d[g.valKey])}return b}function bb(a,b,c){if("undefined"!==typeof c[a.valKey]&&0!==c[a.valKey])return c;c[a.valKey]=0;var d=Fa(a);if(!1===d)return c;d.each(function(){var d=Ga(a.thisField,this);if("date"==a.thisField.type){var f;f=b.date;var h=0;if(d)if("undefined"===
44
+ typeof jQuery.datepicker){h="-";-1<f.indexOf("/")&&(h="/");f=f.split(h);var d=d.split(h),g,k;g=h=k="";for(var m=0;m<f.length;m++)if("y"==f[m])g=((new Date).getFullYear()+15).toString().substr(2,2),g=d[m]>g?"19"+d[m]:"20"+d[m];else if("yy"==f[m])g=d[m];else if("m"==f[m]||"mm"==f[m])h=d[m],2>h.length&&(h="0"+h);else if("d"==f[m]||"dd"==f[m])k=d[m],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&&
45
+ 0!==f&&(f=f.trim(),f=parseFloat(f.replace(/,/g,"").match(/-?[\d\.]+$/)));if("undefined"===typeof f||isNaN(f)||""===f)f=0;c[a.valKey]+=f}});return c}function ab(a,b){if("undefined"!==typeof b[a.valKey]&&""!==b[a.valKey])return b;b[a.valKey]="";var c=Fa(a);if(!1===c)return b;c.each(function(){var c=Ga(a.thisField,this),c=c.trim();b[a.valKey]+=c});return b}function Fa(a){var b;if(!1===a.inSection)b=jQuery(a.thisFieldCall);else if(b=Da(a),null===b||"undefined"===typeof b)b=jQuery(a.thisFieldCall);if(null===
46
+ b||"undefined"===typeof b||1>b.length)b=!1;return b}function Da(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 Ga(a,b){var c;c=!1;if("hidden"==b.type)""!==ba(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_")&&
47
+ 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=ba(b))):c=jQuery(b).closest(".frm_other_container").find(".frm_other_input").val():"checkbox"!=a.type&&"radio"!=a.type||"hidden"==b.type||(c=ba(b))):c="checkbox"!==b.type&&"radio"!==b.type||!b.checked?jQuery(b).val():b.value;"undefined"===typeof c&&(c="");return c}function ba(a){var b="";a=document.getElementById(a.id+"-otext");null!==a&&""!==a.value&&(b=a.value);return b}function Ha(a){var b=
48
+ !1;a=jQuery(a).find(".frm_saving_draft");a.length&&(b=a.val());return b}function Ia(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 ga(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"),
49
+ 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=cb(c)),e=c;else{e=a.className;if(-1!==e.indexOf("frm_pos_none"))return b;d=jQuery(a).val();if("string"!==typeof d)for(var c=d,d="",f=0;f<c.length;f++)""!==c[f]&&(d=c[f]);e=-1===e.indexOf("frm_other_input")?q(a,!0):q(a,!1)}""===d&&(""===e&&(e=q(a,!0)),e in b||(b[e]=E(a,"data-reqmsg")));return b}function cb(a){var b="";jQuery('input[name="file'+
50
+ a+'"], input[name="file'+a+'[]"], input[name^="item_meta['+a+']"]').each(function(){""===b&&(b=this.value)});return b}function ha(a,b,c){var d=a.value,e=q(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=E(a,"data-invmsg");""!==d&&!1===h.test(d)?(b[e]=g,f&&(b[e.replace("conf_","")]="")):f&&(a=a.name.replace("conf_",""),
51
+ c.filter('[name="'+a+'"]').val()!==d&&(b[e]="",b[e.replace("conf_","")]=""))}return b}function ia(a,b){var c=a.value;""!==c&&!1!==isNaN(c/1)&&(c=q(a,!0),c in b||(b[c]=E(a,"data-invmsg")));return b}function ja(a,b){var c=a.value,d=E(a,"pattern");if(""!==d&&""!==c){var e=q(a,!0);e in b||(d=new RegExp("^"+d+"$","i"),!1===d.test(c)&&(b[e]=E(a,"data-invmsg")))}return b}function E(a,b){var c=a.getAttribute(b);null===c&&(c="");return c}function db(a,b){jQuery(a).find('input[type="submit"], input[type="button"]').attr("disabled",
52
+ "disabled");"undefined"==typeof b&&jQuery(a).find('input[name="frm_action"]').val();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;else if(""!==b.content){jQuery(a).find(".frm_ajax_loading").removeClass("frm_loading_now");
53
+ var e=jQuery(a).find('input[name="form_id"]').val();jQuery(a).closest("#frm_form_"+e+"_container").replaceWith(b.content);frmFrontForm.scrollMsg(e);"function"==typeof frmThemeOverride_frmAfterSubmit&&(e=jQuery('input[name="frm_page_order_'+e+'"]').val(),d=jQuery(b.content).find('input[name="form_id"]').val(),frmThemeOverride_frmAfterSubmit(d,e,b.content,a));e=jQuery(a).find('input[name="id"]');e.length&&jQuery(document.getElementById("frm_edit_"+e.val())).find("a").addClass("frm_ajax_edited").click();
54
+ jQuery(b.content).find(".frm_message").length&&ca("pageLoad");da()}else if(Object.keys(b.errors).length){jQuery(a).find('input[type="submit"], input[type="button"]').removeAttr("disabled");jQuery(a).find(".frm_ajax_loading").removeClass("frm_loading_now");d=!0;Ja();var f=!1,h;for(e in b.errors)if(h=jQuery(a).find("#frm_field_"+e+"_container"),h.length){if(!h.is(":visible")){var g=h.closest(".frm_toggle_container");g.length&&(g=g.prev(),g.hasClass("frm_trigger")||(g=g.prev(".frm_trigger")),g.click())}h.is(":visible")&&
55
+ (M(h,e,b.errors),d=!1,h=jQuery(a).find("#frm_field_"+e+"_container .frm-g-recaptcha, #frm_field_"+e+"_container .g-recaptcha"),h.length&&(f=!0,h=h.data("rid"),jQuery().grecaptcha&&(h?grecaptcha.reset(h):grecaptcha.reset())))}Ka(a);!0!==f&&La(a,!1);d?a.submit():jQuery(a).prepend(b.error_message)}else eb(a),La(a,!0),a.submit()},error:function(){jQuery(a).find('input[type="submit"], input[type="button"]').removeAttr("disabled");a.submit()}})}function M(a,b,c){a.length&&a.is(":visible")&&(a.addClass("frm_blank_field"),
56
+ "function"==typeof frmThemeOverride_frmPlaceError?frmThemeOverride_frmPlaceError(b,c):a.append('<div class="frm_error">'+c[b]+"</div>"))}function Ja(){jQuery(".form-field").removeClass("frm_blank_field");jQuery(".form-field .frm_error").replaceWith("");jQuery(".frm_error_style").remove()}function Ka(a){var b=jQuery(a).find(".frm_blank_field:first");b.length&&frmFrontForm.scrollMsg(b,a,!0)}function eb(a){var b=document.getElementById("frm_loading");null!==b&&(a=jQuery(a).find("input[type=file]").val(),
57
+ "undefined"!=typeof a&&""!==a&&setTimeout(function(){jQuery(b).fadeIn("slow")},2E3))}function La(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 fb(){Ma(jQuery(this),"clear")}function gb(){Ma(jQuery(this),"replace")}function Ma(a,b){var c=a.data("frmval").replace(/(\n|\r\n)/g,
58
+ "\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 hb(){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",entry_id:b,form_id:c,nonce:frm_js.nonce},success:function(b){a.replaceWith(b)}});return!1}function ib(a,
59
+ 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=a.fields.length,f,h=0,g=e;h<g;h++){var k=a.fields[h];f=Na(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 m=a.entries.length;b.addRows(m);
60
+ for(var l=0,n=0;n<m;n++){var k=0,p=a.entries[n];d&&(b.setCell(l,k,p.id),k++);for(var q=0,r=e;q<r;q++){var t=a.fields[q];f=Na(t);t=p.metas[t.id];"number"!=f||null!==t&&""!==t?"boolean"==f&&(t=null===t||"false"==t||!1===t?!1:!0):t=0;b.setCell(l,k,t);k++}h&&("undefined"!==typeof p.editLink?b.setCell(l,k,'<a href="'+p.editLink+'">'+a.options.edit_link+"</a>"):b.setCell(l,k,""),k++);g&&("undefined"!==typeof p.deleteLink?b.setCell(l,k,'<a href="'+p.deleteLink+'" class="frm_delete_link" data-frmconfirm="'+
61
+ a.options.confirm+'">'+a.options.delete_link+"</a>"):b.setCell(l,k,""));l++}}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_"+a.options.form_id))).draw(b,a.graphOpts)}})}function jb(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_"+
62
+ a.graph_id);if(null!==c){var d=a.type.charAt(0).toUpperCase()+a.type.slice(1);"Histogram"!==d&&"Table"!==d&&(d+="Chart");(new google.visualization[d](c)).draw(b,a.options)}}})}function Na(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 kb(){var a="frm_section_"+jQuery(this).data("parent")+"-"+jQuery(this).data("key"),
63
+ b=jQuery(document.getElementById(a)),c=b.find("input, select, textarea");b.fadeOut("slow",function(){b.remove();c.each(function(){if("file"!=this.type){var a=q(this,!1);L(a,jQuery(this))}});"function"==typeof frmThemeOverride_frmRemoveRow&&frmThemeOverride_frmRemoveRow(a,b)});return!1}function lb(){if(!0===K)return!1;K=!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")?
64
+ 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 e=c.html,f=jQuery(e).hide().fadeIn("slow");jQuery(".frm_repeat_"+a+":last").after(f);var h=["other"],g,k,m={repeatingSection:a.toString(),repeatRow:b.toString()};jQuery(e).find("input, select, textarea").each(function(){if("file"!=this.type){if(""===this.name)return!0;g=this.name.replace("item_meta[","").split("]")[2].replace("[","");
65
+ -1==jQuery.inArray(g,h)&&!1!==this.id&&""!==this.id&&(k=jQuery("#"+this.id),h.push(g),H(g,m),Z(g,m,"value changed"),ea(g,k),fa(g,k,"value changed"),L(g,k))}});v(m.repeatRow);Oa();aa();"function"==typeof frmThemeOverride_frmAddRow&&frmThemeOverride_frmAddRow(a,c);K=!1},error:function(){K=!1}});return!1}function mb(){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+
66
+ b)),m=k.html();k.html('<span class="frm-loading-img" id="'+c+b+'"></span><div class="frm_orig_content" style="display:none">'+m+"</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(b){k.children(".frm-loading-img").replaceWith(b);a.removeClass("frm_inplace_edit").addClass("frm_cancel_edit");a.html(f);ca("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"]',
67
+ F);da()}});return!1}function nb(){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 ob(){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_'+
68
+ 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){"success"==a.replace(/^\s+|\s+$/g,"")?(jQuery(document.getElementById(d+c)).fadeOut("slow"),jQuery(document.getElementById("frm_delete_"+c)).fadeOut("slow")):jQuery(document.getElementById("frm_delete_"+c)).replaceWith(a)}})}return!1}function da(){"undefined"!==typeof __frmHideFields&&frmFrontForm.hidePreviouslyHiddenFields();jQuery(document).on("focusin",
69
+ ".frm_date",r);if("undefined"!==typeof __frmUniqueTimes)for(var a=__frmUniqueTimes,b=0;b<a.length;b++)jQuery(document.getElementById(a[b].dateID)).change(p);if("undefined"!==typeof __frmMasks)for(a=__frmMasks,b=0;b<a.length;b++)jQuery(a[b].trigger).attr("data-frmmask",a[b].mask);Oa();aa();"undefined"!==typeof __frmDepDynamicFields&&frmFrontForm.checkDependentDynamicFields(__frmDepDynamicFields);"undefined"!==typeof __frmDepLookupFields&&frmFrontForm.checkDependentLookupFields(__frmDepLookupFields);
70
+ if("undefined"!==typeof __FRMCALC){(a=__FRMCALC.triggers)&&jQuery(a.join()).trigger({type:"change",selfTriggered:!0});var a=__FRMCALC.calc,b=[],c;for(c in a)if(1>a[c].fields.length){var d=document.getElementById("field_"+c);null===d||T(d,a[c].form_id)||X(__FRMCALC,c,b)}}v()}function aa(){if(jQuery().chosen){var a={allow_single_deselect:!0};"undefined"!==typeof __frmChosen&&(a="{"+__frmChosen+"}");jQuery(".frm_chzn").chosen(a)}}function Oa(){if(jQuery().rating){var a=jQuery(".star");a.length&&a.rating()}}
71
+ function ca(a){"undefined"!==typeof __frmHideOrShowFields&&frmFrontForm.hideOrShowFields(__frmHideOrShowFields,a)}function u(a,b){"undefined"===typeof b&&(b="dependent");1<a.length&&(a=a.eq(0));a.trigger({type:"change",selfTriggered:!0,frmTriggered:b})}function G(a){var b={repeatingSection:"",repeatRow:""};"undefined"!==typeof a&&3<=a.split("][").length&&(a=a.split("]["),b.repeatingSection=a[0].replace("item_meta[",""),b.repeatRow=a[1]);return b}function Pa(a){a.fadeOut("slow",function(){a.remove()})}
72
+ function pb(){var a=jQuery(this).data("frmconfirm");return confirm(a)}function qb(){var a=jQuery(this).data("frmtoggle");jQuery(a).is(":visible")?jQuery(a).slideUp("fast"):jQuery(a).slideDown("fast");return!1}function Za(a,b){for(var c in a)if(a.hasOwnProperty(c)&&a[c]===b)return c;return null}function Ea(a){return!jQuery.isArray(a)&&0<=a-parseFloat(a)+1}function rb(){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);
73
+ for(0>d&&(d+=c);d<c;d++)if(d in this&&this[d]===a)return d;return-1})}function sb(){"function"!==typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")})}function tb(){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 c){var h=c[f];a.call(b,h,f,c)&&e.push(h)}return e})}function ub(){Object.keys||
74
+ (Object.keys=function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b})}var K=!1,C="",x=[];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",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():
75
+ 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",fb);jQuery(document).on("blur",".frm_toggle_default",gb);jQuery(".frm_toggle_default").blur();jQuery(document.getElementById("frm_resend_email")).click(hb);jQuery(document).on("click",".frm_remove_link",w);jQuery(document).on("focusin","input[data-frmmask]",function(){jQuery(this).mask(jQuery(this).data("frmmask").toString())});
76
+ 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"]',F);jQuery(document).on("click",'.frm-show-form input[type="submit"], .frm-show-form input[name="frm_prev_page"], .frm-show-form .frm_save_draft',l);jQuery(document).on("change",'.frm_other_container input[type="checkbox"], .frm_other_container input[type="radio"], .frm_other_container select',A);jQuery(document).on("click",".frm_remove_form_row",
77
+ kb);jQuery(document).on("click",".frm_add_form_row",lb);jQuery(document).on("click","a[data-frmconfirm]",pb);jQuery("a[data-frmtoggle]").click(qb);jQuery(".frm_edit_link_container").on("click","a.frm_inplace_edit",mb);jQuery(".frm_edit_link_container").on("click","a.frm_cancel_edit",nb);jQuery(document).on("click",".frm_ajax_delete",ob);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")?
78
+ (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())});ca("pageLoad");da();rb();sb();tb();ub()},submitForm:function(a){frmFrontForm.submitFormManual(a,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();
79
+ var d=frmFrontForm.validateFormSubmit(b);0===Object.keys(d).length&&(jQuery(b).find(".frm_ajax_loading").addClass("frm_loading_now"),-1<c.indexOf("frm_ajax_submit")?1>jQuery(b).find('input[type="file"]').length?(C=jQuery(b).find('input[name="frm_action"]').val(),frmFrontForm.checkFormErrors(b,C)):b.submit():b.submit())}},validateFormSubmit:function(a){"undefined"!=typeof tinyMCE&&jQuery(this).find(".wp-editor-wrap").length&&tinyMCE.triggerSave();x=[];var b=jQuery(a).hasClass("frm_js_validate");b&&
80
+ (Ha(a)||Ia(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=ga(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=
81
+ 0,f=d.length;e<f;e++){var h=d[e];""!==h.value&&"hidden"!=h.type&&("number"==h.type?b=ia(h,b):"email"==h.type?b=ha(h,b,c):null!==h.pattern&&(b=ja(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"==typeof frmThemeOverride_jsErrors&&(C=jQuery(a).find('input[name="frm_action"]').val(),a=frmThemeOverride_jsErrors(C,a),Object.keys(a).length))for(var g in a)x[g]=
82
+ a[g];return x},addAjaxFormErrors:function(a){Ja();for(var b in x){var c=jQuery(a).find("#frm_field_"+b+"_container");c.length?M(c,b,x):delete x[b]}Ka(a)},checkFormErrors:function(a,b){db(a,b)},scrollToID:function(a){a=jQuery(document.getElementById(a));frmFrontForm.scrollMsg(a,!1)},scrollMsg:function(a,b,c){if(a=("undefined"==typeof b?jQuery(document.getElementById("frm_form_"+a+"_container")):"string"==typeof a?jQuery(b).find("#frm_field_"+a+"_container"):a).offset().top){a-=frm_js.offset;b=jQuery("html").css("margin-top");
83
+ 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},500),!1}},savingDraft:function(a){return Ha(a)},goingToPreviousPage:function(a){return Ia(a)},hideOrShowFields:function(a,b){if("pageLoad"===b){var c=document.querySelectorAll('[id^="frm_hide_fields_"]');Y(c)}for(var c=
84
+ {repeatingSection:"",repeatRow:""},d=0,e=a.length;d<e;d++)H(a[d],c)},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(D(d));b=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++)H(a[c],b)},checkDependentLookupFields:function(a){for(var b,
85
+ c={repeatingSection:"",repeatRow:""},d=0,e=a.length;d<e;d++)b=a[d],Z(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=a[b[c]],e=0,f=d.length;e<f;e++)jb(d[e]);else for(d=a[b[c]],e=b[c],f=0;f<d.length;f++)ib(d[f],e);else setTimeout(frmFrontForm.loadGoogle,30)},removeUsedTimes:function(a,b){var c=jQuery(a).parents("form:first").find('input[name="id"]');jQuery.ajax({type:"POST",
86
+ 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");if(a&&""!==a)for(var f in a)c.find('option[value="'+f+'"]').attr("disabled","disabled")}})},escapeHtml:function(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},
87
+ invisible:function(a){jQuery(a).css("visibility","hidden")},visible:function(a){jQuery(a).css("visibility","visible")}}}var frmFrontForm=frmFrontFormJS();jQuery(document).ready(function(l){frmFrontForm.init()});function frmRecaptcha(){for(var l=jQuery(".frm-g-recaptcha"),n=0,p=l.length;n<p;n++){var r=grecaptcha.render(l[n].id,{sitekey:l[n].getAttribute("data-sitekey"),size:l[n].getAttribute("data-size"),theme:l[n].getAttribute("data-theme")});l[n].setAttribute("data-rid",r)}}
 
88
  function frmUpdateField(l,n,p,r,v){jQuery(document.getElementById("frm_update_field_"+l+"_"+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:l,field_id:n,value:p,nonce:frm_js.nonce},success:function(){""===r.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById("frm_update_field_"+l+"_"+n+"_"+v)).fadeOut("slow"):jQuery(document.getElementById("frm_update_field_"+l+"_"+n+"_"+v)).replaceWith(r)}})}
89
  function frmEditEntry(l,n,p,r,v,z){console.warn("DEPRECATED: function frmEditEntry in v2.0.13 use frmFrontForm.editEntry");var y=jQuery(document.getElementById("frm_edit_"+l)),w=y.html(),A=jQuery(document.getElementById(n+l)),F=A.html();A.html('<span class="frm-loading-img" id="'+n+l+'"></span><div class="frm_orig_content" style="display:none">'+F+"</div>");jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"html",data:{action:"frm_entries_edit_entry_ajax",post_id:p,entry_id:l,id:r,nonce:frm_js.nonce},
90
  success:function(q){A.children(".frm-loading-img").replaceWith(q);y.replaceWith('<span id="frm_edit_'+l+'"><a onclick="frmCancelEdit('+l+",'"+n+"','"+frmFrontForm.escapeHtml(w)+"',"+p+","+r+",'"+z+'\')" class="'+z+'">'+v+"</a></span>")}})}
languages/formidable-az_AZ.mo ADDED
Binary file
languages/formidable-az_AZ.po ADDED
@@ -0,0 +1,7612 @@