Formidable Forms – Form Builder for WordPress - Version 3.02.01

Version Description

  • Fix: Allow the heading class and ids to stay for the sidebar form widget. The headings were missing a class and not the same as other headings in some themes.
  • Fix: If all form templates are deleted, keep the 'templates' nav item so new templates can still be created.
  • Fix: When creating a new form, don't include trashed form templates in the form template options
  • Fix: Remove outdated sslverify references
  • Fix: The sample form for the form styler didn't have a great layout when CSS grids were turned on
Download this release

Release Info

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

Code changes from version 3.02 to 3.02.01

classes/controllers/FrmAddonsController.php CHANGED
@@ -229,7 +229,6 @@ class FrmAddonsController {
229
  'url' => home_url(),
230
  ),
231
  'timeout' => 15,
232
- 'sslverify' => false,
233
  'user-agent' => 'Formidable/' . FrmAppHelper::$plug_version . '; ' . home_url(),
234
  );
235
 
@@ -262,13 +261,13 @@ class FrmAddonsController {
262
  'id' => 0,
263
  'download' => 19367001,
264
  'price' => '99.00',
265
- 'name' => 'Professional',
266
  ),
267
  'smallbusiness' => array(
268
  'id' => 0,
269
  'download' => 19366995,
270
  'price' => '199.00',
271
- 'name' => 'Small Business',
272
  ),
273
  'enterprise' => array(
274
  'id' => 0,
229
  'url' => home_url(),
230
  ),
231
  'timeout' => 15,
 
232
  'user-agent' => 'Formidable/' . FrmAppHelper::$plug_version . '; ' . home_url(),
233
  );
234
 
261
  'id' => 0,
262
  'download' => 19367001,
263
  'price' => '99.00',
264
+ 'name' => 'Creator',
265
  ),
266
  'smallbusiness' => array(
267
  'id' => 0,
268
  'download' => 19366995,
269
  'price' => '199.00',
270
+ 'name' => 'Business',
271
  ),
272
  'enterprise' => array(
273
  'id' => 0,
classes/controllers/FrmAppController.php CHANGED
@@ -291,11 +291,16 @@ class FrmAppController {
291
  wp_enqueue_script( 'formidable_admin' );
292
  FrmAppHelper::localize_script( 'admin' );
293
 
294
- wp_enqueue_style( 'formidable-admin' );
295
  if ( 'formidable-styles' !== $page ) {
296
  wp_enqueue_style( 'formidable-grids' );
297
  wp_enqueue_style( 'formidable-dropzone' );
298
  add_thickbox();
 
 
 
 
 
299
  }
300
 
301
  wp_register_script( 'formidable-editinplace', FrmAppHelper::plugin_url() . '/js/jquery/jquery.editinplace.packed.js', array( 'jquery' ), '2.3.0' );
291
  wp_enqueue_script( 'formidable_admin' );
292
  FrmAppHelper::localize_script( 'admin' );
293
 
294
+ wp_enqueue_style( 'formidable-admin' );
295
  if ( 'formidable-styles' !== $page ) {
296
  wp_enqueue_style( 'formidable-grids' );
297
  wp_enqueue_style( 'formidable-dropzone' );
298
  add_thickbox();
299
+ } else {
300
+ $settings = FrmAppHelper::get_settings();
301
+ if ( empty( $settings->old_css ) ) {
302
+ wp_enqueue_style( 'formidable-grids' );
303
+ }
304
  }
305
 
306
  wp_register_script( 'formidable-editinplace', FrmAppHelper::plugin_url() . '/js/jquery/jquery.editinplace.packed.js', array( 'jquery' ), '2.3.0' );
classes/controllers/FrmFieldsController.php CHANGED
@@ -676,6 +676,13 @@ class FrmFieldsController {
676
  private static function add_frmval_to_input( $field, &$add_html ) {
677
  if ( $field['default_value'] != '' ) {
678
  $add_html['data-frmval'] = 'data-frmval="' . esc_attr( $field['default_value'] ) . '"';
 
 
 
 
 
 
 
679
  }
680
  }
681
 
676
  private static function add_frmval_to_input( $field, &$add_html ) {
677
  if ( $field['default_value'] != '' ) {
678
  $add_html['data-frmval'] = 'data-frmval="' . esc_attr( $field['default_value'] ) . '"';
679
+
680
+ if ( 'select' === $field['type'] ) {
681
+ $is_placeholder = FrmField::is_option_true( $field, 'default_blank' );
682
+ if ( $is_placeholder ) {
683
+ $add_html['data-frmplaceholder'] = 'data-frmplaceholder="' . esc_attr( $field['default_value'] ) . '"';
684
+ }
685
+ }
686
  }
687
  }
688
 
classes/helpers/FrmAppHelper.php CHANGED
@@ -11,7 +11,7 @@ class FrmAppHelper {
11
  /**
12
  * @since 2.0
13
  */
14
- public static $plug_version = '3.02';
15
 
16
  /**
17
  * @since 1.07.02
@@ -429,6 +429,11 @@ class FrmAppHelper {
429
  * @since 2.05.03
430
  */
431
  private static function safe_html() {
 
 
 
 
 
432
  return array(
433
  'a' => array(
434
  'class' => array(),
@@ -464,16 +469,13 @@ class FrmAppHelper {
464
  'dl' => array(),
465
  'dt' => array(),
466
  'em' => array(),
467
- 'h1' => array(),
468
- 'h2' => array(),
469
- 'h3' => array(),
470
- 'h4' => array(),
471
- 'h5' => array(),
472
- 'h6' => array(),
473
- 'i' => array(
474
- 'class' => array(),
475
- 'id' => array(),
476
- ),
477
  'img' => array(
478
  'alt' => array(),
479
  'class' => array(),
@@ -482,18 +484,9 @@ class FrmAppHelper {
482
  'src' => array(),
483
  'width' => array(),
484
  ),
485
- 'li' => array(
486
- 'class' => array(),
487
- 'id' => array(),
488
- ),
489
- 'ol' => array(
490
- 'class' => array(),
491
- 'id' => array(),
492
- ),
493
- 'p' => array(
494
- 'class' => array(),
495
- 'id' => array(),
496
- ),
497
  'pre' => array(),
498
  'q' => array(
499
  'cite' => array(),
@@ -507,10 +500,7 @@ class FrmAppHelper {
507
  ),
508
  'strike' => array(),
509
  'strong' => array(),
510
- 'ul' => array(
511
- 'class' => array(),
512
- 'id' => array(),
513
- ),
514
  );
515
  }
516
 
11
  /**
12
  * @since 2.0
13
  */
14
+ public static $plug_version = '3.02.01';
15
 
16
  /**
17
  * @since 1.07.02
429
  * @since 2.05.03
430
  */
431
  private static function safe_html() {
432
+ $allow_class = array(
433
+ 'class' => array(),
434
+ 'id' => array(),
435
+ );
436
+
437
  return array(
438
  'a' => array(
439
  'class' => array(),
469
  'dl' => array(),
470
  'dt' => array(),
471
  'em' => array(),
472
+ 'h1' => $allow_class,
473
+ 'h2' => $allow_class,
474
+ 'h3' => $allow_class,
475
+ 'h4' => $allow_class,
476
+ 'h5' => $allow_class,
477
+ 'h6' => $allow_class,
478
+ 'i' => $allow_class,
 
 
 
479
  'img' => array(
480
  'alt' => array(),
481
  'class' => array(),
484
  'src' => array(),
485
  'width' => array(),
486
  ),
487
+ 'li' => $allow_class,
488
+ 'ol' => $allow_class,
489
+ 'p' => $allow_class,
 
 
 
 
 
 
 
 
 
490
  'pre' => array(),
491
  'q' => array(
492
  'cite' => array(),
500
  ),
501
  'strike' => array(),
502
  'strong' => array(),
503
+ 'ul' => $allow_class,
 
 
 
504
  );
505
  }
506
 
classes/helpers/FrmFormsListHelper.php CHANGED
@@ -195,7 +195,7 @@ class FrmFormsListHelper extends FrmListHelper {
195
  $class = '';
196
  }
197
 
198
- if ( $counts->{$status} || 'published' == $status ) {
199
  $links[ $status ] = '<a href="' . esc_url( '?page=formidable&form_type=' . $status ) . '" ' . $class . '>' . sprintf( __( '%1$s <span class="count">(%2$s)</span>', 'formidable' ), $name, number_format_i18n( $counts->{$status} ) ) . '</a>';
200
  }
201
 
195
  $class = '';
196
  }
197
 
198
+ if ( $counts->{$status} || 'published' == $status || 'template' == $status ) {
199
  $links[ $status ] = '<a href="' . esc_url( '?page=formidable&form_type=' . $status ) . '" ' . $class . '>' . sprintf( __( '%1$s <span class="count">(%2$s)</span>', 'formidable' ), $name, number_format_i18n( $counts->{$status} ) ) . '</a>';
200
  }
201
 
classes/models/FrmAddon.php CHANGED
@@ -416,7 +416,6 @@ class FrmAddon {
416
  $arg_array = array(
417
  'body' => $api_params,
418
  'timeout' => 25,
419
- 'sslverify' => false,
420
  'user-agent' => $this->plugin_slug . '/' . $this->version . '; ' . get_bloginfo( 'url' ),
421
  );
422
 
416
  $arg_array = array(
417
  'body' => $api_params,
418
  'timeout' => 25,
 
419
  'user-agent' => $this->plugin_slug . '/' . $this->version . '; ' . get_bloginfo( 'url' ),
420
  );
421
 
classes/models/FrmForm.php CHANGED
@@ -571,6 +571,11 @@ class FrmForm {
571
  */
572
  public static function getAll( $where = array(), $order_by = '', $limit = '' ) {
573
  if ( is_array( $where ) && ! empty( $where ) ) {
 
 
 
 
 
574
  $results = FrmDb::get_results( 'frm_forms', $where, '*', array(
575
  'order_by' => $order_by,
576
  'limit' => $limit,
571
  */
572
  public static function getAll( $where = array(), $order_by = '', $limit = '' ) {
573
  if ( is_array( $where ) && ! empty( $where ) ) {
574
+ if ( isset( $where['is_template'] ) && $where['is_template'] && ! isset( $where['status'] ) ) {
575
+ // don't get trashed templates
576
+ $where['status'] = array( null, '', 'published' );
577
+ }
578
+
579
  $results = FrmDb::get_results( 'frm_forms', $where, '*', array(
580
  'order_by' => $order_by,
581
  'limit' => $limit,
classes/views/frm-forms/form.php CHANGED
@@ -26,6 +26,7 @@
26
 
27
  <div class="frm_drag_inst"><?php esc_html_e( 'Add Fields Here', 'formidable' ) ?></div>
28
  <p id="frm_create_template_form">
 
29
  <?php esc_html_e( 'Or load fields from a template', 'formidable' ); ?>
30
  <select id="frm_create_template_dropdown">
31
  <?php foreach ( $all_templates as $temp ) { ?>
@@ -33,6 +34,7 @@
33
  <?php } ?>
34
  </select>
35
  <input type="button" id="frm_create_template_button" class="button-secondary" value="<?php esc_attr_e( 'Load Template', 'formidable' ) ?>" />
 
36
  </p>
37
 
38
  <div class="alignleft sketch3">
26
 
27
  <div class="frm_drag_inst"><?php esc_html_e( 'Add Fields Here', 'formidable' ) ?></div>
28
  <p id="frm_create_template_form">
29
+ <?php if ( ! empty( $all_templates ) ) { ?>
30
  <?php esc_html_e( 'Or load fields from a template', 'formidable' ); ?>
31
  <select id="frm_create_template_dropdown">
32
  <?php foreach ( $all_templates as $temp ) { ?>
34
  <?php } ?>
35
  </select>
36
  <input type="button" id="frm_create_template_button" class="button-secondary" value="<?php esc_attr_e( 'Load Template', 'formidable' ) ?>" />
37
+ <?php } ?>
38
  </p>
39
 
40
  <div class="alignleft sketch3">
classes/widgets/FrmShowForm.php CHANGED
@@ -18,7 +18,7 @@ class FrmShowForm extends WP_Widget {
18
  }
19
 
20
  $form_atts = array(
21
- 'id' => $instance['form'],
22
  'title' => false,
23
  'description' => isset( $instance['description'] ) ? $instance['description'] : false,
24
  );
18
  }
19
 
20
  $form_atts = array(
21
+ 'id' => isset( $instance['form'] ) ? $instance['form'] : 0,
22
  'title' => false,
23
  'description' => isset( $instance['description'] ) ? $instance['description'] : false,
24
  );
formidable.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Formidable Forms
4
  Description: Quickly and easily create drag-and-drop forms
5
- Version: 3.02
6
  Plugin URI: https://formidableforms.com/
7
  Author URI: https://formidableforms.com/
8
  Author: Strategy11
2
  /*
3
  Plugin Name: Formidable Forms
4
  Description: Quickly and easily create drag-and-drop forms
5
+ Version: 3.02.01
6
  Plugin URI: https://formidableforms.com/
7
  Author URI: https://formidableforms.com/
8
  Author: Strategy11
js/formidable.js CHANGED
@@ -240,6 +240,11 @@ function frmFrontFormJS(){
240
  // set id for time field
241
  fieldID = fieldID.replace('-H', '').replace('-m', '');
242
  }
 
 
 
 
 
243
  }
244
 
245
  if ( val === '' ) {
@@ -323,7 +328,7 @@ function frmFrontFormJS(){
323
  function checkPasswordField( field, errors ) {
324
  var classes = field.className;
325
 
326
- if (!classes.includes("frm_strong_pass")) {
327
  return errors;
328
  }
329
 
@@ -877,6 +882,12 @@ function frmFrontFormJS(){
877
 
878
  e.preventDefault();
879
 
 
 
 
 
 
 
880
  if ( invisibleRecaptcha.length ) {
881
  executeInvisibleRecaptcha( invisibleRecaptcha );
882
  } else {
240
  // set id for time field
241
  fieldID = fieldID.replace('-H', '').replace('-m', '');
242
  }
243
+
244
+ var placeholder = field.getAttribute('data-frmplaceholder');
245
+ if ( placeholder !== null && val === placeholder ) {
246
+ val = '';
247
+ }
248
  }
249
 
250
  if ( val === '' ) {
328
  function checkPasswordField( field, errors ) {
329
  var classes = field.className;
330
 
331
+ if (classes.indexOf('frm_strong_pass') < 0) {
332
  return errors;
333
  }
334
 
882
 
883
  e.preventDefault();
884
 
885
+ if ( typeof frmProForm !== 'undefined' && typeof frmProForm.submitAllowed === 'function' ) {
886
+ if ( ! frmProForm.submitAllowed( object) ) {
887
+ return;
888
+ }
889
+ }
890
+
891
  if ( invisibleRecaptcha.length ) {
892
  executeInvisibleRecaptcha( invisibleRecaptcha );
893
  } else {
js/formidable.min.js CHANGED
@@ -1,34 +1,35 @@
1
  function frmFrontFormJS(){function e(){var a=jQuery(this),b=a.closest(".frm_inside_container").find("label.frm_primary_label");0<a.val().length?b.addClass("frm_visible"):b.removeClass("frm_visible")}function f(a,b){var c="";c=a instanceof jQuery?a.attr("name"):a.name;if(""===c)return c=a instanceof jQuery?a.data("name"):a.getAttribute("data-name"),""!==c&&c?c:0;c=c.replace("item_meta[","").replace("[]","").split("]");if(1>c.length)return 0;c=c.filter(function(a){return""!==a});var d=c[0],h=!1;if(1===
2
  c.length)return d;if("[form"===c[1]||"[row_ids"===c[1])return 0;jQuery('input[name="item_meta['+d+'][form]"]').length&&(d=c[2].replace("[",""),h=!0);"other"===d&&(d=h?c[3].replace("[",""):c[1].replace("[",""));!0===b&&(d=d===c[0]?d+"-"+c[1].replace("[",""):d+"-"+c[0]+"-"+c[1].replace("[",""));return d}function l(a,b){var c=a.getAttribute("data-frmfile");if("hidden"===a.type&&null===c)return b;var d="",h="";if("checkbox"===a.type||"radio"===a.type)c=jQuery('input[name="'+a.name+'"]').closest(".frm_required_field").find("input:checked"),
3
- jQuery(c).each(function(){d=this.value});else if("file"===a.type||c)"undefined"===typeof c&&(c=f(a,!0),c=c.replace("file","")),"undefined"===typeof b[c]&&(d=n(c)),h=c;else{c=a.className;if(-1!==c.indexOf("frm_pos_none"))return b;d=jQuery(a).val();if(null===d)d="";else if("string"!==typeof d){h=d;d="";for(var k=0;k<h.length;k++)""!==h[k]&&(d=h[k])}h=-1===c.indexOf("frm_other_input")?f(a,!0):f(a,!1);-1!==c.indexOf("frm_time_select")&&(h=h.replace("-H","").replace("-m",""))}""===d&&(""===h&&(h=f(a,!0)),
4
- h in b||(b[h]=p(a,"data-reqmsg")));return b}function n(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 q(a,b,c){var d=a.value,h=f(a,!0);if(h in b)return b;var k=0===h.indexOf("conf_");if(""!==d||k){var g=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i,e=p(a,"data-invmsg");""!==
5
- d&&!1===g.test(d)?(b[h]=e,k&&(b[h.replace("conf_","")]="")):k&&(a=a.name.replace("conf_",""),c.filter('[name="'+a+'"]').val()!==d&&(b[h]="",b[h.replace("conf_","")]=""))}return b}function v(a,b){var c=a.value;""!==c&&!1!==isNaN(c/1)&&(c=f(a,!0),c in b||(b[c]=p(a,"data-invmsg")));return b}function w(a,b){var c=a.value,d=p(a,"pattern");if(""!==d&&""!==c){var h=f(a,!0);h in b||(d=new RegExp("^"+d+"$","i"),!1===d.test(c)&&(b[h]=p(a,"data-invmsg")))}return b}function x(a,b){if(!a.className.includes("frm_strong_pass"))return b;
6
- if(!/^(?=.*?[a-z])(?=.*?[A-Z])(?=.*[^a-zA-Z0-9])(?=.*?[0-9]).{8,}$/.test(a.value)){var c=f(a,!0);b[c]=p(a,"data-invmsg")}return b}function p(a,b){var c=a.getAttribute(b);null===c&&(c="");return c}function D(a,b){"undefined"===typeof b&&jQuery(a).find('input[name="frm_action"]').val();var c=jQuery(a).find(".frm_form_field");c.addClass("frm_doing_ajax");jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:jQuery(a).serialize()+"&action=frm_entries_"+b+"&nonce="+frm_js.nonce,success:function(b){var d={content:"",
7
- errors:{},pass:!1};null===b&&(b=d);b=b.replace(/^\s+|\s+$/g,"");b=0===b.indexOf("{")?jQuery.parseJSON(b):d;if("undefined"!==typeof b.redirect)jQuery(document).trigger("frmBeforeFormRedirect",[a,b]),window.location=b.redirect;else if(""!==b.content){t(jQuery(a));-1!=frm_js.offset&&frmFrontForm.scrollMsg(jQuery(a),!1);var k=jQuery(a).find('input[name="form_id"]').val();b.content=b.content.replace(/ frm_pro_form /g," frm_pro_form frm_no_hide ");d=jQuery(a).closest(".frm_forms");var g=jQuery(".frm_end_ajax_"+
8
- k);g.length&&(d.nextUntil(".frm_end_ajax_"+k).remove(),g.remove());d.replaceWith(b.content);d=b;if(history.pushState&&"undefined"!==typeof d.page){var e=d.page;g=encodeURI("frm_page");e=encodeURI(e);for(var f=document.location.search.substr(1).split("&"),l=f.length,m;l--;)if(m=f[l].split("="),m[0]==g){m[1]=e;f[l]=m.join("=");break}0>l&&(f[f.length]=[g,e].join("="));g=f.join("&");window.history.pushState({html:d.html},"","?"+g)}"function"===typeof frmThemeOverride_frmAfterSubmit&&(k=jQuery('input[name="frm_page_order_'+
9
- k+'"]').val(),d=jQuery(b.content).find('input[name="form_id"]').val(),frmThemeOverride_frmAfterSubmit(d,k,b.content,a));jQuery(b.content).find(".frm_message").length?jQuery(document).trigger("frmFormComplete",[a,b]):jQuery(document).trigger("frmPageChanged",[a,b])}else if(Object.keys(b.errors).length){t(jQuery(a),"enable");d=!0;y();g=!1;for(k in b.errors)e=jQuery(a).find("#frm_field_"+k+"_container"),e.length&&(e.is(":visible")||(f=e.closest(".frm_toggle_container"),f.length&&(f=f.prev(),f.hasClass("frm_trigger")||
10
- (f=f.prev(".frm_trigger")),f.click())),e.is(":visible")&&(u(e,k,b.errors),d=!1,e=jQuery(a).find("#frm_field_"+k+"_container .frm-g-recaptcha, #frm_field_"+k+"_container .g-recaptcha"),e.length&&(g=!0,e=e.data("rid"),jQuery().grecaptcha&&(e?grecaptcha.reset(e):grecaptcha.reset()))));jQuery(document).trigger("frmFormErrors",[a,b]);c.removeClass("frm_doing_ajax");z(a);!0!==g&&A(a,!1);d?a.submit():jQuery(a).prepend(b.error_message)}else E(a),A(a,!0),a.submit()},error:function(){jQuery(a).find('input[type="submit"], input[type="button"]').removeAttr("disabled");
11
- a.submit()}})}function u(a,b,c){a.length&&a.is(":visible")&&(a.addClass("frm_blank_field"),"function"===typeof frmThemeOverride_frmPlaceError?frmThemeOverride_frmPlaceError(b,c):a.append('<div class="frm_error">'+c[b]+"</div>"),jQuery(document).trigger("frmAddFieldError",[a,b,c]))}function y(){jQuery(".form-field").removeClass("frm_blank_field has-error");jQuery(".form-field .frm_error").replaceWith("");jQuery(".frm_error_style").remove()}function z(a){var b=jQuery(a).find(".frm_blank_field:first");
12
- b.length&&frmFrontForm.scrollMsg(b,a,!0)}function B(a){a.hasClass("frm_loading_form")||(a.addClass("frm_loading_form"),a.trigger("frmStartFormLoading"));a.find('input[type="submit"], input[type="button"], button[type="submit"]').attr("disabled","disabled")}function t(a,b,c){0<c||(a.removeClass("frm_loading_form"),a.trigger("frmEndFormLoading"),"enable"===b&&a.find('input[type="submit"], input[type="button"], button[type="submit"]').removeAttr("disabled"))}function E(a){var b=document.getElementById("frm_loading");
13
- null!==b&&(a=jQuery(a).find("input[type=file]").val(),"undefined"!==typeof a&&""!==a&&setTimeout(function(){jQuery(b).fadeIn("slow")},2E3))}function A(a,b){var c=jQuery(a).find(".frm-g-recaptcha, .g-recaptcha");c.length&&(!b||1>jQuery(a).find(".frm_next_page").length||1>jQuery(a).find(".frm_next_page").val())&&c.closest(".frm_form_field").replaceWith('<input type="hidden" name="recaptcha_checked" value="'+frm_js.nonce+'">')}function F(){C(jQuery(this),"clear")}function G(){C(jQuery(this),"replace")}
14
- function C(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 H(){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)}});
15
- return!1}function I(){var a=jQuery(this).data("frmconfirm");return confirm(a)}function J(){var a=jQuery(this).data("frmtoggle");jQuery(a).is(":visible")?jQuery(a).slideUp("fast"):jQuery(a).slideDown("fast");return!1}function K(){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 L(){"function"!==typeof String.prototype.trim&&(String.prototype.trim=
16
- function(){return this.replace(/^\s+|\s+$/g,"")})}function M(){Array.prototype.filter||(Array.prototype.filter=function(a,b){if(void 0===this||null===this)throw new TypeError;var c=Object(this),d=c.length>>>0;if("function"!==typeof a)throw new TypeError;for(var e=[],f=0;f<d;f++)if(f in c){var g=c[f];a.call(b,g,f,c)&&e.push(g)}return e})}function N(){Object.keys||(Object.keys=function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b})}var r="",m=[];return{init:function(){jQuery(document).off("submit.formidable",
17
- ".frm-show-form");jQuery(document).on("submit.formidable",".frm-show-form",frmFrontForm.submitForm);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",F);jQuery(document).on("blur",".frm_toggle_default",G);jQuery(".frm_toggle_default").blur();jQuery(document.getElementById("frm_resend_email")).click(H);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"]',
18
- frmFrontForm.fieldValueChanged);jQuery(document).on("change keyup",".frm-show-form .frm_inside_container input, .frm-show-form .frm_inside_container select, .frm-show-form .frm_inside_container textarea",e);jQuery(document).on("click","a[data-frmconfirm]",I);jQuery("a[data-frmtoggle]").click(J);K();L();M();N()},getFieldId:function(a,b){return f(a,b)},renderRecaptcha:function(a){var b=a.getAttribute("data-size"),c={sitekey:a.getAttribute("data-sitekey"),size:b,theme:a.getAttribute("data-theme")};if("invisible"===
19
- b){var d=jQuery(a).closest("form").find('input[name="form_id"]').val();c.callback=function(a){frmFrontForm.afterRecaptcha(a,d)}}b=grecaptcha.render(a.id,c);a.setAttribute("data-rid",b)},afterSingleRecaptcha:function(a){a=jQuery(".frm-show-form .g-recaptcha").closest("form")[0];frmFrontForm.submitFormNow(a)},afterRecaptcha:function(a,b){var c=jQuery("#frm_form_"+b+"_container form")[0];frmFrontForm.submitFormNow(c)},submitForm:function(a){frmFrontForm.submitFormManual(a,this)},submitFormManual:function(a,
20
- b){if("undefined"!==typeof frmProForm&&frmProForm.goingToPreviousPage(b))var c=!1;else{var d=jQuery(b).find('.frm-g-recaptcha[data-size="invisible"], .g-recaptcha[data-size="invisible"]');d.length?(c=d.data("rid"),c=0===grecaptcha.getResponse(c).length?d:!1):c=!1}d=b.className.trim().split(/\s+/gi);d&&1>c.length&&!(-1<d.indexOf("frm_pro_form"))||jQuery("body").hasClass("wp-admin")||(a.preventDefault(),c.length?(d=c.data("rid"),grecaptcha.reset(d),grecaptcha.execute(d)):(c=frmFrontForm.validateFormSubmit(b),
21
- 0===Object.keys(c).length&&(B(jQuery(b)),frmFrontForm.submitFormNow(b,d))))},submitFormNow:function(a){-1<a.className.trim().split(/\s+/gi).indexOf("frm_ajax_submit")?1>jQuery(a).find('input[type="file"]').filter(function(){return!!this.value}).length?(r=jQuery(a).find('input[name="frm_action"]').val(),frmFrontForm.checkFormErrors(a,r)):a.submit():a.submit()},validateFormSubmit:function(a){"undefined"!==typeof tinyMCE&&jQuery(a).find(".wp-editor-wrap").length&&tinyMCE.triggerSave();m=[];var b=jQuery(a).hasClass("frm_js_validate");
22
- b&&"undefined"!==typeof frmProForm&&(frmProForm.savingDraft(a)||frmProForm.goingToPreviousPage(a))&&(b=!1);b&&(frmFrontForm.getAjaxFormErrors(a),Object.keys(m).length&&frmFrontForm.addAjaxFormErrors(a));return m},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=l(c[d],b);c=jQuery(a).find("input[type=email]").filter(":visible");
23
- d=jQuery(a).find("input,select,textarea");if(d.length){e=0;for(var f=d.length;e<f;e++){var g=d[e];""!==g.value&&"hidden"!==g.type&&("number"===g.type?b=v(g,b):"email"===g.type?b=q(g,b,c):"password"===g.type?b=x(g,b):null!==g.pattern&&(b=w(g,b)))}}c=jQuery(a).find(".frm-g-recaptcha");c.length&&(d=c.data("rid"),0===grecaptcha.getResponse(d).length&&(c=c.closest(".frm_form_field").attr("id").replace("frm_field_","").replace("_container",""),b[c]=""));m=b;if("function"===typeof frmThemeOverride_jsErrors&&
24
- (r=jQuery(a).find('input[name="frm_action"]').val(),a=frmThemeOverride_jsErrors(r,a),Object.keys(a).length))for(var n in a)m[n]=a[n];return m},addAjaxFormErrors:function(a){y();for(var b in m){var c=jQuery(a).find("#frm_field_"+b+"_container");c.length?u(c,b,m):delete m[b]}z(a)},checkFormErrors:function(a,b){D(a,b)},checkRequiredField:function(a,b){return l(a,b)},showSubmitLoading:function(a){B(a)},removeSubmitLoading:function(a,b,c){t(a,b,c)},scrollToID:function(a){a=jQuery(document.getElementById(a));
25
- frmFrontForm.scrollMsg(a,!1)},scrollMsg:function(a,b,c){if("undefined"===typeof b){if(a=jQuery(document.getElementById("frm_form_"+a+"_container")),1>a.length)return}else a="string"===typeof a?jQuery(b).find("#frm_field_"+a+"_container"):a;if(a=a.offset().top){a-=frm_js.offset;b=jQuery("html").css("margin-top");var d=jQuery("body").css("margin-top");if(b||d)a=a-parseInt(b)-parseInt(d);if(a&&window.innerHeight&&(b=document.documentElement.scrollTop||document.body.scrollTop,a>b+window.innerHeight||
26
- a<b))return"undefined"===typeof c?jQuery(window).scrollTop(a):jQuery("html,body").animate({scrollTop:a},500),!1}},fieldValueChanged:function(a){var b=frmFrontForm.getFieldId(this,!1);if(b&&"undefined"!==typeof b&&(!a.frmTriggered||a.frmTriggered!=b)&&(jQuery(document).trigger("frmFieldChanged",[this,b,a]),!0!==a.selfTriggered&&jQuery(this).closest("form").hasClass("frm_js_validate"))){a=[];b=jQuery(this).closest(".frm_form_field");b.hasClass("frm_required_field")&&!jQuery(this).hasClass("frm_optional")&&
27
- (a=l(this,a));if(1>a.length)if("email"===this.type){var c=jQuery(this).closest("form").find("input[type=email]");a=q(this,a,c)}else"number"===this.type?a=v(this,a):"password"===this.type?a=x(this,a):null!==this.pattern&&(a=w(this,a));b.removeClass("frm_blank_field has-error");b.find(".frm_error").remove();if(0<Object.keys(a).length)for(var d in a)u(b,d,a)}},savingDraft:function(a){console.warn("DEPRECATED: function frmFrontForm.savingDraft in v3.0 use frmProForm.savingDraft");if("undefined"!==typeof frmProForm)return frmProForm.savingDraft(a)},
28
- goingToPreviousPage:function(a){console.warn("DEPRECATED: function frmFrontForm.goingToPreviousPage in v3.0 use frmProForm.goingToPreviousPage");if("undefined"!==typeof frmProForm)return frmProForm.goingToPreviousPage(a)},hideOrShowFields:function(a,b){console.warn("DEPRECATED: function frmFrontForm.hideOrShowFields in v3.0 use frmProForm.hideOrShowFields");"undefined"!==typeof frmProForm&&frmProForm.hideOrShowFields()},hidePreviouslyHiddenFields:function(){console.warn("DEPRECATED: function frmFrontForm.hidePreviouslyHiddenFields in v3.0 use frmProForm.hidePreviouslyHiddenFields");
29
- "undefined"!==typeof frmProForm&&frmProForm.hidePreviouslyHiddenFields()},checkDependentDynamicFields:function(a){console.warn("DEPRECATED: function frmFrontForm.checkDependentDynamicFields in v3.0 use frmProForm.checkDependentDynamicFields");"undefined"!==typeof frmProForm&&frmProForm.checkDependentDynamicFields(a)},checkDependentLookupFields:function(a){console.warn("DEPRECATED: function frmFrontForm.checkDependentLookupFields in v3.0 use frmProForm.checkDependentLookupFields");"undefined"!==typeof frmProForm&&
30
- frmProForm.checkDependentLookupFields(a)},loadGoogle:function(){console.warn("DEPRECATED: function frmFrontForm.loadGoogle in v3.0 use frmProForm.loadGoogle");frmProForm.loadGoogle()},removeUsedTimes:function(a,b){console.warn("DEPRECATED: function frmFrontForm.removeUsedTimes in v3.0 use frmProForm.removeUsedTimes");"undefined"!==typeof frmProForm&&frmProForm.removeUsedTimes()},escapeHtml:function(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,
31
- "&#039;")},invisible:function(a){jQuery(a).css("visibility","hidden")},visible:function(a){jQuery(a).css("visibility","visible")}}}var frmFrontForm=frmFrontFormJS();jQuery(document).ready(function(e){frmFrontForm.init()});function frmRecaptcha(){for(var e=jQuery(".frm-g-recaptcha"),f=0,l=e.length;f<l;f++)frmFrontForm.renderRecaptcha(e[f])}function frmAfterRecaptcha(e){frmFrontForm.afterSingleRecaptcha(e)}
 
32
  function frmUpdateField(e,f,l,n,q){jQuery(document.getElementById("frm_update_field_"+e+"_"+f+"_"+q)).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:e,field_id:f,value:l,nonce:frm_js.nonce},success:function(){""===n.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById("frm_update_field_"+e+"_"+f+"_"+q)).fadeOut("slow"):jQuery(document.getElementById("frm_update_field_"+e+"_"+f+"_"+q)).replaceWith(n)}})}
33
  function frmDeleteEntry(e,f){console.warn("DEPRECATED: function frmDeleteEntry in v2.0.13 use frmFrontForm.deleteEntry");jQuery(document.getElementById("frm_delete_"+e)).replaceWith('<span class="frm-loading-img" id="frm_delete_'+e+'"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_destroy",entry:e,nonce:frm_js.nonce},success:function(l){"success"===l.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById(f+e)).fadeOut("slow"):jQuery(document.getElementById("frm_delete_"+
34
  e)).replaceWith(l)}})}function frmOnSubmit(e){console.warn("DEPRECATED: function frmOnSubmit in v2.0 use frmFrontForm.submitForm");frmFrontForm.submitForm(e,this)}
1
  function frmFrontFormJS(){function e(){var a=jQuery(this),b=a.closest(".frm_inside_container").find("label.frm_primary_label");0<a.val().length?b.addClass("frm_visible"):b.removeClass("frm_visible")}function f(a,b){var c="";c=a instanceof jQuery?a.attr("name"):a.name;if(""===c)return c=a instanceof jQuery?a.data("name"):a.getAttribute("data-name"),""!==c&&c?c:0;c=c.replace("item_meta[","").replace("[]","").split("]");if(1>c.length)return 0;c=c.filter(function(a){return""!==a});var d=c[0],h=!1;if(1===
2
  c.length)return d;if("[form"===c[1]||"[row_ids"===c[1])return 0;jQuery('input[name="item_meta['+d+'][form]"]').length&&(d=c[2].replace("[",""),h=!0);"other"===d&&(d=h?c[3].replace("[",""):c[1].replace("[",""));!0===b&&(d=d===c[0]?d+"-"+c[1].replace("[",""):d+"-"+c[0]+"-"+c[1].replace("[",""));return d}function l(a,b){var c=a.getAttribute("data-frmfile");if("hidden"===a.type&&null===c)return b;var d="",h="";if("checkbox"===a.type||"radio"===a.type)c=jQuery('input[name="'+a.name+'"]').closest(".frm_required_field").find("input:checked"),
3
+ jQuery(c).each(function(){d=this.value});else if("file"===a.type||c)"undefined"===typeof c&&(c=f(a,!0),c=c.replace("file","")),"undefined"===typeof b[c]&&(d=n(c)),h=c;else{c=a.className;if(-1!==c.indexOf("frm_pos_none"))return b;d=jQuery(a).val();if(null===d)d="";else if("string"!==typeof d){h=d;d="";for(var k=0;k<h.length;k++)""!==h[k]&&(d=h[k])}h=-1===c.indexOf("frm_other_input")?f(a,!0):f(a,!1);-1!==c.indexOf("frm_time_select")&&(h=h.replace("-H","").replace("-m",""));c=a.getAttribute("data-frmplaceholder");
4
+ null!==c&&d===c&&(d="")}""===d&&(""===h&&(h=f(a,!0)),h in b||(b[h]=p(a,"data-reqmsg")));return b}function n(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 q(a,b,c){var d=a.value,h=f(a,!0);if(h in b)return b;var k=0===h.indexOf("conf_");if(""!==d||k){var g=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i,
5
+ e=p(a,"data-invmsg");""!==d&&!1===g.test(d)?(b[h]=e,k&&(b[h.replace("conf_","")]="")):k&&(a=a.name.replace("conf_",""),c.filter('[name="'+a+'"]').val()!==d&&(b[h]="",b[h.replace("conf_","")]=""))}return b}function v(a,b){var c=a.value;""!==c&&!1!==isNaN(c/1)&&(c=f(a,!0),c in b||(b[c]=p(a,"data-invmsg")));return b}function w(a,b){var c=a.value,d=p(a,"pattern");if(""!==d&&""!==c){var h=f(a,!0);h in b||(d=new RegExp("^"+d+"$","i"),!1===d.test(c)&&(b[h]=p(a,"data-invmsg")))}return b}function x(a,b){if(0>
6
+ a.className.indexOf("frm_strong_pass"))return b;if(!/^(?=.*?[a-z])(?=.*?[A-Z])(?=.*[^a-zA-Z0-9])(?=.*?[0-9]).{8,}$/.test(a.value)){var c=f(a,!0);b[c]=p(a,"data-invmsg")}return b}function p(a,b){var c=a.getAttribute(b);null===c&&(c="");return c}function D(a,b){"undefined"===typeof b&&jQuery(a).find('input[name="frm_action"]').val();var c=jQuery(a).find(".frm_form_field");c.addClass("frm_doing_ajax");jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:jQuery(a).serialize()+"&action=frm_entries_"+b+"&nonce="+
7
+ frm_js.nonce,success:function(b){var d={content:"",errors:{},pass:!1};null===b&&(b=d);b=b.replace(/^\s+|\s+$/g,"");b=0===b.indexOf("{")?jQuery.parseJSON(b):d;if("undefined"!==typeof b.redirect)jQuery(document).trigger("frmBeforeFormRedirect",[a,b]),window.location=b.redirect;else if(""!==b.content){t(jQuery(a));-1!=frm_js.offset&&frmFrontForm.scrollMsg(jQuery(a),!1);var k=jQuery(a).find('input[name="form_id"]').val();b.content=b.content.replace(/ frm_pro_form /g," frm_pro_form frm_no_hide ");d=jQuery(a).closest(".frm_forms");
8
+ var g=jQuery(".frm_end_ajax_"+k);g.length&&(d.nextUntil(".frm_end_ajax_"+k).remove(),g.remove());d.replaceWith(b.content);d=b;if(history.pushState&&"undefined"!==typeof d.page){var e=d.page;g=encodeURI("frm_page");e=encodeURI(e);for(var f=document.location.search.substr(1).split("&"),l=f.length,m;l--;)if(m=f[l].split("="),m[0]==g){m[1]=e;f[l]=m.join("=");break}0>l&&(f[f.length]=[g,e].join("="));g=f.join("&");window.history.pushState({html:d.html},"","?"+g)}"function"===typeof frmThemeOverride_frmAfterSubmit&&
9
+ (k=jQuery('input[name="frm_page_order_'+k+'"]').val(),d=jQuery(b.content).find('input[name="form_id"]').val(),frmThemeOverride_frmAfterSubmit(d,k,b.content,a));jQuery(b.content).find(".frm_message").length?jQuery(document).trigger("frmFormComplete",[a,b]):jQuery(document).trigger("frmPageChanged",[a,b])}else if(Object.keys(b.errors).length){t(jQuery(a),"enable");d=!0;y();g=!1;for(k in b.errors)e=jQuery(a).find("#frm_field_"+k+"_container"),e.length&&(e.is(":visible")||(f=e.closest(".frm_toggle_container"),
10
+ f.length&&(f=f.prev(),f.hasClass("frm_trigger")||(f=f.prev(".frm_trigger")),f.click())),e.is(":visible")&&(u(e,k,b.errors),d=!1,e=jQuery(a).find("#frm_field_"+k+"_container .frm-g-recaptcha, #frm_field_"+k+"_container .g-recaptcha"),e.length&&(g=!0,e=e.data("rid"),jQuery().grecaptcha&&(e?grecaptcha.reset(e):grecaptcha.reset()))));jQuery(document).trigger("frmFormErrors",[a,b]);c.removeClass("frm_doing_ajax");z(a);!0!==g&&A(a,!1);d?a.submit():jQuery(a).prepend(b.error_message)}else E(a),A(a,!0),a.submit()},
11
+ error:function(){jQuery(a).find('input[type="submit"], input[type="button"]').removeAttr("disabled");a.submit()}})}function u(a,b,c){a.length&&a.is(":visible")&&(a.addClass("frm_blank_field"),"function"===typeof frmThemeOverride_frmPlaceError?frmThemeOverride_frmPlaceError(b,c):a.append('<div class="frm_error">'+c[b]+"</div>"),jQuery(document).trigger("frmAddFieldError",[a,b,c]))}function y(){jQuery(".form-field").removeClass("frm_blank_field has-error");jQuery(".form-field .frm_error").replaceWith("");
12
+ jQuery(".frm_error_style").remove()}function z(a){var b=jQuery(a).find(".frm_blank_field:first");b.length&&frmFrontForm.scrollMsg(b,a,!0)}function B(a){a.hasClass("frm_loading_form")||(a.addClass("frm_loading_form"),a.trigger("frmStartFormLoading"));a.find('input[type="submit"], input[type="button"], button[type="submit"]').attr("disabled","disabled")}function t(a,b,c){0<c||(a.removeClass("frm_loading_form"),a.trigger("frmEndFormLoading"),"enable"===b&&a.find('input[type="submit"], input[type="button"], button[type="submit"]').removeAttr("disabled"))}
13
+ function E(a){var b=document.getElementById("frm_loading");null!==b&&(a=jQuery(a).find("input[type=file]").val(),"undefined"!==typeof a&&""!==a&&setTimeout(function(){jQuery(b).fadeIn("slow")},2E3))}function A(a,b){var c=jQuery(a).find(".frm-g-recaptcha, .g-recaptcha");c.length&&(!b||1>jQuery(a).find(".frm_next_page").length||1>jQuery(a).find(".frm_next_page").val())&&c.closest(".frm_form_field").replaceWith('<input type="hidden" name="recaptcha_checked" value="'+frm_js.nonce+'">')}function F(){C(jQuery(this),
14
+ "clear")}function G(){C(jQuery(this),"replace")}function C(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 H(){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",
15
+ entry_id:b,form_id:c,nonce:frm_js.nonce},success:function(b){a.replaceWith(b)}});return!1}function I(){var a=jQuery(this).data("frmconfirm");return confirm(a)}function J(){var a=jQuery(this).data("frmtoggle");jQuery(a).is(":visible")?jQuery(a).slideUp("fast"):jQuery(a).slideDown("fast");return!1}function K(){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;
16
+ return-1})}function L(){"function"!==typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")})}function M(){Array.prototype.filter||(Array.prototype.filter=function(a,b){if(void 0===this||null===this)throw new TypeError;var c=Object(this),d=c.length>>>0;if("function"!==typeof a)throw new TypeError;for(var e=[],f=0;f<d;f++)if(f in c){var g=c[f];a.call(b,g,f,c)&&e.push(g)}return e})}function N(){Object.keys||(Object.keys=function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&
17
+ b.push(c);return b})}var r="",m=[];return{init:function(){jQuery(document).off("submit.formidable",".frm-show-form");jQuery(document).on("submit.formidable",".frm-show-form",frmFrontForm.submitForm);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",F);jQuery(document).on("blur",".frm_toggle_default",G);jQuery(".frm_toggle_default").blur();jQuery(document.getElementById("frm_resend_email")).click(H);
18
+ 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"]',frmFrontForm.fieldValueChanged);jQuery(document).on("change keyup",".frm-show-form .frm_inside_container input, .frm-show-form .frm_inside_container select, .frm-show-form .frm_inside_container textarea",e);jQuery(document).on("click","a[data-frmconfirm]",I);jQuery("a[data-frmtoggle]").click(J);K();L();M();N()},getFieldId:function(a,b){return f(a,
19
+ b)},renderRecaptcha:function(a){var b=a.getAttribute("data-size"),c={sitekey:a.getAttribute("data-sitekey"),size:b,theme:a.getAttribute("data-theme")};if("invisible"===b){var d=jQuery(a).closest("form").find('input[name="form_id"]').val();c.callback=function(a){frmFrontForm.afterRecaptcha(a,d)}}b=grecaptcha.render(a.id,c);a.setAttribute("data-rid",b)},afterSingleRecaptcha:function(a){a=jQuery(".frm-show-form .g-recaptcha").closest("form")[0];frmFrontForm.submitFormNow(a)},afterRecaptcha:function(a,
20
+ b){var c=jQuery("#frm_form_"+b+"_container form")[0];frmFrontForm.submitFormNow(c)},submitForm:function(a){frmFrontForm.submitFormManual(a,this)},submitFormManual:function(a,b){if("undefined"!==typeof frmProForm&&frmProForm.goingToPreviousPage(b))var c=!1;else{var d=jQuery(b).find('.frm-g-recaptcha[data-size="invisible"], .g-recaptcha[data-size="invisible"]');d.length?(c=d.data("rid"),c=0===grecaptcha.getResponse(c).length?d:!1):c=!1}d=b.className.trim().split(/\s+/gi);d&&1>c.length&&!(-1<d.indexOf("frm_pro_form"))||
21
+ jQuery("body").hasClass("wp-admin")||(a.preventDefault(),"undefined"!==typeof frmProForm&&"function"===typeof frmProForm.submitAllowed&&!frmProForm.submitAllowed(b))||(c.length?(d=c.data("rid"),grecaptcha.reset(d),grecaptcha.execute(d)):(c=frmFrontForm.validateFormSubmit(b),0===Object.keys(c).length&&(B(jQuery(b)),frmFrontForm.submitFormNow(b,d))))},submitFormNow:function(a){-1<a.className.trim().split(/\s+/gi).indexOf("frm_ajax_submit")?1>jQuery(a).find('input[type="file"]').filter(function(){return!!this.value}).length?
22
+ (r=jQuery(a).find('input[name="frm_action"]').val(),frmFrontForm.checkFormErrors(a,r)):a.submit():a.submit()},validateFormSubmit:function(a){"undefined"!==typeof tinyMCE&&jQuery(a).find(".wp-editor-wrap").length&&tinyMCE.triggerSave();m=[];var b=jQuery(a).hasClass("frm_js_validate");b&&"undefined"!==typeof frmProForm&&(frmProForm.savingDraft(a)||frmProForm.goingToPreviousPage(a))&&(b=!1);b&&(frmFrontForm.getAjaxFormErrors(a),Object.keys(m).length&&frmFrontForm.addAjaxFormErrors(a));return m},getAjaxFormErrors:function(a){var b=
23
+ [],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=l(c[d],b);c=jQuery(a).find("input[type=email]").filter(":visible");d=jQuery(a).find("input,select,textarea");if(d.length){e=0;for(var f=d.length;e<f;e++){var g=d[e];""!==g.value&&"hidden"!==g.type&&("number"===g.type?b=v(g,b):"email"===g.type?b=q(g,b,c):"password"===g.type?b=x(g,b):null!==g.pattern&&
24
+ (b=w(g,b)))}}c=jQuery(a).find(".frm-g-recaptcha");c.length&&(d=c.data("rid"),0===grecaptcha.getResponse(d).length&&(c=c.closest(".frm_form_field").attr("id").replace("frm_field_","").replace("_container",""),b[c]=""));m=b;if("function"===typeof frmThemeOverride_jsErrors&&(r=jQuery(a).find('input[name="frm_action"]').val(),a=frmThemeOverride_jsErrors(r,a),Object.keys(a).length))for(var n in a)m[n]=a[n];return m},addAjaxFormErrors:function(a){y();for(var b in m){var c=jQuery(a).find("#frm_field_"+b+
25
+ "_container");c.length?u(c,b,m):delete m[b]}z(a)},checkFormErrors:function(a,b){D(a,b)},checkRequiredField:function(a,b){return l(a,b)},showSubmitLoading:function(a){B(a)},removeSubmitLoading:function(a,b,c){t(a,b,c)},scrollToID:function(a){a=jQuery(document.getElementById(a));frmFrontForm.scrollMsg(a,!1)},scrollMsg:function(a,b,c){if("undefined"===typeof b){if(a=jQuery(document.getElementById("frm_form_"+a+"_container")),1>a.length)return}else a="string"===typeof a?jQuery(b).find("#frm_field_"+a+
26
+ "_container"):a;if(a=a.offset().top){a-=frm_js.offset;b=jQuery("html").css("margin-top");var d=jQuery("body").css("margin-top");if(b||d)a=a-parseInt(b)-parseInt(d);if(a&&window.innerHeight&&(b=document.documentElement.scrollTop||document.body.scrollTop,a>b+window.innerHeight||a<b))return"undefined"===typeof c?jQuery(window).scrollTop(a):jQuery("html,body").animate({scrollTop:a},500),!1}},fieldValueChanged:function(a){var b=frmFrontForm.getFieldId(this,!1);if(b&&"undefined"!==typeof b&&(!a.frmTriggered||
27
+ a.frmTriggered!=b)&&(jQuery(document).trigger("frmFieldChanged",[this,b,a]),!0!==a.selfTriggered&&jQuery(this).closest("form").hasClass("frm_js_validate"))){a=[];b=jQuery(this).closest(".frm_form_field");b.hasClass("frm_required_field")&&!jQuery(this).hasClass("frm_optional")&&(a=l(this,a));if(1>a.length)if("email"===this.type){var c=jQuery(this).closest("form").find("input[type=email]");a=q(this,a,c)}else"number"===this.type?a=v(this,a):"password"===this.type?a=x(this,a):null!==this.pattern&&(a=
28
+ w(this,a));b.removeClass("frm_blank_field has-error");b.find(".frm_error").remove();if(0<Object.keys(a).length)for(var d in a)u(b,d,a)}},savingDraft:function(a){console.warn("DEPRECATED: function frmFrontForm.savingDraft in v3.0 use frmProForm.savingDraft");if("undefined"!==typeof frmProForm)return frmProForm.savingDraft(a)},goingToPreviousPage:function(a){console.warn("DEPRECATED: function frmFrontForm.goingToPreviousPage in v3.0 use frmProForm.goingToPreviousPage");if("undefined"!==typeof frmProForm)return frmProForm.goingToPreviousPage(a)},
29
+ hideOrShowFields:function(a,b){console.warn("DEPRECATED: function frmFrontForm.hideOrShowFields in v3.0 use frmProForm.hideOrShowFields");"undefined"!==typeof frmProForm&&frmProForm.hideOrShowFields()},hidePreviouslyHiddenFields:function(){console.warn("DEPRECATED: function frmFrontForm.hidePreviouslyHiddenFields in v3.0 use frmProForm.hidePreviouslyHiddenFields");"undefined"!==typeof frmProForm&&frmProForm.hidePreviouslyHiddenFields()},checkDependentDynamicFields:function(a){console.warn("DEPRECATED: function frmFrontForm.checkDependentDynamicFields in v3.0 use frmProForm.checkDependentDynamicFields");
30
+ "undefined"!==typeof frmProForm&&frmProForm.checkDependentDynamicFields(a)},checkDependentLookupFields:function(a){console.warn("DEPRECATED: function frmFrontForm.checkDependentLookupFields in v3.0 use frmProForm.checkDependentLookupFields");"undefined"!==typeof frmProForm&&frmProForm.checkDependentLookupFields(a)},loadGoogle:function(){console.warn("DEPRECATED: function frmFrontForm.loadGoogle in v3.0 use frmProForm.loadGoogle");frmProForm.loadGoogle()},removeUsedTimes:function(a,b){console.warn("DEPRECATED: function frmFrontForm.removeUsedTimes in v3.0 use frmProForm.removeUsedTimes");
31
+ "undefined"!==typeof frmProForm&&frmProForm.removeUsedTimes()},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(e){frmFrontForm.init()});
32
+ function frmRecaptcha(){for(var e=jQuery(".frm-g-recaptcha"),f=0,l=e.length;f<l;f++)frmFrontForm.renderRecaptcha(e[f])}function frmAfterRecaptcha(e){frmFrontForm.afterSingleRecaptcha(e)}
33
  function frmUpdateField(e,f,l,n,q){jQuery(document.getElementById("frm_update_field_"+e+"_"+f+"_"+q)).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:e,field_id:f,value:l,nonce:frm_js.nonce},success:function(){""===n.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById("frm_update_field_"+e+"_"+f+"_"+q)).fadeOut("slow"):jQuery(document.getElementById("frm_update_field_"+e+"_"+f+"_"+q)).replaceWith(n)}})}
34
  function frmDeleteEntry(e,f){console.warn("DEPRECATED: function frmDeleteEntry in v2.0.13 use frmFrontForm.deleteEntry");jQuery(document.getElementById("frm_delete_"+e)).replaceWith('<span class="frm-loading-img" id="frm_delete_'+e+'"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_destroy",entry:e,nonce:frm_js.nonce},success:function(l){"success"===l.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById(f+e)).fadeOut("slow"):jQuery(document.getElementById("frm_delete_"+
35
  e)).replaceWith(l)}})}function frmOnSubmit(e){console.warn("DEPRECATED: function frmOnSubmit in v2.0 use frmFrontForm.submitForm");frmFrontForm.submitForm(e,this)}
js/formidable_admin.js CHANGED
@@ -3254,7 +3254,7 @@ function frmAdminBuildJS(){
3254
  var $navCont = document.getElementById('frm_nav_container');
3255
  if ( $navCont !== null ) {
3256
  var $titleDiv = document.getElementsByClassName('wp-header-end')[0];
3257
- if ( $titleDiv === null ) {
3258
  $titleDiv = document.getElementById('titlediv');
3259
  } else {
3260
  $titleDiv = $titleDiv.parentNode;
3254
  var $navCont = document.getElementById('frm_nav_container');
3255
  if ( $navCont !== null ) {
3256
  var $titleDiv = document.getElementsByClassName('wp-header-end')[0];
3257
+ if ( $titleDiv === null || typeof $titleDiv === 'undefined' ) {
3258
  $titleDiv = document.getElementById('titlediv');
3259
  } else {
3260
  $titleDiv = $titleDiv.parentNode;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: contact form, form builder, custom form, forms, form, form maker, form cre
4
  Requires at least: 4.4
5
  Tested up to: 4.9.5
6
  Requires PHP: 5.3
7
- Stable tag: 3.02
8
 
9
  The best WordPress forms plugin for custom forms. Go beyond contact forms with a drag & drop form builder, HTML control & form style generator
10
 
@@ -107,6 +107,7 @@ Other WordPress form builder plugins only let you collect data. But our Pro form
107
  * [Polylang Forms](https://formidableforms.com/downloads/polylang/ "Polylang Forms"). Create bilingual or multilingual forms with help from Polylang.
108
  * [Bootstrap Form Styles](https://formidableforms.com/downloads/bootstrap/ "Bootstrap Form Styles"). Instantly add Bootstrap styling to all your Formidable forms.
109
  * [Bootstrap Modal Form](https://formidableforms.com/downloads/bootstrap-modal/ "Bootstrap Modal Form"). Open forms, views, other shortcodes, or sections of content in a Bootstrap modal popup.
 
110
  * [Zapier Forms](https://formidableforms.com/downloads/zapier/ "Zapier Forms"). Connect with hundreds of different applications through Zapier. Insert a new row in a Google docs spreadsheet, post on Twitter, or add a new Dropbox file with your form.
111
 
112
  Learn more at [Formidable Forms](https://formidableforms.com/ "Formidable Forms")
@@ -159,13 +160,20 @@ The field and form names and descriptions are all changed with in-place edit. Ju
159
  [See more FAQs](https://formidableforms.com/formidable-faqs/ "Formidable Form FAQs")
160
 
161
  == Changelog ==
 
 
 
 
 
 
 
162
  = 3.02 =
163
  * New: Add support for WordPress export and erase personal data options for easier GDPR support
164
  * Fix: HTML was getting stripped in field labels when a form was edited on the form builder page
165
  * Fix: If a field option includes HTML, allow the HTML rather than sanitizing it with entities
166
  * Fix: When the 'add option' button on the form builder is clicked multiple times, add the options correctly if the previous option isn't yes showing in the form maker
167
  * Fix: The HTML for the link to the user profile was showing in the sidebar when editing or viewing an entry
168
- * Code change: Move input classes into the field object class so it can be more easily overridden and amended. The FrmFieldType->get_input_class() function can be overriden in sub classes
169
 
170
  = 3.01.03 =
171
  * Fix: Add responsive styling for the .frm_four_col class when grids are disabled
4
  Requires at least: 4.4
5
  Tested up to: 4.9.5
6
  Requires PHP: 5.3
7
+ Stable tag: 3.02.01
8
 
9
  The best WordPress forms plugin for custom forms. Go beyond contact forms with a drag & drop form builder, HTML control & form style generator
10
 
107
  * [Polylang Forms](https://formidableforms.com/downloads/polylang/ "Polylang Forms"). Create bilingual or multilingual forms with help from Polylang.
108
  * [Bootstrap Form Styles](https://formidableforms.com/downloads/bootstrap/ "Bootstrap Form Styles"). Instantly add Bootstrap styling to all your Formidable forms.
109
  * [Bootstrap Modal Form](https://formidableforms.com/downloads/bootstrap-modal/ "Bootstrap Modal Form"). Open forms, views, other shortcodes, or sections of content in a Bootstrap modal popup.
110
+ * [Salesforce Forms](https://formidableforms.com/downloads/salesforce/ "Salesforce Forms"). Create leads, contacts, and any other Salesforce objects directly from your WordPress forms.
111
  * [Zapier Forms](https://formidableforms.com/downloads/zapier/ "Zapier Forms"). Connect with hundreds of different applications through Zapier. Insert a new row in a Google docs spreadsheet, post on Twitter, or add a new Dropbox file with your form.
112
 
113
  Learn more at [Formidable Forms](https://formidableforms.com/ "Formidable Forms")
160
  [See more FAQs](https://formidableforms.com/formidable-faqs/ "Formidable Form FAQs")
161
 
162
  == Changelog ==
163
+ = 3.02.01 =
164
+ * Fix: Allow the heading class and ids to stay for the sidebar form widget. The headings were missing a class and not the same as other headings in some themes.
165
+ * Fix: If all form templates are deleted, keep the 'templates' nav item so new templates can still be created.
166
+ * Fix: When creating a new form, don't include trashed form templates in the form template options
167
+ * Fix: Remove outdated sslverify references
168
+ * Fix: The sample form for the form styler didn't have a great layout when CSS grids were turned on
169
+
170
  = 3.02 =
171
  * New: Add support for WordPress export and erase personal data options for easier GDPR support
172
  * Fix: HTML was getting stripped in field labels when a form was edited on the form builder page
173
  * Fix: If a field option includes HTML, allow the HTML rather than sanitizing it with entities
174
  * Fix: When the 'add option' button on the form builder is clicked multiple times, add the options correctly if the previous option isn't yes showing in the form maker
175
  * Fix: The HTML for the link to the user profile was showing in the sidebar when editing or viewing an entry
176
+ * Code change: Move input classes into the field object class so it can be more easily overridden and amended. The FrmFieldType->get_input_class() function can be overridden in sub classes
177
 
178
  = 3.01.03 =
179
  * Fix: Add responsive styling for the .frm_four_col class when grids are disabled