Formidable Forms – Form Builder for WordPress - Version 2.01.02

Version Description

  • Increased minimum required WordPress version to 3.8
  • Added frm_skip_form_action hook. This hook can be used to change whether the action is skipped or not
  • Added border radius settings to success and error messages
  • Fixed issue allowing a trashed form shortcode to still show the form
  • Fixed issue causing & to show instead of & when editing paragraph fields
  • Removes French and Swedish translations since they are complete online
  • Update for better cache deletion in WP 4.0+
  • Allow a specific field type to change the value for emails and entry array
  • Prevent errors with Redis cache plugin
  • Improve styling for submit buttons on mobile devices
  • Don't let imported style override default
  • Add frm_clean_[field-type-here]field_options_beforeupdate hook
  • Fix &, >, and other character comparison issues
  • Pro Features: *
  • Added frm_combo_dropdown_label filter. This hook can be used to add a label to the blank option in combo field dropdowns (state, and country, Credit card month, year)
  • Added frm_use_embedded_form_actions hook. If this hook is used to return the value "true", form actions for embedded forms will be fired
  • Make sure the view page number is not 0
  • When getting the entry array, address fields will no longer be sent as an array
  • Don't load more than 500 options in a lookup field on the form builder page
  • Fixed rich text fields with in place edit
  • Fixed javascript error when submitting an entry from the back-end
  • Use the correct calendar locale when editing an entry from the back-end
  • Fixed issue with the unique message being replaced if it was the same as the global unique message
  • Fixed issue with dependent dynamic field change events not getting triggered
  • Exclude password and credit card fields from the default email message
  • Add views parameter to frm-search shortcode
  • Fix error that appeared when using a date field in a calculation in multi-page form
  • Fix issue with switching from a dropdown to a Lookup field
  • Fix issue with loading icon replacing Lookup field options
  • Set confirmation field description correctly
  • Allow post fields in form action conditional logic
  • Set default value correctly when address field is shown
  • Don't let spaces break conditional logic
  • Fix JS error after in-place edit
  • Fix PHP warning message for Lookup fields
  • Fix ambiguous form ID SQL error
  • Don't require credit card fields when editing
  • Make sure ampersand doesn't break Lookup fields
  • Add autopopulate option to Image URL, time, and hidden fields
  • Add hook to allow LIKE comparison with Lookup fields
Download this release

Release Info

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

Code changes from version 2.01.01 to 2.01.02

Files changed (42) hide show
  1. classes/controllers/FrmAddonsController.php +9 -4
  2. classes/controllers/FrmAppController.php +1 -11
  3. classes/controllers/FrmFormActionsController.php +8 -3
  4. classes/controllers/FrmFormsController.php +1 -1
  5. classes/controllers/FrmHooksController.php +0 -1
  6. classes/helpers/FrmAppHelper.php +25 -13
  7. classes/helpers/FrmFieldsHelper.php +3 -1
  8. classes/helpers/FrmXMLHelper.php +5 -0
  9. classes/models/FrmEntryFormat.php +10 -3
  10. classes/models/FrmEntryValidate.php +2 -3
  11. classes/models/FrmField.php +4 -0
  12. classes/models/FrmFormAction.php +40 -7
  13. classes/views/frm-entries/list.php +0 -1
  14. classes/views/frm-entries/show.php +0 -1
  15. classes/views/frm-forms/add_field.php +2 -1
  16. classes/views/frm-forms/edit.php +0 -1
  17. classes/views/frm-forms/form.php +2 -2
  18. classes/views/frm-forms/list.php +0 -1
  19. classes/views/frm-forms/new.php +0 -1
  20. classes/views/frm-forms/settings.php +0 -1
  21. classes/views/frm-settings/form.php +2 -3
  22. classes/views/styles/_date-fields.php +1 -1
  23. classes/views/xml/import_form.php +0 -1
  24. css/_single_theme.css.php +17 -13
  25. css/custom_theme.css.php +8 -1
  26. css/frm_admin.css +63 -49
  27. css/frm_fonts.css +4 -12
  28. formidable.php +1 -1
  29. images/form_16-2x.png +0 -0
  30. images/form_16.png +0 -0
  31. images/form_32_sprite-2x.png +0 -0
  32. images/form_32_sprite.png +0 -0
  33. js/formidable.js +92 -57
  34. js/formidable.min.js +86 -85
  35. js/formidable_admin.js +26 -24
  36. languages/formidable-en_US.po +742 -736
  37. languages/formidable-fr_FR.mo +0 -0
  38. languages/formidable-fr_FR.po +0 -8196
  39. languages/formidable-sv_SE.mo +0 -0
  40. languages/formidable-sv_SE.po +0 -8726
  41. languages/sv_SE.mo +0 -0
  42. readme.txt +45 -3
classes/controllers/FrmAddonsController.php CHANGED
@@ -18,9 +18,13 @@ class FrmAddonsController {
18
  $addons = self::get_ordered_addons( $pro_link );
19
 
20
  $plugin_names = array(
21
- 'formidable-pro' => 'formidable/pro', 'wp-multilingual' => 'formidable-wpml',
22
- 'registration-lite' => 'formidable-registration', 'bootstrap-modal' => 'formidable-modal',
23
- 'paypal-standard' => 'formidable-paypal', 'formidable-api' => 'formidable-api',
 
 
 
 
24
  );
25
 
26
  include( FrmAppHelper::plugin_path() . '/classes/views/addons/list.php' );
@@ -44,7 +48,8 @@ class FrmAddonsController {
44
 
45
  $plugin_order = array(
46
  'formidable-pro', 'mailchimp', 'registration-lite',
47
- 'paypal-standard', 'bootstrap-modal', 'math-captcha',
 
48
  'zapier',
49
  );
50
  $ordered_addons = array();
18
  $addons = self::get_ordered_addons( $pro_link );
19
 
20
  $plugin_names = array(
21
+ 'formidable-pro' => 'formidable/pro',
22
+ 'wp-multilingual' => 'formidable-wpml',
23
+ 'registration-lite' => 'formidable-registration',
24
+ 'bootstrap-modal' => 'formidable-modal',
25
+ 'paypal-standard' => 'formidable-paypal',
26
+ 'formidable-api' => 'formidable-api',
27
+ 'authorize-net-aim' => 'formidable-authorize-net',
28
  );
29
 
30
  include( FrmAppHelper::plugin_path() . '/classes/views/addons/list.php' );
48
 
49
  $plugin_order = array(
50
  'formidable-pro', 'mailchimp', 'registration-lite',
51
+ 'paypal-standard', 'stripe', 'authorize-net-aim',
52
+ 'bootstrap-modal', 'math-captcha',
53
  'zapier',
54
  );
55
  $ordered_addons = array();
classes/controllers/FrmAppController.php CHANGED
@@ -9,7 +9,7 @@ class FrmAppController {
9
  }
10
 
11
  $menu_name = FrmAppHelper::get_menu_name();
12
- add_menu_page( 'Formidable', $menu_name, 'frm_view_forms', 'formidable', 'FrmFormsController::route', FrmAppHelper::plugin_url() . '/images/form_16.png', self::get_menu_position() );
13
  }
14
 
15
  private static function get_menu_position() {
@@ -277,16 +277,6 @@ class FrmAppController {
277
  }
278
  }
279
 
280
- public static function wp_admin_body_class( $classes ) {
281
- global $wp_version;
282
- //we need this class everywhere in the admin for the menu
283
- if ( version_compare( $wp_version, '3.7.2', '>' ) ) {
284
- $classes .= ' frm_38_trigger';
285
- }
286
-
287
- return $classes;
288
- }
289
-
290
  public static function load_lang() {
291
  load_plugin_textdomain( 'formidable', false, FrmAppHelper::plugin_folder() . '/languages/' );
292
  }
9
  }
10
 
11
  $menu_name = FrmAppHelper::get_menu_name();
12
+ add_menu_page( 'Formidable', $menu_name, 'frm_view_forms', 'formidable', 'FrmFormsController::route', '', self::get_menu_position() );
13
  }
14
 
15
  private static function get_menu_position() {
277
  }
278
  }
279
 
 
 
 
 
 
 
 
 
 
 
280
  public static function load_lang() {
281
  load_plugin_textdomain( 'formidable', false, FrmAppHelper::plugin_folder() . '/languages/' );
282
  }
classes/controllers/FrmFormActionsController.php CHANGED
@@ -265,7 +265,9 @@ class FrmFormActionsController {
265
 
266
  foreach ( $form_actions as $action ) {
267
  $trigger_on_import = $importing && in_array( 'import', $action->post_content['event'] );
268
- if ( ! in_array( $event, $action->post_content['event'] ) && ! $trigger_on_import ) {
 
 
269
  continue;
270
  }
271
 
@@ -280,8 +282,11 @@ class FrmFormActionsController {
280
  $child_entry = ( ( $form && is_numeric( $form->parent_form_id ) && $form->parent_form_id ) || ( $entry && ( $entry->form_id != $form->id || $entry->parent_item_id ) ) || ( isset( $args['is_child'] ) && $args['is_child'] ) );
281
 
282
  if ( $child_entry ) {
283
- //don't trigger actions for sub forms
284
- continue;
 
 
 
285
  }
286
 
287
  // check conditional logic
265
 
266
  foreach ( $form_actions as $action ) {
267
  $trigger_on_import = $importing && in_array( 'import', $action->post_content['event'] );
268
+ $skip_this_action = ( ! in_array( $event, $action->post_content['event'] ) && ! $trigger_on_import );
269
+ $skip_this_action = apply_filters( 'frm_skip_form_action', $skip_this_action, compact( 'action', 'entry', 'form', 'event' ) );
270
+ if ( $skip_this_action ) {
271
  continue;
272
  }
273
 
282
  $child_entry = ( ( $form && is_numeric( $form->parent_form_id ) && $form->parent_form_id ) || ( $entry && ( $entry->form_id != $form->id || $entry->parent_item_id ) ) || ( isset( $args['is_child'] ) && $args['is_child'] ) );
283
 
284
  if ( $child_entry ) {
285
+ // maybe trigger actions for sub forms
286
+ $trigger_children = apply_filters( 'frm_use_embedded_form_actions', false, compact( 'form', 'entry' ) );
287
+ if ( ! $trigger_children ) {
288
+ continue;
289
+ }
290
  }
291
 
292
  // check conditional logic
classes/controllers/FrmFormsController.php CHANGED
@@ -1050,7 +1050,7 @@ class FrmFormsController {
1050
  }
1051
 
1052
  $form = FrmForm::getOne( $id );
1053
- if ( ! $form || $form->parent_form_id ) {
1054
  return __( 'Please select a valid form', 'formidable' );
1055
  }
1056
 
1050
  }
1051
 
1052
  $form = FrmForm::getOne( $id );
1053
+ if ( ! $form || $form->parent_form_id || $form->status == 'trash' ) {
1054
  return __( 'Please select a valid form', 'formidable' );
1055
  }
1056
 
classes/controllers/FrmHooksController.php CHANGED
@@ -87,7 +87,6 @@ class FrmHooksController {
87
  add_action( 'admin_enqueue_scripts', 'FrmAppController::load_wp_admin_style' );
88
  add_action( 'admin_notices', 'FrmAppController::pro_get_started_headline' );
89
  add_action( 'admin_init', 'FrmAppController::admin_init', 11 );
90
- add_filter( 'admin_body_class', 'FrmAppController::wp_admin_body_class' );
91
  add_filter( 'plugin_action_links_' . FrmAppHelper::plugin_folder() . '/formidable.php', 'FrmAppController::settings_link' );
92
  register_activation_hook( FrmAppHelper::plugin_folder() . '/formidable.php', 'FrmAppController::activation_install' );
93
 
87
  add_action( 'admin_enqueue_scripts', 'FrmAppController::load_wp_admin_style' );
88
  add_action( 'admin_notices', 'FrmAppController::pro_get_started_headline' );
89
  add_action( 'admin_init', 'FrmAppController::admin_init', 11 );
 
90
  add_filter( 'plugin_action_links_' . FrmAppHelper::plugin_folder() . '/formidable.php', 'FrmAppController::settings_link' );
91
  register_activation_hook( FrmAppHelper::plugin_folder() . '/formidable.php', 'FrmAppController::activation_install' );
92
 
classes/helpers/FrmAppHelper.php CHANGED
@@ -10,7 +10,7 @@ class FrmAppHelper {
10
  /**
11
  * @since 2.0
12
  */
13
- public static $plug_version = '2.01.01';
14
 
15
  /**
16
  * @since 1.07.02
@@ -101,7 +101,7 @@ class FrmAppHelper {
101
  *
102
  * @since 2.0
103
  */
104
- public static function update_message( $features, $class = '' ) {
105
  _deprecated_function( __FUNCTION__, '2.0.19' );
106
  }
107
 
@@ -493,12 +493,23 @@ class FrmAppHelper {
493
  public static function cache_delete_group( $group ) {
494
  global $wp_object_cache;
495
 
496
- if ( isset( $wp_object_cache->cache[ $group ] ) ) {
497
- foreach ( $wp_object_cache->cache[ $group ] as $k => $v ) {
498
- wp_cache_delete($k, $group);
499
- }
500
- return true;
501
- }
 
 
 
 
 
 
 
 
 
 
 
502
 
503
  return false;
504
  }
@@ -818,11 +829,12 @@ class FrmAppHelper {
818
  return $return;
819
  }
820
 
821
- public static function esc_textarea( $text ) {
822
- $safe_text = str_replace('"', '"', $text);
823
- $safe_text = htmlspecialchars( $safe_text, ENT_NOQUOTES );
824
- return apply_filters( 'esc_textarea', $safe_text, $text );
825
- }
 
826
 
827
  /**
828
  * Add auto paragraphs to text areas
10
  /**
11
  * @since 2.0
12
  */
13
+ public static $plug_version = '2.01.02';
14
 
15
  /**
16
  * @since 1.07.02
101
  *
102
  * @since 2.0
103
  */
104
+ public static function update_message() {
105
  _deprecated_function( __FUNCTION__, '2.0.19' );
106
  }
107
 
493
  public static function cache_delete_group( $group ) {
494
  global $wp_object_cache;
495
 
496
+ if ( is_callable( array( $wp_object_cache, '__get' ) ) ) {
497
+ $group_cache = $wp_object_cache->__get('cache');
498
+ } elseif ( is_callable( array( $wp_object_cache, 'redis_status' ) ) && $wp_object_cache->redis_status() ) {
499
+ // check if the object cache is overridden by Redis
500
+ $wp_object_cache->flush();
501
+ $group_cache = array();
502
+ } else {
503
+ // version < 4.0 fallback
504
+ $group_cache = $wp_object_cache->cache;
505
+ }
506
+
507
+ if ( isset( $group_cache[ $group ] ) ) {
508
+ foreach ( $group_cache[ $group ] as $k => $v ) {
509
+ wp_cache_delete( $k, $group );
510
+ }
511
+ return true;
512
+ }
513
 
514
  return false;
515
  }
829
  return $return;
830
  }
831
 
832
+ public static function esc_textarea( $text ) {
833
+ $safe_text = str_replace( '&quot;', '"', $text );
834
+ $safe_text = htmlspecialchars( $safe_text, ENT_NOQUOTES );
835
+ $safe_text = str_replace( '&amp;', '&', $safe_text );
836
+ return apply_filters( 'esc_textarea', $safe_text, $text );
837
+ }
838
 
839
  /**
840
  * Add auto paragraphs to text areas
classes/helpers/FrmFieldsHelper.php CHANGED
@@ -178,7 +178,7 @@ class FrmFieldsHelper {
178
  );
179
 
180
  $msg = FrmField::get_option( $field, $error );
181
- $msg = ( $msg == $defaults[ $error ]['full'] || empty( $msg ) ) ? $defaults[ $error ]['part'] : $msg;
182
  $msg = do_shortcode( $msg );
183
  return $msg;
184
  }
@@ -617,6 +617,8 @@ DEFAULT_HTML;
617
  $hide_opt = rtrim( $hide_opt );
618
  }
619
 
 
 
620
  if ( is_array($observed_value) ) {
621
  return self::array_value_condition($observed_value, $cond, $hide_opt);
622
  }
178
  );
179
 
180
  $msg = FrmField::get_option( $field, $error );
181
+ $msg = empty( $msg ) ? $defaults[ $error ]['part'] : $msg;
182
  $msg = do_shortcode( $msg );
183
  return $msg;
184
  }
617
  $hide_opt = rtrim( $hide_opt );
618
  }
619
 
620
+ $hide_opt = wp_kses_post( $hide_opt );
621
+
622
  if ( is_array($observed_value) ) {
623
  return self::array_value_condition($observed_value, $cond, $hide_opt);
624
  }
classes/helpers/FrmXMLHelper.php CHANGED
@@ -553,6 +553,11 @@ class FrmXMLHelper {
553
  $post['menu_order'] = $imported['forms'][ (int) $post['menu_order'] ];
554
  }
555
 
 
 
 
 
 
556
  foreach ( $item->postmeta as $meta ) {
557
  self::populate_postmeta($post, $meta, $imported);
558
  unset($meta);
553
  $post['menu_order'] = $imported['forms'][ (int) $post['menu_order'] ];
554
  }
555
 
556
+ // Don't allow default styles to take over a site's default style
557
+ if ( 'frm_styles' == $post['post_type'] ) {
558
+ $post['menu_order'] = 0;
559
+ }
560
+
561
  foreach ( $item->postmeta as $meta ) {
562
  self::populate_postmeta($post, $meta, $imported);
563
  unset($meta);
classes/models/FrmEntryFormat.php CHANGED
@@ -91,7 +91,9 @@ class FrmEntryFormat {
91
  }
92
 
93
  if ( $atts['default_email'] ) {
94
- self::get_field_shortcodes_for_default_email( $f, $values );
 
 
95
  return;
96
  }
97
 
@@ -124,9 +126,14 @@ class FrmEntryFormat {
124
  }
125
 
126
  self::textarea_display_value( $f->type, $atts['plain_text'], $val );
 
127
 
128
- if ( is_array( $val ) && $atts['format'] == 'text' ) {
129
- $val = implode( ', ', $val );
 
 
 
 
130
  }
131
 
132
  self::maybe_strip_html( $atts['plain_text'], $val );
91
  }
92
 
93
  if ( $atts['default_email'] ) {
94
+ if ( $f->type != 'password' && $f->type != 'credit_card' ) {
95
+ self::get_field_shortcodes_for_default_email( $f, $values );
96
+ }
97
  return;
98
  }
99
 
126
  }
127
 
128
  self::textarea_display_value( $f->type, $atts['plain_text'], $val );
129
+ $val = apply_filters( 'frm_display_' . $f->type . '_value_custom', $val, array( 'field' => $f, 'atts' => $atts ) );
130
 
131
+ if ( is_array( $val ) ) {
132
+ if ( $atts['format'] == 'text' ) {
133
+ $val = implode( ', ', $val );
134
+ } else if ( $f->type == 'checkbox' ) {
135
+ $val = array_values( $val );
136
+ }
137
  }
138
 
139
  self::maybe_strip_html( $atts['plain_text'], $val );
classes/models/FrmEntryValidate.php CHANGED
@@ -67,9 +67,8 @@ class FrmEntryValidate {
67
 
68
  self::maybe_clear_value_for_default_blank_setting( $posted_field, $value );
69
 
70
- // Check for an array with only one value
71
- // Don't reset values in "Other" fields because array keys need to be preserved
72
- if ( is_array($value) && count( $value ) == 1 && $args['other'] !== true ) {
73
  $value = reset($value);
74
  }
75
 
67
 
68
  self::maybe_clear_value_for_default_blank_setting( $posted_field, $value );
69
 
70
+ // Reset arrays with only one value if it's not a field where array keys need to be preserved
71
+ if ( is_array($value) && count( $value ) == 1 && isset( $value[0] ) ) {
 
72
  $value = reset($value);
73
  }
74
 
classes/models/FrmField.php CHANGED
@@ -161,6 +161,10 @@ class FrmField {
161
 
162
  self::preserve_phone_format_backslashes( $values );
163
 
 
 
 
 
164
  // serialize array values
165
  foreach ( array( 'default_value', 'field_options', 'options' ) as $opt ) {
166
  if ( isset( $values[ $opt ] ) && is_array( $values[ $opt ] ) ) {
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 );
166
+ }
167
+
168
  // serialize array values
169
  foreach ( array( 'default_value', 'field_options', 'options' ) as $opt ) {
170
  if ( isset( $values[ $opt ] ) && is_array( $values[ $opt ] ) ) {
classes/models/FrmFormAction.php CHANGED
@@ -613,14 +613,9 @@ class FrmFormAction {
613
  continue;
614
  }
615
 
616
- if ( is_array($condition['hide_opt']) ) {
617
- $condition['hide_opt'] = reset($condition['hide_opt']);
618
- }
619
 
620
- $observed_value = isset( $entry->metas[ $condition['hide_field'] ] ) ? $entry->metas[ $condition['hide_field'] ] : '';
621
- if ( $condition['hide_opt'] == 'current_user' ) {
622
- $condition['hide_opt'] = get_current_user_id();
623
- }
624
 
625
  $stop = FrmFieldsHelper::value_meets_condition($observed_value, $condition['hide_field_cond'], $condition['hide_opt']);
626
 
@@ -640,6 +635,44 @@ class FrmFormAction {
640
  return $stop;
641
  }
642
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
643
  public static function default_action_opts( $class = '' ) {
644
  return array(
645
  'classes' => 'frm_icon_font ' . $class,
613
  continue;
614
  }
615
 
616
+ self::prepare_logic_value( $condition['hide_opt'] );
 
 
617
 
618
+ $observed_value = self::get_value_from_entry( $entry, $condition['hide_field'] );
 
 
 
619
 
620
  $stop = FrmFieldsHelper::value_meets_condition($observed_value, $condition['hide_field_cond'], $condition['hide_opt']);
621
 
635
  return $stop;
636
  }
637
 
638
+ /**
639
+ * Prepare the logic value for comparison against the entered value
640
+ *
641
+ * @since 2.01.02
642
+ * @param array|string $logic_value
643
+ */
644
+ private static function prepare_logic_value( &$logic_value ) {
645
+ if ( is_array( $logic_value ) ) {
646
+ $logic_value = reset( $logic_value );
647
+ }
648
+
649
+ if ( $logic_value == 'current_user' ) {
650
+ $logic_value = get_current_user_id();
651
+ }
652
+ }
653
+
654
+
655
+ /**
656
+ * Get the value from a specific field and entry
657
+ *
658
+ * @since 2.01.02
659
+ * @param object $entry
660
+ * @param int $field_id
661
+ * @return array|bool|mixed|string
662
+ */
663
+ private static function get_value_from_entry( $entry, $field_id ) {
664
+ $observed_value = '';
665
+
666
+ if ( isset( $entry->metas[ $field_id ] ) ) {
667
+ $observed_value = $entry->metas[ $field_id ];
668
+ } else if ( $entry->post_id && FrmAppHelper::pro_is_installed() ) {
669
+ $field = FrmField::getOne( $field_id );
670
+ $observed_value = FrmProEntryMetaHelper::get_post_or_meta_value( $entry, $field, array( 'links' => false, 'truncate' => false ) );
671
+ }
672
+
673
+ return $observed_value;
674
+ }
675
+
676
  public static function default_action_opts( $class = '' ) {
677
  return array(
678
  'classes' => 'frm_icon_font ' . $class,
classes/views/frm-entries/list.php CHANGED
@@ -1,5 +1,4 @@
1
  <div id="form_entries_page" class="wrap">
2
- <div class="frmicon icon32"><br/></div>
3
  <h1><?php _e( 'Entries', 'formidable' ); ?>
4
  <?php do_action('frm_entry_inside_h2', $form); ?>
5
  </h1>
1
  <div id="form_entries_page" class="wrap">
 
2
  <h1><?php _e( 'Entries', 'formidable' ); ?>
3
  <?php do_action('frm_entry_inside_h2', $form); ?>
4
  </h1>
classes/views/frm-entries/show.php CHANGED
@@ -1,5 +1,4 @@
1
  <div id="form_show_entry_page" class="wrap">
2
- <div class="frmicon icon32"><br/></div>
3
  <h2><?php _e( 'View Entry', 'formidable' ) ?>
4
  <?php do_action('frm_entry_inside_h2', $entry->form_id); ?>
5
  </h2>
1
  <div id="form_show_entry_page" class="wrap">
 
2
  <h2><?php _e( 'View Entry', 'formidable' ) ?>
3
  <?php do_action('frm_entry_inside_h2', $entry->form_id); ?>
4
  </h2>
classes/views/frm-forms/add_field.php CHANGED
@@ -90,7 +90,8 @@ if ( $display['conf_field'] ) { ?>
90
  <div class="frm_form_fields">
91
  <input type="text" id="conf_field_<?php echo esc_attr( $field['field_key'] ) ?>" name="field_options[conf_input_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['conf_input'] ); ?>" <?php do_action('frm_field_input_html', $field) ?> />
92
  </div>
93
- <div class="frm_ipe_field_conf_desc description <?php echo ($field['conf_desc'] == '') ? 'frm-show-click' : '' ?>"><?php echo ($field['conf_desc'] == '') ? __( '(Click to add description)', 'formidable' ) : force_balance_tags($field['conf_desc']); ?></div>
 
94
  <input type="hidden" name="field_options[conf_desc_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['conf_desc'] ); ?>" />
95
  </div>
96
  <?php if ( $display['clear_on_focus'] ) { ?>
90
  <div class="frm_form_fields">
91
  <input type="text" id="conf_field_<?php echo esc_attr( $field['field_key'] ) ?>" name="field_options[conf_input_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['conf_input'] ); ?>" <?php do_action('frm_field_input_html', $field) ?> />
92
  </div>
93
+ <div id="conf_field_description_<?php echo esc_attr( $field['id'] ) ?>" class="frm_ipe_field_conf_desc description <?php echo ($field['conf_desc'] == '') ? 'frm-show-click' : '' ?>"><?php
94
+ echo ($field['conf_desc'] == '') ? __( '(Click to add description)', 'formidable' ) : force_balance_tags($field['conf_desc']); ?></div>
95
  <input type="hidden" name="field_options[conf_desc_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['conf_desc'] ); ?>" />
96
  </div>
97
  <?php if ( $display['clear_on_focus'] ) { ?>
classes/views/frm-forms/edit.php CHANGED
@@ -1,5 +1,4 @@
1
  <div class="wrap">
2
- <div class="frmicon icon32"><br/></div>
3
  <h2><?php echo ( $form->is_template ? __( 'Templates', 'formidable' ) : __( 'Build', 'formidable' )); ?>
4
  <a href="?page=formidable&amp;frm_action=new" class="add-new-h2"><?php _e( 'Add New', 'formidable' ); ?></a>
5
  </h2>
1
  <div class="wrap">
 
2
  <h2><?php echo ( $form->is_template ? __( 'Templates', 'formidable' ) : __( 'Build', 'formidable' )); ?>
3
  <a href="?page=formidable&amp;frm_action=new" class="add-new-h2"><?php _e( 'Add New', 'formidable' ); ?></a>
4
  </h2>
classes/views/frm-forms/form.php CHANGED
@@ -15,7 +15,7 @@
15
  </div>
16
  </div>
17
 
18
- <div <?php echo version_compare( $GLOBALS['wp_version'], '3.7.2', '>') ? 'class="postbox"' : ''; ?>>
19
  <div class="frm_no_fields <?php echo ( isset($values['fields']) && ! empty($values['fields']) ) ? 'frm_hidden' : ''; ?>">
20
  <div class="alignleft sketch1">
21
  <img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/sketch_arrow1.png' ); ?>" alt="" />
@@ -48,7 +48,7 @@
48
  </div>
49
  <div class="clear"></div>
50
  </div>
51
- <ul id="new_fields" class="frm_sorting <?php echo version_compare( $GLOBALS['wp_version'], '3.7.2', '>') ? 'inside' : ''; ?>">
52
  <?php
53
  if ( isset($values['fields']) && ! empty($values['fields']) ) {
54
  $count = 0;
15
  </div>
16
  </div>
17
 
18
+ <div class="postbox">
19
  <div class="frm_no_fields <?php echo ( isset($values['fields']) && ! empty($values['fields']) ) ? 'frm_hidden' : ''; ?>">
20
  <div class="alignleft sketch1">
21
  <img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/sketch_arrow1.png' ); ?>" alt="" />
48
  </div>
49
  <div class="clear"></div>
50
  </div>
51
+ <ul id="new_fields" class="frm_sorting inside">
52
  <?php
53
  if ( isset($values['fields']) && ! empty($values['fields']) ) {
54
  $count = 0;
classes/views/frm-forms/list.php CHANGED
@@ -1,5 +1,4 @@
1
  <div class="wrap">
2
- <div class="frmicon icon32"><br/></div>
3
  <h2 id="frm_form_page_header">
4
  <?php
5
  echo $params['template'] ? __( 'Templates', 'formidable' ) : __( 'Forms', 'formidable' );
1
  <div class="wrap">
 
2
  <h2 id="frm_form_page_header">
3
  <?php
4
  echo $params['template'] ? __( 'Templates', 'formidable' ) : __( 'Forms', 'formidable' );
classes/views/frm-forms/new.php CHANGED
@@ -1,5 +1,4 @@
1
  <div class="wrap">
2
- <div class="frmicon icon32"><br/></div>
3
  <h2><?php _e( 'Build New Form', 'formidable' ) ?>
4
  <a href="?page=formidable-new" class="add-new-h2 frm_invisible"><?php _e( 'Add New', 'formidable' ); ?></a>
5
  </h2>
1
  <div class="wrap">
 
2
  <h2><?php _e( 'Build New Form', 'formidable' ) ?>
3
  <a href="?page=formidable-new" class="add-new-h2 frm_invisible"><?php _e( 'Add New', 'formidable' ); ?></a>
4
  </h2>
classes/views/frm-forms/settings.php CHANGED
@@ -1,5 +1,4 @@
1
  <div id="form_settings_page" class="wrap">
2
- <div class="frmicon icon32"><br/></div>
3
  <h2><?php _e( 'Settings', 'formidable' ) ?>
4
  <a href="#" class="add-new-h2 frm_invisible"></a>
5
  </h2>
1
  <div id="form_settings_page" class="wrap">
 
2
  <h2><?php _e( 'Settings', 'formidable' ) ?>
3
  <a href="#" class="add-new-h2 frm_invisible"></a>
4
  </h2>
classes/views/frm-settings/form.php CHANGED
@@ -1,5 +1,4 @@
1
  <div id="form_global_settings" class="wrap">
2
- <div class="frmicon icon32"><br/></div>
3
  <h1><?php _e( 'Global Settings', 'formidable' ); ?></h1>
4
 
5
  <?php require( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); ?>
@@ -40,11 +39,11 @@
40
 
41
  <h3><?php _e( 'Styling & Scripts', 'formidable' ); ?></h3>
42
 
43
- <p><label class="frm_left_label"><?php _e( 'Load Formidable styling', 'formidable' ) ?></label>
44
  <select id="frm_load_style" name="frm_load_style">
45
  <option value="all" <?php selected($frm_settings->load_style, 'all') ?>><?php _e( 'on every page of your site', 'formidable' ) ?></option>
46
  <option value="dynamic" <?php selected($frm_settings->load_style, 'dynamic') ?>><?php _e( 'only on applicable pages', 'formidable' ) ?></option>
47
- <option value="none" <?php selected($frm_settings->load_style, 'none') ?>><?php _e( 'Don\'t use Formidable styling on any page', 'formidable' ) ?></option>
48
  </select>
49
  </p>
50
 
1
  <div id="form_global_settings" class="wrap">
 
2
  <h1><?php _e( 'Global Settings', 'formidable' ); ?></h1>
3
 
4
  <?php require( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); ?>
39
 
40
  <h3><?php _e( 'Styling & Scripts', 'formidable' ); ?></h3>
41
 
42
+ <p><label class="frm_left_label"><?php _e( 'Load form styling', 'formidable' ) ?></label>
43
  <select id="frm_load_style" name="frm_load_style">
44
  <option value="all" <?php selected($frm_settings->load_style, 'all') ?>><?php _e( 'on every page of your site', 'formidable' ) ?></option>
45
  <option value="dynamic" <?php selected($frm_settings->load_style, 'dynamic') ?>><?php _e( 'only on applicable pages', 'formidable' ) ?></option>
46
+ <option value="none" <?php selected($frm_settings->load_style, 'none') ?>><?php _e( 'Don\'t use form styling on any page', 'formidable' ) ?></option>
47
  </select>
48
  </p>
49
 
classes/views/styles/_date-fields.php CHANGED
@@ -27,7 +27,7 @@ unset($theme_names);
27
  <label><?php _e( 'Theme', 'formidable' ) ?></label>
28
  <select name="<?php echo esc_attr( $frm_style->get_field_name('theme_selector') ) ?>">
29
  <?php foreach ( $jquery_themes as $theme_name => $theme_title ) { ?>
30
- <option value="<?php echo esc_attr( $theme_name ) ?>" id="90_<?php echo esc_attr( $alt_img_name[ $theme_name ] ); ?>" <?php selected( $theme_title, $style->post_content['theme_name'] ) ?>>
31
  <?php echo esc_html( $theme_title ) ?>
32
  </option>
33
  <?php } ?>
27
  <label><?php _e( 'Theme', 'formidable' ) ?></label>
28
  <select name="<?php echo esc_attr( $frm_style->get_field_name('theme_selector') ) ?>">
29
  <?php foreach ( $jquery_themes as $theme_name => $theme_title ) { ?>
30
+ <option value="<?php echo esc_attr( $theme_name ) ?>" id="90_<?php echo esc_attr( $alt_img_name[ $theme_name ] ); ?>" <?php selected( $theme_name, $style->post_content['theme_selector'] ) ?>>
31
  <?php echo esc_html( $theme_title ) ?>
32
  </option>
33
  <?php } ?>
classes/views/xml/import_form.php CHANGED
@@ -1,5 +1,4 @@
1
  <div class="wrap">
2
- <div class="frmicon icon32"><br/></div>
3
  <h1><?php _e( 'Import/Export', 'formidable' ); ?></h1>
4
 
5
  <?php include( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); ?>
1
  <div class="wrap">
 
2
  <h1><?php _e( 'Import/Export', 'formidable' ); ?></h1>
3
 
4
  <?php include( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); ?>
css/_single_theme.css.php CHANGED
@@ -28,6 +28,8 @@ $label_margin = (int) $width + 10;
28
  $minus_icons = FrmStylesHelper::minus_icons();
29
  $arrow_icons = FrmStylesHelper::arrow_icons();
30
 
 
 
31
  // If left/right label is over a certain size, adjust the field description margin at a different screen size
32
  $temp_label_width = str_replace( 'px', '', $width );
33
  $change_margin = false;
@@ -83,7 +85,7 @@ if ( ! isset( $center_form ) ) {
83
  .<?php echo esc_html( $style_class ) ?> h3.frm_form_title{
84
  font-size:<?php echo esc_html( $title_size . $important ) ?>;
85
  color:#<?php echo esc_html( $title_color . $important ) ?>;
86
- font-family:<?php echo FrmAppHelper::kses( stripslashes( $font ) ) ?>;
87
  margin-top:<?php echo esc_html( $title_margin_top . $important ) ?>;
88
  margin-bottom:<?php echo esc_html( $title_margin_bottom . $important ) ?>;
89
  }
@@ -126,7 +128,7 @@ if ( ! isset( $center_form ) ) {
126
 
127
  .<?php echo esc_html( $style_class ) ?> label.frm_primary_label,
128
  .<?php echo esc_html( $style_class ) ?>.frm_login_form label{
129
- font-family:<?php echo FrmAppHelper::kses( stripslashes( $font ) ) ?>;
130
  font-size:<?php echo esc_html( $font_size . $important ) ?>;
131
  color:#<?php echo esc_html( $label_color . $important ) ?>;
132
  font-weight:<?php echo esc_html( $weight . $important ) ?>;
@@ -138,7 +140,7 @@ if ( ! isset( $center_form ) ) {
138
  }
139
 
140
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_html_container{
141
- font-family:<?php echo FrmAppHelper::kses( stripslashes( $font ) ) ?>;
142
  font-size:<?php echo esc_html( $form_desc_size . $important ) ?>;
143
  color:#<?php echo esc_html( $form_desc_color . $important ) ?>;
144
  }
@@ -187,7 +189,7 @@ if ( ! isset( $center_form ) ) {
187
  .<?php echo esc_html( $style_class ) ?> .frm_error{
188
  margin:0;
189
  padding:0;
190
- font-family:<?php echo FrmAppHelper::kses( stripslashes($font) . $important ) ?>;
191
  font-size:<?php echo esc_html( $description_font_size . $important ) ?>;
192
  color:#<?php echo esc_html( $description_color . $important ) ?>;
193
  font-weight:<?php echo esc_html( $description_weight . $important ) ?>;
@@ -297,7 +299,7 @@ if ( ! isset( $center_form ) ) {
297
 
298
  .<?php echo esc_html( $style_class ) ?> .frm_scale label{
299
  font-weight:<?php echo esc_html( $check_weight . $important ) ?>;
300
- font-family:<?php echo FrmAppHelper::kses( stripslashes($font) . $important ) ?>;
301
  font-size:<?php echo esc_html( $check_font_size . $important ) ?>;
302
  color:#<?php echo esc_html( $check_label_color . $important ) ?>;
303
  }
@@ -317,7 +319,7 @@ if ( ! isset( $center_form ) ) {
317
  .<?php echo esc_html( $style_class ) ?> select,
318
  .<?php echo esc_html( $style_class ) ?> textarea,
319
  .<?php echo esc_html( $style_class ) ?> .chosen-container{
320
- font-family:<?php echo FrmAppHelper::kses( stripslashes($font) . $important ) ?>;
321
  font-size:<?php echo esc_html( $field_font_size ) ?>;
322
  margin-bottom:0<?php echo esc_html( $important ) ?>;
323
  }
@@ -392,7 +394,7 @@ if ( ! isset( $center_form ) ) {
392
  .<?php echo esc_html( $style_class ) ?> input[type=file]{
393
  color:#<?php echo esc_html( $text_color . $important ) ?>;
394
  padding:0px;
395
- font-family:<?php echo FrmAppHelper::kses( stripslashes( $font ) . $important ) ?>;
396
  font-size:<?php echo esc_html( $field_font_size . $important ) ?>;
397
  }
398
 
@@ -401,7 +403,7 @@ if ( ! isset( $center_form ) ) {
401
  }
402
 
403
  .<?php echo esc_html( $style_class ) ?> .frm_file_names, .<?php echo esc_html( $style_class ) ?> .frm_uploaded_files .frm_remove_link{
404
- font-family:<?php echo FrmAppHelper::kses( stripslashes( $font ) . $important ) ?>;
405
  font-size:<?php echo esc_html( $field_font_size . $important ) ?>;
406
  }
407
 
@@ -492,7 +494,7 @@ if ( ! $submit_style ) { ?>
492
  .frm_form_submit_style,
493
  .<?php echo esc_html( $style_class ) ?>.frm_login_form input[type=submit]{
494
  width:<?php echo esc_html( ( $submit_width == '' ? 'auto' : $submit_width ) . $important ) ?>;
495
- font-family:<?php echo FrmAppHelper::kses( stripslashes( $font ) ) ?>;
496
  font-size:<?php echo esc_html( $submit_font_size . $important ); ?>;
497
  height:<?php echo esc_html( $submit_height . $important ) ?>;
498
  line-height:normal<?php echo esc_html( $important ) ?>;
@@ -557,13 +559,13 @@ if ( ! $submit_style ) { ?>
557
  ?>
558
 
559
  .<?php echo esc_html( $style_class ) ?> a.frm_save_draft{
560
- font-family:<?php echo FrmAppHelper::kses( stripslashes( $font ) ) ?>;
561
  font-size:<?php echo esc_html( $submit_font_size ) ?>;
562
  font-weight:<?php echo esc_html( $submit_weight ) ?>;
563
  }
564
 
565
  .<?php echo esc_html( $style_class ) ?> #frm_field_cptch_number_container{
566
- font-family:<?php echo FrmAppHelper::kses( stripslashes( $font ) ) ?>;
567
  font-size:<?php echo esc_html( $font_size . $important ) ?>;
568
  color:#<?php echo esc_html( $label_color . $important ) ?>;
569
  font-weight:<?php echo esc_html( $weight . $important ) ?>;
@@ -596,7 +598,7 @@ if ( ! $submit_style ) { ?>
596
 
597
  .<?php echo esc_html( $style_class ) ?> .frm_radio label,
598
  .<?php echo esc_html( $style_class ) ?> .frm_checkbox label{
599
- font-family:<?php echo FrmAppHelper::kses( stripslashes($font) . $important ) ?>;
600
  font-size:<?php echo esc_html( $check_font_size . $important ) ?>;
601
  color:#<?php echo esc_html( $check_label_color . $important ) ?>;
602
  font-weight:<?php echo esc_html( $check_weight . $important ) ?>;
@@ -636,6 +638,7 @@ if ( ! $submit_style ) { ?>
636
  .<?php echo esc_html( $style_class ) ?> .frm_error_style{
637
  background-color:<?php echo esc_html( ( empty( $error_bg ) ? 'transparent' : '#' . $error_bg ) . $important ); ?>;
638
  border:1px solid #<?php echo esc_html( $error_border . $important ) ?>;
 
639
  color:#<?php echo esc_html( $error_text . $important ) ?>;
640
  font-size:<?php echo esc_html( $error_font_size . $important ) ?>;
641
  margin:0;
@@ -647,6 +650,7 @@ if ( ! $submit_style ) { ?>
647
  border:1px solid #<?php echo esc_html( $success_border_color ) ?>;
648
  background-color:<?php echo esc_html( ( empty( $success_bg_color ) ? 'transparent' : '#' . $success_bg_color ) . $important ); ?>;
649
  color:#<?php echo esc_html( $success_text_color ) ?>;
 
650
  }
651
 
652
  .<?php echo esc_html( $style_class ) ?> .frm_message{
@@ -738,7 +742,7 @@ if ( ! $submit_style ) { ?>
738
  -webkit-border-radius:<?php echo esc_html( $border_radius . $important ) ?>;
739
  border-radius:<?php echo esc_html( $border_radius . $important ) ?>;
740
  font-size:<?php echo esc_html( $submit_font_size . $important ) ?>;
741
- font-family:<?php echo FrmAppHelper::kses( stripslashes($font) . $important ) ?>;
742
  font-weight:<?php echo esc_html( $submit_weight . $important ) ?>;
743
  color:#<?php echo esc_html( $submit_text_color . $important ) ?>;
744
  background:#<?php echo esc_html( $submit_bg_color . $important ) ?>;
28
  $minus_icons = FrmStylesHelper::minus_icons();
29
  $arrow_icons = FrmStylesHelper::arrow_icons();
30
 
31
+ $font = stripslashes( $font );
32
+
33
  // If left/right label is over a certain size, adjust the field description margin at a different screen size
34
  $temp_label_width = str_replace( 'px', '', $width );
35
  $change_margin = false;
85
  .<?php echo esc_html( $style_class ) ?> h3.frm_form_title{
86
  font-size:<?php echo esc_html( $title_size . $important ) ?>;
87
  color:#<?php echo esc_html( $title_color . $important ) ?>;
88
+ font-family:<?php echo FrmAppHelper::kses( $font ) ?>;
89
  margin-top:<?php echo esc_html( $title_margin_top . $important ) ?>;
90
  margin-bottom:<?php echo esc_html( $title_margin_bottom . $important ) ?>;
91
  }
128
 
129
  .<?php echo esc_html( $style_class ) ?> label.frm_primary_label,
130
  .<?php echo esc_html( $style_class ) ?>.frm_login_form label{
131
+ font-family:<?php echo FrmAppHelper::kses( $font ) ?>;
132
  font-size:<?php echo esc_html( $font_size . $important ) ?>;
133
  color:#<?php echo esc_html( $label_color . $important ) ?>;
134
  font-weight:<?php echo esc_html( $weight . $important ) ?>;
140
  }
141
 
142
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_html_container{
143
+ font-family:<?php echo FrmAppHelper::kses( $font ) ?>;
144
  font-size:<?php echo esc_html( $form_desc_size . $important ) ?>;
145
  color:#<?php echo esc_html( $form_desc_color . $important ) ?>;
146
  }
189
  .<?php echo esc_html( $style_class ) ?> .frm_error{
190
  margin:0;
191
  padding:0;
192
+ font-family:<?php echo FrmAppHelper::kses( $font . $important ) ?>;
193
  font-size:<?php echo esc_html( $description_font_size . $important ) ?>;
194
  color:#<?php echo esc_html( $description_color . $important ) ?>;
195
  font-weight:<?php echo esc_html( $description_weight . $important ) ?>;
299
 
300
  .<?php echo esc_html( $style_class ) ?> .frm_scale label{
301
  font-weight:<?php echo esc_html( $check_weight . $important ) ?>;
302
+ font-family:<?php echo FrmAppHelper::kses( $font . $important ) ?>;
303
  font-size:<?php echo esc_html( $check_font_size . $important ) ?>;
304
  color:#<?php echo esc_html( $check_label_color . $important ) ?>;
305
  }
319
  .<?php echo esc_html( $style_class ) ?> select,
320
  .<?php echo esc_html( $style_class ) ?> textarea,
321
  .<?php echo esc_html( $style_class ) ?> .chosen-container{
322
+ font-family:<?php echo FrmAppHelper::kses( $font . $important ) ?>;
323
  font-size:<?php echo esc_html( $field_font_size ) ?>;
324
  margin-bottom:0<?php echo esc_html( $important ) ?>;
325
  }
394
  .<?php echo esc_html( $style_class ) ?> input[type=file]{
395
  color:#<?php echo esc_html( $text_color . $important ) ?>;
396
  padding:0px;
397
+ font-family:<?php echo FrmAppHelper::kses( $font . $important ) ?>;
398
  font-size:<?php echo esc_html( $field_font_size . $important ) ?>;
399
  }
400
 
403
  }
404
 
405
  .<?php echo esc_html( $style_class ) ?> .frm_file_names, .<?php echo esc_html( $style_class ) ?> .frm_uploaded_files .frm_remove_link{
406
+ font-family:<?php echo FrmAppHelper::kses( $font . $important ) ?>;
407
  font-size:<?php echo esc_html( $field_font_size . $important ) ?>;
408
  }
409
 
494
  .frm_form_submit_style,
495
  .<?php echo esc_html( $style_class ) ?>.frm_login_form input[type=submit]{
496
  width:<?php echo esc_html( ( $submit_width == '' ? 'auto' : $submit_width ) . $important ) ?>;
497
+ font-family:<?php echo FrmAppHelper::kses( $font ) ?>;
498
  font-size:<?php echo esc_html( $submit_font_size . $important ); ?>;
499
  height:<?php echo esc_html( $submit_height . $important ) ?>;
500
  line-height:normal<?php echo esc_html( $important ) ?>;
559
  ?>
560
 
561
  .<?php echo esc_html( $style_class ) ?> a.frm_save_draft{
562
+ font-family:<?php echo FrmAppHelper::kses( $font ) ?>;
563
  font-size:<?php echo esc_html( $submit_font_size ) ?>;
564
  font-weight:<?php echo esc_html( $submit_weight ) ?>;
565
  }
566
 
567
  .<?php echo esc_html( $style_class ) ?> #frm_field_cptch_number_container{
568
+ font-family:<?php echo FrmAppHelper::kses( $font ) ?>;
569
  font-size:<?php echo esc_html( $font_size . $important ) ?>;
570
  color:#<?php echo esc_html( $label_color . $important ) ?>;
571
  font-weight:<?php echo esc_html( $weight . $important ) ?>;
598
 
599
  .<?php echo esc_html( $style_class ) ?> .frm_radio label,
600
  .<?php echo esc_html( $style_class ) ?> .frm_checkbox label{
601
+ font-family:<?php echo FrmAppHelper::kses( $font . $important ) ?>;
602
  font-size:<?php echo esc_html( $check_font_size . $important ) ?>;
603
  color:#<?php echo esc_html( $check_label_color . $important ) ?>;
604
  font-weight:<?php echo esc_html( $check_weight . $important ) ?>;
638
  .<?php echo esc_html( $style_class ) ?> .frm_error_style{
639
  background-color:<?php echo esc_html( ( empty( $error_bg ) ? 'transparent' : '#' . $error_bg ) . $important ); ?>;
640
  border:1px solid #<?php echo esc_html( $error_border . $important ) ?>;
641
+ border-radius:<?php echo esc_html( $border_radius . $important ) ?>;
642
  color:#<?php echo esc_html( $error_text . $important ) ?>;
643
  font-size:<?php echo esc_html( $error_font_size . $important ) ?>;
644
  margin:0;
650
  border:1px solid #<?php echo esc_html( $success_border_color ) ?>;
651
  background-color:<?php echo esc_html( ( empty( $success_bg_color ) ? 'transparent' : '#' . $success_bg_color ) . $important ); ?>;
652
  color:#<?php echo esc_html( $success_text_color ) ?>;
653
+ border-radius:<?php echo esc_html( $border_radius . $important ) ?>;
654
  }
655
 
656
  .<?php echo esc_html( $style_class ) ?> .frm_message{
742
  -webkit-border-radius:<?php echo esc_html( $border_radius . $important ) ?>;
743
  border-radius:<?php echo esc_html( $border_radius . $important ) ?>;
744
  font-size:<?php echo esc_html( $submit_font_size . $important ) ?>;
745
+ font-family:<?php echo FrmAppHelper::kses( $font . $important ) ?>;
746
  font-weight:<?php echo esc_html( $submit_weight . $important ) ?>;
747
  color:#<?php echo esc_html( $submit_text_color . $important ) ?>;
748
  background:#<?php echo esc_html( $submit_bg_color . $important ) ?>;
css/custom_theme.css.php CHANGED
@@ -176,9 +176,16 @@ legend.frm_hidden{
176
  text-align:center;
177
  }
178
 
179
- .with_frm_style.frm_center_submit .frm_submit input[type=submit], .with_frm_style.frm_center_submit .frm_submit input[type=button]{
 
180
  margin-bottom:8px !important;
181
  }
 
 
 
 
 
 
182
  .with_frm_style.frm_center_submit .frm_submit .frm_ajax_loading{
183
  display: block;
184
  margin: 0 auto;
176
  text-align:center;
177
  }
178
 
179
+ .with_frm_style.frm_center_submit .frm_submit input[type=submit],
180
+ .with_frm_style.frm_center_submit .frm_submit input[type=button]{
181
  margin-bottom:8px !important;
182
  }
183
+
184
+ .with_frm_style .frm_submit input[type=submit],
185
+ .with_frm_style .frm_submit input[type=button]{
186
+ -webkit-appearance: none;
187
+ }
188
+
189
  .with_frm_style.frm_center_submit .frm_submit .frm_ajax_loading{
190
  display: block;
191
  margin: 0 auto;
css/frm_admin.css CHANGED
@@ -29,7 +29,7 @@ ul.frm_form_nav > li{
29
  border-right:0;
30
  background-color:#EEE;
31
  }
32
- .frm_38_trigger .frm_form_nav a { background-color:#fff; }
33
  .frm_form_nav a:active, .frm_form_nav a:focus{
34
  outline:none;
35
  -webkit-box-shadow:none;
@@ -634,8 +634,7 @@ img.frm_help{
634
  float:left;
635
  }
636
 
637
- label input[type="checkbox"], label input[type="radio"]{vertical-align:baseline;}
638
- .frm_38_trigger label input[type="checkbox"], .frm_38_trigger label input[type="radio"] {vertical-align:inherit;}
639
 
640
  #editorcontainer #dyncontent{
641
  margin:0; width:100%;
@@ -651,13 +650,6 @@ label input[type="checkbox"], label input[type="radio"]{vertical-align:baseline;
651
  .frmcenter{text-align:center;}
652
 
653
  /*ICONS*/
654
- #wpbody-content .frmicon.icon32, .icon32-posts-frm_display{background: url(../images/form_32_sprite.png) no-repeat top left !important;}
655
- #wpbody-content #form_settings_page .icon32 {background-position: -56px 0 !important;}
656
- #wpbody-content #form_entries_page .icon32 {background-position:-114px 0 !important;}
657
- #wpbody-content #form_views_page .icon32, #wpbody-content .icon32-posts-frm_display {background-position: -173px 0 !important;}
658
- #wpbody-content #form_reports_page .icon32 {background-position: -230px 0 !important;}
659
- #wpbody-content #form_global_settings .frmicon.icon32 {background-position: -290px 0 !important;}
660
-
661
  .frm_postbox_icon {
662
  margin: -6px 0 0 -10px;
663
 
@@ -667,8 +659,8 @@ label input[type="checkbox"], label input[type="radio"]{vertical-align:baseline;
667
  height:34px;
668
  }
669
  .frm_form_builder a:hover{text-decoration:underline;}
670
- .frm_form_builder .frm_38_trigger .widget-title h4 {padding:10px 15px;}
671
- .frm_form_builder .frm_38_trigger .widget-top a.widget-action:after {padding: 7px 12px 0;}
672
  #postbox-container-1{width:270px;}
673
  #postbox-container-1 .nodrag a{cursor:pointer;}
674
  #postbox-container-1 .frm_field_list #frm-insert-fields{
@@ -889,8 +881,7 @@ table td, .form-table tr td{vertical-align:top;}
889
  }
890
 
891
  .frm_rte{background:url(../pro/images/rte.png) no-repeat; }
892
- .frm_rte .howto{margin:10px 0 45px 0;}
893
- .frm_38_trigger .frm_rte .howto{margin-bottom:39px;}
894
 
895
  .subform_section{
896
  margin:25px;
@@ -937,11 +928,11 @@ table td, .form-table tr td{vertical-align:top;}
937
  width:300px;
938
  }
939
  .frm_sorting .frm_rte textarea{
940
- width:653px;background:#fff; margin:1px 0; border:1px solid #dfdfdf; border-top:none;
 
941
  -moz-border-radius:0; -webkit-border-radius:0; border-radius:0;
942
  float:none !important;
943
  }
944
- .frm_38_trigger .frm_sorting .frm_rte textarea{margin-bottom:0;}
945
 
946
  .frm_full_rte textarea{width:98%; padding:0;}
947
  .frm_field_box{padding:5px;min-height:20px;}
@@ -1012,6 +1003,12 @@ li.ui-state-default.selected .frm-show-click.frm_import_options select {
1012
  }
1013
 
1014
  .frm_sorting span.ui-icon{width:16px;}
 
 
 
 
 
 
1015
  #form_settings_page .tabs-panel, .frm_settings_form .tabs-panel{max-height:none !important; min-height:260px !important;}
1016
  #form_settings_page #post-body-content{min-width:650px;}
1017
  #form_settings_page .frm_posttax_row select{max-width:35%;}
@@ -1025,7 +1022,7 @@ select.frm_cancelnew, input.frm_enternew{width:175px;}
1025
  #contextual-help-columns div.tabs-panel.general_settings.frm_license_box{min-height:0;border-bottom:none;}
1026
  .general_settings #frm_license_top{float:left;width:55%}
1027
  .categorydiv div.tabs-panel.general_settings{max-height:none;}
1028
- .frm_38_trigger .categorydiv div.tabs-panel.general_settings .postbox{margin-bottom:0;}
1029
  .tabs-panel{height:auto !important; min-height:260px;}
1030
  .tabs-panel.panel_secondary{min-height:20px;margin-top:10px;margin-left:150px;}
1031
  .edd_frm_license_row{
@@ -1389,8 +1386,13 @@ a.frm_action_icon:hover {text-decoration:none;}
1389
  content: '\e60b';
1390
  }
1391
 
1392
- .frm_action_icon.frm_required_icon:before{content: '\e612'; font-size:7px; vertical-align:top; line-height: 2.1em; margin-right:3px;}
1393
- .frm_38_trigger .frm_action_icon.frm_required_icon:before{font-size:8px;}
 
 
 
 
 
1394
  .frm_action_icon.frm_required_icon,
1395
  .ui-state-default .frm_action_icon.frm_required_icon{
1396
  color:#000;
@@ -1436,7 +1438,7 @@ span.howto{display:inline;}
1436
  }
1437
 
1438
  .tagchecklist .frm_exclude_cat_list span{display:inline;}
1439
- .frm_38_trigger .tagchecklist span a:before{line-height:23px;text-align:start;}
1440
 
1441
  /* Entries Page */
1442
  .frm_no_entries_form{
@@ -1663,8 +1665,8 @@ tr.frm_options_heading td{
1663
  .frm_validation_msg p label{float:left;width:25%;max-width:100px;}
1664
  .frm_sorting .form-field .widget .frm_validation_msg input{width:71%;}
1665
 
1666
- .frm_38_trigger .frm_sorting .widget-inside .form-table td p,
1667
- .frm_38_trigger .frm_sorting .widget-inside .form-wrap label{
1668
  padding:10px 0;
1669
  }
1670
 
@@ -1782,17 +1784,36 @@ table td.frm_left_label{
1782
  #menu-management.frm-menu-boxes .menu-edit{margin-bottom:0;}
1783
  #menu-management select{max-width:100%;}
1784
  .general_settings .postbox .manage-menus{border-top:none;border-left:none;border-right:none;}
1785
- .postbox .frm-help-tabs.inside, #poststuff .frm-help-tabs.inside{padding-left:0;padding-right:0;margin-top:0;margin-bottom:0;padding-bottom:12px;}
1786
- .frm_38_trigger .postbox .frm-help-tabs.inside{padding-bottom:inherit;}
1787
- .frm-help-tabs form > .submit, #contextual-help-columns > .submit{margin-left:154px;padding-left:5px;}
1788
- .frm_38_trigger .frm-help-tabs form > .submit, .frm_38_trigger #contextual-help-columns > .submit{padding-left:0.9em;}
1789
- .frm_38_trigger #poststuff .contextual-help-tabs .active, .frm_38_trigger #poststuff .contextual-help-tabs .active a, .frm_38_trigger #poststuff .contextual-help-tabs .active a:hover{background:#fafafa;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1790
  .wrap .contextual-help-tabs ul{min-height:260px;}
1791
- .frm_38_trigger .postbox .menu-settings h3{border-bottom:none;}
 
 
1792
  #poststuff h3.frm_no_bg{background:none;cursor:default;}
1793
  .frm-postbox-no-h3{padding-top:10px;}
1794
- .postbox #contextual-help-back{border-right:none;right:0;}
1795
- .frm_38_trigger .postbox #contextual-help-back{background:#fafafa;}
 
 
 
1796
  #contextual-help-columns div.tabs-panel{
1797
  background:transparent;
1798
  border-width:0;
@@ -1820,21 +1841,19 @@ table td.frm_left_label{
1820
  background:#FDFDFD;
1821
  }
1822
 
1823
- .frm_38_trigger .frm_sorting > li.ui-state-default.frm_not_divider:hover,
1824
- .frm_38_trigger .frm_sorting > li.ui-state-default.frm_not_divider.selected,
1825
- .frm_38_trigger .frm_sorting > li.ui-state-default.edit_field_type_divider.selected .divider_section_only,
1826
- .frm_38_trigger .frm_sorting > li.ui-state-default.edit_field_type_divider .divider_section_only:hover,
1827
- .frm_38_trigger .frm_update_msg{
1828
  box-shadow:0 1px 1px rgba(0, 0, 0, 0.04);
1829
  }
1830
 
1831
- .no_repeat_section .frm_sorting > li.ui-state-default.edit_field_type_end_divider:hover,
1832
- .frm_38_trigger .no_repeat_section .frm_sorting > li.ui-state-default.edit_field_type_end_divider:hover{
1833
  box-shadow:none;
1834
  }
1835
 
1836
  .frm_sorting li.ui-state-default.frm_not_divider.selected,
1837
- .frm_38_trigger .frm_sorting li.ui-state-default.frm_not_divider.selected,
1838
  .frm_sorting li.ui-state-default.selected.edit_field_type_divider .divider_section_only{
1839
  background-color: #fbfdff;
1840
  border: 1px solid #5b9dd9;
@@ -2264,15 +2283,7 @@ Responsive Design
2264
  .field_type_list li{margin-right:4px;}
2265
  .frm_drag_inst{font-size: 40px;text-align:center;}
2266
  }
2267
- @media print,
2268
- (-o-min-device-pixel-ratio: 5/4),
2269
- (-webkit-min-device-pixel-ratio: 1.25),
2270
- (min-resolution: 120dpi) {
2271
- #wpbody-content .frmicon.icon32, .icon32-posts-frm_display {
2272
- background: url(../images/form_32_sprite-2x.png) no-repeat !important;
2273
- background-size: 325px 33px !important;
2274
- }
2275
- }
2276
  @media only screen and (max-width: 782px){
2277
  #form_settings_page .advanced_settings .form-table td, .form-table th{
2278
  display:table-cell;
@@ -2333,8 +2344,11 @@ Responsive Design
2333
  /* PRINT */
2334
  @media print {
2335
  #adminmenuwrap, #adminmenuback, #wphead, #button_bar, #submitdiv, .button-secondary,
2336
- #screen-metas, #screen-meta-links, #footer, #wpfooter, .inner-sidebar, .frm_form_nav, .icon32,
2337
- .frm_flash_graph, .frm_no_print, object{visibility:hidden;display:none !important;}
 
 
 
2338
  #poststuff #post-body.columns-2{margin-right:0;}
2339
  .widget, .postbox, .stuffbox, .postbox h3{border-width:0 !important;border-color:#fff;}
2340
  .postbox{background:#fff !important;border:none;position:static;}
29
  border-right:0;
30
  background-color:#EEE;
31
  }
32
+ .frm_form_nav a { background-color:#fff; }
33
  .frm_form_nav a:active, .frm_form_nav a:focus{
34
  outline:none;
35
  -webkit-box-shadow:none;
634
  float:left;
635
  }
636
 
637
+ label input[type="checkbox"], label input[type="radio"] {vertical-align:inherit;}
 
638
 
639
  #editorcontainer #dyncontent{
640
  margin:0; width:100%;
650
  .frmcenter{text-align:center;}
651
 
652
  /*ICONS*/
 
 
 
 
 
 
 
653
  .frm_postbox_icon {
654
  margin: -6px 0 0 -10px;
655
 
659
  height:34px;
660
  }
661
  .frm_form_builder a:hover{text-decoration:underline;}
662
+ .frm_form_builder .widget-title h4 {padding:10px 15px;}
663
+ .frm_form_builder .widget-top a.widget-action:after {padding: 7px 12px 0;}
664
  #postbox-container-1{width:270px;}
665
  #postbox-container-1 .nodrag a{cursor:pointer;}
666
  #postbox-container-1 .frm_field_list #frm-insert-fields{
881
  }
882
 
883
  .frm_rte{background:url(../pro/images/rte.png) no-repeat; }
884
+ .frm_rte .howto{margin:10px 0 39px 0;}
 
885
 
886
  .subform_section{
887
  margin:25px;
928
  width:300px;
929
  }
930
  .frm_sorting .frm_rte textarea{
931
+ width:653px;background:#fff; margin:1px 0 0;
932
+ border:1px solid #dfdfdf; border-top:none;
933
  -moz-border-radius:0; -webkit-border-radius:0; border-radius:0;
934
  float:none !important;
935
  }
 
936
 
937
  .frm_full_rte textarea{width:98%; padding:0;}
938
  .frm_field_box{padding:5px;min-height:20px;}
1003
  }
1004
 
1005
  .frm_sorting span.ui-icon{width:16px;}
1006
+
1007
+ #form_settings_page label,
1008
+ .frm_form_builder label{
1009
+ font-weight:normal;
1010
+ }
1011
+
1012
  #form_settings_page .tabs-panel, .frm_settings_form .tabs-panel{max-height:none !important; min-height:260px !important;}
1013
  #form_settings_page #post-body-content{min-width:650px;}
1014
  #form_settings_page .frm_posttax_row select{max-width:35%;}
1022
  #contextual-help-columns div.tabs-panel.general_settings.frm_license_box{min-height:0;border-bottom:none;}
1023
  .general_settings #frm_license_top{float:left;width:55%}
1024
  .categorydiv div.tabs-panel.general_settings{max-height:none;}
1025
+ .categorydiv div.tabs-panel.general_settings .postbox{margin-bottom:0;}
1026
  .tabs-panel{height:auto !important; min-height:260px;}
1027
  .tabs-panel.panel_secondary{min-height:20px;margin-top:10px;margin-left:150px;}
1028
  .edd_frm_license_row{
1386
  content: '\e60b';
1387
  }
1388
 
1389
+ .frm_action_icon.frm_required_icon:before{
1390
+ content: '\e612';
1391
+ font-size:8px;
1392
+ vertical-align:top;
1393
+ line-height: 2.1em;
1394
+ margin-right:3px;
1395
+ }
1396
  .frm_action_icon.frm_required_icon,
1397
  .ui-state-default .frm_action_icon.frm_required_icon{
1398
  color:#000;
1438
  }
1439
 
1440
  .tagchecklist .frm_exclude_cat_list span{display:inline;}
1441
+ .tagchecklist span a:before{line-height:23px;text-align:start;}
1442
 
1443
  /* Entries Page */
1444
  .frm_no_entries_form{
1665
  .frm_validation_msg p label{float:left;width:25%;max-width:100px;}
1666
  .frm_sorting .form-field .widget .frm_validation_msg input{width:71%;}
1667
 
1668
+ .frm_sorting .widget-inside .form-table td p,
1669
+ .frm_sorting .widget-inside .form-wrap label{
1670
  padding:10px 0;
1671
  }
1672
 
1784
  #menu-management.frm-menu-boxes .menu-edit{margin-bottom:0;}
1785
  #menu-management select{max-width:100%;}
1786
  .general_settings .postbox .manage-menus{border-top:none;border-left:none;border-right:none;}
1787
+ .postbox .frm-help-tabs.inside,
1788
+ #poststuff .frm-help-tabs.inside{
1789
+ padding-left:0;padding-right:0;padding-bottom:12px;
1790
+ margin-top:0;
1791
+ margin-bottom:0;
1792
+ }
1793
+ .postbox .frm-help-tabs.inside{
1794
+ padding-bottom:inherit;
1795
+ }
1796
+ .frm-help-tabs form > .submit,
1797
+ #contextual-help-columns > .submit{
1798
+ margin-left:154px;
1799
+ padding-left:0.9em;
1800
+ }
1801
+ #poststuff .contextual-help-tabs .active,
1802
+ #poststuff .contextual-help-tabs .active a,
1803
+ #poststuff .contextual-help-tabs .active a:hover{
1804
+ background:#fafafa;
1805
+ }
1806
  .wrap .contextual-help-tabs ul{min-height:260px;}
1807
+ .postbox .menu-settings h3{
1808
+ border-bottom:none;
1809
+ }
1810
  #poststuff h3.frm_no_bg{background:none;cursor:default;}
1811
  .frm-postbox-no-h3{padding-top:10px;}
1812
+ .postbox #contextual-help-back{
1813
+ border-right:none;
1814
+ right:0;
1815
+ background:#fafafa;
1816
+ }
1817
  #contextual-help-columns div.tabs-panel{
1818
  background:transparent;
1819
  border-width:0;
1841
  background:#FDFDFD;
1842
  }
1843
 
1844
+ .frm_sorting > li.ui-state-default.frm_not_divider:hover,
1845
+ .frm_sorting > li.ui-state-default.frm_not_divider.selected,
1846
+ .frm_sorting > li.ui-state-default.edit_field_type_divider.selected .divider_section_only,
1847
+ .frm_sorting > li.ui-state-default.edit_field_type_divider .divider_section_only:hover,
1848
+ .frm_update_msg{
1849
  box-shadow:0 1px 1px rgba(0, 0, 0, 0.04);
1850
  }
1851
 
1852
+ .no_repeat_section .frm_sorting > li.ui-state-default.edit_field_type_end_divider:hover{
 
1853
  box-shadow:none;
1854
  }
1855
 
1856
  .frm_sorting li.ui-state-default.frm_not_divider.selected,
 
1857
  .frm_sorting li.ui-state-default.selected.edit_field_type_divider .divider_section_only{
1858
  background-color: #fbfdff;
1859
  border: 1px solid #5b9dd9;
2283
  .field_type_list li{margin-right:4px;}
2284
  .frm_drag_inst{font-size: 40px;text-align:center;}
2285
  }
2286
+
 
 
 
 
 
 
 
 
2287
  @media only screen and (max-width: 782px){
2288
  #form_settings_page .advanced_settings .form-table td, .form-table th{
2289
  display:table-cell;
2344
  /* PRINT */
2345
  @media print {
2346
  #adminmenuwrap, #adminmenuback, #wphead, #button_bar, #submitdiv, .button-secondary,
2347
+ #screen-metas, #screen-meta-links, #footer, #wpfooter, .inner-sidebar, .frm_form_nav,
2348
+ .frm_flash_graph, .frm_no_print, object{
2349
+ visibility:hidden;
2350
+ display:none !important;
2351
+ }
2352
  #poststuff #post-body.columns-2{margin-right:0;}
2353
  .widget, .postbox, .stuffbox, .postbox h3{border-width:0 !important;border-color:#fff;}
2354
  .postbox{background:#fff !important;border:none;position:static;}
css/frm_fonts.css CHANGED
@@ -7,11 +7,8 @@
7
  }
8
 
9
  /* dashboard icon */
10
- .frm_38_trigger #toplevel_page_formidable .wp-menu-image img{
11
- display: none !important;
12
- }
13
- .frm_38_trigger #toplevel_page_formidable .wp-menu-image:before,
14
- .frm_38_trigger .wp-media-buttons .add_media span.wp-media-buttons-icon.frm-buttons-icon:before {
15
  font-family: 's11-fp' !important;
16
  content: '\e601';
17
  text-shadow: none;
@@ -22,14 +19,9 @@
22
  }
23
 
24
  /* media box button */
25
- .wp-media-buttons .add_media span.wp-media-buttons-icon.frm-buttons-icon{
26
- background:url(../images/form_16.png) no-repeat center;
27
- }
28
 
29
- .wp-media-buttons .button.frm_insert_form{padding-left:0.4em;}
30
- .frm_38_trigger .wp-media-buttons .button.frm_insert_form{padding-left:5px;}
31
-
32
- .frm_38_trigger .wp-media-buttons .add_media span.wp-media-buttons-icon.frm-buttons-icon{
33
  background:none;
34
  }
35
 
7
  }
8
 
9
  /* dashboard icon */
10
+ #toplevel_page_formidable .wp-menu-image:before,
11
+ .wp-media-buttons .add_media span.wp-media-buttons-icon.frm-buttons-icon:before {
 
 
 
12
  font-family: 's11-fp' !important;
13
  content: '\e601';
14
  text-shadow: none;
19
  }
20
 
21
  /* media box button */
22
+ .wp-media-buttons .button.frm_insert_form{padding-left:5px;}
 
 
23
 
24
+ .wp-media-buttons .add_media span.wp-media-buttons-icon.frm-buttons-icon{
 
 
 
25
  background:none;
26
  }
27
 
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.01.01
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.01.02
6
  Plugin URI: http://formidablepro.com/
7
  Author URI: http://strategy11.com
8
  Author: Strategy11
images/form_16-2x.png DELETED
Binary file
images/form_16.png DELETED
Binary file
images/form_32_sprite-2x.png DELETED
Binary file
images/form_32_sprite.png DELETED
Binary file
js/formidable.js CHANGED
@@ -700,17 +700,10 @@ function frmFrontFormJS(){
700
  }
701
 
702
  function operators(op, a, b){
703
- if ( typeof b === 'undefined' ) {
704
- b = '';
705
- }
706
- if(jQuery.isArray(b) && jQuery.inArray(a,b) > -1){
707
- b = a;
708
- }
709
- if(String(a).search(/^\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*$/) !== -1){
710
- a = parseFloat(a);
711
- b = parseFloat(b);
712
- }
713
- if ( String(a).indexOf('&quot;') != '-1' && operators(op, a.replace('&quot;', '"'), b) ) {
714
  return true;
715
  }
716
 
@@ -725,8 +718,8 @@ function frmFrontFormJS(){
725
  return false;
726
  }
727
 
728
- d = prepareEnteredValueForLikeComparison( d );
729
- c = prepareLogicValueForLikeComparison( c );
730
 
731
  return d.indexOf( c ) != -1;
732
  },
@@ -736,8 +729,8 @@ function frmFrontFormJS(){
736
  return true;
737
  }
738
 
739
- d = prepareEnteredValueForLikeComparison( d );
740
- c = prepareLogicValueForLikeComparison( c );
741
 
742
  return d.indexOf( c ) == -1;
743
  }
@@ -745,20 +738,44 @@ function frmFrontFormJS(){
745
  return theOperators[op](a, b);
746
  }
747
 
748
- function prepareEnteredValueForLikeComparison( d ) {
749
- if ( typeof d === 'string' ) {
750
- d = d.toLowerCase();
751
- } else if ( typeof d === 'number' ) {
752
- d = d.toString();
753
  }
754
- return d;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
755
  }
756
 
757
- function prepareLogicValueForLikeComparison( c ) {
758
- if ( typeof c === 'string' ) {
759
- c = c.toLowerCase();
 
 
 
760
  }
761
- return c;
762
  }
763
 
764
  /**
@@ -1095,7 +1112,9 @@ function frmFrontFormJS(){
1095
  // Set the hiddenFields value in the frm_hide_field_formID input
1096
  hiddenFields = JSON.stringify( hiddenFields );
1097
  var frmHideFieldsInput = document.getElementById('frm_hide_fields_' + formId);
1098
- frmHideFieldsInput.value = hiddenFields;
 
 
1099
  }
1100
  }
1101
 
@@ -1145,6 +1164,12 @@ function frmFrontFormJS(){
1145
  setHiddenCheckboxDefaultValue( input.name, defaultValue );
1146
 
1147
  } else {
 
 
 
 
 
 
1148
  input.value = defaultValue;
1149
  }
1150
 
@@ -1194,8 +1219,7 @@ function frmFrontFormJS(){
1194
  // TODO: accommodate for when there are multiple default values but the user has removed some
1195
  }
1196
  }
1197
-
1198
- } else {
1199
  hiddenInputs[0].value = defaultValue;
1200
  }
1201
  }
@@ -1577,6 +1601,8 @@ function frmFrontFormJS(){
1577
  var optContainer = childDiv.getElementsByClassName( 'frm_opt_container' )[0];
1578
  var inputs = optContainer.getElementsByTagName( 'input' );
1579
 
 
 
1580
  var currentValue = '';
1581
  if ( childFieldArgs.inputType == 'radio' ) {
1582
  currentValue = getValueFromRadioInputs( inputs );
@@ -1584,8 +1610,6 @@ function frmFrontFormJS(){
1584
  currentValue = getValuesFromCheckboxInputs(inputs);
1585
  }
1586
 
1587
- addLoadingIconJS( optContainer );
1588
-
1589
  jQuery.ajax({
1590
  type:'POST',
1591
  url:frm_js.ajax_url,
@@ -1601,6 +1625,8 @@ function frmFrontFormJS(){
1601
  success:function(newHtml){
1602
  optContainer.innerHTML = newHtml;
1603
 
 
 
1604
  if ( inputs.length == 1 && inputs[0].value === '' ) {
1605
  maybeHideRadioLookup( childFieldArgs, childDiv );
1606
  } else {
@@ -1655,11 +1681,6 @@ function frmFrontFormJS(){
1655
  }
1656
  }
1657
 
1658
- // Insert the loading icon
1659
- function addLoadingIconJS( optContainer ) {
1660
- optContainer.innerHTML = '<span class="frm-loading-img"></span>';
1661
- }
1662
-
1663
  /**
1664
  * Get new value for a text field if all Lookup Field parents have a value
1665
  *
@@ -1800,8 +1821,7 @@ function frmFrontFormJS(){
1800
  function updateDynamicListData( depFieldArgs, onCurrentPage ){
1801
  if ( onCurrentPage ) {
1802
  var $fieldDiv = jQuery( '#' + depFieldArgs.containerId);
1803
- var $optContainer = $fieldDiv.find('.frm_opt_container');
1804
- addLoadingIcon($optContainer);
1805
  }
1806
 
1807
  jQuery.ajax({
@@ -1815,10 +1835,13 @@ function frmFrontFormJS(){
1815
  },
1816
  success:function(html){
1817
  if ( onCurrentPage ) {
1818
-
1819
  $optContainer.html(html);
1820
  var $listInputs = $optContainer.children('input');
1821
  var listVal = $listInputs.val();
 
 
 
1822
  if (html === '' || listVal === '') {
1823
  hideDynamicField(depFieldArgs);
1824
  } else {
@@ -1848,7 +1871,7 @@ function frmFrontFormJS(){
1848
  var prevVal = getPrevFieldValue( hiddenInput );
1849
  var defaultVal = hiddenInput.data('frmval');
1850
 
1851
- addLoadingIconTemp( $fieldDiv );
1852
 
1853
  jQuery.ajax({
1854
  type:'POST',
@@ -1868,7 +1891,7 @@ function frmFrontFormJS(){
1868
  $optContainer.html(html);
1869
  var $dynamicFieldInputs = $optContainer.find('select, input, textarea');
1870
 
1871
- removeLoadingIconTemp( $fieldDiv );
1872
 
1873
  if ( html === '' || ( $dynamicFieldInputs.length == 1 && $dynamicFieldInputs.attr('type') == 'hidden' ) ) {
1874
  hideDynamicField( depFieldArgs );
@@ -1909,13 +1932,8 @@ function frmFrontFormJS(){
1909
  triggerChange( jQuery( listInput ) );
1910
  }
1911
 
1912
- // Insert the loading icon
1913
- function addLoadingIcon( $optContainer ) {
1914
- $optContainer.html( '<span class="frm-loading-img"></span>' );
1915
- }
1916
-
1917
- // Insert the loading icon
1918
- function addLoadingIconTemp( $fieldDiv ) {
1919
  var currentHTML = $fieldDiv.html();
1920
 
1921
  if ( currentHTML.indexOf( 'frm-loading-img' ) > -1 ) {
@@ -1929,16 +1947,36 @@ function frmFrontFormJS(){
1929
  }
1930
  }
1931
 
1932
- function removeLoadingIconTemp( $fieldDiv ) {
1933
- var currentHTML = $fieldDiv.html();
1934
- currentHTML = currentHTML.replace( '<span class="frm-loading-img"></span>', '' );
1935
- $fieldDiv.html( currentHTML );
 
 
 
 
1936
 
1937
- var $optContainer = $fieldDiv.find('.frm_opt_container');
 
 
 
 
1938
 
 
 
 
1939
  $optContainer.show();
1940
  }
1941
 
 
 
 
 
 
 
 
 
 
1942
 
1943
  // Get the previous field value in a Dynamic field
1944
  function getPrevFieldValue( inputs ) {
@@ -3300,9 +3338,6 @@ function frmFrontFormJS(){
3300
  $edit.html(cancel);
3301
  checkConditionalLogic( 'editInPlace' );
3302
  checkFieldsOnPage();
3303
-
3304
- //TODO: Find out why this extra binding is required
3305
- jQuery('#'+ prefix + entry_id).on('change', 'input[name^="item_meta"], select[name^="item_meta"], textarea[name^="item_meta"]', maybeCheckDependent);
3306
  }
3307
  });
3308
  return false;
@@ -3718,8 +3753,8 @@ function frmFrontFormJS(){
3718
  },
3719
 
3720
  scrollToID: function(id){
3721
- var frm_pos = jQuery(document.getElementById(id).offset());
3722
- window.scrollTo(frm_pos.left, frm_pos.top);
3723
  },
3724
 
3725
  scrollMsg: function( id, object, animate ) {
700
  }
701
 
702
  function operators(op, a, b){
703
+ a = prepareLogicValueForComparison( a );
704
+ b = prepareEnteredValueForComparison( a, b );
705
+
706
+ if ( typeof a === 'string' && a.indexOf('&quot;') != '-1' && operators(op, a.replace('&quot;', '"'), b) ) {
 
 
 
 
 
 
 
707
  return true;
708
  }
709
 
718
  return false;
719
  }
720
 
721
+ d = prepareValueForLikeComparison( d );
722
+ c = prepareValueForLikeComparison( c );
723
 
724
  return d.indexOf( c ) != -1;
725
  },
729
  return true;
730
  }
731
 
732
+ d = prepareValueForLikeComparison( d );
733
+ c = prepareValueForLikeComparison( c );
734
 
735
  return d.indexOf( c ) == -1;
736
  }
738
  return theOperators[op](a, b);
739
  }
740
 
741
+ function prepareLogicValueForComparison( a ) {
742
+ if ( String(a).search(/^\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*$/) !== -1 ) {
743
+ a = parseFloat(a);
744
+ } else if ( typeof a === 'string' ) {
745
+ a = a.trim();
746
  }
747
+
748
+ return a;
749
+ }
750
+
751
+ function prepareEnteredValueForComparison( a, b ) {
752
+ if ( typeof b === 'undefined' ) {
753
+ b = '';
754
+ }
755
+
756
+ if ( jQuery.isArray(b) && jQuery.inArray(a, b) > -1 ) {
757
+ b = a;
758
+ }
759
+
760
+ if ( typeof a === 'number' && typeof b === 'string' ) {
761
+ b = parseFloat(b);
762
+ }
763
+
764
+ if ( typeof b === 'string' ) {
765
+ b = b.trim();
766
+ }
767
+
768
+ return b;
769
  }
770
 
771
+
772
+ function prepareValueForLikeComparison( val ) {
773
+ if ( typeof val === 'string' ) {
774
+ val = val.toLowerCase();
775
+ } else if ( typeof val === 'number' ) {
776
+ val = val.toString();
777
  }
778
+ return val;
779
  }
780
 
781
  /**
1112
  // Set the hiddenFields value in the frm_hide_field_formID input
1113
  hiddenFields = JSON.stringify( hiddenFields );
1114
  var frmHideFieldsInput = document.getElementById('frm_hide_fields_' + formId);
1115
+ if ( frmHideFieldsInput !== null ) {
1116
+ frmHideFieldsInput.value = hiddenFields;
1117
+ }
1118
  }
1119
  }
1120
 
1164
  setHiddenCheckboxDefaultValue( input.name, defaultValue );
1165
 
1166
  } else {
1167
+ var addressType = input.getAttribute('autocompletetype');
1168
+ if ( addressType !== null ) {
1169
+ addressType = addressType.replace( 'address-', '' );
1170
+ defaultValue = defaultValue[addressType];
1171
+ }
1172
+
1173
  input.value = defaultValue;
1174
  }
1175
 
1219
  // TODO: accommodate for when there are multiple default values but the user has removed some
1220
  }
1221
  }
1222
+ } else if ( hiddenInputs[0] !== null ) {
 
1223
  hiddenInputs[0].value = defaultValue;
1224
  }
1225
  }
1601
  var optContainer = childDiv.getElementsByClassName( 'frm_opt_container' )[0];
1602
  var inputs = optContainer.getElementsByTagName( 'input' );
1603
 
1604
+ addLoadingIconJS( childDiv, optContainer );
1605
+
1606
  var currentValue = '';
1607
  if ( childFieldArgs.inputType == 'radio' ) {
1608
  currentValue = getValueFromRadioInputs( inputs );
1610
  currentValue = getValuesFromCheckboxInputs(inputs);
1611
  }
1612
 
 
 
1613
  jQuery.ajax({
1614
  type:'POST',
1615
  url:frm_js.ajax_url,
1625
  success:function(newHtml){
1626
  optContainer.innerHTML = newHtml;
1627
 
1628
+ removeLoadingIconJS( childDiv, optContainer );
1629
+
1630
  if ( inputs.length == 1 && inputs[0].value === '' ) {
1631
  maybeHideRadioLookup( childFieldArgs, childDiv );
1632
  } else {
1681
  }
1682
  }
1683
 
 
 
 
 
 
1684
  /**
1685
  * Get new value for a text field if all Lookup Field parents have a value
1686
  *
1821
  function updateDynamicListData( depFieldArgs, onCurrentPage ){
1822
  if ( onCurrentPage ) {
1823
  var $fieldDiv = jQuery( '#' + depFieldArgs.containerId);
1824
+ addLoadingIcon( $fieldDiv );
 
1825
  }
1826
 
1827
  jQuery.ajax({
1835
  },
1836
  success:function(html){
1837
  if ( onCurrentPage ) {
1838
+ var $optContainer = $fieldDiv.find('.frm_opt_container');
1839
  $optContainer.html(html);
1840
  var $listInputs = $optContainer.children('input');
1841
  var listVal = $listInputs.val();
1842
+
1843
+ removeLoadingIcon( $optContainer );
1844
+
1845
  if (html === '' || listVal === '') {
1846
  hideDynamicField(depFieldArgs);
1847
  } else {
1871
  var prevVal = getPrevFieldValue( hiddenInput );
1872
  var defaultVal = hiddenInput.data('frmval');
1873
 
1874
+ addLoadingIcon( $fieldDiv );
1875
 
1876
  jQuery.ajax({
1877
  type:'POST',
1891
  $optContainer.html(html);
1892
  var $dynamicFieldInputs = $optContainer.find('select, input, textarea');
1893
 
1894
+ removeLoadingIcon( $optContainer );
1895
 
1896
  if ( html === '' || ( $dynamicFieldInputs.length == 1 && $dynamicFieldInputs.attr('type') == 'hidden' ) ) {
1897
  hideDynamicField( depFieldArgs );
1932
  triggerChange( jQuery( listInput ) );
1933
  }
1934
 
1935
+ // Add the loading icon with jQuery
1936
+ function addLoadingIcon( $fieldDiv ) {
 
 
 
 
 
1937
  var currentHTML = $fieldDiv.html();
1938
 
1939
  if ( currentHTML.indexOf( 'frm-loading-img' ) > -1 ) {
1947
  }
1948
  }
1949
 
1950
+ // Add the loading icon with JavaScript
1951
+ function addLoadingIconJS( fieldDiv, optContainer ) {
1952
+ var currentHTML = fieldDiv.innerHTML;
1953
+
1954
+ if ( currentHTML.indexOf( 'frm-loading-img' ) > -1 ) {
1955
+ // Loading image already present
1956
+ } else {
1957
+ optContainer.style.display = "none";
1958
 
1959
+ var loadingIcon = document.createElement('span');
1960
+ loadingIcon.setAttribute("class", "frm-loading-img");
1961
+ fieldDiv.insertBefore(loadingIcon, optContainer.nextSibling);
1962
+ }
1963
+ }
1964
 
1965
+ // Remove the loading icon with jQuery
1966
+ function removeLoadingIcon( $optContainer ) {
1967
+ $optContainer.next( '.frm-loading-img' ).remove();
1968
  $optContainer.show();
1969
  }
1970
 
1971
+ // Remove the loading icon with JavaScript
1972
+ function removeLoadingIconJS( fieldDiv, optContainer ) {
1973
+ var loadingIcon = fieldDiv.getElementsByClassName( 'frm-loading-img' )[0];
1974
+ if ( loadingIcon !== null && loadingIcon !== undefined ) {
1975
+ loadingIcon.parentNode.removeChild( loadingIcon );
1976
+ }
1977
+
1978
+ optContainer.style.display = "block";
1979
+ }
1980
 
1981
  // Get the previous field value in a Dynamic field
1982
  function getPrevFieldValue( inputs ) {
3338
  $edit.html(cancel);
3339
  checkConditionalLogic( 'editInPlace' );
3340
  checkFieldsOnPage();
 
 
 
3341
  }
3342
  });
3343
  return false;
3753
  },
3754
 
3755
  scrollToID: function(id){
3756
+ var object = jQuery(document.getElementById(id));
3757
+ frmFrontForm.scrollMsg( object, false );
3758
  },
3759
 
3760
  scrollMsg: function( id, object, animate ) {
js/formidable.min.js CHANGED
@@ -1,89 +1,90 @@
1
- function frmFrontFormJS(){function l(a){var c=jQuery(this),b=c.attr("type");"submit"!==b&&a.preventDefault();a=c.parents("form:first");var d=c="",f=this.name;if("frm_prev_page"===f||-1!==this.className.indexOf("frm_prev_page"))c=jQuery(a).find(".frm_next_page").attr("id").replace("frm_next_p_","");else if("frm_save_draft"===f||-1!==this.className.indexOf("frm_save_draft"))d=1;jQuery(".frm_next_page").val(c);jQuery(".frm_saving_draft").val(d);"submit"!==b&&a.trigger("submit")}function n(){jQuery(this).parent().children(".frm_toggle_container").slideToggle("fast");
2
- jQuery(this).toggleClass("active").children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s").toggleClass("ui-icon-triangle-1-s ui-icon-triangle-1-e")}function q(){for(var a=__frmUniqueTimes,c=0;c<a.length;c++)a[c].dateID==this.id&&frmFrontForm.removeUsedTimes(this,a[c].timeID)}function r(){if(-1===this.className.indexOf("frm_custom_date")&&"undefined"!==typeof __frmDatepicker){var a=__frmDatepicker,c=this.id,b=c.split("-");b.pop();b='input[id^="'+b.join("-")+'"]';jQuery.datepicker.setDefaults(jQuery.datepicker.regional[""]);
3
- for(var d=0,f=0;f<a.length;f++)if(a[f].triggerID=="#"+c||a[f].triggerID==b)d=f;jQuery(this).datepicker(jQuery.extend(jQuery.datepicker.regional[a[d].locale],a[d].options))}}function w(){this.className=this.className.replace("frm_transparent","");this.parentNode.getElementsByTagName("a")[0].className.indexOf("frm_clear_file_link")}function A(){var a=this.type,c=!1,b=!1;if("select-one"===a)b=!0,"frm_other_trigger"===this.options[this.selectedIndex].className&&(c=!0);else if("select-multiple"===a)for(var b=
4
- !0,d=this.options,c=!1,f=0;f<d.length;f++)if("frm_other_trigger"===d[f].className&&d[f].selected){c=!0;break}b?(a=jQuery(this).parent().children(".frm_other_input"),a.length&&(c?a[0].className=a[0].className.replace("frm_pos_none",""):(1>a[0].className.indexOf("frm_pos_none")&&(a[0].className+=" frm_pos_none"),a[0].value=""))):"radio"===a?jQuery(this).is(":checked")&&(jQuery(this).closest(".frm_radio").children(".frm_other_input").removeClass("frm_pos_none"),jQuery(this).closest(".frm_radio").siblings().children(".frm_other_input").addClass("frm_pos_none").val("")):
5
- "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 x(a){var c=p(this,!1);if(c&&"undefined"!==typeof c&&(!a.frmTriggered||a.frmTriggered!=c)){y(c,jQuery(this));a="undefined"!==typeof a.originalEvent||-1<a.currentTarget.className.indexOf("frm_chzn")?"value changed":"other";Z(c,jQuery(this),a);J(c,jQuery(this));c=[];a=
6
- jQuery(this).closest(".frm_form_field");a.hasClass(".frm_required_field")&&!jQuery(this).hasClass(".frm_optional")&&(c=aa(this,c));if(1>c.length)if("email"==this.type)var b=jQuery(this).closest("form").find("input[type=email]"),c=ba(this,c,b);else"number"==this.type?c=ca(this,c):null!==this.pattern&&(c=da(this,c));a.removeClass("frm_blank_field");a.find(".frm_error").remove();if(0<Object.keys(c).length)for(var d in c)K(a,d,c)}}function p(a,c){var b="",b=a instanceof jQuery?a.attr("name"):a.name;if(""===
7
- b)return b=a instanceof jQuery?a.data("name"):a.getAttribute("data-name"),""!==b&&b?b:0;b=b.replace("item_meta[","").replace("[]","").split("]");if(1>b.length)return 0;var b=b.filter(function(a){return""!==a}),d=b[0],f=!1;if(1===b.length||"[form"==b[1]||"[id"==b[1])return d;if(jQuery('input[name="item_meta['+d+'][form]"]').length){if(2===b.length&&"[0"==b[1])return 0;d=b[2].replace("[","");f=!0}"other"===d&&(d=f?b[3].replace("[",""):b[1].replace("[",""));!0===c&&(d=d===b[0]?d+"-"+b[1].replace("[",
8
- ""):d+"-"+b[0]+"-"+b[1].replace("[",""));return d}function y(a,c){if(!("undefined"===typeof __FRMRULES||"undefined"===typeof __FRMRULES[a]||1>__FRMRULES[a].dependents.length||null===c||"undefined"===typeof c))for(var b=__FRMRULES[a],d=E(c[0].name),f=0,e=b.dependents.length;f<e;f++)z(b.dependents[f],d)}function z(a,c){var b=L(a);if(!(!1===b||1>b.conditions.length)){var d;d=[];if(b.isRepeating)if(""!==c.repeatingSection){var f="frm_field_"+b.fieldId+"-",f=f+(c.repeatingSection+"-"+c.repeatRow+"_container");
9
- d.push(f)}else if("0"!==b.inEmbedForm)d=M(b),d=["frm_field_"+b.fieldId+"-"+d+"-0_container"];else if(d=[],f=M(b),null!==document.getElementById("frm_field_"+f+"_container"))for(var f=document.querySelectorAll(".frm_field_"+b.fieldId+"_container"),e=0,h=f.length;e<h;e++)d.push(f[e].id);else if(d=[],f=M(b),f="frm_field_"+b.fieldId+"-"+f+"-",e=document.querySelectorAll('[id^="field_'+b.inSectionKey+'-rowid-"]'),1>e.length)d.push(f+"0_container");else for(var h=[],g=0,k=e.length;g<k;g++)h=e[g].id.split("-"),
10
- 3==h.length&&d.push(f+h[2]+"_container");else d.push("frm_field_"+b.fieldId+"_container");f=d.length;for(e=0;e<f;e++)b.containerId=d[e],ea(b,d[e]),fa(b)}}function M(a){var c="";"0"!==a.inEmbedForm?c=a.inEmbedForm:"0"!==a.inSection&&(c=a.inSection);return c}function ea(a,c){if(a.isRepeating){var b=c.replace("_container","").split("-");a.repeatRow=b[2]}else a.repeatRow=""}function fa(a){for(var c=[],b=a.conditions.length,d=0;d<b;d++)c.push(Fa(a.conditions[d],a));b=F="any"==a.anyAll?-1<c.indexOf(!0)?
11
- a.showHide:ga(a.showHide):-1<c.indexOf(!1)?ga(a.showHide):a.showHide;c=null!==document.getElementById(a.containerId);"show"==b?"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},children:"",inputType:a.inputType},"data"==a.inputType?Ga(a,c):c&&Ha(a)):!1!==B(a.containerId,a.formId)&&(G(a.containerId,a.formId),c?(c=ha(a.containerId),
12
- ia(c,"divider"==a.fieldType||"form"==a.fieldType,a.formId),jQuery("#"+a.containerId).show()):(c=ja(a),ia(c,"divider"==a.fieldType||"form"==a.fieldType,a.formId))):N(a,c)}function L(a){return"undefined"===typeof __FRMRULES||"undefined"===typeof __FRMRULES[a]?!1:__FRMRULES[a]}function Fa(a,c){var b=L(a.fieldId),d=ka(b,c);"data"==c.fieldType&&"data"==b.fieldType?(b=!1,b=""===a.value?""===d||1==d.length&&""===d[0]?!1:!0:O(a.operator,a.value,d),c.dataLogic=a,c.dataLogic.actualValue=d,d=b):d=O(a.operator,
13
- a.value,d);return d}function ka(a,c){var b="";if("radio"==a.inputType||"checkbox"==a.inputType)b=la(a,c),b=document.querySelectorAll('input[name^="'+b+'"]'),b="checkbox"==a.inputType?P(b):ma(b);else if(b="",!0===a.isMultiSelect)var b=la(a,c),d=document.querySelectorAll('[name^="'+b+'"]'),f=[],b=f=1==d.length&&"hidden"!=d[0].type?jQuery('[name^="'+b+'"]').val():P(d);else d="field_"+a.fieldKey,a.isRepeating&&(d+="-"+c.repeatRow),d=document.getElementById(d),null!==d&&(b=d.value);"undefined"===typeof b?
14
- b="":"string"===typeof b&&(b=b.trim());return b}function la(a,c){var b="";return b=a.isRepeating?"item_meta["+c.inSection+"]["+c.repeatRow+"]["+a.fieldId+"]":"item_meta["+a.fieldId+"]"}function P(a){for(var c=[],b=0,d=a.length;b<d;b++)("hidden"==a[b].type||a[b].checked)&&c.push(a[b].value);0===c.length&&(c="");return c}function O(a,c,b){"undefined"===typeof b&&(b="");jQuery.isArray(b)&&-1<jQuery.inArray(c,b)&&(b=c);-1!==String(c).search(/^\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*$/)&&(c=parseFloat(c),
15
- b=parseFloat(b));return"-1"!=String(c).indexOf("&quot;")&&O(a,c.replace("&quot;",'"'),b)?!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;b=na(b);a=oa(a);return-1!=b.indexOf(a)},"not LIKE":function(a,b){if(!b)return!0;b=na(b);a=oa(a);return-1==b.indexOf(a)}}[a](c,b)}function na(a){"string"===typeof a?a=a.toLowerCase():"number"===typeof a&&(a=a.toString());return a}function oa(a){"string"===
16
- typeof a&&(a=a.toLowerCase());return a}function ga(a){return"show"==a?"hide":"show"}function ha(a){return document.getElementById(a).querySelectorAll('select[name^="item_meta"], textarea[name^="item_meta"], input[name^="item_meta"]')}function ja(a){var c=[];"divider"==a.fieldType?(c=[],"divider"==a.fieldType&&(c=document.querySelectorAll('[data-sectionid="'+a.fieldId+'"]'))):"form"==a.fieldType?c=document.querySelectorAll('[id^="field_'+a.fieldKey+'-"]'):(c="",c=a.isRepeating?"item_meta["+a.inSection+
17
- "]["+a.repeatRow+"]["+a.fieldId+"]":"item_meta["+a.fieldId+"]",c=document.querySelectorAll('[name^="'+c+'"]'));return c}function ia(a,c,b){if(a.length)for(var d,f=["checkbox","radio"],e=0;e<a.length;e++)if(!(0<e&&"undefined"!==typeof d&&d.name==a[e].name&&-1<f.indexOf(d.type)||c&&pa(a[e],b))){d=a[e];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)&&
18
- 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 k[0].value=g;else d.value=g;"SELECT"==d.tagName&&Q(d);u(h)}d=a[e];h=p(d,!1);h=R(h);!1!==h&&"lookup"!=h.fieldType&&(h.parentVals=S(h),qa(h,d));d=a[e];if(h="undefined"!==typeof __FRMCALC){h=d.type;g=!1;if("text"==
19
- 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]&&ra(h,g,[],d)}d=a[e]}}function pa(a,c){var b=p(a,!0);return B("frm_field_"+b+"_container",c)}function N(a,c){if(!B(a.containerId,a.formId)){if(c){jQuery("#"+a.containerId).hide();var b=
20
- ha(a.containerId)}else b=ja(a);T(b);sa(a.containerId,a.formId)}}function T(a){if(!(1>a.length)){for(var c,b=!0,d=0,f=a.length;d<f;d++)0<d&&c.name!=a[d].name&&!0===b&&u(jQuery(c)),b=!0,"radio"==a[d].type||"checkbox"==a[d].type?a[d].checked=!1:"SELECT"==a[d].tagName?(0===a[d].selectedIndex?b=!1:a[d].selectedIndex=0,null!==document.getElementById(a[d].id+"_chosen")&&jQuery(a[d]).trigger("chosen:updated")):a[d].value="",c=a[d];!0===b&&u(jQuery(c))}}function B(a,c){var b=!1;-1<C(c).indexOf(a)&&(b=!0);
21
- return b}function sa(a,c){var b=C(c);-1<b.indexOf(a)||(b.push(a),b=JSON.stringify(b),document.getElementById("frm_hide_fields_"+c).value=b)}function C(a){var c=[];a=document.getElementById("frm_hide_fields_"+a);return null===a?c:c=(c=a.value)?JSON.parse(c):[]}function G(a,c){var b=C(c),d=b.indexOf(a);-1<d&&(b.splice(d,1),b=JSON.stringify(b),document.getElementById("frm_hide_fields_"+c).value=b)}function Z(a,c,b){if(!("undefined"===typeof __FRMLOOKUP||"undefined"===typeof __FRMLOOKUP[a]||1>__FRMLOOKUP[a].dependents.length||
22
- null===c||"undefined"===typeof c)){a=__FRMLOOKUP[a];c=E(c[0].name);for(var d=0,f=a.dependents.length;d<f;d++)U(a.dependents[d],c,b)}}function U(a,c,b){a=R(a);if(!(!1===a||1>a.parents.length))if("lookup"==a.fieldType){c=[];a.isRepeating?c=document.querySelectorAll(".frm_field_"+a.fieldId+"_container"):(b=document.getElementById("frm_field_"+a.fieldId+"_container"),null!==b&&c.push(b));b=0;for(var d=c.length;b<d;b++){ea(a,c[b].id);var f=a,e=c[b];f.parentVals=S(f);if("select"==f.inputType)Ia(f,e);else if("radio"==
23
- f.inputType||"checkbox"==f.inputType)if(!1===f.parentVals){var h=e.getElementsByTagName("input");ta(f,e);T(h)}else Ja(f,e)}}else if("value changed"===b)for(b="field_"+a.fieldKey,b=a.isRepeating?""!==c.repeatingSection?'[id="'+b+"-"+c.repeatRow+'"]':'[id^="'+b+'-"]':'[id="'+b+'"]',c=document.querySelectorAll(b),b=0,d=c.length;b<d;b++)f=a,e=E(c[b].name),f.repeatRow=""!==e.repeatRow?e.repeatRow:"",f=a,e=c[b],f.parentVals=S(f),qa(f,e)}function R(a){return"undefined"===typeof __FRMLOOKUP||"undefined"===
24
- typeof __FRMLOOKUP[a]?!1:__FRMLOOKUP[a]}function S(a){var c=[],b=a.parents,d;d=!1;for(var f=0,e=b.length;f<e;f++){d=R(b[f]);d=ka(d,a);if(""===d||!1===d){c=!1;break}c[f]=d}return c}function ma(a){for(var c=!1,b=a.length,d=0;d<b;d++)if("hidden"==a[d].type||a[d].checked){c=a[d].value;break}return c}function Ia(a,c){var b=c.getElementsByTagName("SELECT")[0];if(null!==b){var d=b.value;!1===a.parentVals?(b.options.length=1,""!==d&&(b.value="",Q(b),u(jQuery(b),a.fieldKey))):jQuery.ajax({type:"POST",url:frm_js.ajax_url,
25
- 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(c){var d=a.fieldKey,h=b.value;c=JSON.parse(c);for(var g=b.options.length;0<g;g--)b.remove(g);for(var k=c.length,g=0;g<k;g++)b.options[g+1]=new Option(c[g],c[g],!1,!1);b.value=h;""===b.value&&(c=b.getAttribute("data-frmval"),null!==c&&(b.value=c));Q(b);b.value!=h&&u(jQuery(b),d)}})}}function Q(a){-1<a.className.indexOf("frm_chzn")&&jQuery().chosen&&
26
- jQuery(a).trigger("chosen:updated")}function Ja(a,c){var b=c.getElementsByClassName("frm_opt_container")[0],d=b.getElementsByTagName("input"),f="",f="radio"==a.inputType?ma(d):P(d);b.innerHTML='<span class="frm-loading-img"></span>';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:f,nonce:frm_js.nonce},success:function(f){b.innerHTML=f;1==d.length&&
27
- ""===d[0].value?ta(a,c):!1!==B(c.id,a.formId)&&(f=L(a.fieldId),!1===f||1>f.conditions.length?(G(c.id,a.formId),jQuery("#"+c.id).show()):(f.containerId=c.id,f.repeatRow=a.repeatRow,fa(f)));u(jQuery(d[0]),a.fieldKey)}})}function ta(a,c){B(c.id,a.formId)||(jQuery("#"+c.id).hide(),sa(c.id,a.formId))}function qa(a,c){if(!pa(c,a.formId))if(!1===a.parentVals){var b=c.getAttribute("data-frmval");null===b&&(b="");ua(a,c,b)}else jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_get_lookup_text_value",
28
- parent_fields:a.parents,parent_vals:a.parentVals,field_id:a.fieldId,nonce:frm_js.nonce},success:function(b){c.value!=b&&ua(a.fieldKey,c,b)}})}function ua(a,c,b){c.value=b;u(jQuery(c),a)}function Ga(a,c){if(c){var b=jQuery("#"+a.containerId),d=b.find(".frm_opt_container");d.html('<span class="frm-loading-img"></span>')}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},
29
- success:function(f){if(c){d.html(f);var e=d.children("input"),h=e.val();""===f||""===h?N(a,!0):va(a,b,e)}else e="field_"+a.fieldKey,""!==a.repeatRow&&(e+="-"+a.repeatRow),e=document.getElementById(e),e.value=f,B(a.containerId,a.formId)&&G(a.containerId,a.formId),u(jQuery(e))}})}function Ha(a,c){var b=jQuery("#"+a.containerId),d=b.find('select[name^="item_meta"], textarea[name^="item_meta"], input[name^="item_meta"]'),f=Ka(d),d=d.data("frmval");La(b);jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_fields_ajax_data_options",
30
- trigger_field_id:a.dataLogic.fieldId,entry_id:a.dataLogic.actualValue,field_id:a.fieldId,default_value:d,container_id:a.containerId,prev_val:f,nonce:frm_js.nonce},success:function(c){var d=b.find(".frm_opt_container");d.html(c);var d=d.find("select, input, textarea"),f=b.html(),f=f.replace('<span class="frm-loading-img"></span>',"");b.html(f);b.find(".frm_opt_container").show();""===c||1==d.length&&"hidden"==d.attr("type")?N(a,!0):va(a,b,d)}})}function La(a){var c=a.html();-1<c.indexOf("frm-loading-img")||
31
- (a.html(c+'<span class="frm-loading-img"></span>'),a.find(".frm_opt_container").hide())}function Ka(a){var c=[],b="";a.each(function(){b=this.value;"radio"===this.type||"checkbox"===this.type?!0===this.checked&&c.push(b):""!==b&&c.push(b)});0===c.length&&(c="");return c}function va(a,c,b){B(a.containerId,a.formId)&&(G(a.containerId,a.formId),c.show());b.hasClass("frm_chzn")&&V();u(b)}function J(a,c){if("undefined"!==typeof __FRMCALC){var b=__FRMCALC,d=b.fields[a];if("undefined"!==typeof d)for(var d=
32
- d.total,f=[],e=0,h=d.length;e<h;e++){var g;g=b.calc[d[e]];var k=c.attr("name"),m=!1,l=g.field_id,n=C(g.form_id);1>n.length||("0"===g.inSection&&"0"===g.inEmbedForm?m=H(l,n):(k=E(k),H(l,n)?m=!0:wa(l,k,n)?m=!0:"0"!==g.inSection&&"0"!==g.inEmbedForm?m=wa(g.inSection,k,n):"0"!==g.inSection?m=H(g.inSection,n):"0"!==g.inEmbedForm&&(m=H(g.inEmbedForm,n))));g=m;!1===g&&ra(b,d[e],f,c)}}}function H(a,c){return-1<c.indexOf("frm_field_"+a+"_container")}function wa(a,c,b){var d=!1;c.repeatingSection&&(a="frm_field_"+
33
- a+"-"+c.repeatingSection,a+="-"+c.repeatRow+"_container",d=-1<b.indexOf(a));return d}function ra(a,c,b,d){var f=a.calc[c],e=f.calc,h=jQuery(document.getElementById("field_"+c)),g={triggerField:d,inSection:!1,thisFieldCall:'input[id^="field_'+c+'-"]'};1>h.length&&"undefined"!==typeof d&&(g.inSection=!0,g.thisFieldId=Ma(a.fieldsWithCalc,c),h=xa(g));if(!(1>h.length)){e=Na(f,e,a,b,g);a=f.calc_dec;e.indexOf(").toFixed(")&&(b=e.split(").toFixed("),ya(b[1])&&(a=b[1],e=e.replace(").toFixed("+a,"")));e=parseFloat(eval(e));
34
- if("undefined"===typeof e||isNaN(e))e=0;ya(a)&&(e=e.toFixed(a));h.val()!=e&&(h.val(e),u(h,c))}}function Na(a,c,b,d,f){for(var e=0,h=a.fields.length;e<h;e++){var g={triggerField:f.triggerField,thisFieldId:a.fields[e],inSection:f.inSection,valKey:f.inSection+""+a.fields[e],thisField:b.fields[a.fields[e]],thisFieldCall:"input"+b.fieldKeys[a.fields[e]]},k=b;"checkbox"==g.thisField.type||"select"==g.thisField.type?g.thisFieldCall=g.thisFieldCall+":checked,select"+k.fieldKeys[g.thisFieldId]+" option:selected,"+
35
- g.thisFieldCall+"[type=hidden]":"radio"==g.thisField.type||"scale"==g.thisField.type?g.thisFieldCall=g.thisFieldCall+":checked,"+g.thisFieldCall+"[type=hidden]":"textarea"==g.thisField.type&&(g.thisFieldCall=g.thisFieldCall+",textarea"+k.fieldKeys[g.thisFieldId]);d=Oa(g,b,d);if("undefined"===typeof d[g.valKey]||isNaN(d[g.valKey]))d[g.valKey]=0;k="["+g.thisFieldId+"]";k=k.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1");c=c.replace(new RegExp(k,"g"),d[g.valKey])}return c}function Oa(a,c,b){if("undefined"!==
36
- typeof b[a.valKey]&&0!==b[a.valKey])return b;b[a.valKey]=0;var d;if(!1===a.inSection)d=jQuery(a.thisFieldCall);else if(d=xa(a),null===d||"undefined"===typeof d)d=jQuery(a.thisFieldCall);if(null===d||"undefined"===typeof d||1>d.length)return b;d.each(function(){var d,e=a.thisField;d=!1;if("hidden"==this.type)""!==W(this)&&(d=!0);else if("select"==e.type){var h=this.className;h&&-1<h.indexOf("frm_other_trigger")&&(d=!0)}else("checkbox"==e.type||"radio"==e.type)&&-1<this.id.indexOf("-other_")&&0>this.id.indexOf("-otext")&&
37
- (d=!0);d?(d=0,"select"==e.type?"hidden"==this.type?(e=!1,2<this.name.split("[").length&&(e=!0),e||(d=W(this))):d=jQuery(this).closest(".frm_other_container").find(".frm_other_input").val():"checkbox"!=e.type&&"radio"!=e.type||"hidden"==this.type||(d=W(this)),e=d):e="checkbox"!==this.type&&"radio"!==this.type||!this.checked?jQuery(this).val():this.value;"undefined"===typeof e&&(e="");d=e;if("date"==a.thisField.type){e=c.date;h=0;if(d)if("undefined"===typeof jQuery.datepicker){h="-";-1<e.indexOf("/")&&
38
- (h="/");e=e.split(h);d=d.split(h);var g,k;g=h=k="";for(var m=0;m<e.length;m++)if("y"==e[m])g=((new Date).getFullYear()+15).toString().substr(2,2),g=d[m]>g?"19"+d[m]:"20"+d[m];else if("yy"==e[m])g=d[m];else if("m"==e[m]||"mm"==e[m])h=d[m],2>h.length&&(h="0"+h);else if("d"==e[m]||"dd"==e[m])k=d[m],2>k.length&&(k="0"+k);h=Date.parse(g+"-"+h+"-"+k)}else h=jQuery.datepicker.parseDate(e,d);e=h;null!==e&&(b[a.valKey]=Math.ceil(e/864E5))}else{e=d;""!==e&&0!==e&&(e=e.trim(),e=parseFloat(e.replace(/,/g,"").match(/-?[\d\.]+$/)));
39
- if("undefined"===typeof e||isNaN(e)||""===e)e=0;b[a.valKey]+=e}});return b}function xa(a){if("undefined"===typeof a.triggerField)return null;var c=a.triggerField.closest(".frm_repeat_sec, .frm_repeat_inline, .frm_repeat_grid");return c.length?(a=a.thisFieldCall.replace("[id=","[id^="),c.find(a)):null}function W(a){var c="";a=document.getElementById(a.id+"-otext");null!==a&&""!==a.value&&(c=a.value);return c}function za(a){var c=!1;a=jQuery(a).find(".frm_saving_draft");a.length&&(c=a.val());return c}
40
- function Aa(a){var c=!1,b=jQuery(a).find(".frm_next_page");if(b.length&&b.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||b.val()<a)c=!0}return c}function aa(a,c){if("hidden"==a.type)return c;var b="",d="";if("checkbox"==a.type||"radio"==a.type){var f=jQuery('input[name="'+a.name+'"]').closest(".frm_required_field").find("input:checked");jQuery(f).each(function(){b=this.value})}else if("file"==a.type)d=jQuery(a).data("fid"),
41
- "undefined"===typeof d&&(d=p(a,!0),d=d.replace("file","")),"undefined"===typeof c[d]&&(b=Pa(d));else{d=a.className;if(-1!==d.indexOf("frm_pos_none"))return c;b=jQuery(a).val();if("string"!==typeof b)for(var f=b,b="",e=0;e<f.length;e++)""!==f[e]&&(b=f[e]);d=-1===d.indexOf("frm_other_input")?p(a,!0):p(a,!1)}""===b&&(""===d&&(d=p(a,!0)),d in c||(c[d]=D(a,"data-reqmsg")));return c}function Pa(a){var c="";jQuery('input[name="file'+a+'"], input[name="file'+a+'[]"], input[name^="item_meta['+a+']"]').each(function(){""===
42
- c&&(c=this.value)});return c}function ba(a,c,b){var d=a.value,f=p(a,!0);if(f in c)return c;var e=0===f.indexOf("conf_");if(""!==d||e){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=D(a,"data-invmsg");""!==d&&!1===h.test(d)?(c[f]=g,e&&(c[f.replace("conf_","")]="")):e&&(a=a.name.replace("conf_",""),b.filter('[name="'+a+'"]').val()!==d&&(c[f]="",c[f.replace("conf_","")]=""))}return c}function ca(a,
43
- c){var b=a.value;""!==b&&!1!==isNaN(b/1)&&(b=p(a,!0),b in c||(c[b]=D(a,"data-invmsg")));return c}function da(a,c){var b=a.value,d=D(a,"pattern");if(""!==d&&""!==b){var f=p(a,!0);f in c||(d=new RegExp("^"+d+"$","i"),!1===d.test(b)&&(c[f]=D(a,"data-invmsg")))}return c}function D(a,c){var b=a.getAttribute(c);null===b&&(b="");return b}function Qa(a,c){jQuery(a).find('input[type="submit"], input[type="button"]').attr("disabled","disabled");jQuery(a).find(".frm_ajax_loading").addClass("frm_loading_now");
44
- "undefined"==typeof c&&jQuery(a).find('input[name="frm_action"]').val();jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:jQuery(a).serialize()+"&action=frm_entries_"+c+"&nonce="+frm_js.nonce,success:function(b){b=b.replace(/^\s+|\s+$/g,"");0===b.indexOf("{")&&(b=jQuery.parseJSON(b));if(""===b||!b||"0"===b||"object"!=typeof b&&0===b.indexOf("<!DOCTYPE")){var c=document.getElementById("frm_loading");null!==c&&(b=jQuery(a).find("input[type=file]").val(),"undefined"!=typeof b&&""!==b&&setTimeout(function(){jQuery(c).fadeIn("slow")},
45
- 2E3));b=jQuery(a).find(".frm-g-recaptcha, .g-recaptcha");b.length&&(1>jQuery(a).find(".frm_next_page").length||1>jQuery(a).find(".frm_next_page").val())&&b.closest(".frm_form_field").replaceWith('<input type="hidden" name="recaptcha_checked" value="'+frm_js.nonce+'">');a.submit()}else if("object"!=typeof b){jQuery(a).find(".frm_ajax_loading").removeClass("frm_loading_now");var f=jQuery(a).find('input[name="form_id"]').val();jQuery(a).closest("#frm_form_"+f+"_container").replaceWith(b);frmFrontForm.scrollMsg(f);
46
- if("function"==typeof frmThemeOverride_frmAfterSubmit){var f=jQuery('input[name="frm_page_order_'+f+'"]').val(),e=jQuery(b).find('input[name="form_id"]').val();frmThemeOverride_frmAfterSubmit(e,f,b,a)}f=jQuery(a).find('input[name="id"]');f.length&&jQuery(document.getElementById("frm_edit_"+f.val())).find("a").addClass("frm_ajax_edited").click();jQuery(b).find(".frm_message").length&&X("pageLoad");Y()}else{jQuery(a).find('input[type="submit"], input[type="button"]').removeAttr("disabled");jQuery(a).find(".frm_ajax_loading").removeClass("frm_loading_now");
47
- f=!0;jQuery(".form-field").removeClass("frm_blank_field");jQuery(".form-field .frm_error").replaceWith("");var e=!1,h=null,g;for(g in b)if(h=jQuery(a).find("#frm_field_"+g+"_container"),h.length){if(!h.is(":visible")){var k=h.closest(".frm_toggle_container");k.length&&(k=k.prev(),k.hasClass("frm_trigger")||(k=k.prev(".frm_trigger")),k.click())}h.is(":visible")&&(K(h,g,b),f=!1,h=jQuery(a).find("#frm_field_"+g+"_container .frm-g-recaptcha, #frm_field_"+g+"_container .g-recaptcha"),h.length&&(e=!0,h=
48
- h.data("rid"),jQuery().grecaptcha&&(h?grecaptcha.reset(h):grecaptcha.reset())))}else if("redirect"==g){window.location=b[g];return}Ba(a);!0!==e&&jQuery(a).find(".frm-g-recaptcha, .g-recaptcha").closest(".frm_form_field").replaceWith('<input type="hidden" name="recaptcha_checked" value="'+frm_js.nonce+'">');f&&a.submit()}},error:function(){jQuery(a).find('input[type="submit"], input[type="button"]').removeAttr("disabled");a.submit()}})}function K(a,c,b){a.length&&a.is(":visible")&&(a.addClass("frm_blank_field"),
49
- "function"==typeof frmThemeOverride_frmPlaceError?frmThemeOverride_frmPlaceError(c,b):a.append('<div class="frm_error">'+b[c]+"</div>"))}function Ba(a){var c=jQuery(a).find(".frm_blank_field:first");c.length&&frmFrontForm.scrollMsg(c,a,!0)}function Ra(){Ca(jQuery(this),"clear")}function Sa(){Ca(jQuery(this),"replace")}function Ca(a,c){var b=a.data("frmval").replace(/(\n|\r\n)/g,"\r");if(""===b||"undefined"==typeof b)return!1;var d=a.val().replace(/(\n|\r\n)/g,"\r");"replace"==c?""===d&&a.addClass("frm_default").val(b):
50
- d==b&&a.removeClass("frm_default").val("")}function Ta(){var a=jQuery(this),c=a.data("eid"),b=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:c,form_id:b,nonce:frm_js.nonce},success:function(b){a.replaceWith(b)}});return!1}function Ua(a,c){google.load("visualization","1.0",{packages:[c],callback:function(){if("table"==c){var b=new google.visualization.DataTable,d=!1;-1!==jQuery.inArray("id",
51
- a.options.fields)&&(d=!0,b.addColumn("number",frm_js.id));for(var f=a.fields.length,e="string",h=0,g=f;h<g;h++){var k=a.fields[h],e=Da(k);b.addColumn(e,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));k=0;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=f;q<r;q++){var t=a.fields[q],e=Da(t),
52
- t=p.metas[t.id];"number"!=e||null!==t&&""!==t?"boolean"==e&&(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="'+a.options.confirm+'">'+a.options.delete_link+"</a>"):b.setCell(l,k,""));l++}}else for(b.addRows(1),h=k=0,g=f;h<g;h++)0<k?b.setCell(0,
53
- 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)}else Va(a)}})}function Da(a){var c="string";if("number"==a.type)c="number";else if("checkbox"==a.type||"select"==a.type){var b=a.options.length;"select"==a.type&&""===a.options[0]&&(b="post_status"==a.field_options.post_field?3:b-1);1==b&&(c="boolean")}return c}function Va(a){var c=new google.visualization.DataTable,b=!1,d=!1,f=a.rows.length;
54
- if(0<f)if("table"==a.type){b=!0;c.addRows(a.rows[f-1][0]+1);for(var e=0;e<f;e++)c.setCell(a.rows[e])}else if("undefined"!=typeof a.rows[0].tooltip)for(var d=b=!0,h=0;h<f;h++){e=a.rows[h].tooltip;delete a.rows[h].tooltip;var g=Object.keys(a.rows[h]).map(function(b){return a.rows[h][b]});a.rows[h]=g;a.rows[h].push(e)}f=a.cols.length;if(b){if(0<f)for(b=0;b<f;b++)e=a.cols[b],c.addColumn(e.type,e.name);d&&(c.addColumn({type:"string",role:"tooltip"}),c.addRows(a.rows))}else{c=[[]];for(d=0;d<f;d++)c[0].push(a.cols[d].name);
55
- c=c.concat(a.rows);c=google.visualization.arrayToDataTable(c)}d=a.type.charAt(0).toUpperCase()+a.type.slice(1)+"Chart";(new google.visualization[d](document.getElementById("chart_"+a.graph_id))).draw(c,a.options)}function Wa(){var a=jQuery(this),c=a.data("fid");a.wrap('<div class="frm_file_names frm_uploaded_files">');for(var b=a.get(0).files,d=0;d<b.length;d++)0===d?a.after(b[d].name+' <a href="#" class="frm_clear_file_link">'+frm_js.remove+"</a>"):a.after(b[d].name+"<br/>");a.hide();b=a.attr("name");
56
- b!="item_meta["+c+"][]"&&b.replace("item_meta[","").replace("[]","").split("][");a.closest(".frm_form_field").find(".frm_uploaded_files:last").after('<input name="'+b+'" data-fid="'+c+'"class="frm_transparent frm_multiple_file" multiple="multiple" type="file" />')}function Xa(){Ya(jQuery(this).parent(".frm_uploaded_files"))}function Za(){jQuery(this).parent(".frm_file_names").replaceWith("");return!1}function $a(){var a="frm_section_"+jQuery(this).data("parent")+"-"+jQuery(this).data("key"),c=jQuery(document.getElementById(a)),
57
- b=c.find("input, select, textarea");c.fadeOut("slow",function(){c.remove();b.each(function(){if("file"!=this.type){var a=p(this,!1);J(a,jQuery(this))}});"function"==typeof frmThemeOverride_frmRemoveRow&&frmThemeOverride_frmRemoveRow(a,c)});return!1}function ab(){if(!0===I)return!1;I=!0;var a=jQuery(this).data("parent"),c=0;if(0<jQuery(".frm_repeat_"+a).length)var b=jQuery(".frm_repeat_"+a+":last").attr("id").replace("frm_section_"+a+"-",""),c=-1<b.indexOf("i")?1:1+parseInt(b);jQuery.ajax({type:"POST",
58
- url:frm_js.ajax_url,dataType:"json",data:{action:"frm_add_form_row",field_id:a,i:c,nonce:frm_js.nonce},success:function(b){var f=b.html,e=jQuery(f).hide().fadeIn("slow");jQuery(".frm_repeat_"+a+":last").after(e);var h=["other"],g,k,m={repeatingSection:a.toString(),repeatRow:c.toString()};jQuery(f).find("input, select, textarea").each(function(){if("file"!=this.type){if(""===this.name)return!0;g=this.name.replace("item_meta[","").split("]")[2].replace("[","");-1==jQuery.inArray(g,h)&&!1!==this.id&&
59
- ""!==this.id&&(k=jQuery("#"+this.id),h.push(g),z(g,m),U(g,m,"value changed"),y(g,k),Z(g,k,"value changed"),J(g,k))}});Ea();V();"function"==typeof frmThemeOverride_frmAddRow&&frmThemeOverride_frmAddRow(a,b);I=!1},error:function(){I=!1}});return!1}function bb(){var a=jQuery(this),c=a.data("entryid"),b=a.data("prefix"),d=a.data("pageid"),f=a.data("formid"),e=a.data("cancel"),h=a.data("fields"),g=a.data("excludefields"),k=jQuery(document.getElementById(b+c)),m=k.html();k.html('<span class="frm-loading-img" id="'+
60
- b+c+'"></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:c,id:f,nonce:frm_js.nonce,fields:h,exclude_fields:g},success:function(d){k.children(".frm-loading-img").replaceWith(d);a.removeClass("frm_inplace_edit").addClass("frm_cancel_edit");a.html(e);X("editInPlace");Y();jQuery("#"+b+c).on("change",'input[name^="item_meta"], select[name^="item_meta"], textarea[name^="item_meta"]',
61
- x)}});return!1}function cb(){var a=jQuery(this),c=a.data("entryid"),b=a.data("prefix"),d=a.data("edit");a.hasClass("frm_ajax_edited")||(c=jQuery(document.getElementById(b+c)),c.children(".frm_forms").replaceWith(""),c.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 db(){var a=jQuery(this),c=a.data("deleteconfirm");if(confirm(c)){var b=a.data("entryid"),d=a.data("prefix");a.replaceWith('<span class="frm-loading-img" id="frm_delete_'+
62
- b+'"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_destroy",entry:b,nonce:frm_js.nonce},success:function(a){"success"==a.replace(/^\s+|\s+$/g,"")?(jQuery(document.getElementById(d+b)).fadeOut("slow"),jQuery(document.getElementById("frm_delete_"+b)).fadeOut("slow")):jQuery(document.getElementById("frm_delete_"+b)).replaceWith(a)}})}return!1}function Y(){"undefined"!==typeof __frmHideFields&&frmFrontForm.hidePreviouslyHiddenFields();jQuery(document).on("focusin",".frm_date",
63
- r);if("undefined"!==typeof __frmUniqueTimes)for(var a=__frmUniqueTimes,c=0;c<a.length;c++)jQuery(document.getElementById(a[c].dateID)).change(q);if("undefined"!==typeof __frmMasks)for(a=__frmMasks,c=0;c<a.length;c++)jQuery(a[c].trigger).attr("data-frmmask",a[c].mask);Ea();V();"undefined"!==typeof __frmDepDynamicFields&&frmFrontForm.checkDependentDynamicFields(__frmDepDynamicFields);"undefined"!==typeof __frmDepLookupFields&&frmFrontForm.checkDependentLookupFields(__frmDepLookupFields);"undefined"!==
64
- typeof __FRMCALC&&(a=__FRMCALC.triggers)&&jQuery(a.join()).trigger({type:"change",selfTriggered:!0})}function V(){if(jQuery().chosen){var a={allow_single_deselect:!0};"undefined"!==typeof __frmChosen&&(a="{"+__frmChosen+"}");jQuery(".frm_chzn").chosen(a)}}function Ea(){if(jQuery().rating){var a=jQuery(".star");a.length&&a.rating()}}function X(a){"undefined"!==typeof __frmHideOrShowFields&&frmFrontForm.hideOrShowFields(__frmHideOrShowFields,a)}function u(a,c){"undefined"===typeof c&&(c="dependent");
65
- 1<a.length&&(a=a.eq(0));a.trigger({type:"change",selfTriggered:!0,frmTriggered:c})}function E(a){var c={repeatingSection:"",repeatRow:""};"undefined"!==typeof a&&3<=a.split("][").length&&(a=a.split("]["),c.repeatingSection=a[0].replace("item_meta[",""),c.repeatRow=a[1]);return c}function Ya(a){a.fadeOut("slow",function(){a.remove()})}function eb(){var a=jQuery(this).data("frmconfirm");return confirm(a)}function fb(){var a=jQuery(this).data("frmtoggle");jQuery(a).is(":visible")?jQuery(a).slideUp("fast"):
66
- jQuery(a).slideDown("fast");return!1}function Ma(a,c){for(var b in a)if(a.hasOwnProperty(b)&&a[b]===c)return b;return null}function ya(a){return!jQuery.isArray(a)&&0<=a-parseFloat(a)+1}function gb(){Array.prototype.indexOf||(Array.prototype.indexOf=function(a,c){var b=this.length>>>0,d=Number(c)||0,d=0>d?Math.ceil(d):Math.floor(d);for(0>d&&(d+=b);d<b;d++)if(d in this&&this[d]===a)return d;return-1})}function hb(){"function"!==typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,
67
- "")})}function ib(){Array.prototype.filter||(Array.prototype.filter=function(a,c){if(void 0===this||null===this)throw new TypeError;var b=Object(this),d=b.length>>>0;if("function"!==typeof a)throw new TypeError;for(var f=[],e=0;e<d;e++)if(e in b){var h=b[e];a.call(c,h,e,b)&&f.push(h)}return f})}function jb(){Object.keys||(Object.keys=function(a){var c=[],b;for(b in a)a.hasOwnProperty(b)&&c.push(b);return c})}var I=!1,F="",v=[];return{init:function(){jQuery(document).off("submit.formidable",".frm-show-form");
68
- 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():jQuery(".frm-show-form input[onblur], .frm-show-form textarea[onblur]").each(function(){""===jQuery(this).val()&&jQuery(this).blur()});jQuery(document).on("focus",
69
- ".frm_toggle_default",Ra);jQuery(document).on("blur",".frm_toggle_default",Sa);jQuery(".frm_toggle_default").blur();jQuery(document.getElementById("frm_resend_email")).click(Ta);jQuery(document).on("change",".frm_multiple_file",Wa);jQuery(document).on("click",".frm_clear_file_link",Za);jQuery(document).on("click",".frm_remove_link",Xa);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"]',
70
- x);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("change","input[type=file].frm_transparent",w);jQuery(document).on("click",".frm_remove_form_row",$a);jQuery(document).on("click",".frm_add_form_row",ab);jQuery(document).on("click","a[data-frmconfirm]",
71
- eb);jQuery("a[data-frmtoggle]").click(fb);jQuery(".frm_edit_link_container").on("click","a.frm_inplace_edit",bb);jQuery(".frm_edit_link_container").on("click","a.frm_cancel_edit",cb);jQuery(document).on("click",".frm_ajax_delete",db);jQuery(".frm_month_heading, .frm_year_heading").click(function(){var a=jQuery(this).children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s");a.hasClass("ui-icon-triangle-1-e")?(a.addClass("ui-icon-triangle-1-s").removeClass("ui-icon-triangle-1-e"),jQuery(this).next(".frm_toggle_container").fadeIn("slow")):
72
- (a.addClass("ui-icon-triangle-1-e").removeClass("ui-icon-triangle-1-s"),jQuery(this).next(".frm_toggle_container").hide())});X("pageLoad");Y();gb();hb();ib();jb()},submitForm:function(a){var c=this.classList;c&&!c.contains("frm_pro_form")||jQuery("body").hasClass("wp-admin")||(a.preventDefault(),a=frmFrontForm.validateFormSubmit(this),0===Object.keys(a).length&&frmFrontForm.checkFormErrors(this,F))},validateFormSubmit:function(a){jQuery(this).find(".wp-editor-wrap").length&&"undefined"!=typeof tinyMCE&&
73
- tinyMCE.triggerSave();F=jQuery(a).find('input[name="frm_action"]').val();v=[];var c=jQuery(a).hasClass("frm_js_validate");c&&(za(a)||Aa(a))&&(c=!1);c&&(frmFrontForm.getAjaxFormErrors(a),Object.keys(v).length&&frmFrontForm.addAjaxFormErrors(a));return v},getAjaxFormErrors:function(a){var c=[],b=jQuery(a).find(".frm_required_field:visible input, .frm_required_field:visible select, .frm_required_field:visible textarea").filter(":not(.frm_optional)");if(b.length)for(var d=0,f=b.length;d<f;d++)c=aa(b[d],
74
- c);b=jQuery(a).find("input[type=email]").filter(":visible");d=jQuery(a).find("input,select,textarea");if(d.length)for(var f=0,e=d.length;f<e;f++){var h=d[f];""!==h.value&&"hidden"!=h.type&&("number"==h.type?c=ca(h,c):"email"==h.type?c=ba(h,c,b):null!==h.pattern&&(c=da(h,c)))}b=jQuery(a).find(".frm-g-recaptcha");b.length&&(d=b.data("rid"),0===grecaptcha.getResponse(d).length&&(b=b.closest(".frm_form_field").attr("id").replace("frm_field_","").replace("_container",""),c[b]=""));v=c;if("function"==typeof frmThemeOverride_jsErrors&&
75
- (a=frmThemeOverride_jsErrors(F,a),Object.keys(a).length))for(var g in a)v[g]=a[g];return v},addAjaxFormErrors:function(a){jQuery(".form-field").removeClass("frm_blank_field");jQuery(".form-field .frm_error").replaceWith("");for(var c in v){var b=jQuery(a).find("#frm_field_"+c+"_container");b.length?K(b,c,v):delete v[c]}Ba(a)},checkFormErrors:function(a,c){Qa(a,c)},scrollToID:function(a){a=jQuery(document.getElementById(a).offset());window.scrollTo(a.left,a.top)},scrollMsg:function(a,c,b){var d="",
76
- d="undefined"==typeof c?jQuery(document.getElementById("frm_form_"+a+"_container")):"string"==typeof a?jQuery(c).find("#frm_field_"+a+"_container"):a;if(a=d.offset().top){a-=frm_js.offset;c=jQuery("html").css("margin-top");d=jQuery("body").css("margin-top");if(c||d)a=a-parseInt(c)-parseInt(d);if(a&&window.innerHeight&&(c=document.documentElement.scrollTop||document.body.scrollTop,a>c+window.innerHeight||a<c))return"undefined"===typeof b?jQuery(window).scrollTop(a):jQuery("html,body").animate({scrollTop:a},
77
- 500),!1}},savingDraft:function(a){return za(a)},goingToPreviousPage:function(a){return Aa(a)},hideOrShowFields:function(a,c){if("pageLoad"===c){var b=document.querySelectorAll('[id^="frm_hide_fields_"]');T(b)}for(var b={repeatingSection:"",repeatRow:""},d=0,f=a.length;d<f;d++)z(a[d],b)},hidePreviouslyHiddenFields:function(){var a;a=[];for(var c=document.querySelectorAll('*[id^="frm_hide_fields_"]'),b=c.length,d,f=0;f<b;f++)d=c[f].id.replace("frm_hide_fields_",""),a=a.concat(C(d));c=0;for(b=a.length;c<
78
- b;c++)d=document.getElementById(a[c]),null!==d&&(d.style.display="none")},checkDependentDynamicFields:function(a){for(var c={repeatingSection:"",repeatRow:""},b=0,d=a.length;b<d;b++)z(a[b],c)},checkDependentLookupFields:function(a){for(var c,b={repeatingSection:"",repeatRow:""},d=0,f=a.length;d<f;d++)c=a[d],U(c,b,"value changed")},loadGoogle:function(){if("undefined"!==typeof google&&google&&google.load)for(var a=__FRMTABLES,c=Object.keys(a),b=0;b<c.length;b++)for(var d=a[c[b]],f=c[b],e=0;e<d.length;e++)Ua(d[e],
79
- f);else setTimeout(frmFrontForm.loadGoogle,30)},removeUsedTimes:function(a,c){var b=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:c,date_field:a.id,entry_id:b?b.val():"",date:jQuery(a).val(),nonce:frm_js.nonce},success:function(a){var b=jQuery(document.getElementById(c));b.find("option").removeAttr("disabled");if(a&&""!==a)for(var e in a)b.find('option[value="'+e+'"]').attr("disabled",
80
- "disabled")}})},escapeHtml:function(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},invisible:function(a){jQuery(a).css("visibility","hidden")},visible:function(a){jQuery(a).css("visibility","visible")}}}var frmFrontForm=frmFrontFormJS();jQuery(document).ready(function(l){frmFrontForm.init()});
 
81
  function frmRecaptcha(){for(var l=jQuery(".frm-g-recaptcha"),n=0,q=l.length;n<q;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)}}
82
  function frmUpdateField(l,n,q,r,w){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:q,nonce:frm_js.nonce},success:function(){""===r.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById("frm_update_field_"+l+"_"+n+"_"+w)).fadeOut("slow"):jQuery(document.getElementById("frm_update_field_"+l+"_"+n+"_"+w)).replaceWith(r)}})}
83
- function frmEditEntry(l,n,q,r,w,A){console.warn("DEPRECATED: function frmEditEntry in v2.0.13 use frmFrontForm.editEntry");var x=jQuery(document.getElementById("frm_edit_"+l)),p=x.html(),y=jQuery(document.getElementById(n+l)),z=y.html();y.html('<span class="frm-loading-img" id="'+n+l+'"></span><div class="frm_orig_content" style="display:none">'+z+"</div>");jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"html",data:{action:"frm_entries_edit_entry_ajax",post_id:q,entry_id:l,id:r,nonce:frm_js.nonce},
84
- success:function(z){y.children(".frm-loading-img").replaceWith(z);x.replaceWith('<span id="frm_edit_'+l+'"><a onclick="frmCancelEdit('+l+",'"+n+"','"+frmFrontForm.escapeHtml(p)+"',"+q+","+r+",'"+A+'\')" class="'+A+'">'+w+"</a></span>")}})}
85
- function frmCancelEdit(l,n,q,r,w,A){console.warn("DEPRECATED: function frmCancelEdit in v2.0.13 use frmFrontForm.cancelEdit");var x=jQuery(document.getElementById("frm_edit_"+l)),p=x.find("a"),y=p.html();p.hasClass("frm_ajax_edited")||(p=jQuery(document.getElementById(n+l)),p.children(".frm_forms").replaceWith(""),p.children(".frm_orig_content").fadeIn("slow").removeClass("frm_orig_content"));x.replaceWith('<a id="frm_edit_'+l+'" class="frm_edit_link '+A+'" href="javascript:frmEditEntry('+l+",'"+
86
- n+"',"+r+","+w+",'"+frmFrontForm.escapeHtml(y)+"','"+A+"')\">"+q+"</a>")}
87
  function frmDeleteEntry(l,n){console.warn("DEPRECATED: function frmDeleteEntry in v2.0.13 use frmFrontForm.deleteEntry");jQuery(document.getElementById("frm_delete_"+l)).replaceWith('<span class="frm-loading-img" id="frm_delete_'+l+'"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_destroy",entry:l,nonce:frm_js.nonce},success:function(q){"success"==q.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById(n+l)).fadeOut("slow"):jQuery(document.getElementById("frm_delete_"+
88
- l)).replaceWith(q)}})}function frmOnSubmit(l){console.warn("DEPRECATED: function frmOnSubmit in v2.0 use frmFrontForm.submitForm");frmFrontForm.submitForm(l,this)}
89
  function frm_resend_email(l,n){console.warn("DEPRECATED: function frm_resend_email in v2.0");$link=jQuery(document.getElementById("frm_resend_email"));$link.append('<span class="spinner" style="display:inline"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_send_email",entry_id:l,form_id:n,nonce:frm_js.nonce},success:function(l){$link.replaceWith(l)}})};
1
+ function frmFrontFormJS(){function l(a){var b=jQuery(this),c=b.attr("type");"submit"!==c&&a.preventDefault();a=b.parents("form:first");var d=b="",e=this.name;if("frm_prev_page"===e||-1!==this.className.indexOf("frm_prev_page"))b=jQuery(a).find(".frm_next_page").attr("id").replace("frm_next_p_","");else if("frm_save_draft"===e||-1!==this.className.indexOf("frm_save_draft"))d=1;jQuery(".frm_next_page").val(b);jQuery(".frm_saving_draft").val(d);"submit"!==c&&a.trigger("submit")}function n(){jQuery(this).parent().children(".frm_toggle_container").slideToggle("fast");
2
+ jQuery(this).toggleClass("active").children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s").toggleClass("ui-icon-triangle-1-s ui-icon-triangle-1-e")}function q(){for(var a=__frmUniqueTimes,b=0;b<a.length;b++)a[b].dateID==this.id&&frmFrontForm.removeUsedTimes(this,a[b].timeID)}function r(){if(-1===this.className.indexOf("frm_custom_date")&&"undefined"!==typeof __frmDatepicker){var a=__frmDatepicker,b=this.id,c=b.split("-");c.pop();c='input[id^="'+c.join("-")+'"]';jQuery.datepicker.setDefaults(jQuery.datepicker.regional[""]);
3
+ for(var d=0,e=0;e<a.length;e++)if(a[e].triggerID=="#"+b||a[e].triggerID==c)d=e;jQuery(this).datepicker(jQuery.extend(jQuery.datepicker.regional[a[d].locale],a[d].options))}}function w(){this.className=this.className.replace("frm_transparent","");this.parentNode.getElementsByTagName("a")[0].className.indexOf("frm_clear_file_link")}function z(){var a=this.type,b=!1,c=!1;if("select-one"===a)c=!0,"frm_other_trigger"===this.options[this.selectedIndex].className&&(b=!0);else if("select-multiple"===a)for(var c=
4
+ !0,d=this.options,b=!1,e=0;e<d.length;e++)if("frm_other_trigger"===d[e].className&&d[e].selected){b=!0;break}c?(a=jQuery(this).parent().children(".frm_other_input"),a.length&&(b?a[0].className=a[0].className.replace("frm_pos_none",""):(1>a[0].className.indexOf("frm_pos_none")&&(a[0].className+=" frm_pos_none"),a[0].value=""))):"radio"===a?jQuery(this).is(":checked")&&(jQuery(this).closest(".frm_radio").children(".frm_other_input").removeClass("frm_pos_none"),jQuery(this).closest(".frm_radio").siblings().children(".frm_other_input").addClass("frm_pos_none").val("")):
5
+ "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 A(a){var b=p(this,!1);if(b&&"undefined"!==typeof b&&(!a.frmTriggered||a.frmTriggered!=b)){x(b,jQuery(this));a="undefined"!==typeof a.originalEvent||-1<a.currentTarget.className.indexOf("frm_chzn")?"value changed":"other";aa(b,jQuery(this),a);K(b,jQuery(this));b=[];a=
6
+ jQuery(this).closest(".frm_form_field");a.hasClass(".frm_required_field")&&!jQuery(this).hasClass(".frm_optional")&&(b=ba(this,b));if(1>b.length)if("email"==this.type)var c=jQuery(this).closest("form").find("input[type=email]"),b=ca(this,b,c);else"number"==this.type?b=da(this,b):null!==this.pattern&&(b=ea(this,b));a.removeClass("frm_blank_field");a.find(".frm_error").remove();if(0<Object.keys(b).length)for(var d in b)L(a,d,b)}}function p(a,b){var c="",c=a instanceof jQuery?a.attr("name"):a.name;if(""===
7
+ 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]||"[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("[",
8
+ ""):d+"-"+c[0]+"-"+c[1].replace("[",""));return d}function x(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=E(b[0].name),e=0,f=c.dependents.length;e<f;e++)y(c.dependents[e],d)}function y(a,b){var c=M(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");
9
+ d.push(e)}else if("0"!==c.inEmbedForm)d=N(c),d=["frm_field_"+c.fieldId+"-"+d+"-0_container"];else if(d=[],e=N(c),null!==document.getElementById("frm_field_"+e+"_container"))for(var e=document.querySelectorAll(".frm_field_"+c.fieldId+"_container"),f=0,h=e.length;f<h;f++)d.push(e[f].id);else if(d=[],e=N(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("-"),
10
+ 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],fa(c,d[f]),ga(c)}}function N(a){var b="";"0"!==a.inEmbedForm?b=a.inEmbedForm:"0"!==a.inSection&&(b=a.inSection);return b}function fa(a,b){if(a.isRepeating){var c=b.replace("_container","").split("-");a.repeatRow=c[2]}else a.repeatRow=""}function ga(a){for(var b=[],c=a.conditions.length,d=0;d<c;d++)b.push(Ga(a.conditions[d],a));c=F="any"==a.anyAll?-1<b.indexOf(!0)?
11
+ a.showHide:ha(a.showHide):-1<b.indexOf(!1)?ha(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},children:"",inputType:a.inputType},"data"==a.inputType?Ha(a,b):b&&Ia(a)):!1!==B(a.containerId,a.formId)&&(G(a.containerId,a.formId),b?(b=ia(a.containerId),
12
+ ja(b,"divider"==a.fieldType||"form"==a.fieldType,a.formId),jQuery("#"+a.containerId).show()):(b=ka(a),ja(b,"divider"==a.fieldType||"form"==a.fieldType,a.formId))):O(a,b)}function M(a){return"undefined"===typeof __FRMRULES||"undefined"===typeof __FRMRULES[a]?!1:__FRMRULES[a]}function Ga(a,b){var c=M(a.fieldId),d=la(c,b);"data"==b.fieldType&&"data"==c.fieldType?(c=""===a.value?""===d||1==d.length&&""===d[0]?!1:!0:P(a.operator,a.value,d),b.dataLogic=a,b.dataLogic.actualValue=d,d=c):d=P(a.operator,a.value,
13
+ d);return d}function la(a,b){var c;if("radio"==a.inputType||"checkbox"==a.inputType)c=ma(a,b),c=document.querySelectorAll('input[name^="'+c+'"]'),c="checkbox"==a.inputType?Q(c):na(c);else if(c="",!0===a.isMultiSelect){c=ma(a,b);var d=document.querySelectorAll('[name^="'+c+'"]');c=1==d.length&&"hidden"!=d[0].type?jQuery('[name^="'+c+'"]').val():Q(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"===
14
+ typeof c&&(c=c.trim());return c}function ma(a,b){return a.isRepeating?"item_meta["+b.inSection+"]["+b.repeatRow+"]["+a.fieldId+"]":"item_meta["+a.fieldId+"]"}function Q(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}function P(a,b,c){b=Ja(b);c=Ka(b,c);return"string"===typeof b&&"-1"!=b.indexOf("&quot;")&&P(a,b.replace("&quot;",'"'),c)?!0:{"==":function(a,b){return a==b},"!=":function(a,b){return a!=b},"<":function(a,b){return a>
15
+ b},">":function(a,b){return a<b},LIKE:function(a,b){if(!b)return!1;b=H(b);a=H(a);return-1!=b.indexOf(a)},"not LIKE":function(a,b){if(!b)return!0;b=H(b);a=H(a);return-1==b.indexOf(a)}}[a](b,c)}function Ja(a){-1!==String(a).search(/^\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*$/)?a=parseFloat(a):"string"===typeof a&&(a=a.trim());return a}function Ka(a,b){"undefined"===typeof b&&(b="");jQuery.isArray(b)&&-1<jQuery.inArray(a,b)&&(b=a);"number"===typeof a&&"string"===typeof b&&(b=parseFloat(b));"string"===typeof b&&
16
+ (b=b.trim());return b}function H(a){"string"===typeof a?a=a.toLowerCase():"number"===typeof a&&(a=a.toString());return a}function ha(a){return"show"==a?"hide":"show"}function ia(a){return document.getElementById(a).querySelectorAll('select[name^="item_meta"], textarea[name^="item_meta"], input[name^="item_meta"]')}function ka(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_'+
17
+ a.fieldKey+'-"]'):document.querySelectorAll('[name^="'+(a.isRepeating?"item_meta["+a.inSection+"]["+a.repeatRow+"]["+a.fieldId+"]":"item_meta["+a.fieldId+"]")+'"]');return a}function ja(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&&oa(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),
18
+ 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=!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 k=d.getAttribute("autocompletetype"),null!==k&&(k=k.replace("address-",""),g=g[k]),d.value=g;"SELECT"==
19
+ d.tagName&&R(d);u(h)}d=a[f];h=p(d,!1);h=S(h);!1!==h&&"lookup"!=h.fieldType&&(h.parentVals=T(h),pa(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]&&qa(h,g,
20
+ [],d)}d=a[f]}}function oa(a,b){var c=p(a,!0);return B("frm_field_"+c+"_container",b)}function O(a,b){if(!B(a.containerId,a.formId)){if(b){jQuery("#"+a.containerId).hide();var c=ia(a.containerId)}else c=ka(a);U(c);ra(a.containerId,a.formId)}}function U(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+
21
+ "_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<C(b).indexOf(a)&&(c=!0);return c}function ra(a,b){var c=C(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 C(a){var b=[];a=document.getElementById("frm_hide_fields_"+a);return null===a?b:b=(b=a.value)?JSON.parse(b):[]}function G(a,b){var c=C(b),d=c.indexOf(a);-1<d&&(c.splice(d,1),c=JSON.stringify(c),
22
+ document.getElementById("frm_hide_fields_"+b).value=c)}function aa(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=E(b[0].name);for(var d=0,e=a.dependents.length;d<e;d++)V(a.dependents[d],b,c)}}function V(a,b,c){a=S(a);if(!(!1===a||1>a.parents.length))if("lookup"==a.fieldType){b=[];a.isRepeating?b=document.querySelectorAll(".frm_field_"+a.fieldId+"_container"):(c=document.getElementById("frm_field_"+
23
+ a.fieldId+"_container"),null!==c&&b.push(c));c=0;for(var d=b.length;c<d;c++){fa(a,b[c].id);var e=a,f=b[c];e.parentVals=T(e);if("select"==e.inputType)La(e,f);else if("radio"==e.inputType||"checkbox"==e.inputType)if(!1===e.parentVals){var h=f.getElementsByTagName("input");sa(e,f);U(h)}else Ma(e,f)}}else if("value changed"===c)for(c="field_"+a.fieldKey,c=a.isRepeating?""!==b.repeatingSection?'[id="'+c+"-"+b.repeatRow+'"]':'[id^="'+c+'-"]':'[id="'+c+'"]',b=document.querySelectorAll(c),c=0,d=b.length;c<
24
+ d;c++)e=a,f=E(b[c].name),e.repeatRow=""!==f.repeatRow?f.repeatRow:"",e=a,f=b[c],e.parentVals=T(e),pa(e,f)}function S(a){return"undefined"===typeof __FRMLOOKUP||"undefined"===typeof __FRMLOOKUP[a]?!1:__FRMLOOKUP[a]}function T(a){for(var b=[],c=a.parents,d,e=0,f=c.length;e<f;e++){d=S(c[e]);d=la(d,a);if(""===d||!1===d){b=!1;break}b[e]=d}return b}function na(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 La(a,b){var c=b.getElementsByTagName("SELECT")[0];
25
+ if(null!==c){var d=c.value;!1===a.parentVals?(c.options.length=1,""!==d&&(c.value="",R(c),u(jQuery(c),a.fieldKey))):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,g=0;g<k;g++)c.options[g+1]=new Option(b[g],b[g],!1,!1);c.value=h;""===c.value&&
26
+ (b=c.getAttribute("data-frmval"),null!==b&&(c.value=b));R(c);c.value!=h&&u(jQuery(c),d)}})}}function R(a){-1<a.className.indexOf("frm_chzn")&&jQuery().chosen&&jQuery(a).trigger("chosen:updated")}function Ma(a,b){var c=b.getElementsByClassName("frm_opt_container")[0],d=c.getElementsByTagName("input");Na(b,c);var e="",e="radio"==a.inputType?na(d):Q(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,
27
+ 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?sa(a,b):!1!==B(b.id,a.formId)&&(e=M(a.fieldId),!1===e||1>e.conditions.length?(G(b.id,a.formId),jQuery("#"+b.id).show()):(e.containerId=b.id,e.repeatRow=a.repeatRow,ga(e)));u(jQuery(d[0]),a.fieldKey)}})}function sa(a,b){B(b.id,a.formId)||(jQuery("#"+b.id).hide(),
28
+ ra(b.id,a.formId))}function pa(a,b){if(!oa(b,a.formId))if(!1===a.parentVals){var c=b.getAttribute("data-frmval");null===c&&(c="");ta(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},success:function(c){b.value!=c&&ta(a.fieldKey,b,c)}})}function ta(a,b,c){b.value=c;u(jQuery(b),a)}function Ha(a,b){if(b){var c=jQuery("#"+a.containerId);ua(c)}jQuery.ajax({type:"POST",
29
+ 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();va(e);""===d||""===h?O(a,!0):wa(a,c,f)}else e="field_"+a.fieldKey,""!==a.repeatRow&&(e+="-"+a.repeatRow),e=document.getElementById(e),e.value=d,B(a.containerId,a.formId)&&G(a.containerId,a.formId),u(jQuery(e))}})}function Ia(a,b){var c=
30
+ jQuery("#"+a.containerId),d=c.find('select[name^="item_meta"], textarea[name^="item_meta"], input[name^="item_meta"]'),e=Oa(d),d=d.data("frmval");ua(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,prev_val:e,nonce:frm_js.nonce},success:function(b){var d=c.find(".frm_opt_container");d.html(b);var e=d.find("select, input, textarea");
31
+ va(d);""===b||1==e.length&&"hidden"==e.attr("type")?O(a,!0):wa(a,c,e)}})}function ua(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 Na(a,b){if(!(-1<a.innerHTML.indexOf("frm-loading-img"))){b.style.display="none";var c=document.createElement("span");c.setAttribute("class","frm-loading-img");a.insertBefore(c,b.nextSibling)}}function va(a){a.next(".frm-loading-img").remove();a.show()}function Oa(a){var b=
32
+ [],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 wa(a,b,c){B(a.containerId,a.formId)&&(G(a.containerId,a.formId),b.show());c.hasClass("frm_chzn")&&W();u(c)}function K(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=C(g.form_id);
33
+ 1>n.length||("0"===g.inSection&&"0"===g.inEmbedForm?m=I(l,n):(k=E(k),I(l,n)?m=!0:xa(l,k,n)?m=!0:"0"!==g.inSection&&"0"!==g.inEmbedForm?m=xa(g.inSection,k,n):"0"!==g.inSection?m=I(g.inSection,n):"0"!==g.inEmbedForm&&(m=I(g.inEmbedForm,n))));g=m;!1===g&&qa(c,d[f],e,b)}}}function I(a,b){return-1<b.indexOf("frm_field_"+a+"_container")}function xa(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 qa(a,b,c,d){var e=
34
+ 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=Pa(a.fieldsWithCalc,b),h=ya(g));if(!(1>h.length)){f=Qa(e,f,a,c,g);a=e.calc_dec;f.indexOf(").toFixed(")&&(c=f.split(").toFixed("),za(c[1])&&(a=c[1],f=f.replace(").toFixed("+a,"")));f=parseFloat(eval(f));if("undefined"===typeof f||isNaN(f))f=0;za(a)&&(f=f.toFixed(a));h.val()!=f&&(h.val(f),u(h,b))}}
35
+ function Qa(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||"select"==g.thisField.type?g.thisFieldCall=g.thisFieldCall+":checked,select"+k.fieldKeys[g.thisFieldId]+" option:selected,"+g.thisFieldCall+"[type=hidden]":"radio"==g.thisField.type||"scale"==g.thisField.type?g.thisFieldCall=
36
+ g.thisFieldCall+":checked,"+g.thisFieldCall+"[type=hidden]":"textarea"==g.thisField.type&&(g.thisFieldCall=g.thisFieldCall+",textarea"+k.fieldKeys[g.thisFieldId]);d=Ra(g,c,d);if("undefined"===typeof d[g.valKey]||isNaN(d[g.valKey]))d[g.valKey]=0;k="["+g.thisFieldId+"]";k=k.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1");b=b.replace(new RegExp(k,"g"),d[g.valKey])}return b}function Ra(a,b,c){if("undefined"!==typeof c[a.valKey]&&0!==c[a.valKey])return c;c[a.valKey]=0;var d;if(!1===a.inSection)d=jQuery(a.thisFieldCall);
37
+ else if(d=ya(a),null===d||"undefined"===typeof d)d=jQuery(a.thisFieldCall);if(null===d||"undefined"===typeof d||1>d.length)return c;d.each(function(){var d,f=a.thisField;d=!1;if("hidden"==this.type)""!==X(this)&&(d=!0);else if("select"==f.type){var h=this.className;h&&-1<h.indexOf("frm_other_trigger")&&(d=!0)}else("checkbox"==f.type||"radio"==f.type)&&-1<this.id.indexOf("-other_")&&0>this.id.indexOf("-otext")&&(d=!0);d?(d=0,"select"==f.type?"hidden"==this.type?(f=!1,2<this.name.split("[").length&&
38
+ (f=!0),f||(d=X(this))):d=jQuery(this).closest(".frm_other_container").find(".frm_other_input").val():"checkbox"!=f.type&&"radio"!=f.type||"hidden"==this.type||(d=X(this)),f=d):f="checkbox"!==this.type&&"radio"!==this.type||!this.checked?jQuery(this).val():this.value;"undefined"===typeof f&&(f="");d=f;if("date"==a.thisField.type){f=b.date;h=0;if(d)if("undefined"===typeof jQuery.datepicker){h="-";-1<f.indexOf("/")&&(h="/");f=f.split(h);d=d.split(h);var g,k;g=h=k="";for(var m=0;m<f.length;m++)if("y"==
39
+ 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&&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}});
40
+ return c}function ya(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 X(a){var b="";a=document.getElementById(a.id+"-otext");null!==a&&""!==a.value&&(b=a.value);return b}function Aa(a){var b=!1;a=jQuery(a).find(".frm_saving_draft");a.length&&(b=a.val());return b}function Ba(a){var b=!1,c=jQuery(a).find(".frm_next_page");if(c.length&&
41
+ 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 ba(a,b){if("hidden"==a.type)return b;var c="",d="";if("checkbox"==a.type||"radio"==a.type){var e=jQuery('input[name="'+a.name+'"]').closest(".frm_required_field").find("input:checked");jQuery(e).each(function(){c=this.value})}else if("file"==a.type)d=jQuery(a).data("fid"),"undefined"===typeof d&&(d=p(a,!0),d=d.replace("file",
42
+ "")),"undefined"===typeof b[d]&&(c=Sa(d));else{d=a.className;if(-1!==d.indexOf("frm_pos_none"))return b;c=jQuery(a).val();if("string"!==typeof c)for(var e=c,c="",f=0;f<e.length;f++)""!==e[f]&&(c=e[f]);d=-1===d.indexOf("frm_other_input")?p(a,!0):p(a,!1)}""===c&&(""===d&&(d=p(a,!0)),d in b||(b[d]=D(a,"data-reqmsg")));return b}function Sa(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 ca(a,
43
+ b,c){var d=a.value,e=p(a,!0);if(e in b)return b;var f=0===e.indexOf("conf_");if(""!==d||f){var h=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i,g=D(a,"data-invmsg");""!==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 da(a,b){var c=a.value;""!==c&&!1!==isNaN(c/
44
+ 1)&&(c=p(a,!0),c in b||(b[c]=D(a,"data-invmsg")));return b}function ea(a,b){var c=a.value,d=D(a,"pattern");if(""!==d&&""!==c){var e=p(a,!0);e in b||(d=new RegExp("^"+d+"$","i"),!1===d.test(c)&&(b[e]=D(a,"data-invmsg")))}return b}function D(a,b){var c=a.getAttribute(b);null===c&&(c="");return c}function Ta(a,b){jQuery(a).find('input[type="submit"], input[type="button"]').attr("disabled","disabled");jQuery(a).find(".frm_ajax_loading").addClass("frm_loading_now");"undefined"==typeof b&&jQuery(a).find('input[name="frm_action"]').val();
45
+ jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:jQuery(a).serialize()+"&action=frm_entries_"+b+"&nonce="+frm_js.nonce,success:function(b){b=b.replace(/^\s+|\s+$/g,"");0===b.indexOf("{")&&(b=jQuery.parseJSON(b));if(""===b||!b||"0"===b||"object"!=typeof b&&0===b.indexOf("<!DOCTYPE")){var d=document.getElementById("frm_loading");null!==d&&(b=jQuery(a).find("input[type=file]").val(),"undefined"!=typeof b&&""!==b&&setTimeout(function(){jQuery(d).fadeIn("slow")},2E3));b=jQuery(a).find(".frm-g-recaptcha, .g-recaptcha");
46
+ b.length&&(1>jQuery(a).find(".frm_next_page").length||1>jQuery(a).find(".frm_next_page").val())&&b.closest(".frm_form_field").replaceWith('<input type="hidden" name="recaptcha_checked" value="'+frm_js.nonce+'">');a.submit()}else if("object"!=typeof b){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);frmFrontForm.scrollMsg(e);if("function"==typeof frmThemeOverride_frmAfterSubmit){var e=
47
+ jQuery('input[name="frm_page_order_'+e+'"]').val(),f=jQuery(b).find('input[name="form_id"]').val();frmThemeOverride_frmAfterSubmit(f,e,b,a)}e=jQuery(a).find('input[name="id"]');e.length&&jQuery(document.getElementById("frm_edit_"+e.val())).find("a").addClass("frm_ajax_edited").click();jQuery(b).find(".frm_message").length&&Y("pageLoad");Z()}else{jQuery(a).find('input[type="submit"], input[type="button"]').removeAttr("disabled");jQuery(a).find(".frm_ajax_loading").removeClass("frm_loading_now");e=
48
+ !0;jQuery(".form-field").removeClass("frm_blank_field");jQuery(".form-field .frm_error").replaceWith("");var f=!1,h=null,g;for(g in b)if(h=jQuery(a).find("#frm_field_"+g+"_container"),h.length){if(!h.is(":visible")){var k=h.closest(".frm_toggle_container");k.length&&(k=k.prev(),k.hasClass("frm_trigger")||(k=k.prev(".frm_trigger")),k.click())}h.is(":visible")&&(L(h,g,b),e=!1,h=jQuery(a).find("#frm_field_"+g+"_container .frm-g-recaptcha, #frm_field_"+g+"_container .g-recaptcha"),h.length&&(f=!0,h=h.data("rid"),
49
+ jQuery().grecaptcha&&(h?grecaptcha.reset(h):grecaptcha.reset())))}else if("redirect"==g){window.location=b[g];return}Ca(a);!0!==f&&jQuery(a).find(".frm-g-recaptcha, .g-recaptcha").closest(".frm_form_field").replaceWith('<input type="hidden" name="recaptcha_checked" value="'+frm_js.nonce+'">');e&&a.submit()}},error:function(){jQuery(a).find('input[type="submit"], input[type="button"]').removeAttr("disabled");a.submit()}})}function L(a,b,c){a.length&&a.is(":visible")&&(a.addClass("frm_blank_field"),
50
+ "function"==typeof frmThemeOverride_frmPlaceError?frmThemeOverride_frmPlaceError(b,c):a.append('<div class="frm_error">'+c[b]+"</div>"))}function Ca(a){var b=jQuery(a).find(".frm_blank_field:first");b.length&&frmFrontForm.scrollMsg(b,a,!0)}function Ua(){Da(jQuery(this),"clear")}function Va(){Da(jQuery(this),"replace")}function Da(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):
51
+ d==c&&a.removeClass("frm_default").val("")}function Wa(){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 Xa(a,b){google.load("visualization","1.0",{packages:[b],callback:function(){if("table"==b){var c=new google.visualization.DataTable,d=!1;-1!==jQuery.inArray("id",
52
+ a.options.fields)&&(d=!0,c.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=Ea(k);c.addColumn(f,k.name)}h=!1;a.options.edit_link&&(h=!0,c.addColumn("string",a.options.edit_link));g=!1;a.options.delete_link&&(g=!0,c.addColumn("string",a.options.delete_link));if(null!==a.entries){var m=a.entries.length;c.addRows(m);for(var l=0,n=0;n<m;n++){var k=0,p=a.entries[n];d&&(c.setCell(l,k,p.id),k++);for(var q=0,r=e;q<r;q++){var t=a.fields[q];f=Ea(t);t=p.metas[t.id];
53
+ "number"!=f||null!==t&&""!==t?"boolean"==f&&(t=null===t||"false"==t||!1===t?!1:!0):t=0;c.setCell(l,k,t);k++}h&&("undefined"!==typeof p.editLink?c.setCell(l,k,'<a href="'+p.editLink+'">'+a.options.edit_link+"</a>"):c.setCell(l,k,""),k++);g&&("undefined"!==typeof p.deleteLink?c.setCell(l,k,'<a href="'+p.deleteLink+'" class="frm_delete_link" data-frmconfirm="'+a.options.confirm+'">'+a.options.delete_link+"</a>"):c.setCell(l,k,""));l++}}else for(c.addRows(1),h=k=0,g=e;h<g;h++)0<k?c.setCell(0,k,""):c.setCell(0,
54
+ k,a.options.no_entries),k++;(new google.visualization.Table(document.getElementById("frm_google_table_"+a.options.form_id))).draw(c,a.graphOpts)}else Ya(a)}})}function Ea(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 Ya(a){var b=new google.visualization.DataTable,c=!1,d=!1,e=a.rows.length;if(0<e)if("table"==
55
+ a.type){c=!0;b.addRows(a.rows[e-1][0]+1);for(var f=0;f<e;f++)b.setCell(a.rows[f])}else if("undefined"!=typeof a.rows[0].tooltip)for(var d=c=!0,h=0;h<e;h++){f=a.rows[h].tooltip;delete a.rows[h].tooltip;var g=Object.keys(a.rows[h]).map(function(b){return a.rows[h][b]});a.rows[h]=g;a.rows[h].push(f)}e=a.cols.length;if(c){if(0<e)for(c=0;c<e;c++)f=a.cols[c],b.addColumn(f.type,f.name);d&&(b.addColumn({type:"string",role:"tooltip"}),b.addRows(a.rows))}else{b=[[]];for(d=0;d<e;d++)b[0].push(a.cols[d].name);
56
+ b=b.concat(a.rows);b=google.visualization.arrayToDataTable(b)}d=a.type.charAt(0).toUpperCase()+a.type.slice(1)+"Chart";(new google.visualization[d](document.getElementById("chart_"+a.graph_id))).draw(b,a.options)}function Za(){var a=jQuery(this),b=a.data("fid");a.wrap('<div class="frm_file_names frm_uploaded_files">');for(var c=a.get(0).files,d=0;d<c.length;d++)0===d?a.after(c[d].name+' <a href="#" class="frm_clear_file_link">'+frm_js.remove+"</a>"):a.after(c[d].name+"<br/>");a.hide();c=a.attr("name");
57
+ c!="item_meta["+b+"][]"&&c.replace("item_meta[","").replace("[]","").split("][");a.closest(".frm_form_field").find(".frm_uploaded_files:last").after('<input name="'+c+'" data-fid="'+b+'"class="frm_transparent frm_multiple_file" multiple="multiple" type="file" />')}function $a(){ab(jQuery(this).parent(".frm_uploaded_files"))}function bb(){jQuery(this).parent(".frm_file_names").replaceWith("");return!1}function cb(){var a="frm_section_"+jQuery(this).data("parent")+"-"+jQuery(this).data("key"),b=jQuery(document.getElementById(a)),
58
+ c=b.find("input, select, textarea");b.fadeOut("slow",function(){b.remove();c.each(function(){if("file"!=this.type){var a=p(this,!1);K(a,jQuery(this))}});"function"==typeof frmThemeOverride_frmRemoveRow&&frmThemeOverride_frmRemoveRow(a,b)});return!1}function db(){if(!0===J)return!1;J=!0;var a=jQuery(this).data("parent"),b=0;if(0<jQuery(".frm_repeat_"+a).length)var c=jQuery(".frm_repeat_"+a+":last").attr("id").replace("frm_section_"+a+"-",""),b=-1<c.indexOf("i")?1:1+parseInt(c);jQuery.ajax({type:"POST",
59
+ 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("[","");-1==jQuery.inArray(g,h)&&!1!==this.id&&
60
+ ""!==this.id&&(k=jQuery("#"+this.id),h.push(g),y(g,m),V(g,m,"value changed"),x(g,k),aa(g,k,"value changed"),K(g,k))}});Fa();W();"function"==typeof frmThemeOverride_frmAddRow&&frmThemeOverride_frmAddRow(a,c);J=!1},error:function(){J=!1}});return!1}function eb(){var a=jQuery(this),b=a.data("entryid"),c=a.data("prefix"),d=a.data("pageid"),e=a.data("formid"),f=a.data("cancel"),h=a.data("fields"),g=a.data("excludefields"),k=jQuery(document.getElementById(c+b)),m=k.html();k.html('<span class="frm-loading-img" id="'+
61
+ 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);Y("editInPlace");Z()}});return!1}function fb(){var a=jQuery(this),b=a.data("entryid"),c=a.data("prefix"),d=a.data("edit");
62
+ 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 gb(){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,
63
+ 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 Z(){"undefined"!==typeof __frmHideFields&&frmFrontForm.hidePreviouslyHiddenFields();jQuery(document).on("focusin",".frm_date",r);if("undefined"!==typeof __frmUniqueTimes)for(var a=
64
+ __frmUniqueTimes,b=0;b<a.length;b++)jQuery(document.getElementById(a[b].dateID)).change(q);if("undefined"!==typeof __frmMasks)for(a=__frmMasks,b=0;b<a.length;b++)jQuery(a[b].trigger).attr("data-frmmask",a[b].mask);Fa();W();"undefined"!==typeof __frmDepDynamicFields&&frmFrontForm.checkDependentDynamicFields(__frmDepDynamicFields);"undefined"!==typeof __frmDepLookupFields&&frmFrontForm.checkDependentLookupFields(__frmDepLookupFields);"undefined"!==typeof __FRMCALC&&(a=__FRMCALC.triggers)&&jQuery(a.join()).trigger({type:"change",
65
+ selfTriggered:!0})}function W(){if(jQuery().chosen){var a={allow_single_deselect:!0};"undefined"!==typeof __frmChosen&&(a="{"+__frmChosen+"}");jQuery(".frm_chzn").chosen(a)}}function Fa(){if(jQuery().rating){var a=jQuery(".star");a.length&&a.rating()}}function Y(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})}
66
+ function E(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 ab(a){a.fadeOut("slow",function(){a.remove()})}function hb(){var a=jQuery(this).data("frmconfirm");return confirm(a)}function ib(){var a=jQuery(this).data("frmtoggle");jQuery(a).is(":visible")?jQuery(a).slideUp("fast"):jQuery(a).slideDown("fast");return!1}function Pa(a,b){for(var c in a)if(a.hasOwnProperty(c)&&
67
+ a[c]===b)return c;return null}function za(a){return!jQuery.isArray(a)&&0<=a-parseFloat(a)+1}function jb(){Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c=this.length>>>0,d=Number(b)||0,d=0>d?Math.ceil(d):Math.floor(d);for(0>d&&(d+=c);d<c;d++)if(d in this&&this[d]===a)return d;return-1})}function kb(){"function"!==typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")})}function lb(){Array.prototype.filter||(Array.prototype.filter=
68
+ 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 mb(){Object.keys||(Object.keys=function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b})}var J=!1,F="",v=[];return{init:function(){jQuery(document).off("submit.formidable",".frm-show-form");jQuery(document).on("submit.formidable",".frm-show-form",
69
+ 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():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",Ua);jQuery(document).on("blur",
70
+ ".frm_toggle_default",Va);jQuery(".frm_toggle_default").blur();jQuery(document.getElementById("frm_resend_email")).click(Wa);jQuery(document).on("change",".frm_multiple_file",Za);jQuery(document).on("click",".frm_clear_file_link",bb);jQuery(document).on("click",".frm_remove_link",$a);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"]',
71
+ A);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',z);jQuery(document).on("change","input[type=file].frm_transparent",w);jQuery(document).on("click",".frm_remove_form_row",cb);jQuery(document).on("click",".frm_add_form_row",db);jQuery(document).on("click","a[data-frmconfirm]",
72
+ hb);jQuery("a[data-frmtoggle]").click(ib);jQuery(".frm_edit_link_container").on("click","a.frm_inplace_edit",eb);jQuery(".frm_edit_link_container").on("click","a.frm_cancel_edit",fb);jQuery(document).on("click",".frm_ajax_delete",gb);jQuery(".frm_month_heading, .frm_year_heading").click(function(){var a=jQuery(this).children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s");a.hasClass("ui-icon-triangle-1-e")?(a.addClass("ui-icon-triangle-1-s").removeClass("ui-icon-triangle-1-e"),jQuery(this).next(".frm_toggle_container").fadeIn("slow")):
73
+ (a.addClass("ui-icon-triangle-1-e").removeClass("ui-icon-triangle-1-s"),jQuery(this).next(".frm_toggle_container").hide())});Y("pageLoad");Z();jb();kb();lb();mb()},submitForm:function(a){var b=this.classList;b&&!b.contains("frm_pro_form")||jQuery("body").hasClass("wp-admin")||(a.preventDefault(),a=frmFrontForm.validateFormSubmit(this),0===Object.keys(a).length&&frmFrontForm.checkFormErrors(this,F))},validateFormSubmit:function(a){jQuery(this).find(".wp-editor-wrap").length&&"undefined"!=typeof tinyMCE&&
74
+ tinyMCE.triggerSave();F=jQuery(a).find('input[name="frm_action"]').val();v=[];var b=jQuery(a).hasClass("frm_js_validate");b&&(Aa(a)||Ba(a))&&(b=!1);b&&(frmFrontForm.getAjaxFormErrors(a),Object.keys(v).length&&frmFrontForm.addAjaxFormErrors(a));return v},getAjaxFormErrors:function(a){var b=[],c=jQuery(a).find(".frm_required_field:visible input, .frm_required_field:visible select, .frm_required_field:visible textarea").filter(":not(.frm_optional)");if(c.length)for(var d=0,e=c.length;d<e;d++)b=ba(c[d],
75
+ b);c=jQuery(a).find("input[type=email]").filter(":visible");d=jQuery(a).find("input,select,textarea");if(d.length)for(var e=0,f=d.length;e<f;e++){var h=d[e];""!==h.value&&"hidden"!=h.type&&("number"==h.type?b=da(h,b):"email"==h.type?b=ca(h,b,c):null!==h.pattern&&(b=ea(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]=""));v=b;if("function"==typeof frmThemeOverride_jsErrors&&
76
+ (a=frmThemeOverride_jsErrors(F,a),Object.keys(a).length))for(var g in a)v[g]=a[g];return v},addAjaxFormErrors:function(a){jQuery(".form-field").removeClass("frm_blank_field");jQuery(".form-field .frm_error").replaceWith("");for(var b in v){var c=jQuery(a).find("#frm_field_"+b+"_container");c.length?L(c,b,v):delete v[b]}Ca(a)},checkFormErrors:function(a,b){Ta(a,b)},scrollToID:function(a){a=jQuery(document.getElementById(a).offset());window.scrollTo(a.left,a.top)},scrollMsg:function(a,b,c){if(a=("undefined"==
77
+ 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");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}},
78
+ savingDraft:function(a){return Aa(a)},goingToPreviousPage:function(a){return Ba(a)},hideOrShowFields:function(a,b){if("pageLoad"===b){var c=document.querySelectorAll('[id^="frm_hide_fields_"]');U(c)}for(var c={repeatingSection:"",repeatRow:""},d=0,e=a.length;d<e;d++)y(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(C(d));b=0;for(c=a.length;b<c;b++)d=
79
+ 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++)y(a[c],b)},checkDependentLookupFields:function(a){for(var b,c={repeatingSection:"",repeatRow:""},d=0,e=a.length;d<e;d++)b=a[d],V(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++)for(var d=a[b[c]],e=b[c],f=0;f<d.length;f++)Xa(d[f],
80
+ 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",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",
81
+ "disabled")}})},escapeHtml:function(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},invisible:function(a){jQuery(a).css("visibility","hidden")},visible:function(a){jQuery(a).css("visibility","visible")}}}var frmFrontForm=frmFrontFormJS();jQuery(document).ready(function(l){frmFrontForm.init()});
82
  function frmRecaptcha(){for(var l=jQuery(".frm-g-recaptcha"),n=0,q=l.length;n<q;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)}}
83
  function frmUpdateField(l,n,q,r,w){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:q,nonce:frm_js.nonce},success:function(){""===r.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById("frm_update_field_"+l+"_"+n+"_"+w)).fadeOut("slow"):jQuery(document.getElementById("frm_update_field_"+l+"_"+n+"_"+w)).replaceWith(r)}})}
84
+ function frmEditEntry(l,n,q,r,w,z){console.warn("DEPRECATED: function frmEditEntry in v2.0.13 use frmFrontForm.editEntry");var A=jQuery(document.getElementById("frm_edit_"+l)),p=A.html(),x=jQuery(document.getElementById(n+l)),y=x.html();x.html('<span class="frm-loading-img" id="'+n+l+'"></span><div class="frm_orig_content" style="display:none">'+y+"</div>");jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"html",data:{action:"frm_entries_edit_entry_ajax",post_id:q,entry_id:l,id:r,nonce:frm_js.nonce},
85
+ success:function(y){x.children(".frm-loading-img").replaceWith(y);A.replaceWith('<span id="frm_edit_'+l+'"><a onclick="frmCancelEdit('+l+",'"+n+"','"+frmFrontForm.escapeHtml(p)+"',"+q+","+r+",'"+z+'\')" class="'+z+'">'+w+"</a></span>")}})}
86
+ function frmCancelEdit(l,n,q,r,w,z){console.warn("DEPRECATED: function frmCancelEdit in v2.0.13 use frmFrontForm.cancelEdit");var A=jQuery(document.getElementById("frm_edit_"+l)),p=A.find("a"),x=p.html();p.hasClass("frm_ajax_edited")||(p=jQuery(document.getElementById(n+l)),p.children(".frm_forms").replaceWith(""),p.children(".frm_orig_content").fadeIn("slow").removeClass("frm_orig_content"));A.replaceWith('<a id="frm_edit_'+l+'" class="frm_edit_link '+z+'" href="javascript:frmEditEntry('+l+",'"+
87
+ n+"',"+r+","+w+",'"+frmFrontForm.escapeHtml(x)+"','"+z+"')\">"+q+"</a>")}
88
  function frmDeleteEntry(l,n){console.warn("DEPRECATED: function frmDeleteEntry in v2.0.13 use frmFrontForm.deleteEntry");jQuery(document.getElementById("frm_delete_"+l)).replaceWith('<span class="frm-loading-img" id="frm_delete_'+l+'"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_destroy",entry:l,nonce:frm_js.nonce},success:function(q){"success"==q.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById(n+l)).fadeOut("slow"):jQuery(document.getElementById("frm_delete_"+
89
+ l)).replaceWith(q)}})}function frmOnSubmit(l){console.warn("DEPRECATED: function frmOnSubmit in v2.0 use frmFrontForm.submitForm");frmFrontForm.submitForm(l,this)}
90
  function frm_resend_email(l,n){console.warn("DEPRECATED: function frm_resend_email in v2.0");$link=jQuery(document.getElementById("frm_resend_email"));$link.append('<span class="spinner" style="display:inline"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_send_email",entry_id:l,form_id:n,nonce:frm_js.nonce},success:function(l){$link.replaceWith(l)}})};
js/formidable_admin.js CHANGED
@@ -568,30 +568,7 @@ function frmAdminBuildJS(){
568
  valMsg.val(frm_admin_js.default_conf);
569
  }
570
 
571
- //Add default descriptions if empty
572
- var field_type = jQuery("select[name='field_options[type_"+field_id+"]']").val();
573
- var $fieldDesc = jQuery(document.getElementById('field_description_'+field_id));
574
- if($fieldDesc.text() == frm_admin_js.desc){
575
- var newDesc = '';
576
- if ( field_type == 'email' ) {
577
- newDesc = frm_admin_js.enter_email;
578
- } else {
579
- newDesc = frm_admin_js.enter_password;
580
- }
581
- $fieldDesc.text(newDesc);
582
- jQuery('input[name="field_options[description_'+ field_id +']"]').val(newDesc);
583
- }
584
-
585
- var $confDesc = jQuery('.frm_ipe_field_conf_desc');
586
- if($confDesc.text() == frm_admin_js.desc){
587
- if ( field_type == 'email' ) {
588
- $confDesc.text(frm_admin_js.confirm_email);
589
- jQuery('#frm_conf_field_'+field_id+'_inner_container input[type=hidden]').val(frm_admin_js.confirm_email);
590
- } else {
591
- $confDesc.text(frm_admin_js.confirm_password);
592
- jQuery('#frm_conf_field_'+field_id+'_inner_container input[type=hidden]').val(frm_admin_js.confirm_password);
593
- }
594
- }
595
 
596
  //Add or remove class for confirmation field styling
597
  if(val == 'inline'){
@@ -611,6 +588,29 @@ function frmAdminBuildJS(){
611
  }
612
  }
613
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
614
  //Add new option or "Other" option to radio/checkbox/dropdown
615
  function addFieldOption(){
616
  var field_id = jQuery(this).closest('li').data('fid');
@@ -2559,6 +2559,8 @@ function frmAdminBuildJS(){
2559
  css = frm_admin_js.jquery_ui_url +'/themes/'+themeVal+'/jquery-ui.css';
2560
  themeName = jQuery("select[name$='[theme_selector]'] option[value='"+themeVal+"']").text();
2561
  }
 
 
2562
  updateUICSS(css);
2563
  document.getElementById('frm_theme_css').value = themeVal;
2564
  document.getElementById('frm_theme_name').value = themeName;
568
  valMsg.val(frm_admin_js.default_conf);
569
  }
570
 
571
+ setConfirmationFieldDescriptions( field_id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
572
 
573
  //Add or remove cla