Formidable Forms – Form Builder for WordPress - Version 5.4.2

Version Description

  • New: Autocomplete dropdowns in the back end will now include an aria-label on the options to avoid accessibility issues with screen readers only reading ID values.
  • New: A redirect will now happen after a form is duplicated to avoid issues with multiple duplicate actions on page refresh.
  • New: Added additional styling for repeaters in tables shown in email actions to show indentation for the repeated data.
  • New: Added a Save and Reload button that appears after installing a required add on when clicking a field with missing requirements from the form builder.
  • Fix: The aria-describedby attribute will now be ordered intentionally so errors get first priority by default. Checks have been added to avoid duplicate ids appearing in aria-describedby attributes as well.
  • Fix: A few issues with label position settings were introduced with last update that are now fixed. Labels were appearing when the "none" label position setting was set.
  • Fix: Automation settings were appearing for action types that don't support automation when the Form Action Automation add on wasn't active.
  • Fix: Fixed a caching conflict that would cause back end pages to break on some servers with an frmDom is not defined console error.
  • Fix: Labels were appearing overlapped over input fields when previewed from the style manager for styles with the inline label position setting.
  • Updated the icon for Zapier.
Download this release

Release Info

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

Code changes from version 5.4.1 to 5.4.2

classes/controllers/FrmAddonsController.php CHANGED
@@ -998,22 +998,33 @@ class FrmAddonsController {
998
  * @return array|string
999
  */
1000
  private static function get_addon_activation_response() {
1001
- if ( self::activating_from_settings_page() ) {
1002
- $response = array(
1003
- 'message' => __( 'Your plugin has been activated. Would you like to save and reload the page now?', 'formidable' ),
1004
- 'saveAndReload' => 'settings',
1005
- );
1006
- } else {
1007
- $response = __( 'Your plugin has been activated. Please reload the page to see more options.', 'formidable' );
1008
- }
1009
  return $response;
1010
  }
1011
 
1012
  /**
1013
- * @return bool
 
 
 
1014
  */
1015
- private static function activating_from_settings_page() {
1016
- return false !== strpos( FrmAppHelper::get_server_value( 'HTTP_REFERER' ), 'frm_action=settings' );
 
 
 
 
 
 
 
 
 
1017
  }
1018
 
1019
  /**
998
  * @return array|string
999
  */
1000
  private static function get_addon_activation_response() {
1001
+ $activating_page = self::get_activating_page();
1002
+
1003
+ $response = array(
1004
+ 'message' => __( 'Your plugin has been activated. Would you like to save and reload the page now?', 'formidable' ),
1005
+ 'saveAndReload' => $activating_page,
1006
+ );
1007
+
 
1008
  return $response;
1009
  }
1010
 
1011
  /**
1012
+ * Return a string that reflects the page from which the addon is being activated on,
1013
+ * if it is from settings or form builder, otherwise return empty string.
1014
+ *
1015
+ * @return string
1016
  */
1017
+ private static function get_activating_page() {
1018
+ $referer = FrmAppHelper::get_server_value( 'HTTP_REFERER' );
1019
+ if ( false !== strpos( $referer, 'frm_action=settings' ) ) {
1020
+ return 'settings';
1021
+ }
1022
+
1023
+ if ( false !== strpos( $referer, 'frm_action=edit' ) ) {
1024
+ return 'form_builder';
1025
+ }
1026
+
1027
+ return '';
1028
  }
1029
 
1030
  /**
classes/controllers/FrmAppController.php CHANGED
@@ -366,11 +366,6 @@ class FrmAppController {
366
  remove_action( 'frm_after_settings', 'FrmSettingsController::settings_cta' );
367
  remove_action( 'frm_add_form_style_tab_options', 'FrmFormsController::add_form_style_tab_options' );
368
  remove_action( 'frm_after_field_options', 'FrmFormsController::logic_tip' );
369
-
370
- if ( is_callable( 'FrmProAddonsController::renewal_message' ) ) {
371
- // These functions moved to Pro in 4.09.01
372
- remove_action( 'frm_page_footer', 'FrmAppHelper::renewal_message' );
373
- }
374
  }
375
 
376
  /**
@@ -432,6 +427,10 @@ class FrmAppController {
432
  * @since 2.0.1
433
  */
434
  public static function admin_init() {
 
 
 
 
435
  new FrmPersonalData(); // register personal data hooks
436
 
437
  if ( ! FrmAppHelper::doing_ajax() && self::needs_update() ) {
366
  remove_action( 'frm_after_settings', 'FrmSettingsController::settings_cta' );
367
  remove_action( 'frm_add_form_style_tab_options', 'FrmFormsController::add_form_style_tab_options' );
368
  remove_action( 'frm_after_field_options', 'FrmFormsController::logic_tip' );
 
 
 
 
 
369
  }
370
 
371
  /**
427
  * @since 2.0.1
428
  */
429
  public static function admin_init() {
430
+ if ( FrmAppHelper::is_admin_page( 'formidable' ) && 'duplicate' === FrmAppHelper::get_param( 'frm_action' ) ) {
431
+ FrmFormsController::duplicate();
432
+ }
433
+
434
  new FrmPersonalData(); // register personal data hooks
435
 
436
  if ( ! FrmAppHelper::doing_ajax() && self::needs_update() ) {
classes/controllers/FrmApplicationsController.php CHANGED
@@ -204,6 +204,7 @@ class FrmApplicationsController {
204
  * @return void
205
  */
206
  public static function render_applications_header( $title, $context ) {
 
207
  require self::get_view_path() . 'header.php';
208
  }
209
  }
204
  * @return void
205
  */
206
  public static function render_applications_header( $title, $context ) {
207
+ FrmAppHelper::print_admin_banner( true );
208
  require self::get_view_path() . 'header.php';
209
  }
210
  }
classes/controllers/FrmFormsController.php CHANGED
@@ -232,16 +232,27 @@ class FrmFormsController {
232
 
233
  public static function duplicate() {
234
  FrmAppHelper::permission_check( 'frm_edit_forms' );
 
 
 
 
 
 
235
 
236
  $params = FrmForm::list_page_params();
237
  $form = FrmForm::duplicate( $params['id'], $params['template'], true );
238
- $message = $params['template'] ? __( 'Form template was Successfully Created', 'formidable' ) : __( 'Form was Successfully Copied', 'formidable' );
 
239
 
240
  if ( $form ) {
241
- return self::get_edit_vars( $form, array(), $message, true );
 
242
  }
243
 
244
- self::display_forms_list( $params, __( 'There was a problem creating the new template.', 'formidable' ) );
 
 
 
245
  }
246
 
247
  /**
@@ -626,7 +637,7 @@ class FrmFormsController {
626
  }
627
 
628
  $response = array(
629
- 'redirect' => admin_url( 'admin.php?page=formidable&frm_action=duplicate&id=' . $new_form_id ),
630
  );
631
  }
632
 
@@ -882,6 +893,8 @@ class FrmFormsController {
882
 
883
  /**
884
  * Get data from api before rendering it so that we can flag the modal as expired
 
 
885
  */
886
  public static function before_list_templates() {
887
  global $frm_templates;
@@ -904,6 +917,9 @@ class FrmFormsController {
904
  $frm_license_type = $license_type;
905
  }
906
 
 
 
 
907
  public static function list_templates() {
908
  global $frm_templates;
909
  global $frm_license_type;
@@ -989,7 +1005,7 @@ class FrmFormsController {
989
  'name' => $template->name,
990
  'key' => $template->form_key,
991
  'description' => $template->description,
992
- 'url' => admin_url( 'admin.php?page=formidable&frm_action=duplicate&id=' . absint( $template->id ) ),
993
  'released' => $template->created_at,
994
  'installed' => 1,
995
  );
@@ -1043,6 +1059,8 @@ class FrmFormsController {
1043
  $message = __( 'Template was successfully updated.', 'formidable' );
1044
  }
1045
 
 
 
1046
  $all_templates = FrmForm::getAll( array( 'is_template' => 1 ), 'name' );
1047
  $has_fields = isset( $values['fields'] ) && ! empty( $values['fields'] );
1048
 
@@ -1053,6 +1071,12 @@ class FrmFormsController {
1053
  }
1054
  }
1055
 
 
 
 
 
 
 
1056
  public static function get_settings_vars( $id, $errors = array(), $args = array() ) {
1057
  FrmAppHelper::permission_check( 'frm_edit_forms' );
1058
 
@@ -1591,7 +1615,6 @@ class FrmFormsController {
1591
  case 'create':
1592
  case 'edit':
1593
  case 'update':
1594
- case 'duplicate':
1595
  case 'trash':
1596
  case 'untrash':
1597
  case 'destroy':
@@ -1621,7 +1644,14 @@ class FrmFormsController {
1621
  return;
1622
  }
1623
 
 
 
 
 
 
 
1624
  self::display_forms_list();
 
1625
  return;
1626
  }
1627
  }
232
 
233
  public static function duplicate() {
234
  FrmAppHelper::permission_check( 'frm_edit_forms' );
235
+ $nonce = FrmAppHelper::simple_get( '_wpnonce' );
236
+
237
+ if ( ! wp_verify_nonce( $nonce ) ) {
238
+ $frm_settings = FrmAppHelper::get_settings();
239
+ wp_die( esc_html( $frm_settings->admin_permission ) );
240
+ }
241
 
242
  $params = FrmForm::list_page_params();
243
  $form = FrmForm::duplicate( $params['id'], $params['template'], true );
244
+ $url = admin_url( 'admin.php?page=formidable' );
245
+ $message = 'form_duplicate_error';
246
 
247
  if ( $form ) {
248
+ $url = admin_url( 'admin.php?page=formidable&frm_action=edit&id=' . absint( $form ) );
249
+ $message = 'form_duplicated';
250
  }
251
 
252
+ $url .= '&message=' . $message;
253
+
254
+ wp_safe_redirect( $url );
255
+ exit();
256
  }
257
 
258
  /**
637
  }
638
 
639
  $response = array(
640
+ 'redirect' => admin_url( 'admin.php?page=formidable&frm_action=duplicate&id=' . $new_form_id ) . '&_wpnonce=' . wp_create_nonce(),
641
  );
642
  }
643
 
893
 
894
  /**
895
  * Get data from api before rendering it so that we can flag the modal as expired
896
+ *
897
+ * @return void
898
  */
899
  public static function before_list_templates() {
900
  global $frm_templates;
917
  $frm_license_type = $license_type;
918
  }
919
 
920
+ /**
921
+ * @return void
922
+ */
923
  public static function list_templates() {
924
  global $frm_templates;
925
  global $frm_license_type;
1005
  'name' => $template->name,
1006
  'key' => $template->form_key,
1007
  'description' => $template->description,
1008
+ 'url' => wp_nonce_url( admin_url( 'admin.php?page=formidable&frm_action=duplicate&id=' . absint( $template->id ) ) ),
1009
  'released' => $template->created_at,
1010
  'installed' => 1,
1011
  );
1059
  $message = __( 'Template was successfully updated.', 'formidable' );
1060
  }
1061
 
1062
+ self::maybe_update_form_builder_message( $message );
1063
+
1064
  $all_templates = FrmForm::getAll( array( 'is_template' => 1 ), 'name' );
1065
  $has_fields = isset( $values['fields'] ) && ! empty( $values['fields'] );
1066
 
1071
  }
1072
  }
1073
 
1074
+ public static function maybe_update_form_builder_message( &$message ) {
1075
+ if ( 'form_duplicated' === FrmAppHelper::simple_get( 'message' ) ) {
1076
+ $message = __( 'Form was Successfully Copied', 'formidable' );
1077
+ }
1078
+ }
1079
+
1080
  public static function get_settings_vars( $id, $errors = array(), $args = array() ) {
1081
  FrmAppHelper::permission_check( 'frm_edit_forms' );
1082
 
1615
  case 'create':
1616
  case 'edit':
1617
  case 'update':
 
1618
  case 'trash':
1619
  case 'untrash':
1620
  case 'destroy':
1644
  return;
1645
  }
1646
 
1647
+ $message = FrmAppHelper::get_param( 'message' );
1648
+ if ( 'form_duplicate_error' === $message ) {
1649
+ self::display_forms_list( array(), '', array( __( 'There was a problem duplicating the form', 'formidable' ) ) );
1650
+ return;
1651
+ }
1652
+
1653
  self::display_forms_list();
1654
+
1655
  return;
1656
  }
1657
  }
classes/controllers/FrmHooksController.php CHANGED
@@ -110,7 +110,6 @@ class FrmHooksController {
110
  // Addons Controller.
111
  add_action( 'admin_menu', 'FrmAddonsController::menu', 100 );
112
  add_filter( 'pre_set_site_transient_update_plugins', 'FrmAddonsController::check_update' );
113
- add_action( 'frm_page_footer', 'FrmAppHelper::renewal_message' );
114
 
115
  // Entries Controller.
116
  add_action( 'admin_menu', 'FrmEntriesController::menu', 12 );
110
  // Addons Controller.
111
  add_action( 'admin_menu', 'FrmAddonsController::menu', 100 );
112
  add_filter( 'pre_set_site_transient_update_plugins', 'FrmAddonsController::check_update' );
 
113
 
114
  // Entries Controller.
115
  add_action( 'admin_menu', 'FrmEntriesController::menu', 12 );
classes/helpers/FrmAppHelper.php CHANGED
@@ -16,7 +16,7 @@ class FrmAppHelper {
16
  /**
17
  * @since 2.0
18
  */
19
- public static $plug_version = '5.4.1';
20
 
21
  /**
22
  * @since 1.07.02
@@ -1089,6 +1089,42 @@ class FrmAppHelper {
1089
  include( self::plugin_path() . '/classes/views/shared/admin-header.php' );
1090
  }
1091
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1092
  /**
1093
  * Render a button for a new item (Form, Application, etc).
1094
  *
@@ -2876,6 +2912,8 @@ class FrmAppHelper {
2876
  * If Pro is far outdated, show a message.
2877
  *
2878
  * @since 4.0.01
 
 
2879
  */
2880
  public static function min_pro_version_notice( $min_version ) {
2881
  if ( ! self::is_formidable_admin() ) {
@@ -3411,34 +3449,6 @@ class FrmAppHelper {
3411
  set_current_screen();
3412
  }
3413
 
3414
- /**
3415
- * @since 4.07
3416
- * @deprecated 4.09.01
3417
- */
3418
- public static function renewal_message() {
3419
- if ( is_callable( 'FrmProAddonsController::renewal_message' ) ) {
3420
- FrmProAddonsController::renewal_message();
3421
- return;
3422
- }
3423
-
3424
- if ( ! FrmAddonsController::is_license_expired() ) {
3425
- return;
3426
- }
3427
-
3428
- ?>
3429
- <div class="frm_error_style" style="text-align:left">
3430
- <?php self::icon_by_class( 'frmfont frm_alert_icon' ); ?>
3431
- &nbsp;
3432
- <?php esc_html_e( 'Your account has expired', 'formidable' ); ?>
3433
- <div style="float:right">
3434
- <a href="<?php echo esc_url( self::admin_upgrade_link( 'form-expired', 'account/downloads/' ) ); ?>">
3435
- <?php esc_html_e( 'Renew Now', 'formidable' ); ?>
3436
- </a>
3437
- </div>
3438
- </div>
3439
- <?php
3440
- }
3441
-
3442
  /**
3443
  * Shows pill text.
3444
  *
@@ -3738,4 +3748,12 @@ class FrmAppHelper {
3738
  _deprecated_function( __FUNCTION__, '5.0.13', 'FrmProAppHelper::jquery_ui_base_url' );
3739
  return is_callable( 'FrmProAppHelper::jquery_ui_base_url' ) ? FrmProAppHelper::jquery_ui_base_url() : '';
3740
  }
 
 
 
 
 
 
 
 
3741
  }
16
  /**
17
  * @since 2.0
18
  */
19
+ public static $plug_version = '5.4.2';
20
 
21
  /**
22
  * @since 1.07.02
1089
  include( self::plugin_path() . '/classes/views/shared/admin-header.php' );
1090
  }
1091
 
1092
+ /**
1093
+ * Print applicable admin banner.
1094
+ *
1095
+ * @since 5.4.2
1096
+ *
1097
+ * @param bool $should_show_lite_upgrade
1098
+ * @return void
1099
+ */
1100
+ public static function print_admin_banner( $should_show_lite_upgrade ) {
1101
+ if ( ! current_user_can( 'administrator' ) ) {
1102
+ FrmInbox::maybe_show_banner();
1103
+ return;
1104
+ }
1105
+
1106
+ if ( self::maybe_show_license_warning() || FrmInbox::maybe_show_banner() || ! $should_show_lite_upgrade || self::pro_is_installed() ) {
1107
+ // Print license warning or inbox banner and exit if either prints.
1108
+ // And exit before printing the upgrade bar if it shouldn't be shown.
1109
+ return;
1110
+ }
1111
+ ?>
1112
+ <div class="frm-upgrade-bar">
1113
+ <span>You're using Formidable Forms Lite. To unlock more features consider</span>
1114
+ <a href="<?php echo esc_url( self::admin_upgrade_link( 'top-bar' ) ); ?>" target="_blank" rel="noopener">upgrading to Pro</a>.
1115
+ </div>
1116
+ <?php
1117
+ }
1118
+
1119
+ /**
1120
+ * @since 5.4.2
1121
+ *
1122
+ * @return bool True if a banner is available and shown.
1123
+ */
1124
+ private static function maybe_show_license_warning() {
1125
+ return is_callable( 'FrmProAddonsController::admin_banner' ) && FrmProAddonsController::admin_banner();
1126
+ }
1127
+
1128
  /**
1129
  * Render a button for a new item (Form, Application, etc).
1130
  *
2912
  * If Pro is far outdated, show a message.
2913
  *
2914
  * @since 4.0.01
2915
+ *
2916
+ * @return void
2917
  */
2918
  public static function min_pro_version_notice( $min_version ) {
2919
  if ( ! self::is_formidable_admin() ) {
3449
  set_current_screen();
3450
  }
3451
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3452
  /**
3453
  * Shows pill text.
3454
  *
3748
  _deprecated_function( __FUNCTION__, '5.0.13', 'FrmProAppHelper::jquery_ui_base_url' );
3749
  return is_callable( 'FrmProAppHelper::jquery_ui_base_url' ) ? FrmProAppHelper::jquery_ui_base_url() : '';
3750
  }
3751
+
3752
+ /**
3753
+ * @since 4.07
3754
+ * @deprecated x.x
3755
+ */
3756
+ public static function renewal_message() {
3757
+ _deprecated_function( __METHOD__, 'x.x', 'FrmProAddonsController::renewal_message' );
3758
+ }
3759
  }
classes/helpers/FrmFieldsHelper.php CHANGED
@@ -1843,7 +1843,9 @@ class FrmFieldsHelper {
1843
 
1844
  /**
1845
  * @since 4.04
 
1846
  * @param array $args
 
1847
  */
1848
  public static function show_add_field_buttons( $args ) {
1849
  $field_key = $args['field_key'];
1843
 
1844
  /**
1845
  * @since 4.04
1846
+ *
1847
  * @param array $args
1848
+ * @return void
1849
  */
1850
  public static function show_add_field_buttons( $args ) {
1851
  $field_key = $args['field_key'];
classes/models/FrmAddon.php CHANGED
@@ -3,6 +3,7 @@ if ( ! defined( 'ABSPATH' ) ) {
3
  die( 'You are not allowed to call this page directly.' );
4
  }
5
 
 
6
  class FrmAddon {
7
  public $store_url = 'https://formidableforms.com';
8
  public $download_id;
@@ -37,7 +38,7 @@ class FrmAddon {
37
 
38
  public static function load_hooks() {
39
  add_filter( 'frm_include_addon_page', '__return_true' );
40
- //new static();
41
  }
42
 
43
  public function insert_installed_addon( $plugins ) {
3
  die( 'You are not allowed to call this page directly.' );
4
  }
5
 
6
+ /** @phpstan-consistent-constructor */
7
  class FrmAddon {
8
  public $store_url = 'https://formidableforms.com';
9
  public $download_id;
38
 
39
  public static function load_hooks() {
40
  add_filter( 'frm_include_addon_page', '__return_true' );
41
+ new static();
42
  }
43
 
44
  public function insert_installed_addon( $plugins ) {
classes/models/FrmFieldFormHtml.php CHANGED
@@ -130,6 +130,7 @@ class FrmFieldFormHtml {
130
  $this->replace_required_class();
131
  $this->maybe_replace_description_shortcode( false );
132
  $this->replace_error_shortcode();
 
133
  $this->add_field_div_classes();
134
 
135
  $this->replace_entry_key();
@@ -408,9 +409,6 @@ class FrmFieldFormHtml {
408
  private function add_class_to_label() {
409
  $label_class = $this->field_obj->get_label_class();
410
  $this->html = str_replace( '[label_position]', $label_class, $this->html );
411
- if ( $this->field_obj->get_field_column( 'label' ) == 'inside' && $this->field_obj->get_field_column( 'value' ) != '' ) {
412
- $this->html = str_replace( 'frm_primary_label', 'frm_primary_label frm_visible', $this->html );
413
- }
414
  }
415
 
416
  /**
130
  $this->replace_required_class();
131
  $this->maybe_replace_description_shortcode( false );
132
  $this->replace_error_shortcode();
133
+ $this->add_class_to_label();
134
  $this->add_field_div_classes();
135
 
136
  $this->replace_entry_key();
409
  private function add_class_to_label() {
410
  $label_class = $this->field_obj->get_label_class();
411
  $this->html = str_replace( '[label_position]', $label_class, $this->html );
 
 
 
412
  }
413
 
414
  /**
classes/models/FrmFormAction.php CHANGED
@@ -384,7 +384,6 @@ class FrmFormAction {
384
  $new_instance['post_name'] = $this->form_id . '_' . $this->id_base . '_' . $this->number;
385
  $new_instance['menu_order'] = $this->form_id;
386
  $new_instance['post_date'] = isset( $old_instance->post_date ) ? $old_instance->post_date : '';
387
-
388
  $instance = $this->update( $new_instance, $old_instance );
389
 
390
  /**
384
  $new_instance['post_name'] = $this->form_id . '_' . $this->id_base . '_' . $this->number;
385
  $new_instance['menu_order'] = $this->form_id;
386
  $new_instance['post_date'] = isset( $old_instance->post_date ) ? $old_instance->post_date : '';
 
387
  $instance = $this->update( $new_instance, $old_instance );
388
 
389
  /**
classes/models/FrmInbox.php CHANGED
@@ -298,12 +298,18 @@ class FrmInbox extends FrmFormApi {
298
  update_option( $this->option, self::$messages, 'no' );
299
  }
300
 
 
 
 
 
 
301
  public static function maybe_show_banner() {
302
  if ( empty( self::$banner_messages ) ) {
303
- return;
304
  }
305
  $message = end( self::$banner_messages );
306
  require FrmAppHelper::plugin_path() . '/classes/views/inbox/banner.php';
 
307
  }
308
 
309
  public static function maybe_disable_screen_options() {
298
  update_option( $this->option, self::$messages, 'no' );
299
  }
300
 
301
+ /**
302
+ * Show a banner message if one is available.
303
+ *
304
+ * @return bool True if a banner is available and shown.
305
+ */
306
  public static function maybe_show_banner() {
307
  if ( empty( self::$banner_messages ) ) {
308
+ return false;
309
  }
310
  $message = end( self::$banner_messages );
311
  require FrmAppHelper::plugin_path() . '/classes/views/inbox/banner.php';
312
+ return true;
313
  }
314
 
315
  public static function maybe_disable_screen_options() {
classes/models/FrmTableHTMLGenerator.php CHANGED
@@ -53,6 +53,14 @@ class FrmTableHTMLGenerator {
53
  */
54
  protected $td_style = '';
55
 
 
 
 
 
 
 
 
 
56
  /**
57
  * FrmTableHTMLGenerator constructor.
58
  *
@@ -271,9 +279,7 @@ class FrmTableHTMLGenerator {
271
  */
272
  public function generate_two_cell_table_row( $label, $value ) {
273
  $row = '<tr' . $this->tr_style();
274
- if ( $value === '' ) {
275
- $row .= ' class="frm-empty-row"';
276
- }
277
  $row .= '>';
278
 
279
  $label = '<th' . $this->td_style . '>' . wp_kses_post( $label ) . '</th>';
@@ -304,7 +310,9 @@ class FrmTableHTMLGenerator {
304
  * @return string
305
  */
306
  public function generate_single_cell_table_row( $value ) {
307
- $row = '<tr' . $this->tr_style() . '>';
 
 
308
  $row .= '<td colspan="2"' . $this->td_style . '>' . $value . '</td>';
309
  $row .= '</tr>' . "\r\n";
310
 
@@ -312,4 +320,25 @@ class FrmTableHTMLGenerator {
312
 
313
  return $row;
314
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
315
  }
53
  */
54
  protected $td_style = '';
55
 
56
+ /**
57
+ * Used to add a class in tables. Set in Pro.
58
+ *
59
+ * @var bool
60
+ * @since 5.4.2
61
+ */
62
+ public $is_child = false;
63
+
64
  /**
65
  * FrmTableHTMLGenerator constructor.
66
  *
279
  */
280
  public function generate_two_cell_table_row( $label, $value ) {
281
  $row = '<tr' . $this->tr_style();
282
+ $row .= $this->add_row_class( $value === '' );
 
 
283
  $row .= '>';
284
 
285
  $label = '<th' . $this->td_style . '>' . wp_kses_post( $label ) . '</th>';
310
  * @return string
311
  */
312
  public function generate_single_cell_table_row( $value ) {
313
+ $row = '<tr' . $this->tr_style();
314
+ $row .= $this->add_row_class();
315
+ $row .= '>';
316
  $row .= '<td colspan="2"' . $this->td_style . '>' . $value . '</td>';
317
  $row .= '</tr>' . "\r\n";
318
 
320
 
321
  return $row;
322
  }
323
+
324
+ /**
325
+ * Add classes to the tr.
326
+ *
327
+ * @since 5.4.2
328
+ * @param bool $empty If the value in the row is blank.
329
+ */
330
+ protected function add_row_class( $empty = false ) {
331
+ $class = '';
332
+ if ( $empty ) {
333
+ // Only add this class on two cell rows.
334
+ $class .= ' frm-empty-row';
335
+ }
336
+ if ( $this->is_child ) {
337
+ $class .= ' frm-child-row';
338
+ }
339
+ if ( $class ) {
340
+ $class = ' class="' . trim( $class ) . '"';
341
+ }
342
+ return $class;
343
+ }
344
  }
classes/models/fields/FrmFieldType.php CHANGED
@@ -1058,24 +1058,51 @@ DEFAULT_HTML;
1058
  protected function add_aria_description( $args, &$input_html ) {
1059
  $aria_describedby_exists = preg_match_all( '/aria-describedby=\"([^\"]*)\"/', $input_html, $matches ) === 1;
1060
  if ( $aria_describedby_exists ) {
1061
- $describedby = 'aria-describedby="' . esc_attr( trim( $matches[1][0] ) );
1062
  } else {
1063
- $describedby = '';
1064
  }
1065
 
1066
- if ( $this->get_field_column( 'description' ) !== '' ) {
1067
- $describedby .= ' frm_desc_' . $args['html_id'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1068
  }
1069
 
1070
- if ( isset( $args['errors'][ 'field' . $args['field_id'] ] ) ) {
1071
- $describedby .= ' frm_error_' . $args['html_id'];
 
 
 
 
1072
  }
1073
 
 
 
1074
  if ( $aria_describedby_exists ) {
1075
- $input_html = preg_replace( '/aria-describedby=\"[^\"]*\"/', $describedby . '"', $input_html );
1076
- } elseif ( ! empty( $describedby ) ) {
1077
  $input_html .= ' aria-describedby="' . esc_attr( trim( $describedby ) ) . '"';
1078
  }
 
 
 
 
1079
  }
1080
 
1081
  /**
1058
  protected function add_aria_description( $args, &$input_html ) {
1059
  $aria_describedby_exists = preg_match_all( '/aria-describedby=\"([^\"]*)\"/', $input_html, $matches ) === 1;
1060
  if ( $aria_describedby_exists ) {
1061
+ $describedby = preg_split( '/\s+/', esc_attr( trim( $matches[1][0] ) ) );
1062
  } else {
1063
+ $describedby = array();
1064
  }
1065
 
1066
+ $error_comes_first = true;
1067
+
1068
+ $custom_error_fields = preg_grep( '/frm_error_field_*/', $describedby );
1069
+ $custom_desc_fields = preg_grep( '/frm_desc_field_*/', $describedby );
1070
+
1071
+ if ( $custom_desc_fields && $custom_error_fields ) {
1072
+ reset( $custom_error_fields );
1073
+ reset( $custom_desc_fields );
1074
+ if ( key( $custom_error_fields ) > key( $custom_desc_fields ) ) {
1075
+ $error_comes_first = false;
1076
+ }
1077
+ }
1078
+
1079
+ if ( isset( $args['errors'][ 'field' . $args['field_id'] ] ) && ! $custom_error_fields ) {
1080
+ if ( $error_comes_first ) {
1081
+ array_unshift( $describedby, 'frm_error_' . $args['html_id'] );
1082
+ } else {
1083
+ array_push( $describedby, 'frm_error_' . $args['html_id'] );
1084
+ }
1085
  }
1086
 
1087
+ if ( $this->get_field_column( 'description' ) !== '' ) {
1088
+ if ( ! $error_comes_first ) {
1089
+ array_unshift( $describedby, 'frm_desc_' . $args['html_id'] );
1090
+ } else {
1091
+ array_push( $describedby, 'frm_desc_' . $args['html_id'] );
1092
+ }
1093
  }
1094
 
1095
+ $describedby = implode( ' ', $describedby );
1096
+
1097
  if ( $aria_describedby_exists ) {
1098
+ $input_html = preg_replace( '/aria-describedby=\"[^\"]*\"/', 'aria-describedby="' . $describedby . '"', $input_html );
1099
+ } elseif ( $describedby ) {
1100
  $input_html .= ' aria-describedby="' . esc_attr( trim( $describedby ) ) . '"';
1101
  }
1102
+
1103
+ if ( ! $error_comes_first ) {
1104
+ $input_html .= ' data-error-first="0"';
1105
+ }
1106
  }
1107
 
1108
  /**
classes/views/frm-form-actions/_action_inside.php CHANGED
@@ -79,7 +79,7 @@ if ( ! FrmAppHelper::pro_is_installed() ) {
79
  }
80
 
81
  // Show Form Action Automation indicator.
82
- if ( ! function_exists( 'load_frm_autoresponder' ) ) {
83
  $upgrading = FrmAddonsController::install_link( 'autoresponder' );
84
  $params = array(
85
  'href' => 'javascript:void(0)',
79
  }
80
 
81
  // Show Form Action Automation indicator.
82
+ if ( ! function_exists( 'load_frm_autoresponder' ) && in_array( $form_action->post_excerpt, apply_filters( 'frm_autoresponder_allowed_actions', array( 'email', 'twilio', 'api', 'register' ) ), true ) ) {
83
  $upgrading = FrmAddonsController::install_link( 'autoresponder' );
84
  $params = array(
85
  'href' => 'javascript:void(0)',
classes/views/frm-form-actions/default_actions.php CHANGED
@@ -65,6 +65,7 @@ class FrmDefMlcmpAction extends FrmFormAction {
65
  class FrmDefZapierAction extends FrmFormAction {
66
  public function __construct() {
67
  $action_ops = FrmFormAction::default_action_opts( 'frm_zapier_icon frm_show_upgrade' );
 
68
  parent::__construct( 'zapier', 'Zapier', $action_ops );
69
  }
70
  }
65
  class FrmDefZapierAction extends FrmFormAction {
66
  public function __construct() {
67
  $action_ops = FrmFormAction::default_action_opts( 'frm_zapier_icon frm_show_upgrade' );
68
+ $action_ops['color'] = 'var(--orange)';
69
  parent::__construct( 'zapier', 'Zapier', $action_ops );
70
  }
71
  }
classes/views/frm-forms/list-template.php CHANGED
@@ -23,7 +23,7 @@ if ( ! empty( $template['custom'] ) ) {
23
  } elseif ( ! empty( $template['custom'] ) ) {
24
  echo 'data-formid="' . absint( $template['id'] ) . '" ';
25
  echo 'data-custom="1" ';
26
- echo 'data-href="' . esc_url( admin_url( '?page=formidable&frm_action=duplicate&id=' . $template['id'] ) ) . '" ';
27
  } elseif ( ! $plan_required ) {
28
  $link = FrmFormsHelper::get_template_install_link( $template, $args );
29
  echo 'data-rel="' . esc_url( $link['url'] ) . '" ';
23
  } elseif ( ! empty( $template['custom'] ) ) {
24
  echo 'data-formid="' . absint( $template['id'] ) . '" ';
25
  echo 'data-custom="1" ';
26
+ echo 'data-href="' . esc_url( $template['url'] ) . '" ';
27
  } elseif ( ! $plan_required ) {
28
  $link = FrmFormsHelper::get_template_install_link( $template, $args );
29
  echo 'data-rel="' . esc_url( $link['url'] ) . '" ';
classes/views/frm-forms/new-form-overlay/leave-email.php CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
4
  }
5
  ?>
6
  <div class="frmcenter">
7
- <div id="frmapi-email-form" class="frmapi-form frm_hidden" data-url="https://community.formidableforms.com/wp-json/frm/v2/forms/freetemplates?return=html">
8
  <span class="frm-wait"></span>
9
  </div>
10
  <img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/leave-email.svg' ); ?>" />
4
  }
5
  ?>
6
  <div class="frmcenter">
7
+ <div id="frmapi-email-form" class="frmapi-form frm_hidden" data-url="https://sandbox.formidableforms.com/api/wp-json/frm/v2/forms/freetemplates?return=html&exclude_script=jquery&exclude_style=formidable-css">
8
  <span class="frm-wait"></span>
9
  </div>
10
  <img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/leave-email.svg' ); ?>" />
classes/views/shared/admin-header.php CHANGED
@@ -3,15 +3,7 @@ if ( ! defined( 'ABSPATH' ) ) {
3
  die( 'You are not allowed to call this page directly.' );
4
  }
5
 
6
- if ( current_user_can( 'administrator' ) && ! FrmAppHelper::pro_is_installed() && ! $has_nav && empty( $atts['switcher'] ) ) {
7
- ?>
8
- <div class="frm-upgrade-bar">
9
- <span>You're using Formidable Forms Lite. To unlock more features consider</span>
10
- <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'top-bar' ) ); ?>" target="_blank" rel="noopener">upgrading to Pro</a>.
11
- </div>
12
- <?php
13
- }
14
- FrmInbox::maybe_show_banner();
15
  ?>
16
  <div id="frm_top_bar">
17
  <?php if ( FrmAppHelper::is_full_screen() ) { ?>
3
  die( 'You are not allowed to call this page directly.' );
4
  }
5
 
6
+ FrmAppHelper::print_admin_banner( ! $has_nav && empty( $atts['switcher'] ) );
 
 
 
 
 
 
 
 
7
  ?>
8
  <div id="frm_top_bar">
9
  <?php if ( FrmAppHelper::is_full_screen() ) { ?>
classes/views/shared/review.php CHANGED
@@ -36,7 +36,7 @@ if ( ! defined( 'ABSPATH' ) ) {
36
  <div class="frm-feedback-request frm_hidden">
37
  <p><?php esc_html_e( 'Sorry to hear you aren\'t enjoying building with Formidable. We would love a chance to improve. Could you take a minute and let us know what we can do better?', 'formidable' ); ?></p>
38
 
39
- <div id="frmapi-feedback" class="frmapi-form" data-url="https://community.formidableforms.com/wp-json/frm/v2/forms/feedback?return=html">
40
  <span class="frm-wait frm_visible_spinner"></span>
41
  </div>
42
  </div>
@@ -89,8 +89,7 @@ if ( ! defined( 'ABSPATH' ) ) {
89
  url:frmcont.data('url'),
90
  success:function(json){
91
  var form = json.renderedHtml;
92
- form = form.replace(/<script\b[^<]*(community.formidableforms.com\/wp-includes\/js\/jquery\/jquery)[^<]*><\/script>/gi, '' );
93
- form = form.replace(/<link\b[^>]*(formidableforms.css)[^>]*>/gi, '' );
94
  frmcont.html(form);
95
  }
96
  });
36
  <div class="frm-feedback-request frm_hidden">
37
  <p><?php esc_html_e( 'Sorry to hear you aren\'t enjoying building with Formidable. We would love a chance to improve. Could you take a minute and let us know what we can do better?', 'formidable' ); ?></p>
38
 
39
+ <div id="frmapi-feedback" class="frmapi-form" data-url="https://sandbox.formidableforms.com/api/wp-json/frm/v2/forms/feedback?return=html&exclude_script=jquery&exclude_style=formidable-css">
40
  <span class="frm-wait frm_visible_spinner"></span>
41
  </div>
42
  </div>
89
  url:frmcont.data('url'),
90
  success:function(json){
91
  var form = json.renderedHtml;
92
+ form = form.replace(/<link\b[^>]*(formidableforms.css|action=frmpro_css)[^>]*>/gi, '' );
 
93
  frmcont.html(form);
94
  }
95
  });
classes/views/styles/_sample_form.php CHANGED
@@ -31,7 +31,7 @@ if ( ! defined( 'ABSPATH' ) ) {
31
 
32
  <select name="item_meta[1028]" id="field_wq7w5e" >
33
  <option value=""> </option>
34
- <option value=""><?php esc_html_e( 'Option 1', 'formidable' ); ?></option>
35
  </select>
36
  </div>
37
 
31
 
32
  <select name="item_meta[1028]" id="field_wq7w5e" >
33
  <option value=""> </option>
34
+ <option value="option-1"><?php esc_html_e( 'Option 1', 'formidable' ); ?></option>
35
  </select>
36
  </div>
37
 
css/frm_admin.css CHANGED
@@ -92,9 +92,9 @@ a, .widget .widget-top, .stuffbox h3, .frm-collapsed {
92
  display: none;
93
  }
94
 
95
- .frm-white-body #screen-meta-links .screen-meta-toggle {
96
  position: absolute;
97
- right: 160px;
98
  box-shadow: none;
99
  border-bottom-left-radius: var(--small-radius);
100
  border-bottom-right-radius: var(--small-radius);
@@ -235,15 +235,14 @@ td.column-title .frm_actions_dropdown {
235
  }
236
 
237
  .frm-upgrade-bar {
238
- text-align: center;
239
  background: var(--sidebar-color);
240
  border-bottom: 1px solid var(--sidebar-hover);
241
- padding: 3px 0;
242
  font-size: 95%;
243
  }
244
 
245
  .frm-upgrade-bar span {
246
- opacity: .5;
247
  }
248
 
249
  a h1 .frmsvg {
@@ -492,6 +491,10 @@ ul.frm_form_nav > li:last-of-type {
492
  display: none;
493
  }
494
 
 
 
 
 
495
  .frm_animate_bg {
496
  transition: background 200ms linear, color 200ms linear;
497
  }
@@ -1617,6 +1620,19 @@ div.frm_updated_message {
1617
  margin-bottom:4px;
1618
  }
1619
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1620
  .frm_updated_message ul,
1621
  .frm_updated_message li,
1622
  .frm_warning_style ul,
@@ -1822,7 +1838,7 @@ h2.frm-h2 + .howto {
1822
  font-size: 13px;
1823
  }
1824
 
1825
- #frm_save_and_reload_settings, #frm_save_and_reload_settings + .frm-button-secondary {
1826
  visibility: visible;
1827
  }
1828
 
@@ -3694,6 +3710,10 @@ label input[type="checkbox"], label input[type="radio"] {
3694
  background-color: var(--sidebar-color);
3695
  }
3696
 
 
 
 
 
3697
  .form-field .frm_cb_button {
3698
  height: 22px;
3699
  line-height: 20px;
92
  display: none;
93
  }
94
 
95
+ .frm-full-screen #screen-meta-links .screen-meta-toggle {
96
  position: absolute;
97
+ right: 80px;
98
  box-shadow: none;
99
  border-bottom-left-radius: var(--small-radius);
100
  border-bottom-right-radius: var(--small-radius);
235
  }
236
 
237
  .frm-upgrade-bar {
 
238
  background: var(--sidebar-color);
239
  border-bottom: 1px solid var(--sidebar-hover);
240
+ padding: 3px 0 3px 60px;
241
  font-size: 95%;
242
  }
243
 
244
  .frm-upgrade-bar span {
245
+ opacity: .9;
246
  }
247
 
248
  a h1 .frmsvg {
491
  display: none;
492
  }
493
 
494
+ .frm-child-row {
495
+ box-shadow: 5px 0px 0px 0px inset var(--sidebar-hover);
496
+ }
497
+
498
  .frm_animate_bg {
499
  transition: background 200ms linear, color 200ms linear;
500
  }
1620
  margin-bottom:4px;
1621
  }
1622
 
1623
+ .frm-banner-alert {
1624
+ text-align: left;
1625
+ margin: 0;
1626
+ border-radius: 0;
1627
+ padding: 10px 0 10px 50px;
1628
+ }
1629
+
1630
+ .frm-banner-alert a {
1631
+ color: var(--primary-color);
1632
+ font-weight: 400;
1633
+ text-decoration: none;
1634
+ }
1635
+
1636
  .frm_updated_message ul,
1637
  .frm_updated_message li,
1638
  .frm_warning_style ul,
1838
  font-size: 13px;
1839
  }
1840
 
1841
+ #frm_save_and_reload, #frm_save_and_reload + .frm-button-secondary {
1842
  visibility: visible;
1843
  }
1844
 
3710
  background-color: var(--sidebar-color);
3711
  }
3712
 
3713
+ .frm-alt-table h3 {
3714
+ margin-bottom: 0;
3715
+ }
3716
+
3717
  .form-field .frm_cb_button {
3718
  height: 22px;
3719
  line-height: 20px;
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: 5.4.1
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: 5.4.2
6
  Plugin URI: https://formidableforms.com/
7
  Author URI: https://formidableforms.com/
8
  Author: Strategy11
images/icons.svg CHANGED
@@ -891,9 +891,9 @@
891
  <symbol id="frm_folder_icon" viewBox="0 0 28 28" fill="none">
892
  <title>directory</title>
893
  <path fill-rule="evenodd" clip-rule="evenodd" d="M5 6.8c-.3 0-.6.1-.9.4-.2.2-.3.5-.3.9v14c0 .4 0 .8.3 1 .3.3.6.4 1 .4h15.6c.4 0 .7-.1 1-.4.1-.2.3-.6.3-1v-11c0-.3-.2-.7-.4-1-.2-.2-.5-.3-.9-.3H12a.7.7 0 01-.6-.3L9.5 6.8H5zm-1.9-.6c.5-.5 1.2-.8 2-.8h4.8c.3 0 .5 0 .6.3l1.8 2.7h8.4c.7 0 1.4.3 2 .8.4.5.7 1.2.7 2v11c0 .7-.3 1.4-.8 1.9s-1.2.8-1.9.8H5c-.7 0-1.4-.3-1.9-.8s-.8-1.2-.8-2v-14c0-.7.3-1.4.8-2z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M4.2 2.7c0-.4.3-.7.7-.7h6.8c.3 0 .5 0 .6.3L14 5h9a3 3 0 013 3v11.3a.7.7 0 11-1.4 0V8c0-.9-.7-1.6-1.6-1.6h-9.4a.7.7 0 01-.6-.3l-1.7-2.7H5a.7.7 0 01-.7-.7z" fill="currentColor"/></symbol>
894
- <symbol id="frm_zapier_icon" viewBox="0 0 28 27">
895
  <title>Zapier</title>
896
- <path fill-rule="evenodd" clip-rule="evenodd" d="M13.6 1.7h-.2a1 1 0 00-.2 0h-.7l-.1.1h-.1-.1-.2v6.9A879.5 879.5 0 016.7 4l-.1.1h-.1v.1h-.1l-.1.1-.1.1-.2.1-.1.1-.1.1-.1.1A15.2 15.2 0 004 6.6a797.2 797.2 0 005 5H2V12.6l-.1.2V15.3l.1.1v.1h7.2l-.4.4a734.5 734.5 0 00-4.5 4.7v.1l.1.1.1.1v.1h.1v.1h.1v.1l.1.1.1.1H5l.1.2A15.2 15.2 0 006.9 23a275.5 275.5 0 005-4.9v6.9h.5l.1.1H16v-3.5-3.5a884.4 884.4 0 015.3 4.8v-.1h.2v-.1h.1v-.1h.1l.1-.1.2-.1v-.1h.1l.1-.1.1-.1a16 16 0 001.7-1.9 702.3 702.3 0 00-5-4.8H26v-.1-.1-.2-.1-.1-.2l.1-.2v-.1-.1-.2-.3-.3-.4-.2-.2-.1-.1-.2-.1-.1-.1-.2l-.1-.2h-7.2a886 886 0 015-5.1l-.1-.1v-.1h-.1l-.1-.1V6h-.1V6l-.1-.1-.1-.1-.1-.1-.1-.1-.1-.1a16 16 0 00-1.9-1.6 272 272 0 00-5 4.8V1.8H16h-.2-.1-.2-.1-.1-.1-.1-.2-.1-.2a1 1 0 01-.2-.1h-.8zm.6 8.8H14.8l.2.1h.5v.1h.4l.1.1H16.4v.1h.2v.1h.1v.2l.1.1v.2h.1v.4h.1v.5l.1.1v1a3.8 3.8 0 010 .8v.6l-.1.1V15.4h-.1V15.7l-.1.1v.2h-.1v.1h-.1-.1l-.1.1h-.1-.1-.1v.1h-.1-.1-.1-.1l-.1.1h-.1-.1-.1-.2-.1l-.1.1h-.1-.1-.4-.4-.8H12.7h-.1l-.1-.1H12.1l-.1-.1H12h-.1-.1V16h-.2-.1V16h-.1v-.1-.1h-.1v-.1-.1-.1l-.1-.1v-.1-.1-.1L11 15v-.1-.1-.1-.1-.1H11v-.1-.1-.1-.1-.2-.4a3.8 3.8 0 010-.8v-.2-.2-.1-.1l.1-.1v-.1-.1-.1l.1-.1v-.1-.1-.1h.1v-.1-.1h.1V11h.2v-.1H12l.1-.1H12.4l.1-.1h.5l.1-.1h1.2z" fill="currentColor"/></symbol>
897
  <symbol id="frm_alert_icon" viewBox="0 0 17 15"><path d="M16.8 12.9c.6 1-.1 2.1-1.2 2.1H1.4c-1 0-1.8-1.2-1.2-2.1L7.2.7c.6-1 2-1 2.5 0l7.1 12.2zm-8.3-2.5c-.7 0-1.4.6-1.4 1.3 0 .8.7 1.4 1.4 1.4s1.4-.6 1.4-1.4c0-.7-.7-1.3-1.4-1.3zM7.2 5.5l.2 4c0 .2.2.3.4.3h1.4c.2 0 .4-.1.4-.3l.2-4c0-.2-.2-.3-.4-.3H7.6c-.2 0-.4.1-.4.3z" fill="currentColor"/></symbol>
898
  <title>Preview</title>
899
  <symbol id="frm_eye_simple" viewBox="0 0 18 16"><path d="M1.667 8S4.333 2.667 9 2.667 16.333 8 16.333 8 13.667 13.333 9 13.333 1.667 8 1.667 8z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 10a2 2 0 100-4 2 2 0 000 4z" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></symbol>
891
  <symbol id="frm_folder_icon" viewBox="0 0 28 28" fill="none">
892
  <title>directory</title>
893
  <path fill-rule="evenodd" clip-rule="evenodd" d="M5 6.8c-.3 0-.6.1-.9.4-.2.2-.3.5-.3.9v14c0 .4 0 .8.3 1 .3.3.6.4 1 .4h15.6c.4 0 .7-.1 1-.4.1-.2.3-.6.3-1v-11c0-.3-.2-.7-.4-1-.2-.2-.5-.3-.9-.3H12a.7.7 0 01-.6-.3L9.5 6.8H5zm-1.9-.6c.5-.5 1.2-.8 2-.8h4.8c.3 0 .5 0 .6.3l1.8 2.7h8.4c.7 0 1.4.3 2 .8.4.5.7 1.2.7 2v11c0 .7-.3 1.4-.8 1.9s-1.2.8-1.9.8H5c-.7 0-1.4-.3-1.9-.8s-.8-1.2-.8-2v-14c0-.7.3-1.4.8-2z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M4.2 2.7c0-.4.3-.7.7-.7h6.8c.3 0 .5 0 .6.3L14 5h9a3 3 0 013 3v11.3a.7.7 0 11-1.4 0V8c0-.9-.7-1.6-1.6-1.6h-9.4a.7.7 0 01-.6-.3l-1.7-2.7H5a.7.7 0 01-.7-.7z" fill="currentColor"/></symbol>
894
+ <symbol id="frm_zapier_icon" viewBox="0 0 24 24">
895
  <title>Zapier</title>
896
+ <path fill="currentColor" d="M4 16h16v4H4z"/></symbol>
897
  <symbol id="frm_alert_icon" viewBox="0 0 17 15"><path d="M16.8 12.9c.6 1-.1 2.1-1.2 2.1H1.4c-1 0-1.8-1.2-1.2-2.1L7.2.7c.6-1 2-1 2.5 0l7.1 12.2zm-8.3-2.5c-.7 0-1.4.6-1.4 1.3 0 .8.7 1.4 1.4 1.4s1.4-.6 1.4-1.4c0-.7-.7-1.3-1.4-1.3zM7.2 5.5l.2 4c0 .2.2.3.4.3h1.4c.2 0 .4-.1.4-.3l.2-4c0-.2-.2-.3-.4-.3H7.6c-.2 0-.4.1-.4.3z" fill="currentColor"/></symbol>
898
  <title>Preview</title>
899
  <symbol id="frm_eye_simple" viewBox="0 0 18 16"><path d="M1.667 8S4.333 2.667 9 2.667 16.333 8 16.333 8 13.667 13.333 9 13.333 1.667 8 1.667 8z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 10a2 2 0 100-4 2 2 0 000 4z" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></symbol>
js/admin/dom.js CHANGED
@@ -1,5 +1,3 @@
1
- let frmDom;
2
-
3
  ( function() {
4
  /** globals frmGlobal */
5
 
@@ -268,7 +266,13 @@ let frmDom;
268
  if ( this.value === '' || this.nextElementSibling.value < 1 ) {
269
  jQuery( this ).autocomplete( 'search', this.value );
270
  }
271
- });
 
 
 
 
 
 
272
  }
273
  },
274
 
@@ -530,5 +534,5 @@ let frmDom;
530
  element.appendChild( child );
531
  }
532
 
533
- frmDom = { tag, div, span, a, img, svg, setAttributes, modal, ajax, bootstrap, autocomplete, search, util };
534
  }() );
 
 
1
  ( function() {
2
  /** globals frmGlobal */
3
 
266
  if ( this.value === '' || this.nextElementSibling.value < 1 ) {
267
  jQuery( this ).autocomplete( 'search', this.value );
268
  }
269
+ })
270
+ .data('ui-autocomplete')._renderItem = function( ul, item ) {
271
+ return jQuery( '<li>' )
272
+ .attr( 'aria-label', item.label )
273
+ .append( jQuery( '<div>' ).text( item.label ) )
274
+ .appendTo( ul );
275
+ };
276
  }
277
  },
278
 
534
  element.appendChild( child );
535
  }
536
 
537
+ window.frmDom = { tag, div, span, a, img, svg, setAttributes, modal, ajax, bootstrap, autocomplete, search, util };
538
  }() );
js/formidable.js CHANGED
@@ -816,9 +816,14 @@ function frmFrontFormJS() {
816
 
817
  if ( typeof describedBy === 'undefined' ) {
818
  describedBy = id;
819
- } else if ( describedBy.indexOf( id ) === -1 ) {
820
- describedBy = describedBy + ' ' + id;
 
 
 
 
821
  }
 
822
  input.attr( 'aria-describedby', describedBy );
823
  }
824
  input.attr( 'aria-invalid', true );
@@ -1216,14 +1221,14 @@ function frmFrontFormJS() {
1216
  firstOpt = input.querySelector( 'option:first-child' );
1217
 
1218
  if ( shouldFloatTop ) {
1219
- if ( firstOpt.getAttribute( 'data-label' ) ) {
1220
- firstOpt.text = firstOpt.getAttribute( 'data-label' );
1221
  firstOpt.removeAttribute( 'data-label' );
1222
  }
1223
  } else {
1224
- if ( firstOpt.text ) {
1225
- firstOpt.setAttribute( 'data-label', firstOpt.text );
1226
- firstOpt.text = '';
1227
  }
1228
  }
1229
  } else if ( isIE() ) {
@@ -1235,9 +1240,9 @@ function frmFrontFormJS() {
1235
  document.querySelectorAll( '.frm-show-form .frm_inside_container:not(.' + floatClass + ') select' ).forEach( function( input ) {
1236
  var firstOpt = input.querySelector( 'option:first-child' );
1237
 
1238
- if ( firstOpt.text ) {
1239
- firstOpt.setAttribute( 'data-label', firstOpt.text );
1240
- firstOpt.text = '';
1241
  }
1242
  });
1243
  };
@@ -1249,7 +1254,7 @@ function frmFrontFormJS() {
1249
  }
1250
 
1251
  if ( document.activeElement === input ) {
1252
- if ( input.getAttribute( 'data-placeholder' ) ) {
1253
  input.placeholder = input.getAttribute( 'data-placeholder' );
1254
  input.removeAttribute( 'data-placeholder' );
1255
  }
816
 
817
  if ( typeof describedBy === 'undefined' ) {
818
  describedBy = id;
819
+ } else if ( describedBy.indexOf( id ) === -1 && describedBy.indexOf( 'frm_error_field_' ) === -1 ) {
820
+ if ( input.data( 'error-first' ) === 0 ) {
821
+ describedBy = describedBy + ' ' + id;
822
+ } else {
823
+ describedBy = id + ' ' + describedBy;
824
+ }
825
  }
826
+
827
  input.attr( 'aria-describedby', describedBy );
828
  }
829
  input.attr( 'aria-invalid', true );
1221
  firstOpt = input.querySelector( 'option:first-child' );
1222
 
1223
  if ( shouldFloatTop ) {
1224
+ if ( firstOpt.hasAttribute( 'data-label' ) ) {
1225
+ firstOpt.textContent = firstOpt.getAttribute( 'data-label' );
1226
  firstOpt.removeAttribute( 'data-label' );
1227
  }
1228
  } else {
1229
+ if ( firstOpt.textContent ) {
1230
+ firstOpt.setAttribute( 'data-label', firstOpt.textContent );
1231
+ firstOpt.textContent = '';
1232
  }
1233
  }
1234
  } else if ( isIE() ) {
1240
  document.querySelectorAll( '.frm-show-form .frm_inside_container:not(.' + floatClass + ') select' ).forEach( function( input ) {
1241
  var firstOpt = input.querySelector( 'option:first-child' );
1242
 
1243
+ if ( firstOpt.textContent ) {
1244
+ firstOpt.setAttribute( 'data-label', firstOpt.textContent );
1245
+ firstOpt.textContent = '';
1246
  }
1247
  });
1248
  };
1254
  }
1255
 
1256
  if ( document.activeElement === input ) {
1257
+ if ( input.hasAttribute( 'data-placeholder' ) ) {
1258
  input.placeholder = input.getAttribute( 'data-placeholder' );
1259
  input.removeAttribute( 'data-placeholder' );
1260
  }
js/formidable.min.js CHANGED
@@ -30,35 +30,36 @@ typeof action&&-1!==action.indexOf("?action=frm_forms_preview"))ajaxUrl=action.s
30
  response])}function removeAddedScripts(formContainer,formID){var endReplace=jQuery(".frm_end_ajax_"+formID);if(endReplace.length){formContainer.nextUntil(".frm_end_ajax_"+formID).remove();endReplace.remove()}}function maybeSlideOut(oldContent,newContent){var c,newClass="frm_slideout";if(newContent.indexOf(" frm_slide")!==-1){c=oldContent.children();if(newContent.indexOf(" frm_going_back")!==-1)newClass+=" frm_going_back";c.removeClass("frm_going_back");c.addClass(newClass);return 300}return 0}function addUrlParam(response){var url;
31
  if(history.pushState&&typeof response.page!=="undefined"){url=addQueryVar("frm_page",response.page);window.history.pushState({"html":response.html},"","?"+url)}}function addQueryVar(key,value){var kvp,i,x;key=encodeURI(key);value=encodeURI(value);kvp=document.location.search.substr(1).split("&");i=kvp.length;while(i--){x=kvp[i].split("=");if(x[0]==key){x[1]=value;kvp[i]=x.join("=");break}}if(i<0)kvp[kvp.length]=[key,value].join("=");return kvp.join("&")}function addFieldError($fieldCont,key,jsErrors){var input,
32
  id,describedBy,roleString;if($fieldCont.length&&$fieldCont.is(":visible")){$fieldCont.addClass("frm_blank_field");input=$fieldCont.find("input, select, textarea");id="frm_error_field_"+key;describedBy=input.attr("aria-describedby");if(typeof frmThemeOverride_frmPlaceError==="function")frmThemeOverride_frmPlaceError(key,jsErrors);else{if(-1!==jsErrors[key].indexOf("<div"))$fieldCont.append(jsErrors[key]);else{roleString=frm_js.include_alert_role?'role="alert"':"";$fieldCont.append('<div class="frm_error" '+
33
- roleString+' id="'+id+'">'+jsErrors[key]+"</div>")}if(typeof describedBy==="undefined")describedBy=id;else if(describedBy.indexOf(id)===-1)describedBy=describedBy+" "+id;input.attr("aria-describedby",describedBy)}input.attr("aria-invalid",true);jQuery(document).trigger("frmAddFieldError",[$fieldCont,key,jsErrors])}}function removeFieldError($fieldCont){var errorMessage=$fieldCont.find(".frm_error"),errorId=errorMessage.attr("id"),input=$fieldCont.find("input, select, textarea"),describedBy=input.attr("aria-describedby");
34
- $fieldCont.removeClass("frm_blank_field has-error");errorMessage.remove();input.attr("aria-invalid",false);input.removeAttr("aria-describedby");if(typeof describedBy!=="undefined"){describedBy=describedBy.replace(errorId,"");input.attr("aria-describedby",describedBy)}}function removeAllErrors(){jQuery(".form-field").removeClass("frm_blank_field has-error");jQuery(".form-field .frm_error").replaceWith("");jQuery(".frm_error_style").remove()}function scrollToFirstField(object){var field=jQuery(object).find(".frm_blank_field").first();
35
- if(field.length)frmFrontForm.scrollMsg(field,object,true)}function showSubmitLoading($object){showLoadingIndicator($object);disableSubmitButton($object);disableSaveDraft($object)}function showLoadingIndicator($object){if(!$object.hasClass("frm_loading_form")&&!$object.hasClass("frm_loading_prev")){addLoadingClass($object);$object.trigger("frmStartFormLoading")}}function addLoadingClass($object){var loadingClass=isGoingToPrevPage($object)?"frm_loading_prev":"frm_loading_form";$object.addClass(loadingClass)}
36
- function isGoingToPrevPage($object){return typeof frmProForm!=="undefined"&&frmProForm.goingToPreviousPage($object)}function removeSubmitLoading($object,enable,processesRunning){var loadingForm;if(processesRunning>0)return;loadingForm=jQuery(".frm_loading_form");loadingForm.removeClass("frm_loading_form");loadingForm.removeClass("frm_loading_prev");loadingForm.trigger("frmEndFormLoading");if(enable==="enable"){enableSubmitButton(loadingForm);enableSaveDraft(loadingForm)}}function showFileLoading(object){var fileval,
37
- loading=document.getElementById("frm_loading");if(loading!==null){fileval=jQuery(object).find("input[type=file]").val();if(typeof fileval!=="undefined"&&fileval!=="")setTimeout(function(){jQuery(loading).fadeIn("slow")},2E3)}}function clearDefault(){toggleDefault(jQuery(this),"clear")}function replaceDefault(){toggleDefault(jQuery(this),"replace")}function toggleDefault($thisField,e){var thisVal,v=$thisField.data("frmval").replace(/(\n|\r\n)/g,"\r");if(v===""||typeof v==="undefined")return false;
38
- thisVal=$thisField.val().replace(/(\n|\r\n)/g,"\r");if("replace"===e){if(thisVal==="")$thisField.addClass("frm_default").val(v)}else if(thisVal==v)$thisField.removeClass("frm_default").val("")}function resendEmail(){var $link=jQuery(this),entryId=this.getAttribute("data-eid"),formId=this.getAttribute("data-fid"),label=$link.find(".frm_link_label");if(label.length<1)label=$link;label.append('<span class="frm-wait"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_send_email",
39
- entry_id:entryId,form_id:formId,nonce:frm_js.nonce},success:function(msg){var admin=document.getElementById("wpbody");if(admin===null)label.html(msg);else{label.html("");$link.after(msg)}}});return false}function confirmClick(){var message=jQuery(this).data("frmconfirm");return confirm(message)}function toggleDiv(){var div=jQuery(this).data("frmtoggle");if(jQuery(div).is(":visible"))jQuery(div).slideUp("fast");else jQuery(div).slideDown("fast");return false}function addIndexOfFallbackForIE8(){var len,
40
- from;if(!Array.prototype.indexOf)Array.prototype.indexOf=function(elt){len=this.length>>>0;from=Number(arguments[1])||0;from=from<0?Math.ceil(from):Math.floor(from);if(from<0)from+=len;for(;from<len;from++)if(from in this&&this[from]===elt)return from;return-1}}function addTrimFallbackForIE8(){if(typeof String.prototype.trim!=="function")String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}}function addFilterFallbackForIE8(){var t,len,res,thisp,i,val;if(!Array.prototype.filter)Array.prototype.filter=
41
- function(fun){if(this===void 0||this===null)throw new TypeError;t=Object(this);len=t.length>>>0;if(typeof fun!=="function")throw new TypeError;res=[];thisp=arguments[1];for(i=0;i<len;i++)if(i in t){val=t[i];if(fun.call(thisp,val,i,t))res.push(val)}return res}}function addKeysFallbackForIE8(){var keys,i;if(!Object.keys)Object.keys=function(obj){keys=[];for(i in obj)if(obj.hasOwnProperty(i))keys.push(i);return keys}}function onHoneypotFieldChange(){var css=jQuery(this).css("box-shadow");if(css.match(/inset/))this.parentNode.removeChild(this)}
42
- function changeFocusWhenClickComboFieldLabel(){var label;var comboInputsContainer=document.querySelectorAll(".frm_combo_inputs_container");comboInputsContainer.forEach(function(inputsContainer){if(!inputsContainer.closest(".frm_form_field"))return;label=inputsContainer.closest(".frm_form_field").querySelector(".frm_primary_label");if(!label)return;label.addEventListener("click",function(e){inputsContainer.querySelector(".frm_form_field:first-child input, .frm_form_field:first-child select, .frm_form_field:first-child textarea").focus()})})}
43
  function checkForErrorsAndMaybeSetFocus(){var errors,element,timeoutCallback;if(!frm_js.focus_first_error)return;errors=document.querySelectorAll(".frm_form_field .frm_error");if(!errors.length)return;element=errors[0];do{element=element.previousSibling;if(-1!==["input","select","textarea"].indexOf(element.nodeName.toLowerCase())){element.focus();break}if("undefined"!==typeof element.classList){if(element.classList.contains("html-active"))timeoutCallback=function(){var textarea=element.querySelector("textarea");
44
  if(null!==textarea)textarea.focus()};else if(element.classList.contains("tmce-active"))timeoutCallback=function(){tinyMCE.activeEditor.focus()};if("function"===typeof timeoutCallback){setTimeout(timeoutCallback,0);break}}}while(element.previousSibling)}function isIE(){return navigator.userAgent.indexOf("MSIE")>-1||navigator.userAgent.indexOf("Trident")>-1}function documentOn(event,selector,handler,options){if("undefined"===typeof options)options=false;document.addEventListener(event,function(e){var target;
45
  for(target=e.target;target&&target!=this;target=target.parentNode)if(target.matches(selector)){handler.call(target,e);break}},options)}function initFloatingLabels(){var checkFloatLabel,checkDropdownLabel,checkPlaceholderIE,runOnLoad,selector,floatClass;selector=".frm-show-form .frm_inside_container input, .frm-show-form .frm_inside_container select, .frm-show-form .frm_inside_container textarea";floatClass="frm_label_float_top";checkFloatLabel=function(input){var container,shouldFloatTop,firstOpt;
46
- container=input.closest(".frm_inside_container");shouldFloatTop=input.value||document.activeElement===input;container.classList.toggle(floatClass,shouldFloatTop);if("SELECT"===input.tagName){firstOpt=input.querySelector("option:first-child");if(shouldFloatTop){if(firstOpt.getAttribute("data-label")){firstOpt.text=firstOpt.getAttribute("data-label");firstOpt.removeAttribute("data-label")}}else if(firstOpt.text){firstOpt.setAttribute("data-label",firstOpt.text);firstOpt.text=""}}else if(isIE())checkPlaceholderIE(input)};
47
- checkDropdownLabel=function(){document.querySelectorAll(".frm-show-form .frm_inside_container:not(."+floatClass+") select").forEach(function(input){var firstOpt=input.querySelector("option:first-child");if(firstOpt.text){firstOpt.setAttribute("data-label",firstOpt.text);firstOpt.text=""}})};checkPlaceholderIE=function(input){if(input.value)return;if(document.activeElement===input){if(input.getAttribute("data-placeholder")){input.placeholder=input.getAttribute("data-placeholder");input.removeAttribute("data-placeholder")}}else if(input.placeholder){input.setAttribute("data-placeholder",
48
- input.placeholder);input.placeholder=""}};["focus","blur","change"].forEach(function(eventName){documentOn(eventName,selector,function(event){checkFloatLabel(event.target)},true)});jQuery(document).on("change",selector,function(event){checkFloatLabel(event.target)});runOnLoad=function(firstLoad){if(firstLoad&&document.activeElement&&-1!==["INPUT","SELECT","TEXTAREA"].indexOf(document.activeElement.tagName))checkFloatLabel(document.activeElement);else if(firstLoad)document.querySelectorAll(".frm_inside_container").forEach(function(container){var input=
49
- container.querySelector("input, select, textarea");if(input&&""!==input.value)checkFloatLabel(input)});checkDropdownLabel();if(isIE())document.querySelectorAll(selector).forEach(function(input){checkPlaceholderIE(input)})};runOnLoad(true);jQuery(document).on("frmPageChanged",function(event){runOnLoad()});document.addEventListener("frm_after_start_over",function(event){runOnLoad()})}return{init:function(){maybeAddPolyfills();jQuery(document).off("submit.formidable",".frm-show-form");jQuery(document).on("submit.formidable",
50
- ".frm-show-form",frmFrontForm.submitForm);jQuery(".frm-show-form input[onblur], .frm-show-form textarea[onblur]").each(function(){if(jQuery(this).val()==="")jQuery(this).trigger("blur")});jQuery(document).on("focus",".frm_toggle_default",clearDefault);jQuery(document).on("blur",".frm_toggle_default",replaceDefault);jQuery(".frm_toggle_default").trigger("blur");jQuery(document.getElementById("frm_resend_email")).on("click",resendEmail);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"]',
51
- frmFrontForm.fieldValueChanged);jQuery(document).on("change","[id^=frm_email_]",onHoneypotFieldChange);jQuery(document).on("click","a[data-frmconfirm]",confirmClick);jQuery("a[data-frmtoggle]").on("click",toggleDiv);checkForErrorsAndMaybeSetFocus();changeFocusWhenClickComboFieldLabel();addIndexOfFallbackForIE8();addTrimFallbackForIE8();addFilterFallbackForIE8();addKeysFallbackForIE8();initFloatingLabels()},getFieldId:function(field,fullID){return getFieldId(field,fullID)},renderRecaptcha:function(captcha){var formID,
52
- recaptchaID,size=captcha.getAttribute("data-size"),rendered=captcha.getAttribute("data-rid")!==null,params={"sitekey":captcha.getAttribute("data-sitekey"),"size":size,"theme":captcha.getAttribute("data-theme")};if(rendered)return;if(size==="invisible"){formID=jQuery(captcha).closest("form").find('input[name="form_id"]').val();jQuery(captcha).closest(".frm_form_field .frm_primary_label").hide();params.callback=function(token){frmFrontForm.afterRecaptcha(token,formID)}}recaptchaID=grecaptcha.render(captcha.id,
53
- params);captcha.setAttribute("data-rid",recaptchaID)},afterSingleRecaptcha:function(){var object=jQuery(".frm-show-form .g-recaptcha").closest("form")[0];frmFrontForm.submitFormNow(object)},afterRecaptcha:function(token,formID){var object=jQuery("#frm_form_"+formID+"_container form")[0];frmFrontForm.submitFormNow(object)},submitForm:function(e){frmFrontForm.submitFormManual(e,this)},submitFormManual:function(e,object){var isPro,errors,invisibleRecaptcha=hasInvisibleRecaptcha(object),classList=object.className.trim().split(/\s+/gi);
54
- if(classList&&invisibleRecaptcha.length<1){isPro=classList.indexOf("frm_pro_form")>-1;if(!isPro)return}if(jQuery("body").hasClass("wp-admin")&&jQuery(object).closest(".frmapi-form").length<1)return;e.preventDefault();if(typeof frmProForm!=="undefined"&&typeof frmProForm.submitAllowed==="function")if(!frmProForm.submitAllowed(object))return;if(invisibleRecaptcha.length){showLoadingIndicator(jQuery(object));executeInvisibleRecaptcha(invisibleRecaptcha)}else{errors=frmFrontForm.validateFormSubmit(object);
55
- if(Object.keys(errors).length===0){showSubmitLoading(jQuery(object));frmFrontForm.submitFormNow(object,classList)}}},submitFormNow:function(object){var hasFileFields,antispamInput,classList=object.className.trim().split(/\s+/gi);if(object.hasAttribute("data-token")&&null===object.querySelector('[name="antispam_token"]')){antispamInput=document.createElement("input");antispamInput.type="hidden";antispamInput.name="antispam_token";antispamInput.value=object.getAttribute("data-token");object.appendChild(antispamInput)}if(classList.indexOf("frm_ajax_submit")>
56
- -1){hasFileFields=jQuery(object).find('input[type="file"]').filter(function(){return!!this.value}).length;if(hasFileFields<1){action=jQuery(object).find('input[name="frm_action"]').val();frmFrontForm.checkFormErrors(object,action)}else object.submit()}else object.submit()},validateFormSubmit:function(object){if(typeof tinyMCE!=="undefined"&&jQuery(object).find(".wp-editor-wrap").length)tinyMCE.triggerSave();jsErrors=[];if(shouldJSValidate(object)){frmFrontForm.getAjaxFormErrors(object);if(Object.keys(jsErrors).length)frmFrontForm.addAjaxFormErrors(object)}return jsErrors},
57
- getAjaxFormErrors:function(object){var customErrors,key;jsErrors=validateForm(object);if(typeof frmThemeOverride_jsErrors==="function"){action=jQuery(object).find('input[name="frm_action"]').val();customErrors=frmThemeOverride_jsErrors(action,object);if(Object.keys(customErrors).length)for(key in customErrors)jsErrors[key]=customErrors[key]}return jsErrors},addAjaxFormErrors:function(object){var key,$fieldCont;removeAllErrors();for(key in jsErrors){$fieldCont=jQuery(object).find("#frm_field_"+key+
58
- "_container");if($fieldCont.length)addFieldError($fieldCont,key,jsErrors);else delete jsErrors[key]}scrollToFirstField(object);checkForErrorsAndMaybeSetFocus()},checkFormErrors:function(object,action){getFormErrors(object,action)},checkRequiredField:function(field,errors){return checkRequiredField(field,errors)},showSubmitLoading:function($object){showSubmitLoading($object)},removeSubmitLoading:function($object,enable,processesRunning){removeSubmitLoading($object,enable,processesRunning)},scrollToID:function(id){var object=
59
- jQuery(document.getElementById(id));frmFrontForm.scrollMsg(object,false)},scrollMsg:function(id,object,animate){var newPos,m,b,screenTop,screenBottom,scrollObj="";if(typeof object==="undefined"){scrollObj=jQuery(document.getElementById("frm_form_"+id+"_container"));if(scrollObj.length<1)return}else if(typeof id==="string")scrollObj=jQuery(object).find("#frm_field_"+id+"_container");else scrollObj=id;jQuery(scrollObj).trigger("focus");newPos=scrollObj.offset().top;if(!newPos||frm_js.offset==="-1")return;
60
- newPos=newPos-frm_js.offset;m=jQuery("html").css("margin-top");b=jQuery("body").css("margin-top");if(m||b)newPos=newPos-parseInt(m)-parseInt(b);if(newPos&&window.innerHeight){screenTop=document.documentElement.scrollTop||document.body.scrollTop;screenBottom=screenTop+window.innerHeight;if(newPos>screenBottom||newPos<screenTop){if(typeof animate==="undefined")jQuery(window).scrollTop(newPos);else jQuery("html,body").animate({scrollTop:newPos},500);return false}}},fieldValueChanged:function(e){var fieldId=
61
- frmFrontForm.getFieldId(this,false);if(!fieldId||typeof fieldId==="undefined")return;if(e.frmTriggered&&e.frmTriggered==fieldId)return;jQuery(document).trigger("frmFieldChanged",[this,fieldId,e]);if(e.selfTriggered!==true)maybeValidateChange(this)},savingDraft:function(object){console.warn("DEPRECATED: function frmFrontForm.savingDraft in v3.0 use frmProForm.savingDraft");if(typeof frmProForm!=="undefined")return frmProForm.savingDraft(object)},goingToPreviousPage:function(object){console.warn("DEPRECATED: function frmFrontForm.goingToPreviousPage in v3.0 use frmProForm.goingToPreviousPage");
 
62
  if(typeof frmProForm!=="undefined")return frmProForm.goingToPreviousPage(object)},hideOrShowFields:function(){console.warn("DEPRECATED: function frmFrontForm.hideOrShowFields in v3.0 use frmProForm.hideOrShowFields");if(typeof frmProForm!=="undefined")frmProForm.hideOrShowFields()},hidePreviouslyHiddenFields:function(){console.warn("DEPRECATED: function frmFrontForm.hidePreviouslyHiddenFields in v3.0 use frmProForm.hidePreviouslyHiddenFields");if(typeof frmProForm!=="undefined")frmProForm.hidePreviouslyHiddenFields()},
63
  checkDependentDynamicFields:function(ids){console.warn("DEPRECATED: function frmFrontForm.checkDependentDynamicFields in v3.0 use frmProForm.checkDependentDynamicFields");if(typeof frmProForm!=="undefined")frmProForm.checkDependentDynamicFields(ids)},checkDependentLookupFields:function(ids){console.warn("DEPRECATED: function frmFrontForm.checkDependentLookupFields in v3.0 use frmProForm.checkDependentLookupFields");if(typeof frmProForm!=="undefined")frmProForm.checkDependentLookupFields(ids)},loadGoogle:function(){console.warn("DEPRECATED: function frmFrontForm.loadGoogle in v3.0 use frmProForm.loadGoogle");
64
  frmProForm.loadGoogle()},escapeHtml:function(text){return text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},invisible:function(classes){jQuery(classes).css("visibility","hidden")},visible:function(classes){jQuery(classes).css("visibility","visible")}}}frmFrontForm=frmFrontFormJS();jQuery(document).ready(function(){frmFrontForm.init()});
30
  response])}function removeAddedScripts(formContainer,formID){var endReplace=jQuery(".frm_end_ajax_"+formID);if(endReplace.length){formContainer.nextUntil(".frm_end_ajax_"+formID).remove();endReplace.remove()}}function maybeSlideOut(oldContent,newContent){var c,newClass="frm_slideout";if(newContent.indexOf(" frm_slide")!==-1){c=oldContent.children();if(newContent.indexOf(" frm_going_back")!==-1)newClass+=" frm_going_back";c.removeClass("frm_going_back");c.addClass(newClass);return 300}return 0}function addUrlParam(response){var url;
31
  if(history.pushState&&typeof response.page!=="undefined"){url=addQueryVar("frm_page",response.page);window.history.pushState({"html":response.html},"","?"+url)}}function addQueryVar(key,value){var kvp,i,x;key=encodeURI(key);value=encodeURI(value);kvp=document.location.search.substr(1).split("&");i=kvp.length;while(i--){x=kvp[i].split("=");if(x[0]==key){x[1]=value;kvp[i]=x.join("=");break}}if(i<0)kvp[kvp.length]=[key,value].join("=");return kvp.join("&")}function addFieldError($fieldCont,key,jsErrors){var input,
32
  id,describedBy,roleString;if($fieldCont.length&&$fieldCont.is(":visible")){$fieldCont.addClass("frm_blank_field");input=$fieldCont.find("input, select, textarea");id="frm_error_field_"+key;describedBy=input.attr("aria-describedby");if(typeof frmThemeOverride_frmPlaceError==="function")frmThemeOverride_frmPlaceError(key,jsErrors);else{if(-1!==jsErrors[key].indexOf("<div"))$fieldCont.append(jsErrors[key]);else{roleString=frm_js.include_alert_role?'role="alert"':"";$fieldCont.append('<div class="frm_error" '+
33
+ roleString+' id="'+id+'">'+jsErrors[key]+"</div>")}if(typeof describedBy==="undefined")describedBy=id;else if(describedBy.indexOf(id)===-1&&describedBy.indexOf("frm_error_field_")===-1)if(input.data("error-first")===0)describedBy=describedBy+" "+id;else describedBy=id+" "+describedBy;input.attr("aria-describedby",describedBy)}input.attr("aria-invalid",true);jQuery(document).trigger("frmAddFieldError",[$fieldCont,key,jsErrors])}}function removeFieldError($fieldCont){var errorMessage=$fieldCont.find(".frm_error"),
34
+ errorId=errorMessage.attr("id"),input=$fieldCont.find("input, select, textarea"),describedBy=input.attr("aria-describedby");$fieldCont.removeClass("frm_blank_field has-error");errorMessage.remove();input.attr("aria-invalid",false);input.removeAttr("aria-describedby");if(typeof describedBy!=="undefined"){describedBy=describedBy.replace(errorId,"");input.attr("aria-describedby",describedBy)}}function removeAllErrors(){jQuery(".form-field").removeClass("frm_blank_field has-error");jQuery(".form-field .frm_error").replaceWith("");
35
+ jQuery(".frm_error_style").remove()}function scrollToFirstField(object){var field=jQuery(object).find(".frm_blank_field").first();if(field.length)frmFrontForm.scrollMsg(field,object,true)}function showSubmitLoading($object){showLoadingIndicator($object);disableSubmitButton($object);disableSaveDraft($object)}function showLoadingIndicator($object){if(!$object.hasClass("frm_loading_form")&&!$object.hasClass("frm_loading_prev")){addLoadingClass($object);$object.trigger("frmStartFormLoading")}}function addLoadingClass($object){var loadingClass=
36
+ isGoingToPrevPage($object)?"frm_loading_prev":"frm_loading_form";$object.addClass(loadingClass)}function isGoingToPrevPage($object){return typeof frmProForm!=="undefined"&&frmProForm.goingToPreviousPage($object)}function removeSubmitLoading($object,enable,processesRunning){var loadingForm;if(processesRunning>0)return;loadingForm=jQuery(".frm_loading_form");loadingForm.removeClass("frm_loading_form");loadingForm.removeClass("frm_loading_prev");loadingForm.trigger("frmEndFormLoading");if(enable==="enable"){enableSubmitButton(loadingForm);
37
+ enableSaveDraft(loadingForm)}}function showFileLoading(object){var fileval,loading=document.getElementById("frm_loading");if(loading!==null){fileval=jQuery(object).find("input[type=file]").val();if(typeof fileval!=="undefined"&&fileval!=="")setTimeout(function(){jQuery(loading).fadeIn("slow")},2E3)}}function clearDefault(){toggleDefault(jQuery(this),"clear")}function replaceDefault(){toggleDefault(jQuery(this),"replace")}function toggleDefault($thisField,e){var thisVal,v=$thisField.data("frmval").replace(/(\n|\r\n)/g,
38
+ "\r");if(v===""||typeof v==="undefined")return false;thisVal=$thisField.val().replace(/(\n|\r\n)/g,"\r");if("replace"===e){if(thisVal==="")$thisField.addClass("frm_default").val(v)}else if(thisVal==v)$thisField.removeClass("frm_default").val("")}function resendEmail(){var $link=jQuery(this),entryId=this.getAttribute("data-eid"),formId=this.getAttribute("data-fid"),label=$link.find(".frm_link_label");if(label.length<1)label=$link;label.append('<span class="frm-wait"></span>');jQuery.ajax({type:"POST",
39
+ url:frm_js.ajax_url,data:{action:"frm_entries_send_email",entry_id:entryId,form_id:formId,nonce:frm_js.nonce},success:function(msg){var admin=document.getElementById("wpbody");if(admin===null)label.html(msg);else{label.html("");$link.after(msg)}}});return false}function confirmClick(){var message=jQuery(this).data("frmconfirm");return confirm(message)}function toggleDiv(){var div=jQuery(this).data("frmtoggle");if(jQuery(div).is(":visible"))jQuery(div).slideUp("fast");else jQuery(div).slideDown("fast");
40
+ return false}function addIndexOfFallbackForIE8(){var len,from;if(!Array.prototype.indexOf)Array.prototype.indexOf=function(elt){len=this.length>>>0;from=Number(arguments[1])||0;from=from<0?Math.ceil(from):Math.floor(from);if(from<0)from+=len;for(;from<len;from++)if(from in this&&this[from]===elt)return from;return-1}}function addTrimFallbackForIE8(){if(typeof String.prototype.trim!=="function")String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}}function addFilterFallbackForIE8(){var t,
41
+ len,res,thisp,i,val;if(!Array.prototype.filter)Array.prototype.filter=function(fun){if(this===void 0||this===null)throw new TypeError;t=Object(this);len=t.length>>>0;if(typeof fun!=="function")throw new TypeError;res=[];thisp=arguments[1];for(i=0;i<len;i++)if(i in t){val=t[i];if(fun.call(thisp,val,i,t))res.push(val)}return res}}function addKeysFallbackForIE8(){var keys,i;if(!Object.keys)Object.keys=function(obj){keys=[];for(i in obj)if(obj.hasOwnProperty(i))keys.push(i);return keys}}function onHoneypotFieldChange(){var css=
42
+ jQuery(this).css("box-shadow");if(css.match(/inset/))this.parentNode.removeChild(this)}function changeFocusWhenClickComboFieldLabel(){var label;var comboInputsContainer=document.querySelectorAll(".frm_combo_inputs_container");comboInputsContainer.forEach(function(inputsContainer){if(!inputsContainer.closest(".frm_form_field"))return;label=inputsContainer.closest(".frm_form_field").querySelector(".frm_primary_label");if(!label)return;label.addEventListener("click",function(e){inputsContainer.querySelector(".frm_form_field:first-child input, .frm_form_field:first-child select, .frm_form_field:first-child textarea").focus()})})}
43
  function checkForErrorsAndMaybeSetFocus(){var errors,element,timeoutCallback;if(!frm_js.focus_first_error)return;errors=document.querySelectorAll(".frm_form_field .frm_error");if(!errors.length)return;element=errors[0];do{element=element.previousSibling;if(-1!==["input","select","textarea"].indexOf(element.nodeName.toLowerCase())){element.focus();break}if("undefined"!==typeof element.classList){if(element.classList.contains("html-active"))timeoutCallback=function(){var textarea=element.querySelector("textarea");
44
  if(null!==textarea)textarea.focus()};else if(element.classList.contains("tmce-active"))timeoutCallback=function(){tinyMCE.activeEditor.focus()};if("function"===typeof timeoutCallback){setTimeout(timeoutCallback,0);break}}}while(element.previousSibling)}function isIE(){return navigator.userAgent.indexOf("MSIE")>-1||navigator.userAgent.indexOf("Trident")>-1}function documentOn(event,selector,handler,options){if("undefined"===typeof options)options=false;document.addEventListener(event,function(e){var target;
45
  for(target=e.target;target&&target!=this;target=target.parentNode)if(target.matches(selector)){handler.call(target,e);break}},options)}function initFloatingLabels(){var checkFloatLabel,checkDropdownLabel,checkPlaceholderIE,runOnLoad,selector,floatClass;selector=".frm-show-form .frm_inside_container input, .frm-show-form .frm_inside_container select, .frm-show-form .frm_inside_container textarea";floatClass="frm_label_float_top";checkFloatLabel=function(input){var container,shouldFloatTop,firstOpt;
46
+ container=input.closest(".frm_inside_container");shouldFloatTop=input.value||document.activeElement===input;container.classList.toggle(floatClass,shouldFloatTop);if("SELECT"===input.tagName){firstOpt=input.querySelector("option:first-child");if(shouldFloatTop){if(firstOpt.hasAttribute("data-label")){firstOpt.textContent=firstOpt.getAttribute("data-label");firstOpt.removeAttribute("data-label")}}else if(firstOpt.textContent){firstOpt.setAttribute("data-label",firstOpt.textContent);firstOpt.textContent=
47
+ ""}}else if(isIE())checkPlaceholderIE(input)};checkDropdownLabel=function(){document.querySelectorAll(".frm-show-form .frm_inside_container:not(."+floatClass+") select").forEach(function(input){var firstOpt=input.querySelector("option:first-child");if(firstOpt.textContent){firstOpt.setAttribute("data-label",firstOpt.textContent);firstOpt.textContent=""}})};checkPlaceholderIE=function(input){if(input.value)return;if(document.activeElement===input){if(input.hasAttribute("data-placeholder")){input.placeholder=
48
+ input.getAttribute("data-placeholder");input.removeAttribute("data-placeholder")}}else if(input.placeholder){input.setAttribute("data-placeholder",input.placeholder);input.placeholder=""}};["focus","blur","change"].forEach(function(eventName){documentOn(eventName,selector,function(event){checkFloatLabel(event.target)},true)});jQuery(document).on("change",selector,function(event){checkFloatLabel(event.target)});runOnLoad=function(firstLoad){if(firstLoad&&document.activeElement&&-1!==["INPUT","SELECT",
49
+ "TEXTAREA"].indexOf(document.activeElement.tagName))checkFloatLabel(document.activeElement);else if(firstLoad)document.querySelectorAll(".frm_inside_container").forEach(function(container){var input=container.querySelector("input, select, textarea");if(input&&""!==input.value)checkFloatLabel(input)});checkDropdownLabel();if(isIE())document.querySelectorAll(selector).forEach(function(input){checkPlaceholderIE(input)})};runOnLoad(true);jQuery(document).on("frmPageChanged",function(event){runOnLoad()});
50
+ document.addEventListener("frm_after_start_over",function(event){runOnLoad()})}return{init:function(){maybeAddPolyfills();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(){if(jQuery(this).val()==="")jQuery(this).trigger("blur")});jQuery(document).on("focus",".frm_toggle_default",clearDefault);jQuery(document).on("blur",".frm_toggle_default",
51
+ replaceDefault);jQuery(".frm_toggle_default").trigger("blur");jQuery(document.getElementById("frm_resend_email")).on("click",resendEmail);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","[id^=frm_email_]",onHoneypotFieldChange);jQuery(document).on("click","a[data-frmconfirm]",confirmClick);jQuery("a[data-frmtoggle]").on("click",toggleDiv);
52
+ checkForErrorsAndMaybeSetFocus();changeFocusWhenClickComboFieldLabel();addIndexOfFallbackForIE8();addTrimFallbackForIE8();addFilterFallbackForIE8();addKeysFallbackForIE8();initFloatingLabels()},getFieldId:function(field,fullID){return getFieldId(field,fullID)},renderRecaptcha:function(captcha){var formID,recaptchaID,size=captcha.getAttribute("data-size"),rendered=captcha.getAttribute("data-rid")!==null,params={"sitekey":captcha.getAttribute("data-sitekey"),"size":size,"theme":captcha.getAttribute("data-theme")};
53
+ if(rendered)return;if(size==="invisible"){formID=jQuery(captcha).closest("form").find('input[name="form_id"]').val();jQuery(captcha).closest(".frm_form_field .frm_primary_label").hide();params.callback=function(token){frmFrontForm.afterRecaptcha(token,formID)}}recaptchaID=grecaptcha.render(captcha.id,params);captcha.setAttribute("data-rid",recaptchaID)},afterSingleRecaptcha:function(){var object=jQuery(".frm-show-form .g-recaptcha").closest("form")[0];frmFrontForm.submitFormNow(object)},afterRecaptcha:function(token,
54
+ formID){var object=jQuery("#frm_form_"+formID+"_container form")[0];frmFrontForm.submitFormNow(object)},submitForm:function(e){frmFrontForm.submitFormManual(e,this)},submitFormManual:function(e,object){var isPro,errors,invisibleRecaptcha=hasInvisibleRecaptcha(object),classList=object.className.trim().split(/\s+/gi);if(classList&&invisibleRecaptcha.length<1){isPro=classList.indexOf("frm_pro_form")>-1;if(!isPro)return}if(jQuery("body").hasClass("wp-admin")&&jQuery(object).closest(".frmapi-form").length<
55
+ 1)return;e.preventDefault();if(typeof frmProForm!=="undefined"&&typeof frmProForm.submitAllowed==="function")if(!frmProForm.submitAllowed(object))return;if(invisibleRecaptcha.length){showLoadingIndicator(jQuery(object));executeInvisibleRecaptcha(invisibleRecaptcha)}else{errors=frmFrontForm.validateFormSubmit(object);if(Object.keys(errors).length===0){showSubmitLoading(jQuery(object));frmFrontForm.submitFormNow(object,classList)}}},submitFormNow:function(object){var hasFileFields,antispamInput,classList=
56
+ object.className.trim().split(/\s+/gi);if(object.hasAttribute("data-token")&&null===object.querySelector('[name="antispam_token"]')){antispamInput=document.createElement("input");antispamInput.type="hidden";antispamInput.name="antispam_token";antispamInput.value=object.getAttribute("data-token");object.appendChild(antispamInput)}if(classList.indexOf("frm_ajax_submit")>-1){hasFileFields=jQuery(object).find('input[type="file"]').filter(function(){return!!this.value}).length;if(hasFileFields<1){action=
57
+ jQuery(object).find('input[name="frm_action"]').val();frmFrontForm.checkFormErrors(object,action)}else object.submit()}else object.submit()},validateFormSubmit:function(object){if(typeof tinyMCE!=="undefined"&&jQuery(object).find(".wp-editor-wrap").length)tinyMCE.triggerSave();jsErrors=[];if(shouldJSValidate(object)){frmFrontForm.getAjaxFormErrors(object);if(Object.keys(jsErrors).length)frmFrontForm.addAjaxFormErrors(object)}return jsErrors},getAjaxFormErrors:function(object){var customErrors,key;
58
+ jsErrors=validateForm(object);if(typeof frmThemeOverride_jsErrors==="function"){action=jQuery(object).find('input[name="frm_action"]').val();customErrors=frmThemeOverride_jsErrors(action,object);if(Object.keys(customErrors).length)for(key in customErrors)jsErrors[key]=customErrors[key]}return jsErrors},addAjaxFormErrors:function(object){var key,$fieldCont;removeAllErrors();for(key in jsErrors){$fieldCont=jQuery(object).find("#frm_field_"+key+"_container");if($fieldCont.length)addFieldError($fieldCont,
59
+ key,jsErrors);else delete jsErrors[key]}scrollToFirstField(object);checkForErrorsAndMaybeSetFocus()},checkFormErrors:function(object,action){getFormErrors(object,action)},checkRequiredField:function(field,errors){return checkRequiredField(field,errors)},showSubmitLoading:function($object){showSubmitLoading($object)},removeSubmitLoading:function($object,enable,processesRunning){removeSubmitLoading($object,enable,processesRunning)},scrollToID:function(id){var object=jQuery(document.getElementById(id));
60
+ frmFrontForm.scrollMsg(object,false)},scrollMsg:function(id,object,animate){var newPos,m,b,screenTop,screenBottom,scrollObj="";if(typeof object==="undefined"){scrollObj=jQuery(document.getElementById("frm_form_"+id+"_container"));if(scrollObj.length<1)return}else if(typeof id==="string")scrollObj=jQuery(object).find("#frm_field_"+id+"_container");else scrollObj=id;jQuery(scrollObj).trigger("focus");newPos=scrollObj.offset().top;if(!newPos||frm_js.offset==="-1")return;newPos=newPos-frm_js.offset;m=
61
+ jQuery("html").css("margin-top");b=jQuery("body").css("margin-top");if(m||b)newPos=newPos-parseInt(m)-parseInt(b);if(newPos&&window.innerHeight){screenTop=document.documentElement.scrollTop||document.body.scrollTop;screenBottom=screenTop+window.innerHeight;if(newPos>screenBottom||newPos<screenTop){if(typeof animate==="undefined")jQuery(window).scrollTop(newPos);else jQuery("html,body").animate({scrollTop:newPos},500);return false}}},fieldValueChanged:function(e){var fieldId=frmFrontForm.getFieldId(this,
62
+ false);if(!fieldId||typeof fieldId==="undefined")return;if(e.frmTriggered&&e.frmTriggered==fieldId)return;jQuery(document).trigger("frmFieldChanged",[this,fieldId,e]);if(e.selfTriggered!==true)maybeValidateChange(this)},savingDraft:function(object){console.warn("DEPRECATED: function frmFrontForm.savingDraft in v3.0 use frmProForm.savingDraft");if(typeof frmProForm!=="undefined")return frmProForm.savingDraft(object)},goingToPreviousPage:function(object){console.warn("DEPRECATED: function frmFrontForm.goingToPreviousPage in v3.0 use frmProForm.goingToPreviousPage");
63
  if(typeof frmProForm!=="undefined")return frmProForm.goingToPreviousPage(object)},hideOrShowFields:function(){console.warn("DEPRECATED: function frmFrontForm.hideOrShowFields in v3.0 use frmProForm.hideOrShowFields");if(typeof frmProForm!=="undefined")frmProForm.hideOrShowFields()},hidePreviouslyHiddenFields:function(){console.warn("DEPRECATED: function frmFrontForm.hidePreviouslyHiddenFields in v3.0 use frmProForm.hidePreviouslyHiddenFields");if(typeof frmProForm!=="undefined")frmProForm.hidePreviouslyHiddenFields()},
64
  checkDependentDynamicFields:function(ids){console.warn("DEPRECATED: function frmFrontForm.checkDependentDynamicFields in v3.0 use frmProForm.checkDependentDynamicFields");if(typeof frmProForm!=="undefined")frmProForm.checkDependentDynamicFields(ids)},checkDependentLookupFields:function(ids){console.warn("DEPRECATED: function frmFrontForm.checkDependentLookupFields in v3.0 use frmProForm.checkDependentLookupFields");if(typeof frmProForm!=="undefined")frmProForm.checkDependentLookupFields(ids)},loadGoogle:function(){console.warn("DEPRECATED: function frmFrontForm.loadGoogle in v3.0 use frmProForm.loadGoogle");
65
  frmProForm.loadGoogle()},escapeHtml:function(text){return text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},invisible:function(classes){jQuery(classes).css("visibility","hidden")},visible:function(classes){jQuery(classes).css("visibility","visible")}}}frmFrontForm=frmFrontFormJS();jQuery(document).ready(function(){frmFrontForm.init()});
js/formidable_admin.js CHANGED
@@ -5684,6 +5684,12 @@ function frmAdminBuildJS() {
5684
  upgradeLabel = parent.dataset.upgrade;
5685
  }
5686
 
 
 
 
 
 
 
5687
  if ( ! upgradeLabel || element.classList.contains( 'frm_show_upgrade_tab' ) ) {
5688
  return;
5689
  }
@@ -7215,6 +7221,10 @@ function frmAdminBuildJS() {
7215
  }
7216
  }
7217
 
 
 
 
 
7218
  function confirmExit( event ) {
7219
  if ( fieldsUpdated ) {
7220
  event.preventDefault();
@@ -7501,7 +7511,48 @@ function frmAdminBuildJS() {
7501
  } else if ( value === 'no_label' ) {
7502
  value = 'none';
7503
  }
7504
- jQuery( '.frm_pos_container' ).removeClass( 'frm_top_container frm_left_container frm_right_container frm_none_container frm_inside_container' ).addClass( 'frm_' + value + '_container' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7505
  }
7506
 
7507
  function collapseAllSections() {
@@ -7936,23 +7987,30 @@ function frmAdminBuildJS() {
7936
  refreshPage = document.querySelectorAll( '.frm-admin-page-import, #frm-admin-smtp, #frm-welcome' );
7937
  if ( refreshPage.length > 0 ) {
7938
  window.location.reload();
7939
- } else if ( 'settings' === saveAndReload ) {
7940
- $addonStatus.append( getSaveAndReloadSettingsOptions() );
7941
  }
7942
  }
7943
 
7944
- function getSaveAndReloadSettingsOptions() {
7945
  var wrapper = div({ id: 'frm_save_and_reload_options' });
7946
- wrapper.appendChild( saveAndReloadSettingsButton() );
7947
  wrapper.appendChild( closePopupButton() );
7948
  return wrapper;
7949
  }
7950
 
7951
- function saveAndReloadSettingsButton() {
7952
  var button = document.createElement( 'button' );
7953
- button.id = 'frm_save_and_reload_settings';
7954
  button.classList.add( 'button', 'button-primary', 'frm-button-primary' );
7955
  button.textContent = __( 'Save and Reload', 'formidable' );
 
 
 
 
 
 
 
7956
  return button;
7957
  }
7958
 
@@ -8162,8 +8220,7 @@ function frmAdminBuildJS() {
8162
  url: formContainer.getAttribute( 'data-url' ),
8163
  success: function( json ) {
8164
  var form = json.renderedHtml;
8165
- form = form.replace( /<script\b[^<]*(community.formidableforms.com\/wp-includes\/js\/jquery\/jquery)[^<]*><\/script>/gi, '' );
8166
- form = form.replace( /<link\b[^>]*(formidableforms.css)[^>]*>/gi, '' );
8167
  formContainer.innerHTML = form;
8168
  }
8169
  });
@@ -9002,6 +9059,34 @@ function frmAdminBuildJS() {
9002
  return frmDom.util.debounce( func, wait );
9003
  }
9004
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9005
  return {
9006
  init: function() {
9007
  s = {};
@@ -9463,7 +9548,6 @@ function frmAdminBuildJS() {
9463
 
9464
  jQuery( document ).on( 'submit', '.frm_form_settings', settingsSubmitted );
9465
  jQuery( document ).on( 'change', '#form_settings_page input:not(.frm-search-input), #form_settings_page select, #form_settings_page textarea', fieldUpdated );
9466
- jQuery( document ).on( 'click', '#frm_save_and_reload_settings', saveAndReloadSettings );
9467
 
9468
  // Page Selection Autocomplete
9469
  initSelectionAutocomplete();
@@ -9743,6 +9827,24 @@ function frmAdminBuildJS() {
9743
 
9744
  jQuery( '.frm_image_preview_wrapper' ).on( 'click', '.frm_choose_image_box', addImageToOption );
9745
  jQuery( '.frm_image_preview_wrapper' ).on( 'click', '.frm_remove_image_option', removeImageFromOption );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9746
  },
9747
 
9748
  customCSSInit: function() {
5684
  upgradeLabel = parent.dataset.upgrade;
5685
  }
5686
 
5687
+ if ( element.classList.contains( 'frm_show_expired_modal' ) ) {
5688
+ const hookName = 'frm_show_expired_modal';
5689
+ wp.hooks.doAction( hookName, element );
5690
+ return;
5691
+ }
5692
+
5693
  if ( ! upgradeLabel || element.classList.contains( 'frm_show_upgrade_tab' ) ) {
5694
  return;
5695
  }
7221
  }
7222
  }
7223
 
7224
+ function saveAndReloadFormBuilder() {
7225
+ document.getElementById( 'frm_submit_side_top' ).click();
7226
+ }
7227
+
7228
  function confirmExit( event ) {
7229
  if ( fieldsUpdated ) {
7230
  event.preventDefault();
7511
  } else if ( value === 'no_label' ) {
7512
  value = 'none';
7513
  }
7514
+
7515
+ document.querySelectorAll( '.frm_pos_container' ).forEach( container => {
7516
+ // Fields that support floating label should have a directly child input/textarea/select.
7517
+ const input = container.querySelector( ':scope > input, :scope > select, :scope > textarea' );
7518
+
7519
+ if ( 'inside' === value && ! input ) {
7520
+ value = 'top';
7521
+ }
7522
+
7523
+ container.classList.remove( 'frm_top_container', 'frm_left_container', 'frm_right_container', 'frm_none_container', 'frm_inside_container' );
7524
+ container.classList.add( 'frm_' + value + '_container' );
7525
+
7526
+ if ( 'inside' === value ) {
7527
+ checkFloatingLabelsForStyles( input, container );
7528
+ }
7529
+ });
7530
+ }
7531
+
7532
+ function checkFloatingLabelsForStyles( input, container ) {
7533
+ if ( ! container ) {
7534
+ container = input.closest( '.frm_inside_container' );
7535
+ }
7536
+
7537
+ const shouldFloatTop = input.value || document.activeElement === input;
7538
+
7539
+ container.classList.toggle( 'frm_label_float_top', shouldFloatTop );
7540
+
7541
+ if ( 'SELECT' === input.tagName ) {
7542
+ const firstOpt = input.querySelector( 'option:first-child' );
7543
+
7544
+ if ( shouldFloatTop ) {
7545
+ if ( firstOpt.hasAttribute( 'data-label' ) ) {
7546
+ firstOpt.textContent = firstOpt.getAttribute( 'data-label' );
7547
+ firstOpt.removeAttribute( 'data-label' );
7548
+ }
7549
+ } else {
7550
+ if ( firstOpt.textContent ) {
7551
+ firstOpt.setAttribute( 'data-label', firstOpt.textContent );
7552
+ firstOpt.textContent = '';
7553
+ }
7554
+ }
7555
+ }
7556
  }
7557
 
7558
  function collapseAllSections() {
7987
  refreshPage = document.querySelectorAll( '.frm-admin-page-import, #frm-admin-smtp, #frm-welcome' );
7988
  if ( refreshPage.length > 0 ) {
7989
  window.location.reload();
7990
+ } else if ([ 'settings', 'form_builder' ].includes( saveAndReload ) ) {
7991
+ $addonStatus.append( getSaveAndReloadSettingsOptions( saveAndReload ) );
7992
  }
7993
  }
7994
 
7995
+ function getSaveAndReloadSettingsOptions( saveAndReload ) {
7996
  var wrapper = div({ id: 'frm_save_and_reload_options' });
7997
+ wrapper.appendChild( saveAndReloadSettingsButton( saveAndReload ) );
7998
  wrapper.appendChild( closePopupButton() );
7999
  return wrapper;
8000
  }
8001
 
8002
+ function saveAndReloadSettingsButton( saveAndReload ) {
8003
  var button = document.createElement( 'button' );
8004
+ button.id = 'frm_save_and_reload';
8005
  button.classList.add( 'button', 'button-primary', 'frm-button-primary' );
8006
  button.textContent = __( 'Save and Reload', 'formidable' );
8007
+ button.addEventListener( 'click', () => {
8008
+ if ( saveAndReload === 'form_builder' ) {
8009
+ saveAndReloadFormBuilder();
8010
+ } else if ( saveAndReload === 'settings' ) {
8011
+ saveAndReloadSettings();
8012
+ }
8013
+ });
8014
  return button;
8015
  }
8016
 
8220
  url: formContainer.getAttribute( 'data-url' ),
8221
  success: function( json ) {
8222
  var form = json.renderedHtml;
8223
+ form = form.replace( /<link\b[^>]*(formidableforms.css|action=frmpro_css)[^>]*>/gi, '' );
 
8224
  formContainer.innerHTML = form;
8225
  }
8226
  });
9059
  return frmDom.util.debounce( func, wait );
9060
  }
9061
 
9062
+ /**
9063
+ * Does the same as jQuery( document ).on( 'event', 'selector', handler ).
9064
+ *
9065
+ * @since 5.4.2
9066
+ *
9067
+ * @param {String} event Event name.
9068
+ * @param {String} selector Selector.
9069
+ * @param {Function} handler Handler.
9070
+ * @param {Boolean|Object} options Options to be added to `addEventListener()` method. Default is `false`.
9071
+ */
9072
+ function documentOn( event, selector, handler, options ) {
9073
+ if ( 'undefined' === typeof options ) {
9074
+ options = false;
9075
+ }
9076
+
9077
+ document.addEventListener( event, function( e ) {
9078
+ var target;
9079
+
9080
+ // loop parent nodes from the target to the delegation node.
9081
+ for ( target = e.target; target && target != this; target = target.parentNode ) {
9082
+ if ( target.matches( selector ) ) {
9083
+ handler.call( target, e );
9084
+ break;
9085
+ }
9086
+ }
9087
+ }, options );
9088
+ }
9089
+
9090
  return {
9091
  init: function() {
9092
  s = {};
9548
 
9549
  jQuery( document ).on( 'submit', '.frm_form_settings', settingsSubmitted );
9550
  jQuery( document ).on( 'change', '#form_settings_page input:not(.frm-search-input), #form_settings_page select, #form_settings_page textarea', fieldUpdated );
 
9551
 
9552
  // Page Selection Autocomplete
9553
  initSelectionAutocomplete();
9827
 
9828
  jQuery( '.frm_image_preview_wrapper' ).on( 'click', '.frm_choose_image_box', addImageToOption );
9829
  jQuery( '.frm_image_preview_wrapper' ).on( 'click', '.frm_remove_image_option', removeImageFromOption );
9830
+
9831
+ // Check floating label when focus or blur fields.
9832
+ const floatingLabelSelector = '.frm_inside_container > input, .frm_inside_container > textarea, .frm_inside_container > select';
9833
+ [ 'focus', 'blur', 'change' ].forEach( function( eventName ) {
9834
+ documentOn(
9835
+ eventName,
9836
+ floatingLabelSelector,
9837
+ function( event ) {
9838
+ checkFloatingLabelsForStyles( event.target );
9839
+ },
9840
+ true
9841
+ );
9842
+ });
9843
+
9844
+ // Trigger label position option on load.
9845
+ const changeEvent = document.createEvent( 'HTMLEvents' );
9846
+ changeEvent.initEvent( 'change', true, false );
9847
+ document.getElementById( 'frm_position' ).dispatchEvent( changeEvent );
9848
  },
9849
 
9850
  customCSSInit: function() {
languages/formidable.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the Formidable Forms plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Formidable Forms 5.4.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/formidable\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2022-07-07T16:22:17+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.6.0\n"
15
  "X-Domain: formidable\n"
@@ -140,7 +140,7 @@ msgstr ""
140
  #: classes/controllers/FrmAddonsController.php:30
141
  #: classes/helpers/FrmFormsHelper.php:1366
142
  #: classes/views/frm-fields/back-end/smart-values.php:16
143
- #: classes/views/shared/admin-header.php:33
144
  msgid "Upgrade"
145
  msgstr ""
146
 
@@ -153,7 +153,7 @@ msgid "Installed"
153
  msgstr ""
154
 
155
  #: classes/controllers/FrmAddonsController.php:638
156
- #: classes/helpers/FrmAppHelper.php:2819
157
  msgid "Active"
158
  msgstr ""
159
 
@@ -165,20 +165,16 @@ msgstr ""
165
  msgid "Sorry, your site requires FTP authentication. Please download plugins from FormidableForms.com and install them manually."
166
  msgstr ""
167
 
168
- #: classes/controllers/FrmAddonsController.php:1003
169
  msgid "Your plugin has been activated. Would you like to save and reload the page now?"
170
  msgstr ""
171
 
172
- #: classes/controllers/FrmAddonsController.php:1007
173
- msgid "Your plugin has been activated. Please reload the page to see more options."
174
- msgstr ""
175
-
176
- #: classes/controllers/FrmAddonsController.php:1112
177
  msgid "Could not install an upgrade. Please download from formidableforms.com and install manually."
178
  msgstr ""
179
 
180
- #: classes/controllers/FrmAddonsController.php:1197
181
- #: classes/controllers/FrmAddonsController.php:1198
182
  #: classes/controllers/FrmWelcomeController.php:141
183
  #: classes/views/frm-forms/new-form-overlay.php:105
184
  #: classes/views/shared/reports-info.php:23
@@ -200,7 +196,7 @@ msgstr ""
200
  #: classes/controllers/FrmAppController.php:178
201
  #: classes/controllers/FrmEntriesController.php:11
202
  #: classes/controllers/FrmEntriesController.php:100
203
- #: classes/controllers/FrmFormsController.php:822
204
  #: classes/controllers/FrmXMLController.php:260
205
  #: classes/views/xml/import_form.php:121
206
  msgid "Entries"
@@ -233,14 +229,14 @@ msgid "Applications"
233
  msgstr ""
234
 
235
  #: classes/controllers/FrmEntriesController.php:79
236
- #: classes/controllers/FrmFormsController.php:1396
237
  #: classes/views/frm-entries/form.php:63
238
  #: classes/views/frm-entries/sidebar-shared.php:57
239
  msgid "Entry Key"
240
  msgstr ""
241
 
242
  #: classes/controllers/FrmEntriesController.php:84
243
- #: classes/controllers/FrmFormsController.php:681
244
  #: classes/views/xml/import_form.php:152
245
  #: classes/widgets/FrmElementorWidget.php:37
246
  #: classes/widgets/FrmShowForm.php:59
@@ -308,7 +304,7 @@ msgid "Form Actions"
308
  msgstr ""
309
 
310
  #: classes/controllers/FrmFormActionsController.php:143
311
- #: classes/views/frm-form-actions/default_actions.php:86
312
  msgid "eCommerce"
313
  msgstr ""
314
 
@@ -326,7 +322,7 @@ msgid "%s form actions"
326
  msgstr ""
327
 
328
  #: classes/controllers/FrmFormsController.php:9
329
- #: classes/controllers/FrmFormsController.php:832
330
  #: classes/controllers/FrmStylesController.php:51
331
  #: classes/controllers/FrmXMLController.php:259
332
  #: classes/views/frm-forms/list.php:10
@@ -353,7 +349,7 @@ msgid "Settings Successfully Updated"
353
  msgstr ""
354
 
355
  #: classes/controllers/FrmFormsController.php:179
356
- #: classes/controllers/FrmFormsController.php:1041
357
  msgid "Form was successfully updated."
358
  msgstr ""
359
 
@@ -362,97 +358,84 @@ msgstr ""
362
  msgid "However, your form is very long and may be %1$sreaching server limits%2$s."
363
  msgstr ""
364
 
365
- #: classes/controllers/FrmFormsController.php:238
366
- #: deprecated/FrmDeprecated.php:414
367
- msgid "Form template was Successfully Created"
368
- msgstr ""
369
-
370
- #: classes/controllers/FrmFormsController.php:238
371
- msgid "Form was Successfully Copied"
372
- msgstr ""
373
-
374
- #: classes/controllers/FrmFormsController.php:244
375
- msgid "There was a problem creating the new template."
376
- msgstr ""
377
-
378
- #: classes/controllers/FrmFormsController.php:364
379
  msgid "Form Preview"
380
  msgstr ""
381
 
382
  #. translators: %1$s: Number of forms
383
- #: classes/controllers/FrmFormsController.php:409
384
- #: classes/controllers/FrmFormsController.php:470
385
  msgid "%1$s form restored from the Trash."
386
  msgid_plural "%1$s forms restored from the Trash."
387
  msgstr[0] ""
388
  msgstr[1] ""
389
 
390
  #. translators: %1$s: Number of forms, %2$s: Start link HTML, %3$s: End link HTML
391
- #: classes/controllers/FrmFormsController.php:473
392
- #: classes/controllers/FrmFormsController.php:498
393
  msgid "%1$s form moved to the Trash. %2$sUndo%3$s"
394
  msgid_plural "%1$s forms moved to the Trash. %2$sUndo%3$s"
395
  msgstr[0] ""
396
  msgstr[1] ""
397
 
398
  #. translators: %1$s: Number of forms
399
- #: classes/controllers/FrmFormsController.php:521
400
  msgid "%1$s Form Permanently Deleted"
401
  msgid_plural "%1$s Forms Permanently Deleted"
402
  msgstr[0] ""
403
  msgstr[1] ""
404
 
405
  #. translators: %1$s: Number of forms
406
- #: classes/controllers/FrmFormsController.php:538
407
- #: classes/controllers/FrmFormsController.php:555
408
  msgid "%1$s form permanently deleted."
409
  msgid_plural "%1$s forms permanently deleted."
410
  msgstr[0] ""
411
  msgstr[1] ""
412
 
413
- #: classes/controllers/FrmFormsController.php:619
414
  msgid "There was an error creating a template."
415
  msgstr ""
416
 
417
- #: classes/controllers/FrmFormsController.php:663
418
  msgid "Add forms and content"
419
  msgstr ""
420
 
421
- #: classes/controllers/FrmFormsController.php:682
422
  #: classes/views/frm-forms/insert_form_popup.php:33
423
  msgid "Insert a Form"
424
  msgstr ""
425
 
426
- #: classes/controllers/FrmFormsController.php:735
427
  msgid "Display form title"
428
  msgstr ""
429
 
430
- #: classes/controllers/FrmFormsController.php:739
431
  msgid "Display form description"
432
  msgstr ""
433
 
434
- #: classes/controllers/FrmFormsController.php:743
435
  msgid "Minimize form HTML"
436
  msgstr ""
437
 
438
- #: classes/controllers/FrmFormsController.php:817
439
  #: classes/views/frm-forms/new-form-overlay.php:46
440
  msgid "Template Name"
441
  msgstr ""
442
 
443
- #: classes/controllers/FrmFormsController.php:818
444
  #: classes/views/xml/import_form.php:120
445
  msgid "Type"
446
  msgstr ""
447
 
448
- #: classes/controllers/FrmFormsController.php:819
449
- #: classes/controllers/FrmFormsController.php:823
450
  #: classes/helpers/FrmCSVExportHelper.php:349
451
  #: classes/views/shared/mb_adv_info.php:98
452
  msgid "Key"
453
  msgstr ""
454
 
455
- #: classes/controllers/FrmFormsController.php:821
456
  #: classes/controllers/FrmStylesController.php:401
457
  #: classes/views/frm-forms/settings-advanced.php:13
458
  #: classes/views/styles/manage.php:39
@@ -461,197 +444,205 @@ msgstr ""
461
  msgid "Form Title"
462
  msgstr ""
463
 
464
- #: classes/controllers/FrmFormsController.php:824
465
  msgid "Actions"
466
  msgstr ""
467
 
468
- #: classes/controllers/FrmFormsController.php:827
469
  #: classes/models/FrmField.php:87
470
  msgid "Date"
471
  msgstr ""
472
 
473
- #: classes/controllers/FrmFormsController.php:947
474
  #: classes/helpers/FrmFormsHelper.php:1309
475
  msgid "My Templates"
476
  msgstr ""
477
 
478
- #: classes/controllers/FrmFormsController.php:1006
479
  msgid "You are trying to edit a form that does not exist."
480
  msgstr ""
481
 
482
  #. translators: %1$s: Start link HTML, %2$s: End link HTML
483
- #: classes/controllers/FrmFormsController.php:1011
484
  msgid "You are trying to edit a child form. Please edit from %1$shere%2$s"
485
  msgstr ""
486
 
487
- #: classes/controllers/FrmFormsController.php:1043
488
  msgid "Template was successfully updated."
489
  msgstr ""
490
 
491
- #: classes/controllers/FrmFormsController.php:1117
 
 
 
 
492
  #: classes/controllers/FrmStylesController.php:400
493
  msgid "General"
494
  msgstr ""
495
 
496
- #: classes/controllers/FrmFormsController.php:1118
497
  msgid "General Form Settings"
498
  msgstr ""
499
 
500
- #: classes/controllers/FrmFormsController.php:1123
501
  msgid "Actions & Notifications"
502
  msgstr ""
503
 
504
- #: classes/controllers/FrmFormsController.php:1129
505
- #: classes/controllers/FrmFormsController.php:1134
506
  msgid "Form Permissions"
507
  msgstr ""
508
 
509
- #: classes/controllers/FrmFormsController.php:1135
510
  msgid "Allow editing, protect forms and files, limit entries, and save drafts. Upgrade to get form and entry permissions."
511
  msgstr ""
512
 
513
- #: classes/controllers/FrmFormsController.php:1140
514
  msgid "Form Scheduling"
515
  msgstr ""
516
 
517
- #: classes/controllers/FrmFormsController.php:1145
518
  msgid "Form scheduling settings"
519
  msgstr ""
520
 
521
- #: classes/controllers/FrmFormsController.php:1150
522
  msgid "Styling & Buttons"
523
  msgstr ""
524
 
525
- #: classes/controllers/FrmFormsController.php:1156
526
  msgid "Form Landing Page"
527
  msgstr ""
528
 
529
- #: classes/controllers/FrmFormsController.php:1162
530
- #: classes/controllers/FrmFormsController.php:1168
531
  msgid "Conversational Forms"
532
  msgstr ""
533
 
534
- #: classes/controllers/FrmFormsController.php:1169
535
  msgid "Ask one question at a time for automated conversations."
536
  msgstr ""
537
 
538
- #: classes/controllers/FrmFormsController.php:1175
539
  msgid "Customize HTML"
540
  msgstr ""
541
 
542
- #: classes/controllers/FrmFormsController.php:1311
543
  msgid "Customize field values with the following parameters."
544
  msgstr ""
545
 
546
- #: classes/controllers/FrmFormsController.php:1349
547
  msgid "Separator"
548
  msgstr ""
549
 
550
- #: classes/controllers/FrmFormsController.php:1350
551
  msgid "Use a different separator for checkbox fields"
552
  msgstr ""
553
 
554
- #: classes/controllers/FrmFormsController.php:1353
555
  msgid "Date Format"
556
  msgstr ""
557
 
558
- #: classes/controllers/FrmFormsController.php:1356
559
  #: classes/views/frm-fields/back-end/settings.php:27
560
  msgid "Field Label"
561
  msgstr ""
562
 
563
- #: classes/controllers/FrmFormsController.php:1359
564
  msgid "No Auto P"
565
  msgstr ""
566
 
567
- #: classes/controllers/FrmFormsController.php:1360
568
  msgid "Do not automatically add any paragraphs or line breaks"
569
  msgstr ""
570
 
571
- #: classes/controllers/FrmFormsController.php:1375
572
  #: classes/models/FrmField.php:62
573
  msgid "User ID"
574
  msgstr ""
575
 
576
- #: classes/controllers/FrmFormsController.php:1376
577
  msgid "First Name"
578
  msgstr ""
579
 
580
- #: classes/controllers/FrmFormsController.php:1377
581
  msgid "Last Name"
582
  msgstr ""
583
 
584
- #: classes/controllers/FrmFormsController.php:1378
585
  msgid "Display Name"
586
  msgstr ""
587
 
588
- #: classes/controllers/FrmFormsController.php:1379
589
  msgid "User Login"
590
  msgstr ""
591
 
592
- #: classes/controllers/FrmFormsController.php:1380
593
  #: classes/models/FrmField.php:34
594
  msgid "Email"
595
  msgstr ""
596
 
597
- #: classes/controllers/FrmFormsController.php:1381
598
  msgid "Avatar"
599
  msgstr ""
600
 
601
- #: classes/controllers/FrmFormsController.php:1382
602
  msgid "Author Link"
603
  msgstr ""
604
 
605
- #: classes/controllers/FrmFormsController.php:1395
606
  #: classes/views/frm-entries/sidebar-shared.php:51
607
  msgid "Entry ID"
608
  msgstr ""
609
 
610
- #: classes/controllers/FrmFormsController.php:1397
611
  msgid "Post ID"
612
  msgstr ""
613
 
614
- #: classes/controllers/FrmFormsController.php:1398
615
  msgid "User IP"
616
  msgstr ""
617
 
618
- #: classes/controllers/FrmFormsController.php:1399
619
  msgid "Entry created"
620
  msgstr ""
621
 
622
- #: classes/controllers/FrmFormsController.php:1400
623
  msgid "Entry updated"
624
  msgstr ""
625
 
626
- #: classes/controllers/FrmFormsController.php:1402
627
  msgid "Site URL"
628
  msgstr ""
629
 
630
- #: classes/controllers/FrmFormsController.php:1403
631
  msgid "Site Name"
632
  msgstr ""
633
 
634
- #: classes/controllers/FrmFormsController.php:1411
635
  msgid "Default Msg"
636
  msgstr ""
637
 
638
- #: classes/controllers/FrmFormsController.php:1412
639
  msgid "Default HTML"
640
  msgstr ""
641
 
642
- #: classes/controllers/FrmFormsController.php:1413
643
  msgid "Default Plain"
644
  msgstr ""
645
 
646
- #: classes/controllers/FrmFormsController.php:1516
647
  msgid "No forms were specified"
648
  msgstr ""
649
 
650
- #: classes/controllers/FrmFormsController.php:1630
 
 
 
 
651
  msgid "Abnormal HTML characters prevented your form from saving correctly"
652
  msgstr ""
653
 
654
- #: classes/controllers/FrmFormsController.php:1745
655
  #: classes/helpers/FrmFormsHelper.php:57
656
  #: classes/helpers/FrmFormsHelper.php:112
657
  #: classes/helpers/FrmFormsHelper.php:166
@@ -664,22 +655,22 @@ msgstr ""
664
  msgid "(no title)"
665
  msgstr ""
666
 
667
- #: classes/controllers/FrmFormsController.php:1811
668
- #: classes/controllers/FrmFormsController.php:1833
669
  msgid "Please select a valid form"
670
  msgstr ""
671
 
672
- #: classes/controllers/FrmFormsController.php:2067
673
  msgid "Please wait while you are redirected."
674
  msgstr ""
675
 
676
  #. translators: %1$s: Start link HTML, %2$s: End link HTML
677
- #: classes/controllers/FrmFormsController.php:2102
678
  msgid "%1$sClick here%2$s if you are not automatically redirected."
679
  msgstr ""
680
 
681
- #: classes/controllers/FrmFormsController.php:2462
682
- #: classes/helpers/FrmAppHelper.php:1359
683
  #: classes/views/frm-forms/settings-advanced.php:93
684
  msgid "Select a Page"
685
  msgstr ""
@@ -878,7 +869,7 @@ msgid "Install WP Mail SMTP"
878
  msgstr ""
879
 
880
  #: classes/controllers/FrmSMTPController.php:305
881
- #: classes/helpers/FrmAppHelper.php:2818
882
  #: classes/helpers/FrmFormMigratorsHelper.php:131
883
  #: classes/views/shared/upgrade_overlay.php:34
884
  msgid "Install"
@@ -974,7 +965,7 @@ msgid "Check Box & Radio Fields"
974
  msgstr ""
975
 
976
  #: classes/controllers/FrmStylesController.php:408
977
- #: classes/helpers/FrmFieldsHelper.php:1938
978
  #: classes/views/frm-forms/settings-buttons.php:46
979
  msgid "Buttons"
980
  msgstr ""
@@ -1028,11 +1019,11 @@ msgstr ""
1028
  msgid "There are no entries for that form."
1029
  msgstr ""
1030
 
1031
- #: classes/helpers/FrmAppHelper.php:1126
1032
  msgid "Add New"
1033
  msgstr ""
1034
 
1035
- #: classes/helpers/FrmAppHelper.php:1138
1036
  #: classes/views/frm-entries/list.php:47
1037
  #: classes/views/frm-forms/list.php:27
1038
  #: classes/views/shared/mb_adv_info.php:40
@@ -1040,634 +1031,626 @@ msgstr ""
1040
  msgid "Search"
1041
  msgstr ""
1042
 
1043
- #: classes/helpers/FrmAppHelper.php:1466
1044
  msgid "Add Entries from Admin Area"
1045
  msgstr ""
1046
 
1047
- #: classes/helpers/FrmAppHelper.php:1467
1048
  msgid "Edit Entries from Admin Area"
1049
  msgstr ""
1050
 
1051
- #: classes/helpers/FrmAppHelper.php:1468
1052
  msgid "View Reports"
1053
  msgstr ""
1054
 
1055
- #: classes/helpers/FrmAppHelper.php:1469
1056
  msgid "Add/Edit Views"
1057
  msgstr ""
1058
 
1059
- #: classes/helpers/FrmAppHelper.php:1494
1060
  msgid "View Forms"
1061
  msgstr ""
1062
 
1063
- #: classes/helpers/FrmAppHelper.php:1495
1064
  msgid "Add and Edit Forms"
1065
  msgstr ""
1066
 
1067
- #: classes/helpers/FrmAppHelper.php:1496
1068
  msgid "Delete Forms"
1069
  msgstr ""
1070
 
1071
- #: classes/helpers/FrmAppHelper.php:1497
1072
  msgid "Access this Settings Page"
1073
  msgstr ""
1074
 
1075
- #: classes/helpers/FrmAppHelper.php:1498
1076
  msgid "View Entries from Admin Area"
1077
  msgstr ""
1078
 
1079
- #: classes/helpers/FrmAppHelper.php:1499
1080
  msgid "Delete Entries from Admin Area"
1081
  msgstr ""
1082
 
1083
- #: classes/helpers/FrmAppHelper.php:2237
1084
  msgid "at"
1085
  msgstr ""
1086
 
1087
- #: classes/helpers/FrmAppHelper.php:2381
1088
  msgid "year"
1089
  msgstr ""
1090
 
1091
- #: classes/helpers/FrmAppHelper.php:2382
1092
  msgid "years"
1093
  msgstr ""
1094
 
1095
- #: classes/helpers/FrmAppHelper.php:2386
1096
  msgid "month"
1097
  msgstr ""
1098
 
1099
- #: classes/helpers/FrmAppHelper.php:2387
1100
  msgid "months"
1101
  msgstr ""
1102
 
1103
- #: classes/helpers/FrmAppHelper.php:2391
1104
  msgid "week"
1105
  msgstr ""
1106
 
1107
- #: classes/helpers/FrmAppHelper.php:2392
1108
  msgid "weeks"
1109
  msgstr ""
1110
 
1111
- #: classes/helpers/FrmAppHelper.php:2396
1112
  msgid "day"
1113
  msgstr ""
1114
 
1115
- #: classes/helpers/FrmAppHelper.php:2397
1116
  msgid "days"
1117
  msgstr ""
1118
 
1119
- #: classes/helpers/FrmAppHelper.php:2401
1120
  msgid "hour"
1121
  msgstr ""
1122
 
1123
- #: classes/helpers/FrmAppHelper.php:2402
1124
  msgid "hours"
1125
  msgstr ""
1126
 
1127
- #: classes/helpers/FrmAppHelper.php:2406
1128
  msgid "minute"
1129
  msgstr ""
1130
 
1131
- #: classes/helpers/FrmAppHelper.php:2407
1132
  msgid "minutes"
1133
  msgstr ""
1134
 
1135
- #: classes/helpers/FrmAppHelper.php:2411
1136
  msgid "second"
1137
  msgstr ""
1138
 
1139
- #: classes/helpers/FrmAppHelper.php:2412
1140
  msgid "seconds"
1141
  msgstr ""
1142
 
1143
- #: classes/helpers/FrmAppHelper.php:2506
1144
  msgid "Give this action a label for easy reference."
1145
  msgstr ""
1146
 
1147
- #: classes/helpers/FrmAppHelper.php:2507
1148
  msgid "Add one or more recipient addresses separated by a \",\". FORMAT: Name <name@email.com> or name@email.com. [admin_email] is the address set in WP General Settings."
1149
  msgstr ""
1150
 
1151
- #: classes/helpers/FrmAppHelper.php:2508
1152
  msgid "Add CC addresses separated by a \",\". FORMAT: Name <name@email.com> or name@email.com."
1153
  msgstr ""
1154
 
1155
- #: classes/helpers/FrmAppHelper.php:2509
1156
  msgid "Add BCC addresses separated by a \",\". FORMAT: Name <name@email.com> or name@email.com."
1157
  msgstr ""
1158
 
1159
- #: classes/helpers/FrmAppHelper.php:2510
1160
  msgid "If you would like a different reply to address than the \"from\" address, add a single address here. FORMAT: Name <name@email.com> or name@email.com."
1161
  msgstr ""
1162
 
1163
- #: classes/helpers/FrmAppHelper.php:2511
1164
  msgid "Enter the name and/or email address of the sender. FORMAT: John Bates <john@example.com> or john@example.com."
1165
  msgstr ""
1166
 
1167
  #. translators: %1$s: Form name, %2$s: Date
1168
- #: classes/helpers/FrmAppHelper.php:2513
1169
  msgid "If you leave the subject blank, the default will be used: %1$s Form submitted on %2$s"
1170
  msgstr ""
1171
 
1172
- #: classes/helpers/FrmAppHelper.php:2717
1173
- #: classes/helpers/FrmAppHelper.php:2800
1174
  msgid "Please wait while your site updates."
1175
  msgstr ""
1176
 
1177
- #: classes/helpers/FrmAppHelper.php:2718
1178
  msgid "Are you sure you want to deauthorize Formidable Forms on this site?"
1179
  msgstr ""
1180
 
1181
- #: classes/helpers/FrmAppHelper.php:2723
1182
- #: classes/helpers/FrmAppHelper.php:2752
1183
  msgid "Loading&hellip;"
1184
  msgstr ""
1185
 
1186
- #: classes/helpers/FrmAppHelper.php:2753
1187
  msgid "Remove"
1188
  msgstr ""
1189
 
1190
- #: classes/helpers/FrmAppHelper.php:2756
1191
  #: classes/helpers/FrmCSVExportHelper.php:348
1192
  #: classes/views/shared/mb_adv_info.php:95
1193
  msgid "ID"
1194
  msgstr ""
1195
 
1196
- #: classes/helpers/FrmAppHelper.php:2757
1197
  msgid "No results match"
1198
  msgstr ""
1199
 
1200
- #: classes/helpers/FrmAppHelper.php:2758
1201
  msgid "That file looks like Spam."
1202
  msgstr ""
1203
 
1204
- #: classes/helpers/FrmAppHelper.php:2759
1205
  msgid "There is an error in the calculation in the field with key"
1206
  msgstr ""
1207
 
1208
- #: classes/helpers/FrmAppHelper.php:2760
1209
  msgid "Please complete the preceding required fields before uploading a file."
1210
  msgstr ""
1211
 
1212
- #: classes/helpers/FrmAppHelper.php:2773
1213
  msgid "(Click to add description)"
1214
  msgstr ""
1215
 
1216
- #: classes/helpers/FrmAppHelper.php:2774
1217
  msgid "(Blank)"
1218
  msgstr ""
1219
 
1220
- #: classes/helpers/FrmAppHelper.php:2775
1221
  msgid "(no label)"
1222
  msgstr ""
1223
 
1224
- #: classes/helpers/FrmAppHelper.php:2776
1225
  msgid "Saving"
1226
  msgstr ""
1227
 
1228
- #: classes/helpers/FrmAppHelper.php:2777
1229
  msgid "Saved"
1230
  msgstr ""
1231
 
1232
- #: classes/helpers/FrmAppHelper.php:2778
1233
  msgid "OK"
1234
  msgstr ""
1235
 
1236
- #: classes/helpers/FrmAppHelper.php:2779
1237
  #: classes/views/frm-forms/new-form-overlay.php:33
1238
  #: classes/views/frm-forms/new-form-overlay.php:93
1239
  #: classes/views/frm-forms/new-form-overlay.php:102
1240
  #: classes/views/frm-forms/new-form-overlay.php:112
1241
  #: classes/views/frm-forms/new-form-overlay.php:122
1242
  #: classes/views/frm-forms/new-form-overlay.php:132
1243
- #: classes/views/shared/admin-header.php:64
1244
  #: classes/views/shared/confirm-overlay.php:19
1245
  #: js/formidable_admin.js:3674
1246
  msgid "Cancel"
1247
  msgstr ""
1248
 
1249
- #: classes/helpers/FrmAppHelper.php:2780
1250
  #: classes/views/frm-fields/back-end/settings.php:280
1251
  msgid "Default"
1252
  msgstr ""
1253
 
1254
- #: classes/helpers/FrmAppHelper.php:2781
1255
  msgid "Clear default value when typing"
1256
  msgstr ""
1257
 
1258
- #: classes/helpers/FrmAppHelper.php:2782
1259
  msgid "Do not clear default value when typing"
1260
  msgstr ""
1261
 
1262
- #: classes/helpers/FrmAppHelper.php:2783
1263
  msgid "Default value will pass form validation"
1264
  msgstr ""
1265
 
1266
- #: classes/helpers/FrmAppHelper.php:2784
1267
  msgid "Default value will NOT pass form validation"
1268
  msgstr ""
1269
 
1270
- #: classes/helpers/FrmAppHelper.php:2785
1271
  #: classes/helpers/FrmListHelper.php:412
1272
  #: js/formidable_admin.js:4066
1273
  msgid "Heads up"
1274
  msgstr ""
1275
 
1276
- #: classes/helpers/FrmAppHelper.php:2786
1277
  #: classes/views/shared/confirm-overlay.php:15
1278
  #: classes/views/shared/info-overlay.php:15
1279
  msgid "Are you sure?"
1280
  msgstr ""
1281
 
1282
- #: classes/helpers/FrmAppHelper.php:2787
1283
  msgid "Are you sure you want to delete this field and all data associated with it?"
1284
  msgstr ""
1285
 
1286
- #: classes/helpers/FrmAppHelper.php:2788
1287
  msgid "All fields inside this Section will be deleted along with their data. Are you sure you want to delete this group of fields?"
1288
  msgstr ""
1289
 
1290
- #: classes/helpers/FrmAppHelper.php:2789
1291
  msgid "Warning: If you have entries with multiple rows, all but the first row will be lost."
1292
  msgstr ""
1293
 
1294
- #: classes/helpers/FrmAppHelper.php:2791
1295
  #: classes/helpers/FrmFieldsHelper.php:284
1296
  msgid "The entered values do not match"
1297
  msgstr ""
1298
 
1299
- #: classes/helpers/FrmAppHelper.php:2792
1300
  msgid "Enter Email"
1301
  msgstr ""
1302
 
1303
- #: classes/helpers/FrmAppHelper.php:2793
1304
  msgid "Confirm Email"
1305
  msgstr ""
1306
 
1307
- #: classes/helpers/FrmAppHelper.php:2794
1308
  #: classes/views/shared/mb_adv_info.php:166
1309
  msgid "Conditional content here"
1310
  msgstr ""
1311
 
1312
- #: classes/helpers/FrmAppHelper.php:2795
1313
  #: classes/helpers/FrmFieldsHelper.php:456
1314
  #: classes/helpers/FrmFieldsHelper.php:457
1315
  msgid "New Option"
1316
  msgstr ""
1317
 
1318
- #: classes/helpers/FrmAppHelper.php:2796
1319
  msgid "In certain browsers (e.g. Firefox) text will not display correctly if the field height is too small relative to the field padding and text size. Please increase your field height or decrease your field padding."
1320
  msgstr ""
1321
 
1322
- #: classes/helpers/FrmAppHelper.php:2797
1323
  msgid "Enter Password"
1324
  msgstr ""
1325
 
1326
- #: classes/helpers/FrmAppHelper.php:2798
1327
  msgid "Confirm Password"
1328
  msgstr ""
1329
 
1330
- #: classes/helpers/FrmAppHelper.php:2799
1331
  msgid "Import Complete"
1332
  msgstr ""
1333
 
1334
- #: classes/helpers/FrmAppHelper.php:2801
1335
  msgid "Warning: There is no way to retrieve unsaved entries."
1336
  msgstr ""
1337
 
1338
- #: classes/helpers/FrmAppHelper.php:2802
1339
  msgid "Private"
1340
  msgstr ""
1341
 
1342
- #: classes/helpers/FrmAppHelper.php:2805
1343
  msgid "No new licenses were found"
1344
  msgstr ""
1345
 
1346
- #: classes/helpers/FrmAppHelper.php:2806
1347
  msgid "This calculation has at least one unmatched ( ) { } [ ]."
1348
  msgstr ""
1349
 
1350
- #: classes/helpers/FrmAppHelper.php:2807
1351
  msgid "This calculation may have shortcodes that work in Views but not forms."
1352
  msgstr ""
1353
 
1354
- #: classes/helpers/FrmAppHelper.php:2808
1355
  msgid "This calculation may have shortcodes that work in text calculations but not numeric calculations."
1356
  msgstr ""
1357
 
1358
- #: classes/helpers/FrmAppHelper.php:2809
1359
  msgid "This form action is limited to one per form. Please edit the existing form action."
1360
  msgstr ""
1361
 
1362
  #. Translators: %s is the name of a Detail Page Slug that is a reserved word.
1363
- #: classes/helpers/FrmAppHelper.php:2812
1364
  msgid "The Detail Page Slug \"%s\" is reserved by WordPress. This may cause problems. Is this intentional?"
1365
  msgstr ""
1366
 
1367
  #. Translators: %s is the name of a parameter that is a reserved word. More than one word could be listed here, though that would not be common.
1368
- #: classes/helpers/FrmAppHelper.php:2814
1369
  msgid "The parameter \"%s\" is reserved by WordPress. This may cause problems when included in the URL. Is this intentional? "
1370
  msgstr ""
1371
 
1372
- #: classes/helpers/FrmAppHelper.php:2815
1373
  #: classes/helpers/FrmFormsHelper.php:1543
1374
  msgid "See the list of reserved words in WordPress."
1375
  msgstr ""
1376
 
1377
- #: classes/helpers/FrmAppHelper.php:2816
1378
  msgid "Please enter a Repeat Limit that is greater than 1."
1379
  msgstr ""
1380
 
1381
- #: classes/helpers/FrmAppHelper.php:2817
1382
  msgid "Please select a limit between 0 and 200."
1383
  msgstr ""
1384
 
1385
- #: classes/helpers/FrmAppHelper.php:2820
1386
  #: classes/views/shared/mb_adv_info.php:113
1387
  #: classes/views/shared/mb_adv_info.php:127
1388
  msgid "Select a Field"
1389
  msgstr ""
1390
 
1391
- #: classes/helpers/FrmAppHelper.php:2821
1392
  #: classes/helpers/FrmListHelper.php:262
1393
  msgid "No items found."
1394
  msgstr ""
1395
 
1396
- #: classes/helpers/FrmAppHelper.php:2871
1397
  msgid "You are running an outdated version of Formidable. This plugin may not work correctly if you do not update Formidable."
1398
  msgstr ""
1399
 
1400
- #: classes/helpers/FrmAppHelper.php:2898
1401
  msgid "You are running a version of Formidable Forms that may not be compatible with your version of Formidable Forms Pro."
1402
  msgstr ""
1403
 
1404
- #: classes/helpers/FrmAppHelper.php:2926
1405
  msgid "The version of PHP on your server is too low. If this is not corrected, you may see issues with Formidable Forms. Please contact your web host and ask to be updated to PHP 7.0+."
1406
  msgstr ""
1407
 
1408
- #: classes/helpers/FrmAppHelper.php:2932
1409
  msgid "You are using an outdated browser that is not compatible with Formidable Forms. Please update to a more current browser (we recommend Chrome)."
1410
  msgstr ""
1411
 
1412
- #: classes/helpers/FrmAppHelper.php:2946
1413
  msgid "English"
1414
  msgstr ""
1415
 
1416
- #: classes/helpers/FrmAppHelper.php:2947
1417
  msgid "Afrikaans"
1418
  msgstr ""
1419
 
1420
- #: classes/helpers/FrmAppHelper.php:2948
1421
  msgid "Albanian"
1422
  msgstr ""
1423
 
1424
- #: classes/helpers/FrmAppHelper.php:2949
1425
  msgid "Arabic"
1426
  msgstr ""
1427
 
1428
- #: classes/helpers/FrmAppHelper.php:2950
1429
  msgid "Armenian"
1430
  msgstr ""
1431
 
1432
- #: classes/helpers/FrmAppHelper.php:2951
1433
  msgid "Azerbaijani"
1434
  msgstr ""
1435
 
1436