Formidable Forms – Form Builder for WordPress - Version 3.01

Version Description

  • New: Added frm_js_location hook for saving the combined javascript file in a different location
  • New: Added frm_include_field_in_content hook for excluding fields in the default email message
  • Tweak: Process shortcodes inside the form validation messages
  • Tweak: Reduce page load time by not autoloading the saved form styling from the database. In most cases, this data is saved in the CSS file, and doesn't need to be retrieved from the database.
  • Fix: The Invisible reCaptcha wasn't being validated correctly in contact forms when the Pro version was not running.
  • Fix: Run the server-side form validation on a number field that uses 0 for the minimum value. This was being skipped.
  • Fix: Show the label above a dropdown field if the label position is set to inside since dropdown placeholders are not yet supported. Plus, don't show the Inside label position option for any fields that don't allow placeholders.
  • Fix: If there is an error during a database update, make sure it can try again in the future
  • Fix: Prevent more conflicts with Divi when editing some posts with forms
  • Fix: Fields without CSS grids were not aligning correctly with left, right, or inline labels
Download this release

Release Info

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

Code changes from version 3.0.06 to 3.01

classes/controllers/FrmAppController.php CHANGED
@@ -358,9 +358,12 @@ class FrmAppController {
358
  load_plugin_textdomain( 'formidable', false, FrmAppHelper::plugin_folder() . '/languages/' );
359
  }
360
 
361
- /**
362
- * Filter shortcodes in text widgets
363
- */
 
 
 
364
  public static function widget_text_filter( $content ) {
365
  _deprecated_function( __METHOD__, '2.5.4' );
366
  $regex = '/\[\s*(formidable|display-frm-data|frm-stats|frm-graph|frm-entry-links|formresults|frm-search)\s+.*\]/';
@@ -369,6 +372,9 @@ class FrmAppController {
369
 
370
  /**
371
  * Deprecated in favor of wpmu_upgrade_site
 
 
 
372
  */
373
  public static function front_head() {
374
  _deprecated_function( __FUNCTION__, '2.3' );
@@ -430,8 +436,8 @@ class FrmAppController {
430
  public static function api_install() {
431
  if ( self::needs_update() ) {
432
  $running = get_option( 'frm_install_running' );
433
- if ( false === $running ) {
434
- update_option( 'frm_install_running', true );
435
  self::install();
436
  delete_option( 'frm_install_running' );
437
  }
@@ -450,6 +456,10 @@ class FrmAppController {
450
  wp_die();
451
  }
452
 
 
 
 
 
453
  public static function activation_install() {
454
  _deprecated_function( __METHOD__, '3.0.04', 'FrmAppController::install' );
455
  FrmDb::delete_cache_and_transient( 'frm_plugin_version' );
@@ -485,7 +495,12 @@ class FrmAppController {
485
  return $tables;
486
  }
487
 
488
- // Routes for wordpress pages -- we're just replacing content here folks.
 
 
 
 
 
489
  public static function page_route( $content ) {
490
  _deprecated_function( __METHOD__, '3.0' );
491
  global $post;
@@ -523,6 +538,10 @@ class FrmAppController {
523
  return $text;
524
  }
525
 
 
 
 
 
526
  public static function get_form_shortcode( $atts ) {
527
  _deprecated_function( __FUNCTION__, '1.07.05', 'FrmFormsController::get_form_shortcode()' );
528
  return FrmFormsController::get_form_shortcode( $atts );
358
  load_plugin_textdomain( 'formidable', false, FrmAppHelper::plugin_folder() . '/languages/' );
359
  }
360
 
361
+ /**
362
+ * Filter shortcodes in text widgets
363
+ *
364
+ * @deprecated 2.5.4
365
+ * @codeCoverageIgnore
366
+ */
367
  public static function widget_text_filter( $content ) {
368
  _deprecated_function( __METHOD__, '2.5.4' );
369
  $regex = '/\[\s*(formidable|display-frm-data|frm-stats|frm-graph|frm-entry-links|formresults|frm-search)\s+.*\]/';
372
 
373
  /**
374
  * Deprecated in favor of wpmu_upgrade_site
375
+ *
376
+ * @deprecated 2.3
377
+ * @codeCoverageIgnore
378
  */
379
  public static function front_head() {
380
  _deprecated_function( __FUNCTION__, '2.3' );
436
  public static function api_install() {
437
  if ( self::needs_update() ) {
438
  $running = get_option( 'frm_install_running' );
439
+ if ( false === $running || $running < strtotime( '-5 minutes' ) ) {
440
+ update_option( 'frm_install_running', time(), 'no' );
441
  self::install();
442
  delete_option( 'frm_install_running' );
443
  }
456
  wp_die();
457
  }
458
 
459
+ /**
460
+ * @deprecated 3.0.04
461
+ * @codeCoverageIgnore
462
+ */
463
  public static function activation_install() {
464
  _deprecated_function( __METHOD__, '3.0.04', 'FrmAppController::install' );
465
  FrmDb::delete_cache_and_transient( 'frm_plugin_version' );
495
  return $tables;
496
  }
497
 
498
+ /**
499
+ * Routes for wordpress pages -- we're just replacing content
500
+ *
501
+ * @deprecated 3.0
502
+ * @codeCoverageIgnore
503
+ */
504
  public static function page_route( $content ) {
505
  _deprecated_function( __METHOD__, '3.0' );
506
  global $post;
538
  return $text;
539
  }
540
 
541
+ /**
542
+ * @deprecated 1.07.05
543
+ * @codeCoverageIgnore
544
+ */
545
  public static function get_form_shortcode( $atts ) {
546
  _deprecated_function( __FUNCTION__, '1.07.05', 'FrmFormsController::get_form_shortcode()' );
547
  return FrmFormsController::get_form_shortcode( $atts );
classes/controllers/FrmEntriesController.php CHANGED
@@ -132,34 +132,50 @@ class FrmEntriesController {
132
  continue;
133
  }
134
 
135
- if ( $form_col->type == 'form' && isset( $form_col->field_options['form_select'] ) && ! empty( $form_col->field_options['form_select'] ) ) {
136
- $sub_form_cols = FrmField::get_all_for_form( $form_col->field_options['form_select'] );
137
-
138
- if ( $sub_form_cols ) {
139
- foreach ( $sub_form_cols as $k => $sub_form_col ) {
140
- if ( FrmField::is_no_save_field( $sub_form_col->type ) ) {
141
- unset( $sub_form_cols[ $k ] );
142
- continue;
143
- }
144
- $columns[ $form_id . '_' . $sub_form_col->field_key . '-_-' . $form_col->id ] = FrmAppHelper::truncate( $sub_form_col->name, 35 );
145
- unset( $sub_form_col );
146
- }
147
- }
148
- unset( $sub_form_cols );
149
  } else {
150
- $col_id = $form_col->field_key;
151
- if ( $form_col->form_id != $form_id ) {
152
- $col_id .= '-_-form' . $form_col->form_id;
153
- }
154
 
155
- $has_separate_value = ! FrmField::is_option_empty( $form_col, 'separate_value' );
156
- $is_post_status = FrmField::is_option_true( $form_col, 'post_field' ) && $form_col->field_options['post_field'] == 'post_status';
157
- if ( $has_separate_value && ! $is_post_status ) {
158
- $columns[ $form_id . '_frmsep_' . $col_id ] = FrmAppHelper::truncate( $form_col->name, 35 );
159
- }
160
- $columns[ $form_id . '_' . $col_id ] = FrmAppHelper::truncate( $form_col->name, 35 );
 
 
 
 
 
 
 
161
  }
 
 
 
 
 
 
 
 
 
 
 
 
162
  }
 
 
 
 
 
 
 
 
163
  }
164
 
165
  private static function maybe_add_ip_col( $form_id, &$columns ) {
@@ -457,7 +473,6 @@ class FrmEntriesController {
457
  wp_die( $frm_settings->admin_permission );
458
  }
459
 
460
- global $wpdb;
461
  $params = FrmForm::get_admin_params();
462
  $message = '';
463
  $errors = array();
@@ -475,8 +490,7 @@ class FrmEntriesController {
475
  }
476
  }
477
 
478
- $wpdb->query( $wpdb->prepare( "DELETE em.* FROM {$wpdb->prefix}frm_item_metas as em INNER JOIN {$wpdb->prefix}frm_items as e on (em.item_id=e.id) and form_id=%d", $form_id ) );
479
- $results = $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}frm_items WHERE form_id=%d", $form_id ) );
480
  if ( $results ) {
481
  FrmEntry::clear_cache();
482
  $message = __( 'Entries were Successfully Destroyed', 'formidable' );
@@ -488,11 +502,59 @@ class FrmEntriesController {
488
  self::display_list( $message, $errors );
489
  }
490
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
491
  public static function show_form( $id = '', $key = '', $title = false, $description = false ) {
492
  _deprecated_function( __FUNCTION__, '1.07.05', 'FrmFormsController::show_form()' );
493
  return FrmFormsController::show_form( $id, $key, $title, $description );
494
  }
495
 
 
 
 
 
496
  public static function get_form( $filename, $form, $title, $description ) {
497
  _deprecated_function( __FUNCTION__, '1.07.05', 'FrmFormsController::get_form()' );
498
  return FrmFormsController::get_form( $form, $title, $description );
132
  continue;
133
  }
134
 
135
+ $has_child_fields = $form_col->type == 'form' && isset( $form_col->field_options['form_select'] ) && ! empty( $form_col->field_options['form_select'] );
136
+ if ( $has_child_fields ) {
137
+ self::add_subform_cols( $form_col, $form_id, $columns );
 
 
 
 
 
 
 
 
 
 
 
138
  } else {
139
+ self::add_field_cols( $form_col, $form_id, $columns );
140
+ }
141
+ }
142
+ }
143
 
144
+ /**
145
+ * @since 3.01
146
+ */
147
+ private static function add_subform_cols( $field, $form_id, &$columns ) {
148
+ $sub_form_cols = FrmField::get_all_for_form( $field->field_options['form_select'] );
149
+ if ( empty( $sub_form_cols ) ) {
150
+ return;
151
+ }
152
+
153
+ foreach ( $sub_form_cols as $k => $sub_form_col ) {
154
+ if ( FrmField::is_no_save_field( $sub_form_col->type ) ) {
155
+ unset( $sub_form_cols[ $k ] );
156
+ continue;
157
  }
158
+ $columns[ $form_id . '_' . $sub_form_col->field_key . '-_-' . $field->id ] = FrmAppHelper::truncate( $sub_form_col->name, 35 );
159
+ unset( $sub_form_col );
160
+ }
161
+ }
162
+
163
+ /**
164
+ * @since 3.01
165
+ */
166
+ private static function add_field_cols( $field, $form_id, &$columns ) {
167
+ $col_id = $field->field_key;
168
+ if ( $field->form_id != $form_id ) {
169
+ $col_id .= '-_-form' . $field->form_id;
170
  }
171
+
172
+ $has_separate_value = ! FrmField::is_option_empty( $field, 'separate_value' );
173
+ $is_post_status = FrmField::is_option_true( $field, 'post_field' ) && $field->field_options['post_field'] == 'post_status';
174
+ if ( $has_separate_value && ! $is_post_status ) {
175
+ $columns[ $form_id . '_frmsep_' . $col_id ] = FrmAppHelper::truncate( $field->name, 35 );
176
+ }
177
+
178
+ $columns[ $form_id . '_' . $col_id ] = FrmAppHelper::truncate( $field->name, 35 );
179
  }
180
 
181
  private static function maybe_add_ip_col( $form_id, &$columns ) {
473
  wp_die( $frm_settings->admin_permission );
474
  }
475
 
 
476
  $params = FrmForm::get_admin_params();
477
  $message = '';
478
  $errors = array();
490
  }
491
  }
492
 
493
+ $results = self::delete_form_entries( $form_id );
 
494
  if ( $results ) {
495
  FrmEntry::clear_cache();
496
  $message = __( 'Entries were Successfully Destroyed', 'formidable' );
502
  self::display_list( $message, $errors );
503
  }
504
 
505
+ /**
506
+ * @since 3.01
507
+ * @param int $form_id
508
+ */
509
+ private static function delete_form_entries( $form_id ) {
510
+ global $wpdb;
511
+
512
+ $form_ids = self::get_child_form_ids( $form_id );
513
+
514
+ $meta_query = $wpdb->prepare( "DELETE em.* FROM {$wpdb->prefix}frm_item_metas as em INNER JOIN {$wpdb->prefix}frm_items as e on (em.item_id=e.id) WHERE form_id=%d", $form_id );
515
+ $entry_query = $wpdb->prepare( "DELETE FROM {$wpdb->prefix}frm_items WHERE form_id=%d", $form_id );
516
+
517
+ if ( ! empty( $form_ids ) ) {
518
+ $form_query = ' OR form_id in (' . $form_ids . ')';
519
+ $meta_query .= $form_query;
520
+ $entry_query .= $form_query;
521
+ }
522
+
523
+ $wpdb->query( $meta_query );
524
+ return $wpdb->query( $entry_query );
525
+ }
526
+
527
+ /**
528
+ * @since 3.01
529
+ * @param int $form_id
530
+ * @param bool|string $implode
531
+ */
532
+ private static function get_child_form_ids( $form_id, $implode = ',' ) {
533
+ $form_ids = array();
534
+ $child_form_ids = FrmDb::get_col( 'frm_forms', array( 'parent_form_id' => $form_id ) );
535
+ if ( $child_form_ids ) {
536
+ $form_ids = $child_form_ids;
537
+ }
538
+ $form_ids = array_filter( $form_ids, 'is_numeric' );
539
+ if ( $implode ) {
540
+ $form_ids = implode( $implode, $form_ids );
541
+ }
542
+ return $form_ids;
543
+ }
544
+
545
+ /**
546
+ * @deprecated 1.07.05
547
+ * @codeCoverageIgnore
548
+ */
549
  public static function show_form( $id = '', $key = '', $title = false, $description = false ) {
550
  _deprecated_function( __FUNCTION__, '1.07.05', 'FrmFormsController::show_form()' );
551
  return FrmFormsController::show_form( $id, $key, $title, $description );
552
  }
553
 
554
+ /**
555
+ * @deprecated 1.07.05
556
+ * @codeCoverageIgnore
557
+ */
558
  public static function get_form( $filename, $form, $title, $description ) {
559
  _deprecated_function( __FUNCTION__, '1.07.05', 'FrmFormsController::get_form()' );
560
  return FrmFormsController::get_form( $form, $title, $description );
classes/controllers/FrmFieldsController.php CHANGED
@@ -91,6 +91,10 @@ class FrmFieldsController {
91
  return $field;
92
  }
93
 
 
 
 
 
94
  public static function edit_name( $field = 'name', $id = '' ) {
95
  _deprecated_function( __FUNCTION__, '3.0' );
96
 
@@ -175,6 +179,9 @@ class FrmFieldsController {
175
  /**
176
  * Load a single field in the form builder along with all needed variables
177
  *
 
 
 
178
  * @param int $field_id
179
  * @param array $values
180
  * @param int $form_id
@@ -300,10 +307,18 @@ class FrmFieldsController {
300
  wp_die();
301
  }
302
 
 
 
 
 
303
  public static function edit_option() {
304
  _deprecated_function( __FUNCTION__, '2.3' );
305
  }
306
 
 
 
 
 
307
  public static function delete_option() {
308
  _deprecated_function( __FUNCTION__, '2.3' );
309
  }
91
  return $field;
92
  }
93
 
94
+ /**
95
+ * @deprecated 3.0
96
+ * @codeCoverageIgnore
97
+ */
98
  public static function edit_name( $field = 'name', $id = '' ) {
99
  _deprecated_function( __FUNCTION__, '3.0' );
100
 
179
  /**
180
  * Load a single field in the form builder along with all needed variables
181
  *
182
+ * @deprecated 3.0
183
+ * @codeCoverageIgnore
184
+ *
185
  * @param int $field_id
186
  * @param array $values
187
  * @param int $form_id
307
  wp_die();
308
  }
309
 
310
+ /**
311
+ * @deprecated 2.3
312
+ * @codeCoverageIgnore
313
+ */
314
  public static function edit_option() {
315
  _deprecated_function( __FUNCTION__, '2.3' );
316
  }
317
 
318
+ /**
319
+ * @deprecated 2.3
320
+ * @codeCoverageIgnore
321
+ */
322
  public static function delete_option() {
323
  _deprecated_function( __FUNCTION__, '2.3' );
324
  }
classes/controllers/FrmFormsController.php CHANGED
@@ -37,6 +37,17 @@ class FrmFormsController {
37
  register_widget('FrmShowForm');
38
  }
39
 
 
 
 
 
 
 
 
 
 
 
 
40
  public static function list_form() {
41
  FrmAppHelper::permission_check('frm_view_forms');
42
 
@@ -163,35 +174,6 @@ class FrmFormsController {
163
  return self::get_settings_vars( $id, array(), $message );
164
  }
165
 
166
- public static function edit_key() {
167
- _deprecated_function( __METHOD__, '3.0' );
168
- $values = self::edit_in_place_value( 'form_key' );
169
- echo wp_kses( stripslashes( FrmForm::get_key_by_id( $values['form_id'] ) ), array() );
170
- wp_die();
171
- }
172
-
173
- public static function edit_description() {
174
- _deprecated_function( __METHOD__, '3.0' );
175
- $values = self::edit_in_place_value( 'description' );
176
- echo wp_kses_post( FrmAppHelper::use_wpautop( stripslashes( $values['description'] ) ) );
177
- wp_die();
178
- }
179
-
180
- private static function edit_in_place_value( $field ) {
181
- _deprecated_function( __METHOD__, '3.0' );
182
- check_ajax_referer( 'frm_ajax', 'nonce' );
183
- FrmAppHelper::permission_check('frm_edit_forms', 'hide');
184
-
185
- $form_id = FrmAppHelper::get_post_param( 'form_id', '', 'absint' );
186
- $value = FrmAppHelper::get_post_param( 'update_value', '', 'wp_filter_post_kses' );
187
-
188
- $values = array( $field => trim( $value ) );
189
- FrmForm::update( $form_id, $values );
190
- $values['form_id'] = $form_id;
191
-
192
- return $values;
193
- }
194
-
195
  public static function update( $values = array() ) {
196
  if ( empty( $values ) ) {
197
  $values = $_POST;
@@ -388,13 +370,6 @@ class FrmFormsController {
388
  require( FrmAppHelper::plugin_path() . '/classes/views/frm-entries/direct.php' );
389
  }
390
 
391
- public static function register_pro_scripts() {
392
- _deprecated_function( __FUNCTION__, '2.03', 'FrmProEntriesController::register_scripts' );
393
- if ( FrmAppHelper::pro_is_installed() ) {
394
- FrmProEntriesController::register_scripts();
395
- }
396
- }
397
-
398
  public static function untrash() {
399
  self::change_form_status( 'untrash' );
400
  }
@@ -964,6 +939,10 @@ class FrmFormsController {
964
  return $errors;
965
  }
966
 
 
 
 
 
967
  public static function add_default_templates( $path, $default = true, $template = true ) {
968
  _deprecated_function( __FUNCTION__, '1.07.05', 'FrmXMLController::add_default_templates()' );
969
 
@@ -1634,6 +1613,10 @@ class FrmFormsController {
1634
  return isset( $atts['minimize'] ) && ! empty( $atts['minimize'] );
1635
  }
1636
 
 
 
 
 
1637
  public static function bulk_create_template( $ids ) {
1638
  _deprecated_function( __METHOD__, '3.0', 'FrmForm::duplicate( $id, true, true )' );
1639
  FrmAppHelper::permission_check( 'frm_edit_forms' );
@@ -1644,4 +1627,56 @@ class FrmFormsController {
1644
 
1645
  return __( 'Form template was Successfully Created', 'formidable' );
1646
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1647
  }
37
  register_widget('FrmShowForm');
38
  }
39
 
40
+ /**
41
+ * By default, Divi processes form shortcodes on the edit post page.
42
+ * Now that won't do.
43
+ *
44
+ * @since 3.01
45
+ */
46
+ public static function prevent_divi_conflict( $shortcodes ) {
47
+ $shortcodes[] = 'formidable';
48
+ return $shortcodes;
49
+ }
50
+
51
  public static function list_form() {
52
  FrmAppHelper::permission_check('frm_view_forms');
53
 
174
  return self::get_settings_vars( $id, array(), $message );
175
  }
176
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  public static function update( $values = array() ) {
178
  if ( empty( $values ) ) {
179
  $values = $_POST;
370
  require( FrmAppHelper::plugin_path() . '/classes/views/frm-entries/direct.php' );
371
  }
372
 
 
 
 
 
 
 
 
373
  public static function untrash() {
374
  self::change_form_status( 'untrash' );
375
  }
939
  return $errors;
940
  }
941
 
942
+ /**
943
+ * @deprecated 1.07.05
944
+ * @codeCoverageIgnore
945
+ */
946
  public static function add_default_templates( $path, $default = true, $template = true ) {
947
  _deprecated_function( __FUNCTION__, '1.07.05', 'FrmXMLController::add_default_templates()' );
948
 
1613
  return isset( $atts['minimize'] ) && ! empty( $atts['minimize'] );
1614
  }
1615
 
1616
+ /**
1617
+ * @deprecated 3.0
1618
+ * @codeCoverageIgnore
1619
+ */
1620
  public static function bulk_create_template( $ids ) {
1621
  _deprecated_function( __METHOD__, '3.0', 'FrmForm::duplicate( $id, true, true )' );
1622
  FrmAppHelper::permission_check( 'frm_edit_forms' );
1627
 
1628
  return __( 'Form template was Successfully Created', 'formidable' );
1629
  }
1630
+
1631
+ /**
1632
+ * @deprecated 2.03
1633
+ * @codeCoverageIgnore
1634
+ */
1635
+ public static function register_pro_scripts() {
1636
+ _deprecated_function( __FUNCTION__, '2.03', 'FrmProEntriesController::register_scripts' );
1637
+ if ( FrmAppHelper::pro_is_installed() ) {
1638
+ FrmProEntriesController::register_scripts();
1639
+ }
1640
+ }
1641
+
1642
+ /**
1643
+ * @deprecated 3.0
1644
+ * @codeCoverageIgnore
1645
+ */
1646
+ public static function edit_key() {
1647
+ _deprecated_function( __METHOD__, '3.0' );
1648
+ $values = self::edit_in_place_value( 'form_key' );
1649
+ echo wp_kses( stripslashes( FrmForm::get_key_by_id( $values['form_id'] ) ), array() );
1650
+ wp_die();
1651
+ }
1652
+
1653
+ /**
1654
+ * @deprecated 3.0
1655
+ * @codeCoverageIgnore
1656
+ */
1657
+ public static function edit_description() {
1658
+ _deprecated_function( __METHOD__, '3.0' );
1659
+ $values = self::edit_in_place_value( 'description' );
1660
+ echo wp_kses_post( FrmAppHelper::use_wpautop( stripslashes( $values['description'] ) ) );
1661
+ wp_die();
1662
+ }
1663
+
1664
+ /**
1665
+ * @deprecated 3.0
1666
+ * @codeCoverageIgnore
1667
+ */
1668
+ private static function edit_in_place_value( $field ) {
1669
+ _deprecated_function( __METHOD__, '3.0' );
1670
+ check_ajax_referer( 'frm_ajax', 'nonce' );
1671
+ FrmAppHelper::permission_check('frm_edit_forms', 'hide');
1672
+
1673
+ $form_id = FrmAppHelper::get_post_param( 'form_id', '', 'absint' );
1674
+ $value = FrmAppHelper::get_post_param( 'update_value', '', 'wp_filter_post_kses' );
1675
+
1676
+ $values = array( $field => trim( $value ) );
1677
+ FrmForm::update( $form_id, $values );
1678
+ $values['form_id'] = $form_id;
1679
+
1680
+ return $values;
1681
+ }
1682
  }
classes/controllers/FrmHooksController.php CHANGED
@@ -110,6 +110,7 @@ class FrmHooksController {
110
  add_filter( 'set-screen-option', 'FrmFormsController::save_per_page', 10, 3 );
111
  add_action( 'admin_footer', 'FrmFormsController::insert_form_popup' );
112
  add_action( 'media_buttons', 'FrmFormsController::insert_form_button' );
 
113
 
114
  // Forms Model
115
  add_action( 'frm_after_duplicate_form', 'FrmForm::after_duplicate', 10, 2 );
110
  add_filter( 'set-screen-option', 'FrmFormsController::save_per_page', 10, 3 );
111
  add_action( 'admin_footer', 'FrmFormsController::insert_form_popup' );
112
  add_action( 'media_buttons', 'FrmFormsController::insert_form_button' );
113
+ add_action( 'et_pb_admin_excluded_shortcodes', 'FrmFormsController::prevent_divi_conflict' );
114
 
115
  // Forms Model
116
  add_action( 'frm_after_duplicate_form', 'FrmForm::after_duplicate', 10, 2 );
classes/helpers/FrmAppHelper.php CHANGED
@@ -11,7 +11,7 @@ class FrmAppHelper {
11
  /**
12
  * @since 2.0
13
  */
14
- public static $plug_version = '3.0.06';
15
 
16
  /**
17
  * @since 1.07.02
@@ -386,11 +386,13 @@ class FrmAppHelper {
386
  }
387
  }
388
 
 
 
 
 
389
  public static function sanitize_array( &$values ) {
390
- $temp_values = $values;
391
- foreach ( $temp_values as $k => $val ) {
392
- $values[ $k ] = wp_kses_post( $val );
393
- }
394
  }
395
 
396
  /**
@@ -583,10 +585,10 @@ class FrmAppHelper {
583
  * @since 3.0
584
  */
585
  public static function save_combined_js() {
586
- $file_atts = array(
587
  'file_name' => 'frm.min.js',
588
  'new_file_path' => FrmAppHelper::plugin_path() . '/js',
589
- );
590
  $new_file = new FrmCreateFile( $file_atts );
591
 
592
  $files = array(
@@ -612,6 +614,9 @@ class FrmAppHelper {
612
 
613
  /**
614
  * Used to filter shortcode in text widgets
 
 
 
615
  */
616
  public static function widget_text_filter_callback( $matches ) {
617
  _deprecated_function( __METHOD__, '2.5.4' );
@@ -1765,6 +1770,7 @@ class FrmAppHelper {
1765
  *
1766
  * @since 2.0.6
1767
  * @deprecated 2.05.06
 
1768
  */
1769
  public static function save_settings( $settings, $group ) {
1770
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
@@ -1780,6 +1786,7 @@ class FrmAppHelper {
1780
  *
1781
  * @since 2.0.4
1782
  * @deprecated 2.05.06
 
1783
  */
1784
  public static function save_json_post( $settings ) {
1785
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
@@ -1791,6 +1798,7 @@ class FrmAppHelper {
1791
  *
1792
  * @since 2.0
1793
  * @deprecated 2.05.06
 
1794
  *
1795
  * @param string $cache_key The unique name for this cache
1796
  * @param string $group The name of the cache group
@@ -1805,6 +1813,7 @@ class FrmAppHelper {
1805
 
1806
  /**
1807
  * @deprecated 2.05.06
 
1808
  */
1809
  public static function set_cache( $cache_key, $results, $group = '', $time = 300 ) {
1810
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
@@ -1815,12 +1824,17 @@ class FrmAppHelper {
1815
  * Keep track of the keys cached in each group so they can be deleted
1816
  * in Redis and Memcache
1817
  * @deprecated 2.05.06
 
1818
  */
1819
  public static function add_key_to_group_cache( $key, $group ) {
1820
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
1821
  FrmDb::add_key_to_group_cache( $key, $group );
1822
  }
1823
 
 
 
 
 
1824
  public static function get_group_cached_keys( $group ) {
1825
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
1826
  return FrmDb::get_group_cached_keys( $group );
@@ -1829,6 +1843,7 @@ class FrmAppHelper {
1829
  /**
1830
  * @since 2.0
1831
  * @deprecated 2.05.06
 
1832
  * @return mixed The cached value or false
1833
  */
1834
  public static function check_cache_and_transient( $cache_key ) {
@@ -1839,6 +1854,7 @@ class FrmAppHelper {
1839
  /**
1840
  * @since 2.0
1841
  * @deprecated 2.05.06
 
1842
  * @param string $cache_key
1843
  */
1844
  public static function delete_cache_and_transient( $cache_key, $group = 'default' ) {
@@ -1849,6 +1865,7 @@ class FrmAppHelper {
1849
  /**
1850
  * @since 2.0
1851
  * @deprecated 2.05.06
 
1852
  *
1853
  * @param string $group The name of the cache group
1854
  */
@@ -1862,6 +1879,7 @@ class FrmAppHelper {
1862
  *
1863
  * @since 1.07.10
1864
  * @deprecated 2.05.06
 
1865
  *
1866
  * @param string $term The value to escape
1867
  * @return string The escaped value
@@ -1874,6 +1892,7 @@ class FrmAppHelper {
1874
  /**
1875
  * @param string $order_query
1876
  * @deprecated 2.05.06
 
1877
  */
1878
  public static function esc_order( $order_query ) {
1879
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
@@ -1883,6 +1902,7 @@ class FrmAppHelper {
1883
  /**
1884
  * Make sure this is ordering by either ASC or DESC
1885
  * @deprecated 2.05.06
 
1886
  */
1887
  public static function esc_order_by( &$order_by ) {
1888
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
@@ -1892,6 +1912,7 @@ class FrmAppHelper {
1892
  /**
1893
  * @param string $limit
1894
  * @deprecated 2.05.06
 
1895
  */
1896
  public static function esc_limit( $limit ) {
1897
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
@@ -1902,6 +1923,7 @@ class FrmAppHelper {
1902
  * Get an array of values ready to go through $wpdb->prepare
1903
  * @since 2.0
1904
  * @deprecated 2.05.06
 
1905
  */
1906
  public static function prepare_array_values( $array, $type = '%s' ) {
1907
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
@@ -1910,6 +1932,7 @@ class FrmAppHelper {
1910
 
1911
  /**
1912
  * @deprecated 2.05.06
 
1913
  */
1914
  public static function prepend_and_or_where( $starts_with = ' WHERE ', $where = '' ) {
1915
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
11
  /**
12
  * @since 2.0
13
  */
14
+ public static $plug_version = '3.01';
15
 
16
  /**
17
  * @since 1.07.02
386
  }
387
  }
388
 
389
+ /**
390
+ * @deprecated 3.01
391
+ * @codeCoverageIgnore
392
+ */
393
  public static function sanitize_array( &$values ) {
394
+ _deprecated_function( __METHOD__, '3.01', 'FrmAppHelper::sanitize_value' );
395
+ self::sanitize_value( 'wp_kses_post', $values );
 
 
396
  }
397
 
398
  /**
585
  * @since 3.0
586
  */
587
  public static function save_combined_js() {
588
+ $file_atts = apply_filters( 'frm_js_location', array(
589
  'file_name' => 'frm.min.js',
590
  'new_file_path' => FrmAppHelper::plugin_path() . '/js',
591
+ ) );
592
  $new_file = new FrmCreateFile( $file_atts );
593
 
594
  $files = array(
614
 
615
  /**
616
  * Used to filter shortcode in text widgets
617
+ *
618
+ * @deprecated 2.5.4
619
+ * @codeCoverageIgnore
620
  */
621
  public static function widget_text_filter_callback( $matches ) {
622
  _deprecated_function( __METHOD__, '2.5.4' );
1770
  *
1771
  * @since 2.0.6
1772
  * @deprecated 2.05.06
1773
+ * @codeCoverageIgnore
1774
  */
1775
  public static function save_settings( $settings, $group ) {
1776
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
1786
  *
1787
  * @since 2.0.4
1788
  * @deprecated 2.05.06
1789
+ * @codeCoverageIgnore
1790
  */
1791
  public static function save_json_post( $settings ) {
1792
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
1798
  *
1799
  * @since 2.0
1800
  * @deprecated 2.05.06
1801
+ * @codeCoverageIgnore
1802
  *
1803
  * @param string $cache_key The unique name for this cache
1804
  * @param string $group The name of the cache group
1813
 
1814
  /**
1815
  * @deprecated 2.05.06
1816
+ * @codeCoverageIgnore
1817
  */
1818
  public static function set_cache( $cache_key, $results, $group = '', $time = 300 ) {
1819
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
1824
  * Keep track of the keys cached in each group so they can be deleted
1825
  * in Redis and Memcache
1826
  * @deprecated 2.05.06
1827
+ * @codeCoverageIgnore
1828
  */
1829
  public static function add_key_to_group_cache( $key, $group ) {
1830
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
1831
  FrmDb::add_key_to_group_cache( $key, $group );
1832
  }
1833
 
1834
+ /**
1835
+ * @deprecated 2.05.06
1836
+ * @codeCoverageIgnore
1837
+ */
1838
  public static function get_group_cached_keys( $group ) {
1839
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
1840
  return FrmDb::get_group_cached_keys( $group );
1843
  /**
1844
  * @since 2.0
1845
  * @deprecated 2.05.06
1846
+ * @codeCoverageIgnore
1847
  * @return mixed The cached value or false
1848
  */
1849
  public static function check_cache_and_transient( $cache_key ) {
1854
  /**
1855
  * @since 2.0
1856
  * @deprecated 2.05.06
1857
+ * @codeCoverageIgnore
1858
  * @param string $cache_key
1859
  */
1860
  public static function delete_cache_and_transient( $cache_key, $group = 'default' ) {
1865
  /**
1866
  * @since 2.0
1867
  * @deprecated 2.05.06
1868
+ * @codeCoverageIgnore
1869
  *
1870
  * @param string $group The name of the cache group
1871
  */
1879
  *
1880
  * @since 1.07.10
1881
  * @deprecated 2.05.06
1882
+ * @codeCoverageIgnore
1883
  *
1884
  * @param string $term The value to escape
1885
  * @return string The escaped value
1892
  /**
1893
  * @param string $order_query
1894
  * @deprecated 2.05.06
1895
+ * @codeCoverageIgnore
1896
  */
1897
  public static function esc_order( $order_query ) {
1898
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
1902
  /**
1903
  * Make sure this is ordering by either ASC or DESC
1904
  * @deprecated 2.05.06
1905
+ * @codeCoverageIgnore
1906
  */
1907
  public static function esc_order_by( &$order_by ) {
1908
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
1912
  /**
1913
  * @param string $limit
1914
  * @deprecated 2.05.06
1915
+ * @codeCoverageIgnore
1916
  */
1917
  public static function esc_limit( $limit ) {
1918
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
1923
  * Get an array of values ready to go through $wpdb->prepare
1924
  * @since 2.0
1925
  * @deprecated 2.05.06
1926
+ * @codeCoverageIgnore
1927
  */
1928
  public static function prepare_array_values( $array, $type = '%s' ) {
1929
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
1932
 
1933
  /**
1934
  * @deprecated 2.05.06
1935
+ * @codeCoverageIgnore
1936
  */
1937
  public static function prepend_and_or_where( $starts_with = ' WHERE ', $where = '' ) {
1938
  _deprecated_function( __METHOD__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
classes/helpers/FrmFieldsHelper.php CHANGED
@@ -322,6 +322,9 @@ class FrmFieldsHelper {
322
  }
323
 
324
  /**
 
 
 
325
  * @param string $html
326
  * @param array $field
327
  * @param array $errors
@@ -358,6 +361,9 @@ class FrmFieldsHelper {
358
  */
359
  public static function &label_position( $position, $field, $form ) {
360
  if ( $position && $position != '' ) {
 
 
 
361
  return $position;
362
  }
363
 
@@ -384,11 +390,19 @@ class FrmFieldsHelper {
384
  return ! in_array( $type, array( 'select', 'radio', 'checkbox', 'hidden', 'file' ) );
385
  }
386
 
 
 
 
 
387
  public static function remove_inline_conditions( $no_vars, $code, $replace_with, &$html ) {
388
  _deprecated_function( __FUNCTION__, '3.0', 'FrmShortcodeHelper::remove_inline_conditions' );
389
  FrmShortcodeHelper::remove_inline_conditions( $no_vars, $code, $replace_with, $html );
390
  }
391
 
 
 
 
 
392
  public static function get_shortcode_tag( $shortcodes, $short_key, $args ) {
393
  _deprecated_function( __FUNCTION__, '3.0', 'FrmShortcodeHelper::get_shortcode_tag' );
394
  return FrmShortcodeHelper::get_shortcode_tag( $shortcodes, $short_key, $args );
@@ -402,6 +416,10 @@ class FrmFieldsHelper {
402
  return 'frm_checkbox_' . $id . '-' . $opt_key;
403
  }
404
 
 
 
 
 
405
  public static function display_recaptcha( $field ) {
406
  _deprecated_function( __FUNCTION__, '3.0', 'FrmFieldCaptcha::field_input' );
407
  }
@@ -1309,6 +1327,10 @@ class FrmFieldsHelper {
1309
  return $field_array + $field_options;
1310
  }
1311
 
 
 
 
 
1312
  public static function get_default_field_opts( $type, $field = null, $limit = false ) {
1313
  if ( $limit ) {
1314
  _deprecated_function( __FUNCTION__, '3.0', 'FrmFieldHelper::get_default_field_options' );
@@ -1321,6 +1343,10 @@ class FrmFieldsHelper {
1321
  return $field_options;
1322
  }
1323
 
 
 
 
 
1324
  public static function dropdown_categories( $args ) {
1325
  _deprecated_function( __FUNCTION__, '2.02.07', 'FrmProPost::get_category_dropdown' );
1326
 
322
  }
323
 
324
  /**
325
+ * @deprecated 3.0
326
+ * @codeCoverageIgnore
327
+ *
328
  * @param string $html
329
  * @param array $field
330
  * @param array $errors
361
  */
362
  public static function &label_position( $position, $field, $form ) {
363
  if ( $position && $position != '' ) {
364
+ if ( $position == 'inside' && ! self::is_placeholder_field_type( $field['type'] ) ) {
365
+ $position = 'top';
366
+ }
367
  return $position;
368
  }
369
 
390
  return ! in_array( $type, array( 'select', 'radio', 'checkbox', 'hidden', 'file' ) );
391
  }
392
 
393
+ /**
394
+ * @deprecated 3.0
395
+ * @codeCoverageIgnore
396
+ */
397
  public static function remove_inline_conditions( $no_vars, $code, $replace_with, &$html ) {
398
  _deprecated_function( __FUNCTION__, '3.0', 'FrmShortcodeHelper::remove_inline_conditions' );
399
  FrmShortcodeHelper::remove_inline_conditions( $no_vars, $code, $replace_with, $html );
400
  }
401
 
402
+ /**
403
+ * @deprecated 3.0
404
+ * @codeCoverageIgnore
405
+ */
406
  public static function get_shortcode_tag( $shortcodes, $short_key, $args ) {
407
  _deprecated_function( __FUNCTION__, '3.0', 'FrmShortcodeHelper::get_shortcode_tag' );
408
  return FrmShortcodeHelper::get_shortcode_tag( $shortcodes, $short_key, $args );
416
  return 'frm_checkbox_' . $id . '-' . $opt_key;
417
  }
418
 
419
+ /**
420
+ * @deprecated 3.0
421
+ * @codeCoverageIgnore
422
+ */
423
  public static function display_recaptcha( $field ) {
424
  _deprecated_function( __FUNCTION__, '3.0', 'FrmFieldCaptcha::field_input' );
425
  }
1327
  return $field_array + $field_options;
1328
  }
1329
 
1330
+ /**
1331
+ * @deprecated 3.0
1332
+ * @codeCoverageIgnore
1333
+ */
1334
  public static function get_default_field_opts( $type, $field = null, $limit = false ) {
1335
  if ( $limit ) {
1336
  _deprecated_function( __FUNCTION__, '3.0', 'FrmFieldHelper::get_default_field_options' );
1343
  return $field_options;
1344
  }
1345
 
1346
+ /**
1347
+ * @deprecated 2.02.07
1348
+ * @codeCoverageIgnore
1349
+ */
1350
  public static function dropdown_categories( $args ) {
1351
  _deprecated_function( __FUNCTION__, '2.02.07', 'FrmProPost::get_category_dropdown' );
1352
 
classes/helpers/FrmFormsHelper.php CHANGED
@@ -158,10 +158,8 @@ class FrmFormsHelper {
158
  */
159
  public static function get_invalid_error_message( $args ) {
160
  $frm_settings = FrmAppHelper::get_settings();
161
-
162
- $invalid_msg = apply_filters( 'frm_invalid_error_message', $frm_settings->invalid_msg, $args );
163
-
164
- return $invalid_msg;
165
  }
166
 
167
  public static function get_success_message( $atts ) {
158
  */
159
  public static function get_invalid_error_message( $args ) {
160
  $frm_settings = FrmAppHelper::get_settings();
161
+ $invalid_msg = do_shortcode( $frm_settings->invalid_msg );
162
+ return apply_filters( 'frm_invalid_error_message', $invalid_msg, $args );
 
 
163
  }
164
 
165
  public static function get_success_message( $atts ) {
classes/helpers/FrmStylesHelper.php CHANGED
@@ -109,7 +109,7 @@ class FrmStylesHelper {
109
  );
110
  }
111
 
112
- public static function get_sigle_label_postitions() {
113
  return array(
114
  'top' => __( 'Top', 'formidable' ),
115
  'left' => __( 'Left', 'formidable' ),
@@ -385,4 +385,13 @@ class FrmStylesHelper {
385
  public static function previewing_style() {
386
  return isset( $_GET['frm_style_setting'] ) || isset( $_GET['flat'] );
387
  }
 
 
 
 
 
 
 
 
 
388
  }
109
  );
110
  }
111
 
112
+ public static function get_single_label_positions() {
113
  return array(
114
  'top' => __( 'Top', 'formidable' ),
115
  'left' => __( 'Left', 'formidable' ),
385
  public static function previewing_style() {
386
  return isset( $_GET['frm_style_setting'] ) || isset( $_GET['flat'] );
387
  }
388
+
389
+ /**
390
+ * @deprecated 3.01
391
+ * @codeCoverageIgnore
392
+ */
393
+ public static function get_sigle_label_postitions() {
394
+ _deprecated_function( __METHOD__, '3.01', 'FrmStylesHelper::get_single_label_positions' );
395
+ return FrmStylesHelper::get_single_label_positions();
396
+ }
397
  }
classes/models/FrmDb.php CHANGED
@@ -692,6 +692,7 @@ class FrmDb {
692
 
693
  /**
694
  * @deprecated 2.05.06
 
695
  */
696
  public function upgrade( $old_db_version = false ) {
697
  _deprecated_function( __METHOD__, '2.05.06', 'FrmMigrate::upgrade' );
@@ -702,6 +703,7 @@ class FrmDb {
702
 
703
  /**
704
  * @deprecated 2.05.06
 
705
  */
706
  public function collation() {
707
  _deprecated_function( __METHOD__, '2.05.06', 'FrmMigrate::collation' );
@@ -712,6 +714,7 @@ class FrmDb {
712
 
713
  /**
714
  * @deprecated 2.05.06
 
715
  */
716
  public function uninstall() {
717
  _deprecated_function( __METHOD__, '2.05.06', 'FrmMigrate::uninstall' );
692
 
693
  /**
694
  * @deprecated 2.05.06
695
+ * @codeCoverageIgnore
696
  */
697
  public function upgrade( $old_db_version = false ) {
698
  _deprecated_function( __METHOD__, '2.05.06', 'FrmMigrate::upgrade' );
703
 
704
  /**
705
  * @deprecated 2.05.06
706
+ * @codeCoverageIgnore
707
  */
708
  public function collation() {
709
  _deprecated_function( __METHOD__, '2.05.06', 'FrmMigrate::collation' );
714
 
715
  /**
716
  * @deprecated 2.05.06
717
+ * @codeCoverageIgnore
718
  */
719
  public function uninstall() {
720
  _deprecated_function( __METHOD__, '2.05.06', 'FrmMigrate::uninstall' );
classes/models/FrmEDD_SL_Plugin_Updater.php CHANGED
@@ -8,8 +8,8 @@ if ( ! defined( 'ABSPATH' ) ) {
8
  /**
9
  * Allows plugins to use their own update API.
10
  *
11
- * @author Pippin Williamson
12
- * @version 1.6.5
13
  */
14
  class FrmEDD_SL_Plugin_Updater {
15
 
@@ -41,11 +41,20 @@ class FrmEDD_SL_Plugin_Updater {
41
  $this->slug = basename( $_plugin_file, '.php' );
42
  $this->version = $_api_data['version'];
43
  $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
44
- $this->beta = ! empty( $this->api_data['beta'] );
45
  $this->cache_key = md5( serialize( $this->slug . $this->version . $this->api_data['license'] . $this->beta ) );
46
 
47
  $frm_edd_plugin_data[ $this->slug ] = $this->api_data;
48
 
 
 
 
 
 
 
 
 
 
49
  // Set up hooks.
50
  $this->init();
51
  }
@@ -112,7 +121,7 @@ class FrmEDD_SL_Plugin_Updater {
112
 
113
  }
114
 
115
- $_transient_data->last_checked = current_time( 'timestamp' );
116
  $_transient_data->checked[ $this->name ] = $this->version;
117
 
118
  }
@@ -204,11 +213,13 @@ class FrmEDD_SL_Plugin_Updater {
204
  * @return object $array
205
  */
206
  public function http_request_args( $args, $url ) {
207
- // If it is an https request and we are performing a package download, disable ssl verification
 
208
  if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
209
- $args['sslverify'] = true;
210
  }
211
  return $args;
 
212
  }
213
 
214
  /**
@@ -248,9 +259,10 @@ class FrmEDD_SL_Plugin_Updater {
248
  'beta' => ! empty( $data['beta'] ),
249
  );
250
 
251
- $request = wp_remote_post( $this->api_url, array(
 
252
  'timeout' => 15,
253
- 'sslverify' => true,
254
  'body' => $api_params,
255
  ) );
256
 
@@ -298,9 +310,9 @@ class FrmEDD_SL_Plugin_Updater {
298
  }
299
 
300
  $data = $frm_edd_plugin_data[ $_REQUEST['slug'] ];
301
- $beta = ! empty( $data['beta'] );
302
  $cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_' . $beta . '_version_info' );
303
- $version_info = get_transient( $cache_key );
304
 
305
  if ( false === $version_info ) {
306
 
@@ -314,9 +326,10 @@ class FrmEDD_SL_Plugin_Updater {
314
  'beta' => $beta,
315
  );
316
 
317
- $request = wp_remote_post( $this->api_url, array(
 
318
  'timeout' => 15,
319
- 'sslverify' => true,
320
  'body' => $api_params,
321
  ) );
322
 
@@ -364,7 +377,18 @@ class FrmEDD_SL_Plugin_Updater {
364
  'value' => json_encode( $value ),
365
  );
366
 
367
- update_option( $cache_key, $data );
368
 
369
  }
 
 
 
 
 
 
 
 
 
 
 
370
  }
8
  /**
9
  * Allows plugins to use their own update API.
10
  *
11
+ * @author Easy Digital Downloads
12
+ * @version 1.6.15
13
  */
14
  class FrmEDD_SL_Plugin_Updater {
15
 
41
  $this->slug = basename( $_plugin_file, '.php' );
42
  $this->version = $_api_data['version'];
43
  $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
44
+ $this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
45
  $this->cache_key = md5( serialize( $this->slug . $this->version . $this->api_data['license'] . $this->beta ) );
46
 
47
  $frm_edd_plugin_data[ $this->slug ] = $this->api_data;
48
 
49
+ /**
50
+ * Fires after the $frm_edd_plugin_data is setup.
51
+ *
52
+ * @since x.x.x
53
+ *
54
+ * @param array $frm_edd_plugin_data Array of EDD SL plugin data.
55
+ */
56
+ do_action( 'post_edd_sl_plugin_updater_setup', $frm_edd_plugin_data );
57
+
58
  // Set up hooks.
59
  $this->init();
60
  }
121
 
122
  }
123
 
124
+ $_transient_data->last_checked = time();
125
  $_transient_data->checked[ $this->name ] = $this->version;
126
 
127
  }
213
  * @return object $array
214
  */
215
  public function http_request_args( $args, $url ) {
216
+
217
+ $verify_ssl = $this->verify_ssl();
218
  if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
219
+ $args['sslverify'] = $verify_ssl;
220
  }
221
  return $args;
222
+
223
  }
224
 
225
  /**
259
  'beta' => ! empty( $data['beta'] ),
260
  );
261
 
262
+ $verify_ssl = $this->verify_ssl();
263
+ $request = wp_remote_post( $this->api_url, array(
264
  'timeout' => 15,
265
+ 'sslverify' => $verify_ssl,
266
  'body' => $api_params,
267
  ) );
268
 
310
  }
311
 
312
  $data = $frm_edd_plugin_data[ $_REQUEST['slug'] ];
313
+ $beta = ! empty( $data['beta'] ) ? true : false;
314
  $cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_' . $beta . '_version_info' );
315
+ $version_info = $this->get_cached_version_info( $cache_key );
316
 
317
  if ( false === $version_info ) {
318
 
326
  'beta' => $beta,
327
  );
328
 
329
+ $verify_ssl = $this->verify_ssl();
330
+ $request = wp_remote_post( $this->api_url, array(
331
  'timeout' => 15,
332
+ 'sslverify' => $verify_ssl,
333
  'body' => $api_params,
334
  ) );
335
 
377
  'value' => json_encode( $value ),
378
  );
379
 
380
+ update_option( $cache_key, $data, 'no' );
381
 
382
  }
383
+
384
+ /**
385
+ * Returns if the SSL of the store should be verified.
386
+ *
387
+ * @since 1.6.13
388
+ * @return bool
389
+ */
390
+ private function verify_ssl() {
391
+ return (bool) apply_filters( 'edd_sl_api_request_verify_ssl', true, $this );
392
+ }
393
+
394
  }
classes/models/FrmEntryFormatter.php CHANGED
@@ -749,7 +749,7 @@ class FrmEntryFormatter {
749
  $include = false;
750
  }
751
 
752
- return $include;
753
  }
754
 
755
  /**
749
  $include = false;
750
  }
751
 
752
+ return apply_filters( 'frm_include_field_in_content', $include, $field_value );
753
  }
754
 
755
  /**
classes/models/FrmEntryValidate.php CHANGED
@@ -134,6 +134,10 @@ class FrmEntryValidate {
134
  }
135
  }
136
 
 
 
 
 
137
  public static function validate_url_field( &$errors, $field, $value, $args ) {
138
  _deprecated_function( __FUNCTION__, '3.0', 'FrmFieldType::validate' );
139
 
@@ -144,6 +148,10 @@ class FrmEntryValidate {
144
  self::validate_field_types( $errors, $field, $value, $args );
145
  }
146
 
 
 
 
 
147
  public static function validate_email_field( &$errors, $field, $value, $args ) {
148
  _deprecated_function( __FUNCTION__, '3.0', 'FrmFieldType::validate' );
149
 
@@ -154,6 +162,10 @@ class FrmEntryValidate {
154
  self::validate_field_types( $errors, $field, $value, $args );
155
  }
156
 
 
 
 
 
157
  public static function validate_number_field( &$errors, $field, $value, $args ) {
158
  _deprecated_function( __FUNCTION__, '3.0', 'FrmFieldType::validate' );
159
 
@@ -177,9 +189,8 @@ class FrmEntryValidate {
177
  }
178
 
179
  public static function phone_format( $field ) {
180
- $default_format = '^((\+\d{1,3}(-|.| )?\(?\d\)?(-| |.)?\d{1,5})|(\(?\d{2,6}\)?))(-|.| )?(\d{3,4})(-|.| )?(\d{4})(( x| ext)\d{1,5}){0,1}$';
181
  if ( FrmField::is_option_empty( $field, 'format' ) ) {
182
- $pattern = $default_format;
183
  } else {
184
  $pattern = FrmField::get_option( $field, 'format' );
185
  }
@@ -195,6 +206,13 @@ class FrmEntryValidate {
195
  return $pattern;
196
  }
197
 
 
 
 
 
 
 
 
198
  /**
199
  * Create a regular expression from a phone number format
200
  *
@@ -231,6 +249,10 @@ class FrmEntryValidate {
231
  return $pattern;
232
  }
233
 
 
 
 
 
234
  public static function validate_recaptcha( &$errors, $field, $args ) {
235
  _deprecated_function( __FUNCTION__, '3.0', 'FrmFieldType::validate' );
236
 
134
  }
135
  }
136
 
137
+ /**
138
+ * @deprecated 3.0
139
+ * @codeCoverageIgnore
140
+ */
141
  public static function validate_url_field( &$errors, $field, $value, $args ) {
142
  _deprecated_function( __FUNCTION__, '3.0', 'FrmFieldType::validate' );
143
 
148
  self::validate_field_types( $errors, $field, $value, $args );
149
  }
150
 
151
+ /**
152
+ * @deprecated 3.0
153
+ * @codeCoverageIgnore
154
+ */
155
  public static function validate_email_field( &$errors, $field, $value, $args ) {
156
  _deprecated_function( __FUNCTION__, '3.0', 'FrmFieldType::validate' );
157
 
162
  self::validate_field_types( $errors, $field, $value, $args );
163
  }
164
 
165
+ /**
166
+ * @deprecated 3.0
167
+ * @codeCoverageIgnore
168
+ */
169
  public static function validate_number_field( &$errors, $field, $value, $args ) {
170
  _deprecated_function( __FUNCTION__, '3.0', 'FrmFieldType::validate' );
171
 
189
  }
190
 
191
  public static function phone_format( $field ) {
 
192
  if ( FrmField::is_option_empty( $field, 'format' ) ) {
193
+ $pattern = self::default_phone_format();
194
  } else {
195
  $pattern = FrmField::get_option( $field, 'format' );
196
  }
206
  return $pattern;
207
  }
208
 
209
+ /**
210
+ * @since 3.01
211
+ */
212
+ private static function default_phone_format() {
213
+ return '^((\+\d{1,3}(-|.| )?\(?\d\)?(-| |.)?\d{1,5})|(\(?\d{2,6}\)?))(-|.| )?(\d{3,4})(-|.| )?(\d{4})(( x| ext)\d{1,5}){0,1}$';
214
+ }
215
+
216
  /**
217
  * Create a regular expression from a phone number format
218
  *
249
  return $pattern;
250
  }
251
 
252
+ /**
253
+ * @deprecated 3.0
254
+ * @codeCoverageIgnore
255
+ */
256
  public static function validate_recaptcha( &$errors, $field, $args ) {
257
  _deprecated_function( __FUNCTION__, '3.0', 'FrmFieldType::validate' );
258
 
classes/models/FrmFieldDeprecated.php CHANGED
@@ -298,5 +298,4 @@ class FrmFieldDeprecated {
298
 
299
  return FrmField::get_key_by_id( $id );
300
  }
301
-
302
- }
298
 
299
  return FrmField::get_key_by_id( $id );
300
  }
301
+ }
 
classes/models/FrmForm.php CHANGED
@@ -479,7 +479,10 @@ class FrmForm {
479
  return (int) FrmDb::get_var( 'frm_forms', array( 'form_key' => sanitize_title( $key ) ) );
480
  }
481
 
482
- /**
 
 
 
483
  * @param string $key
484
  * @return int form id
485
  */
@@ -505,6 +508,10 @@ class FrmForm {
505
  return $key;
506
  }
507
 
 
 
 
 
508
  public static function getKeyById( $id ) {
509
  _deprecated_function( __METHOD__, '3.0', 'FrmForm::get_key_by_id' );
510
  return self::get_key_by_id( $id );
479
  return (int) FrmDb::get_var( 'frm_forms', array( 'form_key' => sanitize_title( $key ) ) );
480
  }
481
 
482
+ /**
483
+ * @deprecated 3.0
484
+ * @codeCoverageIgnore
485
+ *
486
  * @param string $key
487
  * @return int form id
488
  */
508
  return $key;
509
  }
510
 
511
+ /**
512
+ * @deprecated 3.0
513
+ * @codeCoverageIgnore
514
+ */
515
  public static function getKeyById( $id ) {
516
  _deprecated_function( __METHOD__, '3.0', 'FrmForm::get_key_by_id' );
517
  return self::get_key_by_id( $id );
classes/models/FrmFormDeprecated.php CHANGED
@@ -273,5 +273,4 @@ class FrmFormDeprecated {
273
 
274
  return FrmForm::get_option( $atts );
275
  }
276
-
277
- }
273
 
274
  return FrmForm::get_option( $atts );
275
  }
276
+ }
 
classes/models/FrmNotification.php CHANGED
@@ -69,6 +69,7 @@ class FrmNotification {
69
 
70
  /**
71
  * @deprecated 2.03.04
 
72
  */
73
  public static function remove_mandrill_br() {
74
  _deprecated_function( __FUNCTION__, '2.03.04', 'FrmEmailHelper::remove_mandrill_br' );
@@ -77,6 +78,7 @@ class FrmNotification {
77
 
78
  /**
79
  * @deprecated 2.03.04
 
80
  */
81
  public static function send_email() {
82
  _deprecated_function( __FUNCTION__, '2.03.04', 'FrmEmail::send' );
69
 
70
  /**
71
  * @deprecated 2.03.04
72
+ * @codeCoverageIgnore
73
  */
74
  public static function remove_mandrill_br() {
75
  _deprecated_function( __FUNCTION__, '2.03.04', 'FrmEmailHelper::remove_mandrill_br' );
78
 
79
  /**
80
  * @deprecated 2.03.04
81
+ * @codeCoverageIgnore
82
  */
83
  public static function send_email() {
84
  _deprecated_function( __FUNCTION__, '2.03.04', 'FrmEmail::send' );
classes/models/FrmStyle.php CHANGED
@@ -123,9 +123,8 @@ class FrmStyle {
123
  ) );
124
  $create_file->create_file( $css );
125
 
126
- update_option('frmpro_css', $css);
127
-
128
- set_transient('frmpro_css', $css);
129
  }
130
 
131
  private function get_css_content( $filename ) {
123
  ) );
124
  $create_file->create_file( $css );
125
 
126
+ update_option( 'frmpro_css', $css, 'no' );
127
+ set_transient( 'frmpro_css', $css );
 
128
  }
129
 
130
  private function get_css_content( $filename ) {
classes/models/fields/FrmFieldCaptcha.php CHANGED
@@ -140,7 +140,7 @@ class FrmFieldCaptcha extends FrmFieldType {
140
  return $errors;
141
  }
142
 
143
- if ( ! isset( $_POST['g-recaptcha-response']) ) {
144
  // If captcha is missing, check if it was already verified
145
  if ( ! isset( $_POST['recaptcha_checked'] ) || ! wp_verify_nonce( $_POST['recaptcha_checked'], 'frm_ajax' ) ) {
146
  // There was no captcha submitted
140
  return $errors;
141
  }
142
 
143
+ if ( ! isset( $_POST['g-recaptcha-response'] ) ) {
144
  // If captcha is missing, check if it was already verified
145
  if ( ! isset( $_POST['recaptcha_checked'] ) || ! wp_verify_nonce( $_POST['recaptcha_checked'], 'frm_ajax' ) ) {
146
  // There was no captcha submitted
classes/models/fields/FrmFieldEmail.php CHANGED
@@ -21,7 +21,7 @@ class FrmFieldEmail extends FrmFieldType {
21
  protected function field_settings_for_type() {
22
  return array(
23
  'size' => true,
24
- 'clear_on_focus' => true,
25
  'invalid' => true,
26
  );
27
  }
21
  protected function field_settings_for_type() {
22
  return array(
23
  'size' => true,
24
+ 'clear_on_focus' => true,
25
  'invalid' => true,
26
  );
27
  }
classes/models/fields/FrmFieldNumber.php CHANGED
@@ -52,7 +52,7 @@ class FrmFieldNumber extends FrmFieldType {
52
  // only check if options are available in settings
53
  $minnum = FrmField::get_option( $this->field, 'minnum' );
54
  $maxnum = FrmField::get_option( $this->field, 'maxnum' );
55
- if ( $frm_settings->use_html && $maxnum != '' && $minnum != '' ) {
56
  $value = (float) $args['value'];
57
  if ( $value < $minnum ) {
58
  $errors[ 'field' . $args['id'] ] = __( 'Please select a higher number', 'formidable' );
52
  // only check if options are available in settings
53
  $minnum = FrmField::get_option( $this->field, 'minnum' );
54
  $maxnum = FrmField::get_option( $this->field, 'maxnum' );
55
+ if ( $frm_settings->use_html && $maxnum !== '' && $minnum !== '' ) {
56
  $value = (float) $args['value'];
57
  if ( $value < $minnum ) {
58
  $errors[ 'field' . $args['id'] ] = __( 'Please select a higher number', 'formidable' );
classes/views/frm-forms/add_field.php CHANGED
@@ -188,7 +188,13 @@ if ( $display['options'] ) {
188
  <option value=""<?php selected( $field['label'], '' ); ?>>
189
  <?php esc_html_e( 'Default', 'formidable' ) ?>
190
  </option>
191
- <?php foreach ( FrmStylesHelper::get_sigle_label_postitions() as $pos => $pos_label ) { ?>
 
 
 
 
 
 
192
  <option value="<?php echo esc_attr( $pos ) ?>"<?php selected( $field['label'], $pos ); ?>>
193
  <?php echo esc_html( $pos_label ) ?>
194
  </option>
188
  <option value=""<?php selected( $field['label'], '' ); ?>>
189
  <?php esc_html_e( 'Default', 'formidable' ) ?>
190
  </option>
191
+ <?php foreach ( FrmStylesHelper::get_single_label_positions() as $pos => $pos_label ) { ?>
192
+ <?php
193
+ if ( ! $display['clear_on_focus'] && 'inside' === $pos ) {
194
+ // don't allow inside labels for fields without placeholders
195
+ continue;
196
+ }
197
+ ?>
198
  <option value="<?php echo esc_attr( $pos ) ?>"<?php selected( $field['label'], $pos ); ?>>
199
  <?php echo esc_html( $pos_label ) ?>
200
  </option>
css/custom_theme.css.php CHANGED
@@ -346,6 +346,7 @@ a.frm_save_draft{
346
  width:auto;
347
  border:none;
348
  vertical-align:baseline;
 
349
  }
350
 
351
  .with_frm_style :invalid,
@@ -529,68 +530,10 @@ select.frm_loading_lookup{
529
 
530
  <?php readfile( dirname( __FILE__ ) . '/frm_grids.css' ); ?>
531
 
532
- /* Left and right label styling for non-Formidable styling */
533
-
534
- .frm_form_field.frm_inline_container,
535
- .frm_form_field.frm_right_container,
536
- .frm_form_field.frm_left_container{
537
- display: grid;
538
- grid-template-columns: 25% auto;
539
- width:100%;
540
- grid-auto-rows: min-content;
541
- }
542
-
543
- .frm_form_field.frm_right_container{
544
- grid-template-columns: auto 25%;
545
- }
546
-
547
- .frm_form_field.frm_inline_container{
548
- grid-template-columns: repeat(2, minmax(auto, max-content) );
549
- }
550
-
551
- .frm_form_field.frm_inline_container label.frm_primary_label,
552
- .frm_form_field.frm_right_container label.frm_primary_label,
553
- .frm_form_field.frm_left_container label.frm_primary_label{
554
- margin-right:10px;
555
- grid-row:span 2/span 2;
556
- padding-top:4px;
557
- }
558
-
559
- .frm_form_field.frm_left_container label.frm_primary_label{
560
- grid-column:1;
561
- grid-row:span 2/span 2; /* cover a row for the description */
562
- }
563
-
564
- .frm_form_field.frm_right_container label.frm_primary_label{
565
- grid-column:2;
566
- grid-row:1;
567
- margin-right:0;
568
- margin-left:10px;
569
- }
570
-
571
- .frm_form_field.frm_inline_container .frm_description,
572
- .frm_form_field.frm_left_container .frm_description{
573
- grid-column:2;
574
- }
575
-
576
- .frm_form_field.frm_right_container .frm_description{
577
- grid-column:1;
578
- }
579
-
580
- .frm_conf_field.frm_left_container{
581
- grid-template-columns: 67%;
582
- }
583
-
584
- .frm_conf_field.frm_left_container .frm_description{
585
- grid-column:1;
586
- }
587
-
588
  .frm_conf_field.frm_left_container label.frm_primary_label{
589
  display:none;
590
  }
591
 
592
- /* End of left and right label styling */
593
-
594
  .wp-editor-wrap *,
595
  .wp-editor-wrap *:after,
596
  .wp-editor-wrap *:before{
346
  width:auto;
347
  border:none;
348
  vertical-align:baseline;
349
+ position: initial; /* override Bootstrap */
350
  }
351
 
352
  .with_frm_style :invalid,
530
 
531
  <?php readfile( dirname( __FILE__ ) . '/frm_grids.css' ); ?>
532
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
533
  .frm_conf_field.frm_left_container label.frm_primary_label{
534
  display:none;
535
  }
536
 
 
 
537
  .wp-editor-wrap *,
538
  .wp-editor-wrap *:after,
539
  .wp-editor-wrap *:before{
css/frm_grids.css CHANGED
@@ -243,6 +243,62 @@
243
  margin-right:5px;
244
  }
245
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
246
  /* End RTL Grids */
247
 
248
  .frm-fade-in {
@@ -277,4 +333,10 @@
277
  .frm_fields_container > .frm_form_field{
278
  grid-column: 1 / span 12 !important;
279
  }
 
 
 
 
 
 
280
  }
243
  margin-right:5px;
244
  }
245
 
246
+ /* Left and right label styling for non-Formidable styling */
247
+
248
+ .frm_form_field.frm_inline_container,
249
+ .frm_form_field.frm_right_container,
250
+ .frm_form_field.frm_left_container{
251
+ display: grid;
252
+ grid-template-columns: 25% auto;
253
+ width:100%;
254
+ grid-auto-rows: min-content;
255
+ }
256
+
257
+ .frm_form_field.frm_right_container{
258
+ grid-template-columns: auto 25%;
259
+ }
260
+
261
+ .frm_form_field.frm_inline_container{
262
+ grid-template-columns: repeat(2, minmax(auto, max-content) );
263
+ }
264
+
265
+ .frm_form_field.frm_inline_container label.frm_primary_label,
266
+ .frm_form_field.frm_right_container label.frm_primary_label,
267
+ .frm_form_field.frm_left_container label.frm_primary_label{
268
+ margin-right:10px;
269
+ grid-row:span 2/span 2;
270
+ padding-top:4px;
271
+ }
272
+
273
+ .frm_form_field.frm_left_container label.frm_primary_label{
274
+ grid-column:1;
275
+ grid-row:span 2/span 2; /* cover a row for the description */
276
+ }
277
+
278
+ .frm_form_field.frm_right_container label.frm_primary_label{
279
+ grid-column:2;
280
+ grid-row:1;
281
+ margin-right:0;
282
+ margin-left:10px;
283
+ }
284
+
285
+ .frm_form_field.frm_inline_container .frm_description,
286
+ .frm_form_field.frm_left_container .frm_description{
287
+ grid-column:2;
288
+ }
289
+
290
+ .frm_form_field.frm_right_container .frm_description{
291
+ grid-column:1;
292
+ }
293
+
294
+ .frm_conf_field.frm_left_container{
295
+ grid-template-columns: 67%;
296
+ }
297
+
298
+ .frm_conf_field.frm_left_container .frm_description{
299
+ grid-column:1;
300
+ }
301
+
302
  /* End RTL Grids */
303
 
304
  .frm-fade-in {
333
  .frm_fields_container > .frm_form_field{
334
  grid-column: 1 / span 12 !important;
335
  }
336
+
337
+ .frm_form_field.frm_inline_container,
338
+ .frm_form_field.frm_right_container,
339
+ .frm_form_field.frm_left_container{
340
+ display:block;
341
+ }
342
  }
css/frm_old_grids.css CHANGED
@@ -208,10 +208,7 @@
208
 
209
  .frm_form_field.frm_inline_container,
210
  .frm_form_field.frm_right_container,
211
- .frm_form_field.frm_left_container{
212
- display:inline-block;
213
- }
214
-
215
  .frm_combo_inputs_container,
216
  .frm_grid_container,
217
  .frm_form_fields .frm_section_heading,
208
 
209
  .frm_form_field.frm_inline_container,
210
  .frm_form_field.frm_right_container,
211
+ .frm_form_field.frm_left_container,
 
 
 
212
  .frm_combo_inputs_container,
213
  .frm_grid_container,
214
  .frm_form_fields .frm_section_heading,
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.0.06
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.01
6
  Plugin URI: https://formidableforms.com/
7
  Author URI: https://formidableforms.com/
8
  Author: Strategy11
js/formidable.js CHANGED
@@ -317,7 +317,7 @@ function frmFrontFormJS(){
317
  }
318
 
319
  function hasInvisibleRecaptcha( object ) {
320
- if ( typeof frmProForm === 'undefined' || frmProForm.goingToPreviousPage( object ) ) {
321
  return false;
322
  }
323
 
317
  }
318
 
319
  function hasInvisibleRecaptcha( object ) {
320
+ if ( typeof frmProForm !== 'undefined' && frmProForm.goingToPreviousPage( object ) ) {
321
  return false;
322
  }
323
 
js/formidable.min.js CHANGED
@@ -16,7 +16,7 @@ jQuery(this),b=a.data("eid"),c=a.data("fid");a.append('<span class="spinner" sty
16
  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 M(){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",".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()});
17
  jQuery(document).on("focus",".frm_toggle_default",E);jQuery(document).on("blur",".frm_toggle_default",F);jQuery(".frm_toggle_default").blur();jQuery(document.getElementById("frm_resend_email")).click(G);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",
18
  f);jQuery(document).on("click","a[data-frmconfirm]",H);jQuery("a[data-frmtoggle]").click(I);J();K();L();M()},getFieldId:function(a,b){return e(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"===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=
19
- 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,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"),
20
  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),0===Object.keys(c).length&&(A(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?
21
  (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=
22
  [],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=k(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=p(g,b,c):null!==g.pattern&&(b=w(g,b)))}}c=jQuery(a).find(".frm-g-recaptcha");
16
  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 M(){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",".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()});
17
  jQuery(document).on("focus",".frm_toggle_default",E);jQuery(document).on("blur",".frm_toggle_default",F);jQuery(".frm_toggle_default").blur();jQuery(document.getElementById("frm_resend_email")).click(G);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",
18
  f);jQuery(document).on("click","a[data-frmconfirm]",H);jQuery("a[data-frmtoggle]").click(I);J();K();L();M()},getFieldId:function(a,b){return e(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"===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=
19
+ 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,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"),
20
  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),0===Object.keys(c).length&&(A(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?
21
  (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=
22
  [],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=k(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=p(g,b,c):null!==g.pattern&&(b=w(g,b)))}}c=jQuery(a).find(".frm-g-recaptcha");
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
6
  Requires PHP: 5.3
7
- Stable tag: 3.0.06
8
 
9
  The best WordPress form plugin for contact forms, surveys and more. Make forms a breeze with a drag and drop form builder and form style generator.
10
 
@@ -159,7 +159,19 @@ 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.0.06 =
 
 
 
 
 
 
 
 
 
 
 
 
163
  * New: Include the option to duplicate a form in the free form builder
164
  * Fix: If the reply to address in the email is not specified, use only the from email without the from name to increase receivability
165
  * Fix: Improve styling without CSS grids when using left, right, and inline labels
4
  Requires at least: 4.4
5
  Tested up to: 4.9
6
  Requires PHP: 5.3
7
+ Stable tag: 3.01
8
 
9
  The best WordPress form plugin for contact forms, surveys and more. Make forms a breeze with a drag and drop form builder and form style generator.
10
 
159
  [See more FAQs](https://formidableforms.com/formidable-faqs/ "Formidable Form FAQs")
160
 
161
  == Changelog ==
162
+ = 3.01 =
163
+ * New: Added frm_js_location hook for saving the combined javascript file in a different location
164
+ * New: Added frm_include_field_in_content hook for excluding fields in the default email message
165
+ * Tweak: Process shortcodes inside the form validation messages
166
+ * Tweak: Reduce page load time by not autoloading the saved form styling from the database. In most cases, this data is saved in the CSS file, and doesn't need to be retrieved from the database.
167
+ * Fix: The Invisible reCaptcha wasn't being validated correctly in contact forms when the Pro version was not running.
168
+ * Fix: Run the server-side form validation on a number field that uses 0 for the minimum value. This was being skipped.
169
+ * Fix: Show the label above a dropdown field if the label position is set to inside since dropdown placeholders are not yet supported. Plus, don't show the Inside label position option for any fields that don't allow placeholders.
170
+ * Fix: If there is an error during a database update, make sure it can try again in the future
171
+ * Fix: Prevent more conflicts with Divi when editing some posts with forms
172
+ * Fix: Fields without CSS grids were not aligning correctly with left, right, or inline labels
173
+
174
+ = 3.0.06 =
175
  * New: Include the option to duplicate a form in the free form builder
176
  * Fix: If the reply to address in the email is not specified, use only the from email without the from name to increase receivability
177
  * Fix: Improve styling without CSS grids when using left, right, and inline labels