Formidable Forms – Form Builder for WordPress - Version 2.0.25

Version Description

  • Add an option to allow multiple recaptchas. This is off by default to avoid new conflicts.
  • Use the recaptcha size setting when displaying multiple recaptchas per page.
  • Add frm_after_field_is_imported and frm_prepare_single_field_for_duplication hooks
  • Add property="stylesheet" to the stylehsheets when HTML5 is enabled
  • Pro Features: *
  • Redirect to post when View detail page is linked to post
  • Make sure entry ID is unique filter does not get used
  • Make sure limit applies to a View's pagination
  • Add dynamic field to frm_data_sort hook
  • Add a message when the file upload field is included before a page break
  • Fix the issue with the frm_first class applying to the confirmation field
  • Remove the invalid email message used when the email confirmation doesn't match
Download this release

Release Info

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

Code changes from version 2.0.24 to 2.0.25

classes/controllers/FrmFieldsController.php CHANGED
@@ -163,13 +163,15 @@ class FrmFieldsController {
163
  do_action( 'frm_duplicate_field', $copy_field, $form_id );
164
  do_action( 'frm_duplicate_field_' . $copy_field->type, $copy_field, $form_id );
165
 
166
- $values = array( 'id' => $form_id );
167
  FrmFieldsHelper::fill_field( $values, $copy_field, $form_id );
168
 
169
  $field_count = FrmDb::get_count( $wpdb->prefix . 'frm_fields fi LEFT JOIN ' . $wpdb->prefix . 'frm_forms fr ON (fi.form_id = fr.id)', array( 'or' => 1, 'fr.id' => $form_id, 'fr.parent_form_id' => $form_id ) );
170
 
171
  $values['field_order'] = $field_count + 1;
172
 
 
 
173
  if ( ! $field_id = FrmField::create($values) ) {
174
  wp_die();
175
  }
163
  do_action( 'frm_duplicate_field', $copy_field, $form_id );
164
  do_action( 'frm_duplicate_field_' . $copy_field->type, $copy_field, $form_id );
165
 
166
+ $values = array();
167
  FrmFieldsHelper::fill_field( $values, $copy_field, $form_id );
168
 
169
  $field_count = FrmDb::get_count( $wpdb->prefix . 'frm_fields fi LEFT JOIN ' . $wpdb->prefix . 'frm_forms fr ON (fi.form_id = fr.id)', array( 'or' => 1, 'fr.id' => $form_id, 'fr.parent_form_id' => $form_id ) );
170
 
171
  $values['field_order'] = $field_count + 1;
172
 
173
+ $values = apply_filters( 'frm_prepare_single_field_for_duplication', $values );
174
+
175
  if ( ! $field_id = FrmField::create($values) ) {
176
  wp_die();
177
  }
classes/controllers/FrmStylesController.php CHANGED
@@ -96,6 +96,8 @@ class FrmStylesController {
96
  }
97
  }
98
  unset( $css );
 
 
99
  }
100
  }
101
 
@@ -142,6 +144,16 @@ class FrmStylesController {
142
  }
143
  }
144
 
 
 
 
 
 
 
 
 
 
 
145
  public static function new_style( $return = '' ) {
146
  self::load_styler('default');
147
  }
96
  }
97
  }
98
  unset( $css );
99
+
100
+ add_filter( 'style_loader_tag', 'FrmStylesController::add_tags_to_css', 10, 2 );
101
  }
102
  }
103
 
144
  }
145
  }
146
 
147
+ public static function add_tags_to_css( $tag, $handle ) {
148
+ if ( ( 'formidable' == $handle || 'jquery-theme' == $handle ) && strpos( $tag, ' property=' ) === false ) {
149
+ $frm_settings = FrmAppHelper::get_settings();
150
+ if ( $frm_settings->use_html ) {
151
+ $tag = str_replace( ' type=', ' property="stylesheet" type=', $tag );
152
+ }
153
+ }
154
+ return $tag;
155
+ }
156
+
157
  public static function new_style( $return = '' ) {
158
  self::load_styler('default');
159
  }
classes/helpers/FrmAppHelper.php CHANGED
@@ -5,12 +5,12 @@ if ( ! defined('ABSPATH') ) {
5
 
6
  class FrmAppHelper {
7
  public static $db_version = 29; //version of the database we are moving to
8
- public static $pro_db_version = 32;
9
 
10
  /**
11
  * @since 2.0
12
  */
13
- public static $plug_version = '2.0.24';
14
 
15
  /**
16
  * @since 1.07.02
@@ -1153,7 +1153,7 @@ class FrmAppHelper {
1153
 
1154
  public static function truncate( $str, $length, $minword = 3, $continue = '...' ) {
1155
  if ( is_array( $str ) ) {
1156
- return;
1157
  }
1158
 
1159
  $length = (int) $length;
@@ -1679,7 +1679,7 @@ class FrmAppHelper {
1679
  * @since 1.07.10
1680
  *
1681
  * @param string $post_type The name of the post type that may need to be highlighted
1682
- * @return echo The javascript to open and highlight the Formidable menu
1683
  */
1684
  public static function maybe_highlight_menu( $post_type ) {
1685
  global $post, $pagenow;
5
 
6
  class FrmAppHelper {
7
  public static $db_version = 29; //version of the database we are moving to
8
+ public static $pro_db_version = 33;
9
 
10
  /**
11
  * @since 2.0
12
  */
13
+ public static $plug_version = '2.0.25';
14
 
15
  /**
16
  * @since 1.07.02
1153
 
1154
  public static function truncate( $str, $length, $minword = 3, $continue = '...' ) {
1155
  if ( is_array( $str ) ) {
1156
+ return '';
1157
  }
1158
 
1159
  $length = (int) $length;
1679
  * @since 1.07.10
1680
  *
1681
  * @param string $post_type The name of the post type that may need to be highlighted
1682
+ * echo The javascript to open and highlight the Formidable menu
1683
  */
1684
  public static function maybe_highlight_menu( $post_type ) {
1685
  global $post, $pagenow;
classes/helpers/FrmEntriesHelper.php CHANGED
@@ -6,7 +6,6 @@ if ( ! defined('ABSPATH') ) {
6
  class FrmEntriesHelper {
7
 
8
  public static function setup_new_vars( $fields, $form = '', $reset = false, $args = array() ) {
9
- global $frm_vars;
10
  $values = array();
11
  foreach ( array( 'name' => '', 'description' => '', 'item_key' => '' ) as $var => $default ) {
12
  $values[ $var ] = FrmAppHelper::get_post_param( $var, $default );
@@ -33,6 +32,7 @@ class FrmEntriesHelper {
33
  'field_order' => $field->field_order,
34
  'form_id' => $field->form_id,
35
  'parent_form_id' => isset( $args['parent_form_id'] ) ? $args['parent_form_id'] : $field->form_id,
 
36
  );
37
 
38
  $opt_defaults = FrmFieldsHelper::get_default_field_opts($field_array['type'], $field, true);
@@ -436,7 +436,7 @@ class FrmEntriesHelper {
436
 
437
  public static function enqueue_scripts( $params ) {
438
  _deprecated_function( __FUNCTION__, '2.0.9', 'FrmFormsController::enqueue_scripts' );
439
- return FrmFormsController::enqueue_scripts( $params );
440
  }
441
 
442
  // Add submitted values to a string for spam checking
@@ -485,7 +485,7 @@ class FrmEntriesHelper {
485
 
486
  public static function convert_entry_to_content( $values, $atts, array &$content ) {
487
  _deprecated_function( __FUNCTION__, '2.0.9', 'FrmEntryFormat::convert_entry_to_content' );
488
- return FrmEntryFormat::convert_entry_to_content( $values, $atts, $content );
489
  }
490
 
491
  public static function get_browser( $u_agent ) {
6
  class FrmEntriesHelper {
7
 
8
  public static function setup_new_vars( $fields, $form = '', $reset = false, $args = array() ) {
 
9
  $values = array();
10
  foreach ( array( 'name' => '', 'description' => '', 'item_key' => '' ) as $var => $default ) {
11
  $values[ $var ] = FrmAppHelper::get_post_param( $var, $default );
32
  'field_order' => $field->field_order,
33
  'form_id' => $field->form_id,
34
  'parent_form_id' => isset( $args['parent_form_id'] ) ? $args['parent_form_id'] : $field->form_id,
35
+ 'reset_value' => $reset,
36
  );
37
 
38
  $opt_defaults = FrmFieldsHelper::get_default_field_opts($field_array['type'], $field, true);
436
 
437
  public static function enqueue_scripts( $params ) {
438
  _deprecated_function( __FUNCTION__, '2.0.9', 'FrmFormsController::enqueue_scripts' );
439
+ FrmFormsController::enqueue_scripts( $params );
440
  }
441
 
442
  // Add submitted values to a string for spam checking
485
 
486
  public static function convert_entry_to_content( $values, $atts, array &$content ) {
487
  _deprecated_function( __FUNCTION__, '2.0.9', 'FrmEntryFormat::convert_entry_to_content' );
488
+ FrmEntryFormat::convert_entry_to_content( $values, $atts, $content );
489
  }
490
 
491
  public static function get_browser( $u_agent ) {
classes/helpers/FrmFieldsHelper.php CHANGED
@@ -478,20 +478,28 @@ DEFAULT_HTML;
478
  }
479
 
480
  public static function display_recaptcha( $field ) {
481
- $frm_settings = FrmAppHelper::get_settings();
482
- $lang = apply_filters('frm_recaptcha_lang', $frm_settings->re_lang, $field);
 
 
 
 
 
 
 
 
 
483
 
484
- $api_js_url = 'https://www.google.com/recaptcha/api.js?onload=frmRecaptcha&render=explicit';
485
  if ( $lang != 'en' ) {
486
  $api_js_url .= '&hl=' . $lang;
487
  }
488
- $api_js_url = apply_filters('frm_recpatcha_js_url', $api_js_url);
489
 
490
- wp_register_script('recaptcha-api', $api_js_url, '', true);
491
- wp_enqueue_script('recaptcha-api');
492
 
493
  ?>
494
- <div id="field_<?php echo esc_attr( $field['field_key'] ) ?>" class="frm-g-recaptcha" data-sitekey="<?php echo esc_attr( $frm_settings->pubkey ) ?>" data-size="<?php echo esc_attr( $field['captcha_size'] ) ?>" data-theme="<?php echo esc_attr( $field['captcha_theme'] ) ?>"></div>
495
  <?php
496
  }
497
 
478
  }
479
 
480
  public static function display_recaptcha( $field ) {
481
+ $frm_settings = FrmAppHelper::get_settings();
482
+ $lang = apply_filters( 'frm_recaptcha_lang', $frm_settings->re_lang, $field );
483
+
484
+ $class_prefix = '';
485
+ $api_js_url = 'https://www.google.com/recaptcha/api.js?';
486
+
487
+ $allow_mutiple = $frm_settings->re_multi;
488
+ if ( $allow_mutiple ) {
489
+ $api_js_url .= '&onload=frmRecaptcha&render=explicit';
490
+ $class_prefix = 'frm-';
491
+ }
492
 
 
493
  if ( $lang != 'en' ) {
494
  $api_js_url .= '&hl=' . $lang;
495
  }
496
+ $api_js_url = apply_filters( 'frm_recaptcha_js_url', $api_js_url );
497
 
498
+ wp_register_script( 'recaptcha-api', $api_js_url, '', true );
499
+ wp_enqueue_script( 'recaptcha-api' );
500
 
501
  ?>
502
+ <div id="field_<?php echo esc_attr( $field['field_key'] ) ?>" class="<?php echo esc_attr( $class_prefix ) ?>g-recaptcha" data-sitekey="<?php echo esc_attr( $frm_settings->pubkey ) ?>" data-size="<?php echo esc_attr( $field['captcha_size'] ) ?>" data-theme="<?php echo esc_attr( $field['captcha_theme'] ) ?>"></div>
503
  <?php
504
  }
505
 
classes/helpers/FrmXMLHelper.php CHANGED
@@ -278,6 +278,8 @@ class FrmXMLHelper {
278
  * TODO: Cut down on params
279
  */
280
  private static function import_xml_fields( $xml_fields, $form_id, $this_form, &$form_fields, &$imported ) {
 
 
281
  foreach ( $xml_fields as $field ) {
282
  $f = array(
283
  'id' => (int) $field->id,
@@ -305,50 +307,62 @@ class FrmXMLHelper {
305
  }
306
  }
307
 
308
- $f = apply_filters('frm_duplicated_field', $f);
309
-
310
  self::maybe_update_form_select( $f, $imported );
311
 
312
- if ( ! empty($this_form) ) {
313
- // check for field to edit by field id
314
  if ( isset( $form_fields[ $f['id'] ] ) ) {
315
- FrmField::update( $f['id'], $f );
316
- $imported['updated']['fields']++;
317
 
318
  unset( $form_fields[ $f['id'] ] );
319
 
320
- //unset old field key
321
  if ( isset( $form_fields[ $f['field_key'] ] ) ) {
322
  unset( $form_fields[ $f['field_key'] ] );
323
  }
324
  } else if ( isset( $form_fields[ $f['field_key'] ] ) ) {
325
- // check for field to edit by field key
326
- unset($f['id']);
327
 
328
  FrmField::update( $form_fields[ $f['field_key'] ], $f );
329
- $imported['updated']['fields']++;
330
 
331
  unset( $form_fields[ $form_fields[ $f['field_key'] ] ] ); //unset old field id
332
  unset( $form_fields[ $f['field_key'] ] ); //unset old field key
333
  } else {
334
- $new_id = FrmField::create( $f );
335
- if ( $new_id == false ) {
336
- continue;
337
- }
338
-
339
- // if no matching field id or key in this form, create the field
340
- $imported['imported']['fields']++;
341
- }
342
- } else {
343
- $new_id = FrmField::create( $f );
344
- if ( $new_id == false ) {
345
- continue;
346
  }
 
347
 
348
- $imported['imported']['fields']++;
349
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
350
 
351
- unset($field, $new_id);
 
 
352
  }
353
  }
354
 
@@ -374,6 +388,21 @@ class FrmXMLHelper {
374
  }
375
  }
376
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
377
  /**
378
  * Updates the custom style setting on import
379
  *
278
  * TODO: Cut down on params
279
  */
280
  private static function import_xml_fields( $xml_fields, $form_id, $this_form, &$form_fields, &$imported ) {
281
+ $in_section = 0;
282
+
283
  foreach ( $xml_fields as $field ) {
284
  $f = array(
285
  'id' => (int) $field->id,
307
  }
308
  }
309
 
310
+ self::maybe_update_in_section_variable( $in_section, $f );
 
311
  self::maybe_update_form_select( $f, $imported );
312
 
313
+ if ( ! empty($this_form) ) {
314
+ // check for field to edit by field id
315
  if ( isset( $form_fields[ $f['id'] ] ) ) {
316
+ FrmField::update( $f['id'], $f );
317
+ $imported['updated']['fields']++;
318
 
319
  unset( $form_fields[ $f['id'] ] );
320
 
321
+ //unset old field key
322
  if ( isset( $form_fields[ $f['field_key'] ] ) ) {
323
  unset( $form_fields[ $f['field_key'] ] );
324
  }
325
  } else if ( isset( $form_fields[ $f['field_key'] ] ) ) {
326
+ // check for field to edit by field key
327
+ unset($f['id']);
328
 
329
  FrmField::update( $form_fields[ $f['field_key'] ], $f );
330
+ $imported['updated']['fields']++;
331
 
332
  unset( $form_fields[ $form_fields[ $f['field_key'] ] ] ); //unset old field id
333
  unset( $form_fields[ $f['field_key'] ] ); //unset old field key
334
  } else {
335
+ // if no matching field id or key in this form, create the field
336
+ self::create_imported_field( $f, $imported );
 
 
 
 
 
 
 
 
 
 
337
  }
338
+ } else {
339
 
340
+ self::create_imported_field( $f, $imported );
341
+ }
342
+ }
343
+ }
344
+
345
+ /**
346
+ * Update the current in_section value
347
+ *
348
+ * @since 2.0.25
349
+ * @param int $in_section
350
+ * @param array $f
351
+ */
352
+ private static function maybe_update_in_section_variable( &$in_section, &$f ) {
353
+ // If we're at the end of a section, switch $in_section is 0
354
+ if ( in_array( $f['type'], array( 'end_divider', 'break', 'form' ) ) ) {
355
+ $in_section = 0;
356
+ }
357
+
358
+ // Update the current field's in_section value
359
+ if ( ! isset( $f['field_options']['in_section'] ) ) {
360
+ $f['field_options']['in_section'] = $in_section;
361
+ }
362
 
363
+ // If we're starting a new section, switch $in_section to ID of divider
364
+ if ( $f['type'] == 'divider' ) {
365
+ $in_section = $f['id'];
366
  }
367
  }
368
 
388
  }
389
  }
390
 
391
+ /**
392
+ * Create an imported field
393
+ *
394
+ * @since 2.0.25
395
+ * @param array $f
396
+ * @param array $imported
397
+ */
398
+ private static function create_imported_field( $f, &$imported ) {
399
+ $new_id = FrmField::create( $f );
400
+ if ( $new_id != false ) {
401
+ $imported['imported']['fields']++;
402
+ do_action( 'frm_after_field_is_imported', $f, $new_id );
403
+ }
404
+ }
405
+
406
  /**
407
  * Updates the custom style setting on import
408
  *
classes/models/FrmSettings.php CHANGED
@@ -26,6 +26,7 @@ class FrmSettings{
26
  public $privkey;
27
  public $re_lang;
28
  public $re_msg;
 
29
 
30
  public function __construct() {
31
  if ( ! defined('ABSPATH') ) {
@@ -82,6 +83,8 @@ class FrmSettings{
82
  'jquery_css' => false,
83
  'accordion_js' => false,
84
 
 
 
85
  'success_msg' => __( 'Your responses were successfully submitted. Thank you!', 'formidable' ),
86
  'blank_msg' => __( 'This field cannot be blank.', 'formidable' ),
87
  'unique_msg' => __( 'This value must be unique.', 'formidable' ),
26
  public $privkey;
27
  public $re_lang;
28
  public $re_msg;
29
+ public $re_multi;
30
 
31
  public function __construct() {
32
  if ( ! defined('ABSPATH') ) {
83
  'jquery_css' => false,
84
  'accordion_js' => false,
85
 
86
+ 're_multi' => 0,
87
+
88
  'success_msg' => __( 'Your responses were successfully submitted. Thank you!', 'formidable' ),
89
  'blank_msg' => __( 'This field cannot be blank.', 'formidable' ),
90
  'unique_msg' => __( 'This value must be unique.', 'formidable' ),
classes/views/frm-settings/form.php CHANGED
@@ -90,6 +90,14 @@
90
  <?php } ?>
91
  </select></p>
92
 
 
 
 
 
 
 
 
 
93
  <h3><?php _e( 'Default Messages', 'formidable' ); ?>
94
  <span class="frm_help frm_icon_font frm_tooltip_icon" title="<?php esc_attr_e( 'You can override the success message and submit button settings on individual forms.', 'formidable' ) ?>"></span>
95
  </h3>
90
  <?php } ?>
91
  </select></p>
92
 
93
+ <p>
94
+ <label class="frm_left_label"><?php _e( 'Multiple reCaptchas', 'formidable' ) ?></label>
95
+ <label for="frm_re_multi">
96
+ <input type="checkbox" name="frm_re_multi" id="frm_re_multi" value="1" <?php checked( $frm_settings->re_multi, 1 ) ?> />
97
+ <?php _e( 'Allow multiple reCaptchas to be used on a single page', 'formidable' ) ?>
98
+ </label>
99
+ </p>
100
+
101
  <h3><?php _e( 'Default Messages', 'formidable' ); ?>
102
  <span class="frm_help frm_icon_font frm_tooltip_icon" title="<?php esc_attr_e( 'You can override the success message and submit button settings on individual forms.', 'formidable' ) ?>"></span>
103
  </h3>
css/_single_theme.css.php CHANGED
@@ -227,16 +227,20 @@ if ( ! isset( $center_form ) ) {
227
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container textarea,
228
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .frm_opt_container,
229
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .frm-g-recaptcha,
 
230
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container input:not([type=radio]):not([type=checkbox]),
231
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container:not(.frm_dynamic_select_container) select,
232
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container textarea,
233
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm_opt_container,
 
234
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm-g-recaptcha{
235
  max-width:62%<?php echo esc_html( $important ) ?>;
236
  }
237
 
238
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .frm_opt_container,
239
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm_opt_container,
 
 
240
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .frm-g-recaptcha,
241
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm-g-recaptcha{
242
  display:inline-block<?php echo esc_html( $important ) ?>;
@@ -611,6 +615,7 @@ if ( ! $submit_style ) { ?>
611
  .<?php echo esc_html( $style_class ) ?> .frm_blank_field select,
612
  .frm_form_fields_error_style,
613
  .<?php echo esc_html( $style_class ) ?> .frm_blank_field .frm-g-recaptcha iframe,
 
614
  .<?php echo esc_html( $style_class ) ?> .frm_blank_field .chosen-container-multi .chosen-choices{
615
  color:#<?php echo esc_html( $text_color_error . $important ) ?>;
616
  background-color:<?php echo esc_html( ( empty( $bg_color_error ) ? 'transparent' : '#' . $bg_color_error ) . $important ); ?>;
@@ -896,11 +901,13 @@ if ( ! $submit_style ) { ?>
896
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_left_container textarea,
897
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_left_container .frm_opt_container,
898
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_left_container.frm-g-recaptcha,
 
899
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_right_container input:not([type=radio]):not([type=checkbox]),
900
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_right_container select,
901
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_right_container textarea,
902
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_right_container .frm_opt_container,
903
- .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_right_container.frm-g-recaptcha{
 
904
  max-width:100%<?php echo esc_html( $important ) ?>;
905
  }
906
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_half.frm_left_container .frm_primary_label,
@@ -956,11 +963,13 @@ if ( ! $submit_style ) { ?>
956
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container textarea,
957
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .frm_opt_container,
958
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .frm-g-recaptcha,
 
959
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container input:not([type=radio]):not([type=checkbox]),
960
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container:not(.frm_dynamic_select_container) select,
961
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container textarea,
962
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm_opt_container,
963
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm-g-recaptcha,
 
964
  .<?php echo esc_html( $style_class ) ?> .frm_left_container p.description,
965
  .<?php echo esc_html( $style_class ) ?> .frm_left_container div.description,
966
  .<?php echo esc_html( $style_class ) ?> .frm_left_container div.frm_description,
227
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container textarea,
228
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .frm_opt_container,
229
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .frm-g-recaptcha,
230
+ .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .g-recaptcha,
231
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container input:not([type=radio]):not([type=checkbox]),
232
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container:not(.frm_dynamic_select_container) select,
233
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container textarea,
234
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm_opt_container,
235
+ .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .g-recaptcha,
236
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm-g-recaptcha{
237
  max-width:62%<?php echo esc_html( $important ) ?>;
238
  }
239
 
240
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .frm_opt_container,
241
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm_opt_container,
242
+ .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .g-recaptcha,
243
+ .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .g-recaptcha,
244
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .frm-g-recaptcha,
245
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm-g-recaptcha{
246
  display:inline-block<?php echo esc_html( $important ) ?>;
615
  .<?php echo esc_html( $style_class ) ?> .frm_blank_field select,
616
  .frm_form_fields_error_style,
617
  .<?php echo esc_html( $style_class ) ?> .frm_blank_field .frm-g-recaptcha iframe,
618
+ .<?php echo esc_html( $style_class ) ?> .frm_blank_field .g-recaptcha iframe,
619
  .<?php echo esc_html( $style_class ) ?> .frm_blank_field .chosen-container-multi .chosen-choices{
620
  color:#<?php echo esc_html( $text_color_error . $important ) ?>;
621
  background-color:<?php echo esc_html( ( empty( $bg_color_error ) ? 'transparent' : '#' . $bg_color_error ) . $important ); ?>;
901
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_left_container textarea,
902
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_left_container .frm_opt_container,
903
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_left_container.frm-g-recaptcha,
904
+ .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_left_container.g-recaptcha,
905
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_right_container input:not([type=radio]):not([type=checkbox]),
906
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_right_container select,
907
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_right_container textarea,
908
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_right_container .frm_opt_container,
909
+ .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_right_container.frm-g-recaptcha,
910
+ .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_half.frm_right_container.g-recaptcha{
911
  max-width:100%<?php echo esc_html( $important ) ?>;
912
  }
913
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_half.frm_left_container .frm_primary_label,
963
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container textarea,
964
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .frm_opt_container,
965
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .frm-g-recaptcha,
966
+ .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_left_container .g-recaptcha,
967
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container input:not([type=radio]):not([type=checkbox]),
968
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container:not(.frm_dynamic_select_container) select,
969
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container textarea,
970
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm_opt_container,
971
  .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .frm-g-recaptcha,
972
+ .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_right_container .g-recaptcha,
973
  .<?php echo esc_html( $style_class ) ?> .frm_left_container p.description,
974
  .<?php echo esc_html( $style_class ) ?> .frm_left_container div.description,
975
  .<?php echo esc_html( $style_class ) ?> .frm_left_container div.frm_description,
css/custom_theme.css.php CHANGED
@@ -634,18 +634,22 @@ table.frmcal-calendar .frmcal-today .frmcal_date{
634
  .frm_form_field.frm_left_container textarea,
635
  .frm_form_field.frm_left_container .frm_opt_container,
636
  .frm_form_field.frm_left_container .frm-g-recaptcha,
 
637
  .frm_form_field.frm_right_container input:not([type=radio]):not([type=checkbox]),
638
  .frm_form_field.frm_right_container:not(.frm_dynamic_select_container) select,
639
  .frm_form_field.frm_right_container textarea,
640
  .frm_form_field.frm_right_container .frm_opt_container,
641
- .frm_form_field.frm_right_container .frm-g-recaptcha{
 
642
  max-width:62%;
643
  }
644
 
645
  .frm_form_field.frm_left_container .frm_opt_container,
646
  .frm_form_field.frm_right_container .frm_opt_container,
647
  .frm_form_field.frm_left_container .frm-g-recaptcha,
648
- .frm_form_field.frm_right_container .frm-g-recaptcha{
 
 
649
  display:inline-block;
650
  }
651
 
@@ -1632,7 +1636,8 @@ html[xmlns] .frm_clearfix{
1632
  position:static;
1633
  }
1634
 
1635
- .with_frm_style .frm-g-recaptcha > div > div{
 
1636
  width:inherit !important;
1637
  display:block;
1638
  overflow:hidden;
@@ -1643,6 +1648,7 @@ html[xmlns] .frm_clearfix{
1643
  -moz-box-shadow:2px 0px 4px -1px rgba(0,0,0,.08);
1644
  }
1645
 
 
1646
  .with_frm_style .frm-g-recaptcha iframe{
1647
  width:100%;
1648
  }
634
  .frm_form_field.frm_left_container textarea,
635
  .frm_form_field.frm_left_container .frm_opt_container,
636
  .frm_form_field.frm_left_container .frm-g-recaptcha,
637
+ .frm_form_field.frm_left_container .g-recaptcha,
638
  .frm_form_field.frm_right_container input:not([type=radio]):not([type=checkbox]),
639
  .frm_form_field.frm_right_container:not(.frm_dynamic_select_container) select,
640
  .frm_form_field.frm_right_container textarea,
641
  .frm_form_field.frm_right_container .frm_opt_container,
642
+ .frm_form_field.frm_right_container .frm-g-recaptcha,
643
+ .frm_form_field.frm_right_container .g-recaptcha{
644
  max-width:62%;
645
  }
646
 
647
  .frm_form_field.frm_left_container .frm_opt_container,
648
  .frm_form_field.frm_right_container .frm_opt_container,
649
  .frm_form_field.frm_left_container .frm-g-recaptcha,
650
+ .frm_form_field.frm_right_container .frm-g-recaptcha,
651
+ .frm_form_field.frm_left_container .g-recaptcha,
652
+ .frm_form_field.frm_right_container .g-recaptcha{
653
  display:inline-block;
654
  }
655
 
1636
  position:static;
1637
  }
1638
 
1639
+ .with_frm_style .frm-g-recaptcha > div > div,
1640
+ .with_frm_style .g-recaptcha > div > div{
1641
  width:inherit !important;
1642
  display:block;
1643
  overflow:hidden;
1648
  -moz-box-shadow:2px 0px 4px -1px rgba(0,0,0,.08);
1649
  }
1650
 
1651
+ .with_frm_style .g-recaptcha iframe,
1652
  .with_frm_style .frm-g-recaptcha iframe{
1653
  width:100%;
1654
  }
css/frm_admin.css CHANGED
@@ -250,7 +250,8 @@ form label.frm_primary_label input{font-size:12px;}
250
  .with_frm_style form .frm_blank_field input,
251
  .with_frm_style form .frm_blank_field textarea,
252
  .with_frm_style form .frm_blank_field select,
253
- .with_frm_style form .frm_blank_field .frm-g-recaptcha iframe{
 
254
  border-color:#B94A48;
255
  }
256
  .with_frm_style form .frm_blank_field label{color:#B94A48;}
@@ -605,6 +606,14 @@ form label.frm_primary_label input{font-size:12px;}
605
  }
606
  .frm_form_fields div.star a, .frm_form_fields div.star a:hover, .frm_form_fields div.star a:visited{position:static;right:auto;}
607
 
 
 
 
 
 
 
 
 
608
  .frm_ext_sc{display:none;}
609
  .frm_long_input{width:95% !important;}
610
 
250
  .with_frm_style form .frm_blank_field input,
251
  .with_frm_style form .frm_blank_field textarea,
252
  .with_frm_style form .frm_blank_field select,
253
+ .with_frm_style form .frm_blank_field .frm-g-recaptcha iframe,
254
+ .with_frm_style form .frm_blank_field .g-recaptcha iframe{
255
  border-color:#B94A48;
256
  }
257
  .with_frm_style form .frm_blank_field label{color:#B94A48;}
606
  }
607
  .frm_form_fields div.star a, .frm_form_fields div.star a:hover, .frm_form_fields div.star a:visited{position:static;right:auto;}
608
 
609
+ .edit_field_type_file ~ .edit_field_type_break .frm_hidden.frm_pro_tip{
610
+ display:block;
611
+ color:red;
612
+ border-color:red;
613
+ background-color: transparent;
614
+ margin-top:10px;
615
+ }
616
+
617
  .frm_ext_sc{display:none;}
618
  .frm_long_input{width:95% !important;}
619
 
css/frm_fonts.css CHANGED
@@ -66,6 +66,7 @@
66
  }
67
  #frm_shortcode_options.media-embed .setting span{float:left;}
68
  #frm_shortcode_options h4{margin:3px 0 0;}
 
69
  #frm_popup_content .media-toolbar-secondary{width:60%;}
70
  #frm_complete_shortcode{margin-top:15px;width:100%;}
71
  .frm_box_line{border-bottom:1px solid #ddd;display:block;margin:15px 0 0;}
66
  }
67
  #frm_shortcode_options.media-embed .setting span{float:left;}
68
  #frm_shortcode_options h4{margin:3px 0 0;}
69
+ #frm_popup_content .media-toolbar-primary{width:33% !important;}
70
  #frm_popup_content .media-toolbar-secondary{width:60%;}
71
  #frm_complete_shortcode{margin-top:15px;width:100%;}
72
  .frm_box_line{border-bottom:1px solid #ddd;display:block;margin:15px 0 0;}
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.0.24
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.0.25
6
  Plugin URI: http://formidablepro.com/
7
  Author URI: http://strategy11.com
8
  Author: Strategy11
js/formidable.js CHANGED
@@ -1694,7 +1694,7 @@ function frmFrontFormJS(){
1694
  var confName = field.name.replace('conf_', '');
1695
  var match = emailFields.filter('[name="'+ confName +'"]').val();
1696
  if ( match !== emailAddress ) {
1697
- errors[ fieldID ] = invalidMsg;
1698
  errors[ fieldID.replace('conf_', '') ] = '';
1699
  }
1700
  }
@@ -1779,7 +1779,7 @@ function frmFrontFormJS(){
1779
  },2000);
1780
  }
1781
  }
1782
- var $recapField = jQuery(object).find('.frm-g-recaptcha');
1783
  if($recapField.length && (jQuery(object).find('.frm_next_page').length < 1 || jQuery(object).find('.frm_next_page').val() < 1)){
1784
  $recapField.closest('.frm_form_field').replaceWith('<input type="hidden" name="recaptcha_checked" value="'+ frm_js.nonce +'">');
1785
  }
@@ -1834,10 +1834,15 @@ function frmFrontFormJS(){
1834
 
1835
  cont_submit = false;
1836
 
1837
- var $recapcha = jQuery(object).find('#frm_field_'+key+'_container .frm-g-recaptcha');
1838
- if ( $recapcha.length ) {
1839
  show_captcha = true;
1840
- grecaptcha.reset( $recapcha.data('rid') );
 
 
 
 
 
1841
  }
1842
  }
1843
  }else if(key == 'redirect'){
@@ -1849,7 +1854,7 @@ function frmFrontFormJS(){
1849
  scrollToFirstField( object );
1850
 
1851
  if(show_captcha !== true){
1852
- jQuery(object).find('.frm-g-recaptcha').closest('.frm_form_field').replaceWith('<input type="hidden" name="recaptcha_checked" value="'+ frm_js.nonce +'">');
1853
  }
1854
 
1855
  if(cont_submit){
@@ -1858,7 +1863,8 @@ function frmFrontFormJS(){
1858
  }
1859
  },
1860
  error:function(){
1861
- jQuery(object).find('input[type="submit"], input[type="button"]').removeAttr('disabled');object.submit();
 
1862
  }
1863
  });
1864
  }
@@ -2933,6 +2939,7 @@ function frmRecaptcha() {
2933
  for ( var c = 0, cl = captchas.length; c < cl; c++ ) {
2934
  var recaptchaID = grecaptcha.render( captchas[c].id, {
2935
  'sitekey': captchas[c].getAttribute('data-sitekey'),
 
2936
  'theme': captchas[c].getAttribute('data-theme')
2937
  } );
2938
  captchas[c].setAttribute('data-rid', recaptchaID);
1694
  var confName = field.name.replace('conf_', '');
1695
  var match = emailFields.filter('[name="'+ confName +'"]').val();
1696
  if ( match !== emailAddress ) {
1697
+ errors[ fieldID ] = '';
1698
  errors[ fieldID.replace('conf_', '') ] = '';
1699
  }
1700
  }
1779
  },2000);
1780
  }
1781
  }
1782
+ var $recapField = jQuery(object).find('.frm-g-recaptcha, .g-recaptcha');
1783
  if($recapField.length && (jQuery(object).find('.frm_next_page').length < 1 || jQuery(object).find('.frm_next_page').val() < 1)){
1784
  $recapField.closest('.frm_form_field').replaceWith('<input type="hidden" name="recaptcha_checked" value="'+ frm_js.nonce +'">');
1785
  }
1834
 
1835
  cont_submit = false;
1836
 
1837
+ var $recaptcha = jQuery(object).find('#frm_field_'+key+'_container .frm-g-recaptcha, #frm_field_'+key+'_container .g-recaptcha');
1838
+ if ( $recaptcha.length ) {
1839
  show_captcha = true;
1840
+ var recaptchaID = $recaptcha.data('rid');
1841
+ if ( recaptchaID ) {
1842
+ grecaptcha.reset( recaptchaID );
1843
+ } else {
1844
+ grecaptcha.reset();
1845
+ }
1846
  }
1847
  }
1848
  }else if(key == 'redirect'){
1854
  scrollToFirstField( object );
1855
 
1856
  if(show_captcha !== true){
1857
+ jQuery(object).find('.frm-g-recaptcha, .g-recaptcha').closest('.frm_form_field').replaceWith('<input type="hidden" name="recaptcha_checked" value="'+ frm_js.nonce +'">');
1858
  }
1859
 
1860
  if(cont_submit){
1863
  }
1864
  },
1865
  error:function(){
1866
+ jQuery(object).find('input[type="submit"], input[type="button"]').removeAttr('disabled');
1867
+ object.submit();
1868
  }
1869
  });
1870
  }
2939
  for ( var c = 0, cl = captchas.length; c < cl; c++ ) {
2940
  var recaptchaID = grecaptcha.render( captchas[c].id, {
2941
  'sitekey': captchas[c].getAttribute('data-sitekey'),
2942
+ 'size': captchas[c].getAttribute('data-size'),
2943
  'theme': captchas[c].getAttribute('data-theme')
2944
  } );
2945
  captchas[c].setAttribute('data-rid', recaptchaID);
js/formidable.min.js CHANGED
@@ -35,31 +35,31 @@ b.date;g=0;if(d)if("undefined"===typeof jQuery.datepicker){g="-";-1<e.indexOf("/
35
  864E5))}else{e=d;""!==e&&0!==e&&(e=e.trim(),e=parseFloat(e.replace(/,/g,"").match(/-?[\d\.]+$/)));if("undefined"===typeof e||isNaN(e)||""===e)e=0;c[a.valKey]+=e}});return c}function la(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 R(a){var b="";a=document.getElementById(a.id+"-otext");null!==a&&""!==a.value&&(b=a.value);return b}
36
  function na(a){var b=!1;a=jQuery(a).find(".frm_saving_draft");a.length&&(b=a.val());return b}function oa(a){var b=!1,c=jQuery(a).find(".frm_next_page");if(c.length&&c.val()){var d=jQuery(a).find('input[name="form_id"]').val();a=jQuery(a).find('input[name="frm_page_order_'+d+'"]');a=a.length?a.val():0;if(!a||c.val()<a)b=!0}return b}function T(a,b){if("hidden"==a.type)return b;var c="",d="";if("checkbox"==a.type||"radio"==a.type){var f=jQuery('input[name="'+a.name+'"]').closest(".frm_required_field").find("input:checked");
37
  jQuery(f).each(function(){c=this.value})}else if("file"==a.type)d=jQuery(a).data("fid"),"undefined"===typeof d&&(d=t(a,!0),d=d.replace("file","")),"undefined"===typeof b[d]&&(c=ya(d));else{d=a.className;if(-1!==d.indexOf("frm_pos_none"))return b;c=jQuery(a).val();if("string"!==typeof c)for(var f=c,c="",e=0;e<f.length;e++)""!==f[e]&&(c=f[e]);d=-1===d.indexOf("frm_other_input")?t(a,!0):t(a,!1)}""===c&&(""===d&&(d=t(a,!0)),d in b||(b[d]=G(a,"data-reqmsg")));return b}function ya(a){var b="";jQuery('input[name="file'+
38
- a+'"], input[name="file'+a+'[]"], input[name^="item_meta['+a+']"]').each(function(){""===b&&(b=this.value)});return b}function U(a,b,c){var d=a.value,f=t(a,!0);if(f in b)return b;var e=0===f.indexOf("conf_");if(""!==d||e){var g=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i,h=G(a,"data-invmsg");""!==d&&!1===g.test(d)?(b[f]=h,e&&(b[f.replace("conf_","")]="")):e&&(a=a.name.replace("conf_",""),c.filter('[name="'+a+'"]').val()!==d&&(b[f]=h,b[f.replace("conf_","")]=
39
  ""))}return b}function V(a,b){var c=a.value;""!==c&&!1!==isNaN(c/1)&&(c=t(a,!0),c in b||(b[c]=G(a,"data-invmsg")));return b}function W(a,b){var c=a.value,d=G(a,"pattern");if(""!==d&&""!==c){var f=t(a,!0);f in b||(d=new RegExp("^"+d+"$","i"),!1===d.test(c)&&(b[f]=G(a,"data-invmsg")))}return b}function G(a,b){var c=a.getAttribute(b);null===c&&(c="");return c}function za(a,b){jQuery(a).find('input[type="submit"], input[type="button"]').attr("disabled","disabled");jQuery(a).find(".frm_ajax_loading").addClass("frm_loading_now");
40
  "undefined"==typeof b&&jQuery(a).find('input[name="frm_action"]').val();jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:jQuery(a).serialize()+"&action=frm_entries_"+b+"&nonce="+frm_js.nonce,success:function(b){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")},
41
- 2E3));b=jQuery(a).find(".frm-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);
42
  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)}b=jQuery(a).find('input[name="id"]');b.length&&jQuery(document.getElementById("frm_edit_"+b.val())).find("a").addClass("frm_ajax_edited").click()}else{jQuery(a).find('input[type="submit"], input[type="button"]').removeAttr("disabled");jQuery(a).find(".frm_ajax_loading").removeClass("frm_loading_now");
43
- f=!0;jQuery(".form-field").removeClass("frm_blank_field");jQuery(".form-field .frm_error").replaceWith("");var e=!1,g=null,h;for(h in b)if(g=jQuery(a).find("#frm_field_"+h+"_container"),g.length){if(!g.is(":visible")){var k=g.closest(".frm_toggle_container");k.length&&(k=k.prev(),k.hasClass("frm_trigger")||(k=k.prev(".frm_trigger")),k.click())}g.is(":visible")&&(L(g,h,b),f=!1,g=jQuery(a).find("#frm_field_"+h+"_container .frm-g-recaptcha"),g.length&&(e=!0,grecaptcha.reset(g.data("rid"))))}else if("redirect"==
44
- h){window.location=b[h];return}pa(a);!0!==e&&jQuery(a).find(".frm-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 L(a,b,c){a.length&&a.is(":visible")&&(a.addClass("frm_blank_field"),"function"==typeof frmThemeOverride_frmPlaceError?frmThemeOverride_frmPlaceError(b,c):a.append('<div class="frm_error">'+
45
- c[b]+"</div>"))}function pa(a){var b=jQuery(a).find(".frm_blank_field:first");b.length&&frmFrontForm.scrollMsg(b,a,!0)}function Aa(){qa(jQuery(this),"clear")}function Ba(){qa(jQuery(this),"replace")}function qa(a,b){var c=a.data("frmval").replace(/(\n|\r\n)/g,"\r");if(""===c||"undefined"==typeof c)return!1;var d=a.val().replace(/(\n|\r\n)/g,"\r");"replace"==b?""===d&&a.addClass("frm_default").val(c):d==c&&a.removeClass("frm_default").val("")}function Ca(){var a=jQuery(this),b=a.data("eid"),c=a.data("fid");
46
- 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 Da(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",a.options.fields)&&(d=!0,c.addColumn("number",frm_js.id));for(var f=a.fields.length,e="string",
47
- g=0,h=f;g<h;g++){var k=a.fields[g],e=ra(k);c.addColumn(e,k.name)}g=!1;a.options.edit_link&&(g=!0,c.addColumn("string",a.options.edit_link));h=!1;a.options.delete_link&&(h=!0,c.addColumn("string",a.options.delete_link));k=0;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 t=0,u=f;t<u;t++){var r=a.fields[t],e=ra(r),r=p.metas[r.id];"number"!=e||null!==r&&""!==r?"boolean"==e&&(r=null===r||"false"==r||!1===r?!1:
48
- !0):r=0;c.setCell(l,k,r);k++}g&&("undefined"!==typeof p.editLink?c.setCell(l,k,'<a href="'+p.editLink+'">'+a.options.edit_link+"</a>"):c.setCell(l,k,""),k++);h&&("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),g=k=0,h=f;g<h;g++)0<k?c.setCell(0,k,""):c.setCell(0,k,a.options.no_entries),k++;(new google.visualization.Table(document.getElementById("frm_google_table_"+
49
- a.options.form_id))).draw(c,a.graphOpts)}else Ea(a)}})}function ra(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 Ea(a){var b=new google.visualization.DataTable,c=!1,d=!1,f=a.rows.length;if(0<f)if("table"==a.type){c=!0;b.addRows(a.rows[f-1][0]+1);for(var e=0;e<f;e++)b.setCell(a.rows[e])}else if("undefined"!=
50
- typeof a.rows[0].tooltip)for(var d=c=!0,g=0;g<f;g++){e=a.rows[g].tooltip;delete a.rows[g].tooltip;var h=Object.keys(a.rows[g]).map(function(b){return a.rows[g][b]});a.rows[g]=h;a.rows[g].push(e)}f=a.cols.length;if(c){if(0<f)for(c=0;c<f;c++)e=a.cols[c],b.addColumn(e.type,e.name);d&&(b.addColumn({type:"string",role:"tooltip"}),b.addRows(a.rows))}else{b=[[]];for(d=0;d<f;d++)b[0].push(a.cols[d].name);b=b.concat(a.rows);b=google.visualization.arrayToDataTable(b)}d=a.type.charAt(0).toUpperCase()+a.type.slice(1)+
51
- "Chart";(new google.visualization[d](document.getElementById("chart_"+a.graph_id))).draw(b,a.options)}function Fa(){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");c!="item_meta["+b+"][]"&&c.replace("item_meta[","").replace("[]","").split("][");a.closest(".frm_form_field").find(".frm_uploaded_files:last").after('<input name="'+
52
- c+'" data-fid="'+b+'"class="frm_transparent frm_multiple_file" multiple="multiple" type="file" />')}function Ga(){Ha(jQuery(this).parent(".frm_uploaded_files"))}function Ia(){jQuery(this).parent(".frm_file_names").replaceWith("");return!1}function Ja(){var a="frm_section_"+jQuery(this).data("parent")+"-"+jQuery(this).data("key"),b=jQuery(document.getElementById(a)),c=b.find("input, select, textarea");b.fadeOut("slow",function(){b.remove();c.each(function(){if("file"!=this.type){var a=t(this,!1);K(a,
53
- jQuery(this))}});"function"==typeof frmThemeOverride_frmRemoveRow&&frmThemeOverride_frmRemoveRow(a,b)});return!1}function Ka(){if(!0===J)return!1;J=!0;var a=jQuery(this).data("parent"),b=0;0<jQuery(".frm_repeat_"+a).length&&(b=1+parseInt(jQuery(".frm_repeat_"+a+":last").attr("id").replace("frm_section_"+a+"-","")),"undefined"==typeof b&&(b=1));jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"json",data:{action:"frm_add_form_row",field_id:a,i:b,nonce:frm_js.nonce},success:function(b){var d=b.html,
54
- f=jQuery(d).hide().fadeIn("slow");jQuery(".frm_repeat_"+a+":last").after(f);var e=["other"],g,h,k="reset";B=f.attr("id");jQuery(d).find("input, select, textarea").each(function(){if("file"!=this.type){if(""===this.name)return!0;g=this.name.replace("item_meta[","").split("]")[2].replace("[","");-1==jQuery.inArray(g,e)&&!1!==this.id&&(h=jQuery("#"+this.id),e.push(g),r(g,null,h,k),K(g,h),k="persist")}});B="";for(var f=0,l=b.logic.check.length;f<l;f++)-1==jQuery.inArray(b.logic.check[f],e)&&1>jQuery(d).find(".frm_field_"+
55
- b.logic.check[f]+"_container").length&&(r(b.logic.check[f],null,null,k),k="persist");0<jQuery(d).find(".star").length&&jQuery(".star").rating();0<jQuery(d).find(".frm_chzn").length&&jQuery().chosen&&jQuery(".frm_chzn").chosen({allow_single_deselect:!0});"function"==typeof frmThemeOverride_frmAddRow&&frmThemeOverride_frmAddRow(a,b);J=!1},error:function(){J=!1}});return!1}function La(){var a=jQuery(this),b=a.data("entryid"),c=a.data("prefix"),d=a.data("pageid"),f=a.data("formid"),e=a.data("cancel"),
56
- g=a.data("fields"),h=a.data("excludefields"),k=jQuery(document.getElementById(c+b)),l=k.html();k.html('<span class="frm-loading-img" id="'+c+b+'"></span><div class="frm_orig_content" style="display:none">'+l+"</div>");jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"html",data:{action:"frm_entries_edit_entry_ajax",post_id:d,entry_id:b,id:f,nonce:frm_js.nonce,fields:g,exclude_fields:h},success:function(b){k.children(".frm-loading-img").replaceWith(b);a.removeClass("frm_inplace_edit").addClass("frm_cancel_edit");
57
- a.html(e)}});return!1}function Ma(){var a=jQuery(this),b=a.data("entryid"),c=a.data("prefix"),d=a.data("edit");a.hasClass("frm_ajax_edited")||(b=jQuery(document.getElementById(c+b)),b.children(".frm_forms").replaceWith(""),b.children(".frm_orig_content").fadeIn("slow").removeClass("frm_orig_content"));a.removeClass("frm_cancel_edit").addClass("frm_inplace_edit");a.html(d);return!1}function Na(){var a=jQuery(this),b=a.data("deleteconfirm");if(confirm(b)){var c=a.data("entryid"),d=a.data("prefix");
58
- a.replaceWith('<span class="frm-loading-img" id="frm_delete_'+c+'"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_destroy",entry:c,nonce:frm_js.nonce},success:function(a){"success"==a.replace(/^\s+|\s+$/g,"")?(jQuery(document.getElementById(d+c)).fadeOut("slow"),jQuery(document.getElementById("frm_delete_"+c)).fadeOut("slow")):jQuery(document.getElementById("frm_delete_"+c)).replaceWith(a)}})}return!1}function Ha(a){a.fadeOut("slow",function(){a.remove()})}function Oa(){var a=
59
- jQuery(this).data("frmconfirm");return confirm(a)}function Pa(){var a=jQuery(this).data("frmtoggle");jQuery(a).is(":visible")?jQuery(a).slideUp("fast"):jQuery(a).slideDown("fast");return!1}function va(a,b){for(var c in a)if(a.hasOwnProperty(c)&&a[c]===b)return c;return null}function ma(a){return!jQuery.isArray(a)&&0<=a-parseFloat(a)+1}function da(a){return a.find('select[name^="item_meta"], textarea[name^="item_meta"], input[name^="item_meta"]')}function fa(a,b){var c="item_meta["+a+"]";M(a)&&(c=
60
- N(a,b));return c}function N(a,b){var c="";-1<b.indexOf("frm_section")?(c=b.replace("frm_section_","").split("-"),c="item_meta["+c[0]+"]["+c[1]+"]["+a+"]"):(c=b.replace("frm_field_","").replace("_container","").split("-"),c="item_meta["+c[1]+"]["+c[2]+"]["+a+"]");return c}function aa(a,b){var c=b.replace("frm_section_","").split("-");return"frm_field_"+a+"-"+c[0]+"-"+c[1]+"_container"}function M(a){var b=document.getElementById("frm_field_"+a+"_container");return"undefined"!==typeof b&&null!==b?!1:
61
- 1>jQuery('input[name^="item_meta['+a+']"],select[name^="item_meta['+a+']"], textarea[name^="item_meta['+a+']"]').length?!0:!1}function Qa(){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 Ra(){"function"!==typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")})}function Sa(){Array.prototype.filter||
62
- (Array.prototype.filter=function(a,b){if(void 0===this||null===this)throw new TypeError;var c=Object(this),d=c.length>>>0;if("function"!==typeof a)throw new TypeError;for(var f=[],e=0;e<d;e++)if(e in c){var g=c[e];a.call(b,g,e,c)&&f.push(g)}return f})}function Ta(){Object.keys||(Object.keys=function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b})}function sa(a,b){var c=[];if("undefined"==typeof document.querySelector)jQuery("#"+a+' input[type=checkbox]:checked, input[type=hidden][name^="'+
63
  b+'"]').each(function(){c.push(this.value)});else for(var d=document.querySelectorAll("#"+a+' input[type=checkbox], input[type=hidden][name^="'+b+'"]'),f=0;f<d.length;f++)("checkbox"==d[f].type&&d[f].checked||"hidden"==d[f].type)&&c.push(d[f].value);return c}var p=[],D={},F=[],Q=[],B="",J=!1,S="",y=[];return{init:function(){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)?
64
  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",Aa);jQuery(document).on("blur",".frm_toggle_default",Ba);jQuery(".frm_toggle_default").blur();jQuery(document.getElementById("frm_resend_email")).click(Ca);jQuery(document).on("change",".frm_multiple_file",Fa);jQuery(document).on("click",".frm_clear_file_link",
65
  Ia);jQuery(document).on("click",".frm_remove_link",Ga);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"]',z);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",
@@ -72,7 +72,7 @@ for(var b in y){var c=jQuery(a).find("#frm_field_"+b+"_container");c.length?L(c,
72
  d=jQuery("body").css("margin-top");if(b||d)a=a-parseInt(b)-parseInt(d);if(a&&window.innerHeight&&(b=document.documentElement.scrollTop||document.body.scrollTop,a>b+window.innerHeight||a<b))return"undefined"===typeof c?jQuery(window).scrollTop(a):jQuery("html,body").animate({scrollTop:a},500),!1}},savingDraft:function(a){return na(a)},goingToPreviousPage:function(a){return oa(a)},hideCondFields:function(a){a=JSON.parse(a);for(var b=0,c=a.length;b<c;b++){var d=document.getElementById("frm_field_"+a[b]+
73
  "_container");null!==d?d.style.display="none":jQuery(".frm_field_"+a[b]+"_container").hide()}},checkDependent:function(a){a=JSON.parse(a);for(var b="reset",c=0,d=a.length;c<d;c++)r(a[c],null,null,b),b="persist"},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]],f=b[c],e=0;e<d.length;e++)Da(d[e],f);else setTimeout(frmFrontForm.loadGoogle,30)},removeUsedTimes:function(a,b){var c=jQuery(a).parents("form:first").find('input[name="id"]');
74
  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 e in a)c.find('option[value="'+e+'"]').attr("disabled","disabled")}})},escapeHtml:function(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,
75
- "&#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()});function frmRecaptcha(){for(var l=jQuery(".frm-g-recaptcha"),n=0,u=l.length;n<u;n++){var v=grecaptcha.render(l[n].id,{sitekey:l[n].getAttribute("data-sitekey"),theme:l[n].getAttribute("data-theme")});l[n].setAttribute("data-rid",v)}}
76
  function frmUpdateField(l,n,u,v,z){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:u,nonce:frm_js.nonce},success:function(){""===v.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById("frm_update_field_"+l+"_"+n+"_"+z)).fadeOut("slow"):jQuery(document.getElementById("frm_update_field_"+l+"_"+n+"_"+z)).replaceWith(v)}})}
77
  function frmEditEntry(l,n,u,v,z,t){console.warn("DEPRECATED: function frmEditEntry in v2.0.13 use frmFrontForm.editEntry");var r=jQuery(document.getElementById("frm_edit_"+l)),w=r.html(),x=jQuery(document.getElementById(n+l)),A=x.html();x.html('<span class="frm-loading-img" id="'+n+l+'"></span><div class="frm_orig_content" style="display:none">'+A+"</div>");jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"html",data:{action:"frm_entries_edit_entry_ajax",post_id:u,entry_id:l,id:v,nonce:frm_js.nonce},
78
  success:function(A){x.children(".frm-loading-img").replaceWith(A);r.replaceWith('<span id="frm_edit_'+l+'"><a onclick="frmCancelEdit('+l+",'"+n+"','"+frmFrontForm.escapeHtml(w)+"',"+u+","+v+",'"+t+'\')" class="'+t+'">'+z+"</a></span>")}})}
35
  864E5))}else{e=d;""!==e&&0!==e&&(e=e.trim(),e=parseFloat(e.replace(/,/g,"").match(/-?[\d\.]+$/)));if("undefined"===typeof e||isNaN(e)||""===e)e=0;c[a.valKey]+=e}});return c}function la(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 R(a){var b="";a=document.getElementById(a.id+"-otext");null!==a&&""!==a.value&&(b=a.value);return b}
36
  function na(a){var b=!1;a=jQuery(a).find(".frm_saving_draft");a.length&&(b=a.val());return b}function oa(a){var b=!1,c=jQuery(a).find(".frm_next_page");if(c.length&&c.val()){var d=jQuery(a).find('input[name="form_id"]').val();a=jQuery(a).find('input[name="frm_page_order_'+d+'"]');a=a.length?a.val():0;if(!a||c.val()<a)b=!0}return b}function T(a,b){if("hidden"==a.type)return b;var c="",d="";if("checkbox"==a.type||"radio"==a.type){var f=jQuery('input[name="'+a.name+'"]').closest(".frm_required_field").find("input:checked");
37
  jQuery(f).each(function(){c=this.value})}else if("file"==a.type)d=jQuery(a).data("fid"),"undefined"===typeof d&&(d=t(a,!0),d=d.replace("file","")),"undefined"===typeof b[d]&&(c=ya(d));else{d=a.className;if(-1!==d.indexOf("frm_pos_none"))return b;c=jQuery(a).val();if("string"!==typeof c)for(var f=c,c="",e=0;e<f.length;e++)""!==f[e]&&(c=f[e]);d=-1===d.indexOf("frm_other_input")?t(a,!0):t(a,!1)}""===c&&(""===d&&(d=t(a,!0)),d in b||(b[d]=G(a,"data-reqmsg")));return b}function ya(a){var b="";jQuery('input[name="file'+
38
+ a+'"], input[name="file'+a+'[]"], input[name^="item_meta['+a+']"]').each(function(){""===b&&(b=this.value)});return b}function U(a,b,c){var d=a.value,f=t(a,!0);if(f in b)return b;var e=0===f.indexOf("conf_");if(""!==d||e){var g=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i,h=G(a,"data-invmsg");""!==d&&!1===g.test(d)?(b[f]=h,e&&(b[f.replace("conf_","")]="")):e&&(a=a.name.replace("conf_",""),c.filter('[name="'+a+'"]').val()!==d&&(b[f]="",b[f.replace("conf_","")]=
39
  ""))}return b}function V(a,b){var c=a.value;""!==c&&!1!==isNaN(c/1)&&(c=t(a,!0),c in b||(b[c]=G(a,"data-invmsg")));return b}function W(a,b){var c=a.value,d=G(a,"pattern");if(""!==d&&""!==c){var f=t(a,!0);f in b||(d=new RegExp("^"+d+"$","i"),!1===d.test(c)&&(b[f]=G(a,"data-invmsg")))}return b}function G(a,b){var c=a.getAttribute(b);null===c&&(c="");return c}function za(a,b){jQuery(a).find('input[type="submit"], input[type="button"]').attr("disabled","disabled");jQuery(a).find(".frm_ajax_loading").addClass("frm_loading_now");
40
  "undefined"==typeof b&&jQuery(a).find('input[name="frm_action"]').val();jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:jQuery(a).serialize()+"&action=frm_entries_"+b+"&nonce="+frm_js.nonce,success:function(b){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")},
41
+ 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);
42
  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)}b=jQuery(a).find('input[name="id"]');b.length&&jQuery(document.getElementById("frm_edit_"+b.val())).find("a").addClass("frm_ajax_edited").click()}else{jQuery(a).find('input[type="submit"], input[type="button"]').removeAttr("disabled");jQuery(a).find(".frm_ajax_loading").removeClass("frm_loading_now");
43
+ f=!0;jQuery(".form-field").removeClass("frm_blank_field");jQuery(".form-field .frm_error").replaceWith("");var e=!1,g=null,h;for(h in b)if(g=jQuery(a).find("#frm_field_"+h+"_container"),g.length){if(!g.is(":visible")){var k=g.closest(".frm_toggle_container");k.length&&(k=k.prev(),k.hasClass("frm_trigger")||(k=k.prev(".frm_trigger")),k.click())}g.is(":visible")&&(L(g,h,b),f=!1,g=jQuery(a).find("#frm_field_"+h+"_container .frm-g-recaptcha, #frm_field_"+h+"_container .g-recaptcha"),g.length&&(e=!0,(g=
44
+ g.data("rid"))?grecaptcha.reset(g):grecaptcha.reset()))}else if("redirect"==h){window.location=b[h];return}pa(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 L(a,b,c){a.length&&a.is(":visible")&&(a.addClass("frm_blank_field"),"function"==
45
+ typeof frmThemeOverride_frmPlaceError?frmThemeOverride_frmPlaceError(b,c):a.append('<div class="frm_error">'+c[b]+"</div>"))}function pa(a){var b=jQuery(a).find(".frm_blank_field:first");b.length&&frmFrontForm.scrollMsg(b,a,!0)}function Aa(){qa(jQuery(this),"clear")}function Ba(){qa(jQuery(this),"replace")}function qa(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):
46
+ d==c&&a.removeClass("frm_default").val("")}function Ca(){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 Da(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",
47
+ a.options.fields)&&(d=!0,c.addColumn("number",frm_js.id));for(var f=a.fields.length,e="string",g=0,h=f;g<h;g++){var k=a.fields[g],e=ra(k);c.addColumn(e,k.name)}g=!1;a.options.edit_link&&(g=!0,c.addColumn("string",a.options.edit_link));h=!1;a.options.delete_link&&(h=!0,c.addColumn("string",a.options.delete_link));k=0;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 t=0,u=f;t<u;t++){var r=a.fields[t],e=ra(r),
48
+ r=p.metas[r.id];"number"!=e||null!==r&&""!==r?"boolean"==e&&(r=null===r||"false"==r||!1===r?!1:!0):r=0;c.setCell(l,k,r);k++}g&&("undefined"!==typeof p.editLink?c.setCell(l,k,'<a href="'+p.editLink+'">'+a.options.edit_link+"</a>"):c.setCell(l,k,""),k++);h&&("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),g=k=0,h=f;g<h;g++)0<k?c.setCell(0,
49
+ k,""):c.setCell(0,k,a.options.no_entries),k++;(new google.visualization.Table(document.getElementById("frm_google_table_"+a.options.form_id))).draw(c,a.graphOpts)}else Ea(a)}})}function ra(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 Ea(a){var b=new google.visualization.DataTable,c=!1,d=!1,f=a.rows.length;
50
+ if(0<f)if("table"==a.type){c=!0;b.addRows(a.rows[f-1][0]+1);for(var e=0;e<f;e++)b.setCell(a.rows[e])}else if("undefined"!=typeof a.rows[0].tooltip)for(var d=c=!0,g=0;g<f;g++){e=a.rows[g].tooltip;delete a.rows[g].tooltip;var h=Object.keys(a.rows[g]).map(function(b){return a.rows[g][b]});a.rows[g]=h;a.rows[g].push(e)}f=a.cols.length;if(c){if(0<f)for(c=0;c<f;c++)e=a.cols[c],b.addColumn(e.type,e.name);d&&(b.addColumn({type:"string",role:"tooltip"}),b.addRows(a.rows))}else{b=[[]];for(d=0;d<f;d++)b[0].push(a.cols[d].name);
51
+ 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 Fa(){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");
52
+ 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 Ga(){Ha(jQuery(this).parent(".frm_uploaded_files"))}function Ia(){jQuery(this).parent(".frm_file_names").replaceWith("");return!1}function Ja(){var a="frm_section_"+jQuery(this).data("parent")+"-"+jQuery(this).data("key"),b=jQuery(document.getElementById(a)),
53
+ c=b.find("input, select, textarea");b.fadeOut("slow",function(){b.remove();c.each(function(){if("file"!=this.type){var a=t(this,!1);K(a,jQuery(this))}});"function"==typeof frmThemeOverride_frmRemoveRow&&frmThemeOverride_frmRemoveRow(a,b)});return!1}function Ka(){if(!0===J)return!1;J=!0;var a=jQuery(this).data("parent"),b=0;0<jQuery(".frm_repeat_"+a).length&&(b=1+parseInt(jQuery(".frm_repeat_"+a+":last").attr("id").replace("frm_section_"+a+"-","")),"undefined"==typeof b&&(b=1));jQuery.ajax({type:"POST",
54
+ url:frm_js.ajax_url,dataType:"json",data:{action:"frm_add_form_row",field_id:a,i:b,nonce:frm_js.nonce},success:function(b){var d=b.html,f=jQuery(d).hide().fadeIn("slow");jQuery(".frm_repeat_"+a+":last").after(f);var e=["other"],g,h,k="reset";B=f.attr("id");jQuery(d).find("input, select, textarea").each(function(){if("file"!=this.type){if(""===this.name)return!0;g=this.name.replace("item_meta[","").split("]")[2].replace("[","");-1==jQuery.inArray(g,e)&&!1!==this.id&&(h=jQuery("#"+this.id),e.push(g),
55
+ r(g,null,h,k),K(g,h),k="persist")}});B="";for(var f=0,l=b.logic.check.length;f<l;f++)-1==jQuery.inArray(b.logic.check[f],e)&&1>jQuery(d).find(".frm_field_"+b.logic.check[f]+"_container").length&&(r(b.logic.check[f],null,null,k),k="persist");0<jQuery(d).find(".star").length&&jQuery(".star").rating();0<jQuery(d).find(".frm_chzn").length&&jQuery().chosen&&jQuery(".frm_chzn").chosen({allow_single_deselect:!0});"function"==typeof frmThemeOverride_frmAddRow&&frmThemeOverride_frmAddRow(a,b);J=!1},error:function(){J=
56
+ !1}});return!1}function La(){var a=jQuery(this),b=a.data("entryid"),c=a.data("prefix"),d=a.data("pageid"),f=a.data("formid"),e=a.data("cancel"),g=a.data("fields"),h=a.data("excludefields"),k=jQuery(document.getElementById(c+b)),l=k.html();k.html('<span class="frm-loading-img" id="'+c+b+'"></span><div class="frm_orig_content" style="display:none">'+l+"</div>");jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"html",data:{action:"frm_entries_edit_entry_ajax",post_id:d,entry_id:b,id:f,nonce:frm_js.nonce,
57
+ fields:g,exclude_fields:h},success:function(b){k.children(".frm-loading-img").replaceWith(b);a.removeClass("frm_inplace_edit").addClass("frm_cancel_edit");a.html(e)}});return!1}function Ma(){var a=jQuery(this),b=a.data("entryid"),c=a.data("prefix"),d=a.data("edit");a.hasClass("frm_ajax_edited")||(b=jQuery(document.getElementById(c+b)),b.children(".frm_forms").replaceWith(""),b.children(".frm_orig_content").fadeIn("slow").removeClass("frm_orig_content"));a.removeClass("frm_cancel_edit").addClass("frm_inplace_edit");
58
+ a.html(d);return!1}function Na(){var a=jQuery(this),b=a.data("deleteconfirm");if(confirm(b)){var c=a.data("entryid"),d=a.data("prefix");a.replaceWith('<span class="frm-loading-img" id="frm_delete_'+c+'"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_destroy",entry:c,nonce:frm_js.nonce},success:function(a){"success"==a.replace(/^\s+|\s+$/g,"")?(jQuery(document.getElementById(d+c)).fadeOut("slow"),jQuery(document.getElementById("frm_delete_"+c)).fadeOut("slow")):jQuery(document.getElementById("frm_delete_"+
59
+ c)).replaceWith(a)}})}return!1}function Ha(a){a.fadeOut("slow",function(){a.remove()})}function Oa(){var a=jQuery(this).data("frmconfirm");return confirm(a)}function Pa(){var a=jQuery(this).data("frmtoggle");jQuery(a).is(":visible")?jQuery(a).slideUp("fast"):jQuery(a).slideDown("fast");return!1}function va(a,b){for(var c in a)if(a.hasOwnProperty(c)&&a[c]===b)return c;return null}function ma(a){return!jQuery.isArray(a)&&0<=a-parseFloat(a)+1}function da(a){return a.find('select[name^="item_meta"], textarea[name^="item_meta"], input[name^="item_meta"]')}
60
+ function fa(a,b){var c="item_meta["+a+"]";M(a)&&(c=N(a,b));return c}function N(a,b){var c="";-1<b.indexOf("frm_section")?(c=b.replace("frm_section_","").split("-"),c="item_meta["+c[0]+"]["+c[1]+"]["+a+"]"):(c=b.replace("frm_field_","").replace("_container","").split("-"),c="item_meta["+c[1]+"]["+c[2]+"]["+a+"]");return c}function aa(a,b){var c=b.replace("frm_section_","").split("-");return"frm_field_"+a+"-"+c[0]+"-"+c[1]+"_container"}function M(a){var b=document.getElementById("frm_field_"+a+"_container");
61
+ return"undefined"!==typeof b&&null!==b?!1:1>jQuery('input[name^="item_meta['+a+']"],select[name^="item_meta['+a+']"], textarea[name^="item_meta['+a+']"]').length?!0:!1}function Qa(){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 Ra(){"function"!==typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,
62
+ "")})}function Sa(){Array.prototype.filter||(Array.prototype.filter=function(a,b){if(void 0===this||null===this)throw new TypeError;var c=Object(this),d=c.length>>>0;if("function"!==typeof a)throw new TypeError;for(var f=[],e=0;e<d;e++)if(e in c){var g=c[e];a.call(b,g,e,c)&&f.push(g)}return f})}function Ta(){Object.keys||(Object.keys=function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b})}function sa(a,b){var c=[];if("undefined"==typeof document.querySelector)jQuery("#"+a+' input[type=checkbox]:checked, input[type=hidden][name^="'+
63
  b+'"]').each(function(){c.push(this.value)});else for(var d=document.querySelectorAll("#"+a+' input[type=checkbox], input[type=hidden][name^="'+b+'"]'),f=0;f<d.length;f++)("checkbox"==d[f].type&&d[f].checked||"hidden"==d[f].type)&&c.push(d[f].value);return c}var p=[],D={},F=[],Q=[],B="",J=!1,S="",y=[];return{init:function(){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)?
64
  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",Aa);jQuery(document).on("blur",".frm_toggle_default",Ba);jQuery(".frm_toggle_default").blur();jQuery(document.getElementById("frm_resend_email")).click(Ca);jQuery(document).on("change",".frm_multiple_file",Fa);jQuery(document).on("click",".frm_clear_file_link",
65
  Ia);jQuery(document).on("click",".frm_remove_link",Ga);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"]',z);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",
72
  d=jQuery("body").css("margin-top");if(b||d)a=a-parseInt(b)-parseInt(d);if(a&&window.innerHeight&&(b=document.documentElement.scrollTop||document.body.scrollTop,a>b+window.innerHeight||a<b))return"undefined"===typeof c?jQuery(window).scrollTop(a):jQuery("html,body").animate({scrollTop:a},500),!1}},savingDraft:function(a){return na(a)},goingToPreviousPage:function(a){return oa(a)},hideCondFields:function(a){a=JSON.parse(a);for(var b=0,c=a.length;b<c;b++){var d=document.getElementById("frm_field_"+a[b]+
73
  "_container");null!==d?d.style.display="none":jQuery(".frm_field_"+a[b]+"_container").hide()}},checkDependent:function(a){a=JSON.parse(a);for(var b="reset",c=0,d=a.length;c<d;c++)r(a[c],null,null,b),b="persist"},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]],f=b[c],e=0;e<d.length;e++)Da(d[e],f);else setTimeout(frmFrontForm.loadGoogle,30)},removeUsedTimes:function(a,b){var c=jQuery(a).parents("form:first").find('input[name="id"]');
74
  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 e in a)c.find('option[value="'+e+'"]').attr("disabled","disabled")}})},escapeHtml:function(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,
75
+ "&#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()});function frmRecaptcha(){for(var l=jQuery(".frm-g-recaptcha"),n=0,u=l.length;n<u;n++){var v=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",v)}}
76
  function frmUpdateField(l,n,u,v,z){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:u,nonce:frm_js.nonce},success:function(){""===v.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById("frm_update_field_"+l+"_"+n+"_"+z)).fadeOut("slow"):jQuery(document.getElementById("frm_update_field_"+l+"_"+n+"_"+z)).replaceWith(v)}})}
77
  function frmEditEntry(l,n,u,v,z,t){console.warn("DEPRECATED: function frmEditEntry in v2.0.13 use frmFrontForm.editEntry");var r=jQuery(document.getElementById("frm_edit_"+l)),w=r.html(),x=jQuery(document.getElementById(n+l)),A=x.html();x.html('<span class="frm-loading-img" id="'+n+l+'"></span><div class="frm_orig_content" style="display:none">'+A+"</div>");jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"html",data:{action:"frm_entries_edit_entry_ajax",post_id:u,entry_id:l,id:v,nonce:frm_js.nonce},
78
  success:function(A){x.children(".frm-loading-img").replaceWith(A);r.replaceWith('<span id="frm_edit_'+l+'"><a onclick="frmCancelEdit('+l+",'"+n+"','"+frmFrontForm.escapeHtml(w)+"',"+u+","+v+",'"+t+'\')" class="'+t+'">'+z+"</a></span>")}})}
js/formidable_admin.js CHANGED
@@ -841,7 +841,7 @@ function frmAdminBuildJS(){
841
 
842
  // Update data-formid on section field
843
  var fieldListElement = document.getElementById( 'frm_field_id_' + field_id );
844
- if ( id != '' ) {
845
  fieldListElement.setAttribute('data-formid', id);
846
  } else {
847
  fieldListElement.setAttribute('data-formid', main_form_id);
841
 
842
  // Update data-formid on section field
843
  var fieldListElement = document.getElementById( 'frm_field_id_' + field_id );
844
+ if ( id !== '' ) {
845
  fieldListElement.setAttribute('data-formid', id);
846
  } else {
847
  fieldListElement.setAttribute('data-formid', main_form_id);
languages/formidable-da_DK.mo ADDED
Binary file
languages/formidable-da_DK.po ADDED
@@ -0,0 +1,8196 @@