Formidable Forms – Form Builder for WordPress - Version 5.5.2

Version Description

  • New: When dragging a field or field group, a smaller drag helper will be used that is more consistent with the field type options in the sidebar, and the field that is being dragged will gray out.
  • New: Improved error handling when installing templates from XML. A message will be shown when the simple XML extension is not installed, and errors will now be shown in a pop up when a template falls to install.
  • New: Added a new frm_before_simple_form_render action that triggers before a Gutenberg block is rendered.
  • New: Added a new frm_rich_text_emails filter for cases when a plain textarea may be preferred over rich text.
  • New: Fields with floating labels now take up less space in the front end.
  • Fix: When inserting a [default-plain] or [default-html] shortcode into a rich text editor, the shortcode would insert instead of changing dynamically as expected.
  • Fix: Rich text HTML emails were not automatically using wpautop so line breaks were not appearing in emails as expected.
  • Fix: Improved how drag and drop works when dragging multiple sections in a field group.
  • Fix: Prevent a warning that would trigger when previewing in-theme when using Twenty Twenty One.
  • Fix: Prevent a fatal error that would only ever happen once, immediately when upgrading to version 5.5 or higher from an older version.
  • Fix: Prevent a fatal error that was preventing add ons from installing via API.
  • Fix: Updated radio button styling on the Edit Entry page to fix visual issues at mobile screen sizes.
  • Embed examples no longer include title=true and description=true.
  • License types will no longer appear as application template category options.
  • Plain text email actions will no longer use a rich text editor.
Download this release

Release Info

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

Code changes from version 5.5.1 to 5.5.2

classes/controllers/FrmAddonsController.php CHANGED
@@ -317,11 +317,9 @@ class FrmAddonsController {
317
  return $transient;
318
  }
319
 
320
- $version_info = self::fill_update_addon_info( $installed_addons );
321
-
322
  $transient->last_checked = time();
323
-
324
- $wp_plugins = FrmAppHelper::get_plugins();
325
 
326
  foreach ( $version_info as $id => $plugin ) {
327
  $plugin = (object) $plugin;
@@ -356,6 +354,21 @@ class FrmAddonsController {
356
  return $transient;
357
  }
358
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
359
  /**
360
  * Check if a plugin is installed before showing an update for it
361
  *
@@ -366,7 +379,7 @@ class FrmAddonsController {
366
  * @return bool - True if installed
367
  */
368
  protected static function is_installed( $plugin ) {
369
- $all_plugins = FrmAppHelper::get_plugins();
370
  return isset( $all_plugins[ $plugin ] );
371
  }
372
 
@@ -861,7 +874,7 @@ class FrmAddonsController {
861
  $response = array();
862
 
863
  // It's already installed and active.
864
- $active = activate_plugin( 'formidable-pro/formidable-pro.php', false, false, true );
865
  if ( is_wp_error( $active ) ) {
866
  // The plugin was installed, but not active. Download it now.
867
  self::ajax_install_addon();
@@ -874,6 +887,22 @@ class FrmAddonsController {
874
  wp_die();
875
  }
876
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
877
  /**
878
  * @since 5.0.10
879
  *
@@ -1028,7 +1057,7 @@ class FrmAddonsController {
1028
  return;
1029
  }
1030
 
1031
- $activate = activate_plugin( $installed );
1032
  if ( is_wp_error( $activate ) ) {
1033
  // Ignore the invalid header message that shows with nested plugins.
1034
  if ( $activate->get_error_code() !== 'no_plugin_header' ) {
@@ -1118,7 +1147,7 @@ class FrmAddonsController {
1118
  delete_option( 'frm_connect_token' );
1119
 
1120
  // It's already installed and active.
1121
- $active = activate_plugin( 'formidable-pro/formidable-pro.php', false, false, true );
1122
  if ( is_wp_error( $active ) ) {
1123
  // Download plugin now.
1124
  $response = self::download_and_activate();
317
  return $transient;
318
  }
319
 
320
+ $version_info = self::fill_update_addon_info( $installed_addons );
 
321
  $transient->last_checked = time();
322
+ $wp_plugins = self::get_plugins();
 
323
 
324
  foreach ( $version_info as $id => $plugin ) {
325
  $plugin = (object) $plugin;
354
  return $transient;
355
  }
356
 
357
+ /**
358
+ * Copy of FrmAppHelper::get_plugins.
359
+ * Because this gets called on "pre_set_site_transient_update_plugins" an old version of FrmAppHelper may be loaded on plugin update.
360
+ * This means that trying to access FrmAppHelper::get_plugins when upgrading from a Lite version before v5.5 results in a one-off error.
361
+ *
362
+ * @since 5.5.2
363
+ * @return array
364
+ */
365
+ protected static function get_plugins() {
366
+ if ( ! function_exists( 'get_plugins' ) ) {
367
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
368
+ }
369
+ return get_plugins();
370
+ }
371
+
372
  /**
373
  * Check if a plugin is installed before showing an update for it
374
  *
379
  * @return bool - True if installed
380
  */
381
  protected static function is_installed( $plugin ) {
382
+ $all_plugins = self::get_plugins();
383
  return isset( $all_plugins[ $plugin ] );
384
  }
385
 
874
  $response = array();
875
 
876
  // It's already installed and active.
877
+ $active = self::activate_plugin( 'formidable-pro/formidable-pro.php', false, false, true );
878
  if ( is_wp_error( $active ) ) {
879
  // The plugin was installed, but not active. Download it now.
880
  self::ajax_install_addon();
887
  wp_die();
888
  }
889
 
890
+ /**
891
+ * @since 5.5.2
892
+ *
893
+ * @param string $plugin
894
+ * @param string $redirect
895
+ * @param bool $network_wide
896
+ * @param bool $silent
897
+ * @return null|WP_Error Null on success, WP_Error on invalid file.
898
+ */
899
+ protected static function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silent = false ) {
900
+ if ( ! function_exists( 'activate_plugin' ) ) {
901
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
902
+ }
903
+ return activate_plugin( $plugin, $redirect, $network_wide, $silent );
904
+ }
905
+
906
  /**
907
  * @since 5.0.10
908
  *
1057
  return;
1058
  }
1059
 
1060
+ $activate = self::activate_plugin( $installed );
1061
  if ( is_wp_error( $activate ) ) {
1062
  // Ignore the invalid header message that shows with nested plugins.
1063
  if ( $activate->get_error_code() !== 'no_plugin_header' ) {
1147
  delete_option( 'frm_connect_token' );
1148
 
1149
  // It's already installed and active.
1150
+ $active = self::activate_plugin( 'formidable-pro/formidable-pro.php', false, false, true );
1151
  if ( is_wp_error( $active ) ) {
1152
  // Download plugin now.
1153
  $response = self::download_and_activate();
classes/controllers/FrmEntriesController.php CHANGED
@@ -666,6 +666,13 @@ class FrmEntriesController {
666
  if ( isset( $data['browser'] ) ) {
667
  $browser = FrmEntriesHelper::get_browser( $data['browser'] );
668
  }
 
 
 
 
 
 
 
669
  }
670
 
671
  include( FrmAppHelper::plugin_path() . '/classes/views/frm-entries/sidebar-shared.php' );
666
  if ( isset( $data['browser'] ) ) {
667
  $browser = FrmEntriesHelper::get_browser( $data['browser'] );
668
  }
669
+ /**
670
+ * Add or remove information in the entry sidebar.
671
+ *
672
+ * @since 5.5.2
673
+ * @param array $data
674
+ */
675
+ $data = apply_filters( 'frm_sidebar_data', $data, compact( 'entry' ) );
676
  }
677
 
678
  include( FrmAppHelper::plugin_path() . '/classes/views/frm-entries/sidebar-shared.php' );
classes/controllers/FrmFormsController.php CHANGED
@@ -318,7 +318,6 @@ class FrmFormsController {
318
  }
319
 
320
  $random_page = get_posts( $page_query );
321
-
322
  if ( ! $random_page ) {
323
  return;
324
  }
@@ -330,6 +329,23 @@ class FrmFormsController {
330
  'page_id' => $random_page->ID,
331
  )
332
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  }
334
 
335
  /**
318
  }
319
 
320
  $random_page = get_posts( $page_query );
 
321
  if ( ! $random_page ) {
322
  return;
323
  }
329
  'page_id' => $random_page->ID,
330
  )
331
  );
332
+
333
+ // Fixes Pro issue #3004. Prevent an undefined $post object.
334
+ // Otherwise WordPress themes will trigger a warning "Attempt to read property "comment_count" on null".
335
+ self::set_post_global( $random_page );
336
+ }
337
+
338
+ /**
339
+ * Set the WP $post global object. Used for in-theme preview when defining a page.
340
+ *
341
+ * @since 5.5.2
342
+ *
343
+ * @param WP_Post $post
344
+ * @return void
345
+ */
346
+ private static function set_post_global( $page ) {
347
+ global $post;
348
+ $post = $page; // phpcs:ignore WordPress.WP.GlobalVariablesOverride
349
  }
350
 
351
  /**
classes/controllers/FrmSimpleBlocksController.php CHANGED
@@ -131,8 +131,7 @@ class FrmSimpleBlocksController {
131
  /**
132
  * Renders a form given the specified attributes.
133
  *
134
- * @param $attributes
135
- *
136
  * @return string
137
  */
138
  public static function simple_form_render( $attributes ) {
@@ -140,6 +139,12 @@ class FrmSimpleBlocksController {
140
  return '';
141
  }
142
 
 
 
 
 
 
 
143
  $params = array_filter( $attributes );
144
  $params['id'] = $params['formId'];
145
  unset( $params['formId'] );
131
  /**
132
  * Renders a form given the specified attributes.
133
  *
134
+ * @param array $attributes
 
135
  * @return string
136
  */
137
  public static function simple_form_render( $attributes ) {
139
  return '';
140
  }
141
 
142
+ /**
143
+ * @since 5.5.2
144
+ * @param array $attributes
145
+ */
146
+ do_action( 'frm_before_simple_form_render', $attributes );
147
+
148
  $params = array_filter( $attributes );
149
  $params['id'] = $params['formId'];
150
  unset( $params['formId'] );
classes/controllers/FrmXMLController.php CHANGED
@@ -35,11 +35,20 @@ class FrmXMLController {
35
  * Use the template link to install the XML template
36
  *
37
  * @since 3.06
 
38
  */
39
  public static function install_template() {
40
  FrmAppHelper::permission_check( 'frm_edit_forms' );
41
  check_ajax_referer( 'frm_ajax', 'nonce' );
42
 
 
 
 
 
 
 
 
 
43
  $url = FrmAppHelper::get_param( 'xml', '', 'post', 'esc_url_raw' );
44
 
45
  $form = self::get_posted_form();
@@ -51,7 +60,7 @@ class FrmXMLController {
51
 
52
  if ( ! $xml ) {
53
  $response = array(
54
- 'message' => __( 'There was an error reading the form template', 'formidable' ),
55
  );
56
  echo wp_json_encode( $response );
57
  wp_die();
35
  * Use the template link to install the XML template
36
  *
37
  * @since 3.06
38
+ * @return void
39
  */
40
  public static function install_template() {
41
  FrmAppHelper::permission_check( 'frm_edit_forms' );
42
  check_ajax_referer( 'frm_ajax', 'nonce' );
43
 
44
+ if ( ! function_exists( 'simplexml_load_string' ) ) {
45
+ $response = array(
46
+ 'message' => __( 'Your server is missing the Simple XML extension. This is required to install a template.', 'formidable' ),
47
+ );
48
+ echo wp_json_encode( $response );
49
+ wp_die();
50
+ }
51
+
52
  $url = FrmAppHelper::get_param( 'xml', '', 'post', 'esc_url_raw' );
53
 
54
  $form = self::get_posted_form();
60
 
61
  if ( ! $xml ) {
62
  $response = array(
63
+ 'message' => __( 'There was an error reading the form template.', 'formidable' ),
64
  );
65
  echo wp_json_encode( $response );
66
  wp_die();
classes/helpers/FrmAppHelper.php CHANGED
@@ -16,7 +16,7 @@ class FrmAppHelper {
16
  /**
17
  * @since 2.0
18
  */
19
- public static $plug_version = '5.5.1';
20
 
21
  /**
22
  * @since 1.07.02
16
  /**
17
  * @since 2.0
18
  */
19
+ public static $plug_version = '5.5.2';
20
 
21
  /**
22
  * @since 1.07.02
classes/helpers/FrmFormsHelper.php CHANGED
@@ -1340,6 +1340,8 @@ BEFORE_HTML;
1340
 
1341
  /**
1342
  * @since 4.03.01
 
 
1343
  */
1344
  public static function ignore_template_categories() {
1345
  return array( 'Business', 'Elite', 'Personal', 'Creator', 'Basic', 'free' );
1340
 
1341
  /**
1342
  * @since 4.03.01
1343
+ *
1344
+ * @return array<string>
1345
  */
1346
  public static function ignore_template_categories() {
1347
  return array( 'Business', 'Elite', 'Personal', 'Creator', 'Basic', 'free' );
classes/models/FrmApplicationTemplate.php CHANGED
@@ -80,13 +80,29 @@ class FrmApplicationTemplate {
80
  */
81
  private static function populate_category_information( $categories ) {
82
  foreach ( $categories as $category ) {
83
- if ( false !== strpos( $category, '+Views' ) || in_array( $category, self::$categories, true ) ) {
 
 
 
84
  continue;
85
  }
86
  self::$categories[] = $category;
87
  }
88
  }
89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  /**
91
  * @return array<string>
92
  */
80
  */
81
  private static function populate_category_information( $categories ) {
82
  foreach ( $categories as $category ) {
83
+ if ( self::category_matches_a_license_type( $category ) ) {
84
+ continue;
85
+ }
86
+ if ( in_array( $category, self::$categories, true ) ) {
87
  continue;
88
  }
89
  self::$categories[] = $category;
90
  }
91
  }
92
 
93
+ /**
94
+ * @since 5.5.2
95
+ *
96
+ * @param string $category
97
+ * @return bool
98
+ */
99
+ private static function category_matches_a_license_type( $category ) {
100
+ if ( false !== strpos( $category, '+Views' ) ) {
101
+ return true;
102
+ }
103
+ return in_array( $category, FrmFormsHelper::ignore_template_categories(), true );
104
+ }
105
+
106
  /**
107
  * @return array<string>
108
  */
classes/models/FrmEmail.php CHANGED
@@ -361,7 +361,13 @@ class FrmEmail {
361
  * @since 2.03.04
362
  */
363
  private function set_message() {
364
- $this->message = FrmFieldsHelper::basic_replace_shortcodes( $this->settings['email_message'], $this->form, $this->entry );
 
 
 
 
 
 
365
 
366
  $prev_mail_body = $this->message;
367
  $pass_entry = clone $this->entry; // make a copy to prevent changes by reference
@@ -390,6 +396,8 @@ class FrmEmail {
390
 
391
  if ( $this->is_plain_text ) {
392
  $this->message = wp_specialchars_decode( strip_tags( $this->message ), ENT_QUOTES );
 
 
393
  }
394
 
395
  $this->message = apply_filters( 'frm_email_message', $this->message, $this->package_atts() );
361
  * @since 2.03.04
362
  */
363
  private function set_message() {
364
+ $this->message = $this->settings['email_message'];
365
+
366
+ if ( ! $this->is_plain_text ) {
367
+ $this->message = html_entity_decode( $this->message ); // The decode is to support [default-html] shortcodes.
368
+ }
369
+
370
+ $this->message = FrmFieldsHelper::basic_replace_shortcodes( $this->message, $this->form, $this->entry );
371
 
372
  $prev_mail_body = $this->message;
373
  $pass_entry = clone $this->entry; // make a copy to prevent changes by reference
396
 
397
  if ( $this->is_plain_text ) {
398
  $this->message = wp_specialchars_decode( strip_tags( $this->message ), ENT_QUOTES );
399
+ } else {
400
+ $this->message = wpautop( $this->message, false ); // HTML emails should use autop.
401
  }
402
 
403
  $this->message = apply_filters( 'frm_email_message', $this->message, $this->package_atts() );
classes/models/FrmEntryValues.php CHANGED
@@ -273,7 +273,7 @@ class FrmEntryValues {
273
  * @param array $referrer
274
  * @param array @entry_description
275
  */
276
- $referrer = apply_filters( 'frm_user_info_referrer', $referrer, $entry_description );
277
 
278
  $this->user_info = array(
279
  'ip' => $ip,
273
  * @param array $referrer
274
  * @param array @entry_description
275
  */
276
+ $referrer = apply_filters( 'frm_user_info_referrer', $referrer, $entry_description, $this->entry );
277
 
278
  $this->user_info = array(
279
  'ip' => $ip,
classes/views/frm-form-actions/_email_settings.php CHANGED
@@ -77,16 +77,35 @@ if ( ! defined( 'ABSPATH' ) ) {
77
  <?php esc_html_e( 'Message', 'formidable' ); ?>
78
  </label>
79
  <?php
80
- $editor_args = array(
81
- 'textarea_name' => $this->get_field_name( 'email_message' ),
82
- 'textarea_rows' => 6,
83
- 'editor_class' => 'frm_not_email_message',
84
- );
85
- wp_editor(
86
- $form_action->post_content['email_message'],
87
- $this->get_field_id( 'email_message' ),
88
- $editor_args
89
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  ?>
91
  </p>
92
 
77
  <?php esc_html_e( 'Message', 'formidable' ); ?>
78
  </label>
79
  <?php
80
+ $rich_text_emails = empty( $form_action->post_content['plain_text'] );
81
+
82
+ /**
83
+ * @since 5.5.2
84
+ *
85
+ * @param bool $rich_text_emails True by default unless plain text is selected.
86
+ * @param array $args {
87
+ * @type stdClass $form
88
+ * @type WP_Post $form_action
89
+ * }
90
+ */
91
+ $rich_text_emails = apply_filters( 'frm_rich_text_emails', $rich_text_emails, compact( 'form', 'form_action' ) );
92
+
93
+ if ( $rich_text_emails ) {
94
+ $editor_args = array(
95
+ 'textarea_name' => $this->get_field_name( 'email_message' ),
96
+ 'textarea_rows' => 6,
97
+ 'editor_class' => 'frm_not_email_message',
98
+ );
99
+ wp_editor(
100
+ $form_action->post_content['email_message'],
101
+ $this->get_field_id( 'email_message' ),
102
+ $editor_args
103
+ );
104
+ } else {
105
+ ?>
106
+ <textarea name="<?php echo esc_attr( $this->get_field_name( 'email_message' ) ); ?>" class="frm_not_email_message frm_long_input" id="<?php echo esc_attr( $this->get_field_id( 'email_message' ) ); ?>" cols="50" rows="5"><?php echo FrmAppHelper::esc_textarea( $form_action->post_content['email_message'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></textarea>
107
+ <?php
108
+ }
109
  ?>
110
  </p>
111
 
css/custom_theme.css.php CHANGED
@@ -443,8 +443,8 @@ legend.frm_hidden{
443
  /* Floating labels */
444
  .with_frm_style .frm_inside_container {
445
  position: relative;
446
- padding-top: 27px;
447
- padding-top: calc(0.85 * var(--field-height));
448
  }
449
 
450
  .with_frm_style .frm_inside_container > input,
@@ -476,8 +476,8 @@ legend.frm_hidden{
476
  transition: all 0.3s ease-in;
477
 
478
  position: absolute;
479
- top: 28px;
480
- top: calc(1px + 0.85 * var(--field-height));
481
  left: 3px;
482
  width: 100%;
483
 
@@ -505,6 +505,7 @@ legend.frm_hidden{
505
  .with_frm_style .frm_inside_container.frm_label_float_top > label {
506
  top: 0;
507
  left: 0;
 
508
  font-size: 12px;
509
  font-size: calc(0.85 * var(--field-font-size));
510
  }
@@ -527,6 +528,7 @@ legend.frm_hidden{
527
  opacity: 1;
528
  transition: opacity 0.3s ease-in;
529
  }
 
530
 
531
  .with_frm_style .frm_description,
532
  .with_frm_style .frm_pro_max_limit_desc{
443
  /* Floating labels */
444
  .with_frm_style .frm_inside_container {
445
  position: relative;
446
+ padding-top: 16px;
447
+ padding-top: calc(0.5 * var(--field-height));
448
  }
449
 
450
  .with_frm_style .frm_inside_container > input,
476
  transition: all 0.3s ease-in;
477
 
478
  position: absolute;
479
+ top: 17px;
480
+ top: calc(1px + .5 * var(--field-height));
481
  left: 3px;
482
  width: 100%;
483
 
505
  .with_frm_style .frm_inside_container.frm_label_float_top > label {
506
  top: 0;
507
  left: 0;
508
+ padding: 0;
509
  font-size: 12px;
510
  font-size: calc(0.85 * var(--field-font-size));
511
  }
528
  opacity: 1;
529
  transition: opacity 0.3s ease-in;
530
  }
531
+ /* End floating label */
532
 
533
  .with_frm_style .frm_description,
534
  .with_frm_style .frm_pro_max_limit_desc{
css/frm_admin.css CHANGED
@@ -3350,6 +3350,19 @@ input[type="checkbox"] {
3350
  margin-right: 5px;
3351
  }
3352
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3353
  .frm_inner_field_container {
3354
  margin-bottom: 10px;
3355
  }
@@ -3377,6 +3390,24 @@ li.ui-state-default.selected > .frm_inner_field_container > label {
3377
  max-width: calc(100% - 100px);
3378
  }
3379
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3380
  .frm_form_settings #op-popup, /* 1Password */
3381
  .frm_form_settings com-1password-op-button,
3382
  .frm_conf_below .frm_conf_field_container .frm_primary_label,
@@ -3820,7 +3851,7 @@ li.sortable-placeholder {
3820
  border: none;
3821
  margin: 0;
3822
  visibility: visible !important;
3823
- box-shadow: 2px -10px 0 1px var(--primary-color);
3824
  }
3825
 
3826
  #frm_form_editor_container > ul > .frm_single_option.ui-sortable-placeholder,
@@ -3833,7 +3864,6 @@ li.sortable-placeholder {
3833
  position: relative;
3834
  }
3835
 
3836
- #frm_form_editor_container > ul > li > ul > .frm_single_option.ui-sortable-placeholder,
3837
  #frm_form_editor_container > ul > li > ul > li.sortable-placeholder,
3838
  #frm_form_editor_container ul.start_divider > li > ul > li.sortable-placeholder {
3839
  position: absolute;
@@ -3842,36 +3872,27 @@ li.sortable-placeholder {
3842
  }
3843
 
3844
  .edit_field_type_divider + li.sortable-placeholder {
3845
- box-shadow: 2px 5px 0 1px var(--primary-color);
3846
  }
3847
 
3848
  .start_divider li.sortable-placeholder {
3849
- box-shadow: 2px -5px 0 1px var(--primary-color);
3850
  }
3851
 
3852
- .frm_single_option.ui-sortable-placeholder {
3853
- box-shadow: 0 0 1px 1px var(--primary-color);
3854
  }
3855
 
3856
- .frm-is-collapsed + .sortable-placeholder {
3857
- box-shadow: 2px 15px 0 1px var(--primary-color);
3858
  }
3859
 
3860
  .frm_sorting > li.edit_field_type_end_divider:first-child,
3861
- .frm_sorting > .frmbutton + .sortable-placeholder, /* hide for first field */
3862
- .no-drop-placeholder,
3863
  .frm-show-click,
3864
  li.ui-state-default.edit_field_type_divider .frm-show-click {
3865
  display: none;
3866
  }
3867
 
3868
- .frm_form_field.ui-sortable-helper {
3869
- height: 30px !important;
3870
- background-color: #fff !important;
3871
- overflow: hidden !important;
3872
- box-sizing: border-box;
3873
- }
3874
-
3875
  .frm_form_field.ui-sortable-helper .frm-field-action-icons,
3876
  .frm_form_field.ui-sortable-helper .frm_form_fields,
3877
  .frm_form_field.ui-sortable-helper .frm_description,
@@ -5457,7 +5478,7 @@ a.frm_action_icon:hover {
5457
  }
5458
 
5459
  .frm-move {
5460
- cursor: move;
5461
  }
5462
 
5463
  span.howto {
@@ -5901,7 +5922,7 @@ li.selected .divider_section_only:before {
5901
  overflow: visible;
5902
  position: relative;
5903
  padding: 0 0 0 20px;
5904
- margin: 25px 0 0 -20px;
5905
  border-left: 1px solid var(--primary-hover);
5906
  transition: border 0.7s ease-out;
5907
  }
@@ -6132,7 +6153,7 @@ tr.frm_options_heading td {
6132
  border: 1px dashed var(--grey-border);
6133
  }
6134
 
6135
- .drop-me + .frm_no_fields {
6136
  border-style: solid;
6137
  }
6138
 
@@ -7162,35 +7183,26 @@ input[disabled],
7162
  color: var(--dark-grey);
7163
  }
7164
 
7165
- .frmbutton.ui-draggable-dragging {
7166
- width: auto !important;
7167
- }
7168
-
7169
  /* Icon while dragging */
7170
- .frmbutton.ui-draggable-dragging,
7171
- .frmbutton.ui-draggable-dragging a {
7172
- cursor: move;
7173
  }
7174
 
7175
- .frmbutton.ui-sortable-helper a,
7176
- .frmbutton.ui-draggable-dragging a:hover,
7177
  .frmbutton.ui-draggable-dragging a {
7178
  text-decoration: none;
7179
- height: 25px !important;
7180
  width: 180px;
7181
- text-align: center;
7182
- display: block !important;
7183
- background-color: var(--primary-hover) !important;
 
 
7184
  border-radius: 35px !important;
7185
- padding: 5px 20px !important;
7186
- color: #fff !important;
7187
- }
7188
-
7189
- .frmbutton.ui-draggable-dragging:not(.ui-sortable-helper) a {
7190
- /* When the new field is held outside of a dropzone */
7191
- cursor: not-allowed;
7192
- background: var(--sidebar-color) !important;
7193
  color: var(--dark-grey) !important;
 
 
 
7194
  }
7195
 
7196
  .frmbutton.ui-draggable-dragging span {
@@ -7198,29 +7210,27 @@ input[disabled],
7198
  }
7199
 
7200
  #frm-show-fields .frmbutton.ui-sortable-helper i,
7201
- .frmbutton.ui-sortable-helper span,
7202
  .frmbutton.ui-draggable-dragging i,
7203
  .frmbutton.ui-draggable-dragging .frmsvg {
7204
  color: #fff !important;
7205
  }
7206
 
7207
- .frmbutton.ui-draggable-dragging:not(.ui-sortable-helper) i,
7208
- .frmbutton.ui-draggable-dragging:not(.ui-sortable-helper) .frmsvg {
7209
  color: var(--dark-grey) !important;
7210
  }
7211
 
7212
- .frmbutton.ui-draggable-dragging .frm-dropdown-menu {
7213
- display: none;
7214
- }
7215
-
7216
  .frm_sorting li.ui-state-default.ui-sortable-helper,
7217
  .frmbutton.ui-sortable-helper {
7218
  transition: opacity .2s;
7219
  opacity: 1;
7220
  }
7221
 
7222
- .frmbutton.ui-sortable-helper:not(.ui-draggable-dragging) {
7223
- opacity: 0;
 
 
 
7224
  }
7225
 
7226
  /* End dragging */
@@ -8235,7 +8245,9 @@ Responsive Design
8235
  width: 100%;
8236
  }
8237
 
8238
- .with_frm_style .frm_radio input[type=radio],
 
 
8239
  .with_frm_style .frm_checkbox input[type=checkbox] {
8240
  width: 25px !important;
8241
  }
@@ -8671,6 +8683,11 @@ Responsive Design
8671
  pointer-events: none;
8672
  }
8673
 
 
 
 
 
 
8674
  #frm_banner {
8675
  width: 100%;
8676
  color: #fff;
@@ -8743,3 +8760,4 @@ Responsive Design
8743
  .frm-ready-made-solution img {
8744
  max-width: 100%;
8745
  }
 
3350
  margin-right: 5px;
3351
  }
3352
 
3353
+ .with_frm_style .frm_radio input[type=radio] {
3354
+ margin: 5px 0;
3355
+ width: 18px;
3356
+ position: relative; /* override Bootstrap */
3357
+ }
3358
+
3359
+ .with_frm_style .frm_radio input[type=radio]:before {
3360
+ position: relative !important;
3361
+ left: calc(50% - 6px);
3362
+ top: calc(50% - 6px);
3363
+ margin: 0 !important;
3364
+ }
3365
+
3366
  .frm_inner_field_container {
3367
  margin-bottom: 10px;
3368
  }
3390
  max-width: calc(100% - 100px);
3391
  }
3392
 
3393
+ .frm-dragging * {
3394
+ cursor: grabbing !important;
3395
+ }
3396
+
3397
+ .frm-drag-fade {
3398
+ background-color: var(--lightest-grey) !important;
3399
+ border-radius: 4px;
3400
+ }
3401
+
3402
+ .frm-drag-fade * {
3403
+ opacity: 0;
3404
+ }
3405
+
3406
+ .frm-dragging .divider_section_only,
3407
+ .frm-dragging .frm_field_box {
3408
+ pointer-events: none;
3409
+ }
3410
+
3411
  .frm_form_settings #op-popup, /* 1Password */
3412
  .frm_form_settings com-1password-op-button,
3413
  .frm_conf_below .frm_conf_field_container .frm_primary_label,
3851
  border: none;
3852
  margin: 0;
3853
  visibility: visible !important;
3854
+ box-shadow: 2px -10px 0 2px var(--primary-color);
3855
  }
3856
 
3857
  #frm_form_editor_container > ul > .frm_single_option.ui-sortable-placeholder,
3864
  position: relative;
3865
  }
3866
 
 
3867
  #frm_form_editor_container > ul > li > ul > li.sortable-placeholder,
3868
  #frm_form_editor_container ul.start_divider > li > ul > li.sortable-placeholder {
3869
  position: absolute;
3872
  }
3873
 
3874
  .edit_field_type_divider + li.sortable-placeholder {
3875
+ box-shadow: 2px 5px 0 2px var(--primary-color);
3876
  }
3877
 
3878
  .start_divider li.sortable-placeholder {
3879
+ box-shadow: 2px -5px 0 2px var(--primary-color);
3880
  }
3881
 
3882
+ .frm-is-collapsed + .sortable-placeholder {
3883
+ box-shadow: 2px 15px 0 2px var(--primary-color);
3884
  }
3885
 
3886
+ .frm_single_option.ui-sortable-placeholder {
3887
+ box-shadow: 0 0 1px 1px var(--primary-color);
3888
  }
3889
 
3890
  .frm_sorting > li.edit_field_type_end_divider:first-child,
 
 
3891
  .frm-show-click,
3892
  li.ui-state-default.edit_field_type_divider .frm-show-click {
3893
  display: none;
3894
  }
3895
 
 
 
 
 
 
 
 
3896
  .frm_form_field.ui-sortable-helper .frm-field-action-icons,
3897
  .frm_form_field.ui-sortable-helper .frm_form_fields,
3898
  .frm_form_field.ui-sortable-helper .frm_description,
5478
  }
5479
 
5480
  .frm-move {
5481
+ cursor: grab;
5482
  }
5483
 
5484
  span.howto {
5922
  overflow: visible;
5923
  position: relative;
5924
  padding: 0 0 0 20px;
5925
+ margin: 25px 0 0 -5px;
5926
  border-left: 1px solid var(--primary-hover);
5927
  transition: border 0.7s ease-out;
5928
  }
6153
  border: 1px dashed var(--grey-border);
6154
  }
6155
 
6156
+ .ui-droppable-active ~ .frm_no_fields {
6157
  border-style: solid;
6158
  }
6159
 
7183
  color: var(--dark-grey);
7184
  }
7185
 
 
 
 
 
7186
  /* Icon while dragging */
7187
+ .frmbutton.ui-draggable-dragging {
7188
+ pointer-events: none;
 
7189
  }
7190
 
 
 
7191
  .frmbutton.ui-draggable-dragging a {
7192
  text-decoration: none;
7193
+ height: 40px;
7194
  width: 180px;
7195
+ display: inline-flex !important;
7196
+ flex-direction: row;
7197
+ justify-content: center;
7198
+ align-items: center;
7199
+ background-color: var(--sidebar-color) !important;
7200
  border-radius: 35px !important;
7201
+ padding: 5px 10px !important;
 
 
 
 
 
 
 
7202
  color: var(--dark-grey) !important;
7203
+ box-sizing: border-box;
7204
+ border: 1px solid var(--grey-border);
7205
+ box-shadow: 0 0 8px rgba(0,0,0,.3);
7206
  }
7207
 
7208
  .frmbutton.ui-draggable-dragging span {
7210
  }
7211
 
7212
  #frm-show-fields .frmbutton.ui-sortable-helper i,
 
7213
  .frmbutton.ui-draggable-dragging i,
7214
  .frmbutton.ui-draggable-dragging .frmsvg {
7215
  color: #fff !important;
7216
  }
7217
 
7218
+ .frmbutton.ui-draggable-dragging i,
7219
+ .frmbutton.ui-draggable-dragging .frmsvg {
7220
  color: var(--dark-grey) !important;
7221
  }
7222
 
 
 
 
 
7223
  .frm_sorting li.ui-state-default.ui-sortable-helper,
7224
  .frmbutton.ui-sortable-helper {
7225
  transition: opacity .2s;
7226
  opacity: 1;
7227
  }
7228
 
7229
+ .frm-field-group-count {
7230
+ background-color: var(--sidebar-hover);
7231
+ padding: 5px;
7232
+ color: #fff !important;
7233
+ border-radius: 10px;
7234
  }
7235
 
7236
  /* End dragging */
8245
  width: 100%;
8246
  }
8247
 
8248
+ .with_frm_style .frm_radio input[type=radio] {
8249
+ width: 18px !important;
8250
+ }
8251
  .with_frm_style .frm_checkbox input[type=checkbox] {
8252
  width: 25px !important;
8253
  }
8683
  pointer-events: none;
8684
  }
8685
 
8686
+ .frm-sortable-helper {
8687
+ /* Make sure the item being dragged appears above other form builder fields */
8688
+ z-index: 99;
8689
+ }
8690
+
8691
  #frm_banner {
8692
  width: 100%;
8693
  color: #fff;
8760
  .frm-ready-made-solution img {
8761
  max-width: 100%;
8762
  }
8763
+
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.5.1
6
  Plugin URI: https://formidableforms.com/
7
  Author URI: https://formidableforms.com/
8
  Author: Strategy11 Form Builder Team
2
  /*
3
  Plugin Name: Formidable Forms
4
  Description: Quickly and easily create drag-and-drop forms
5
+ Version: 5.5.2
6
  Plugin URI: https://formidableforms.com/
7
  Author URI: https://formidableforms.com/
8
  Author: Strategy11 Form Builder Team
js/admin/dom.js CHANGED
@@ -389,7 +389,7 @@
389
  };
390
 
391
  const wysiwyg = {
392
- init( editor, { setupCallback, height } = {}) {
393
  if ( isTinyMceActive() ) {
394
  setTimeout( resetTinyMce, 0 );
395
  } else {
@@ -428,9 +428,24 @@
428
  }
429
  );
430
 
431
- if ( setupCallback ) {
432
- settings.setup = setupCallback;
433
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
434
  if ( height ) {
435
  settings.height = height;
436
  }
389
  };
390
 
391
  const wysiwyg = {
392
+ init( editor, { setupCallback, height, addFocusEvents } = {}) {
393
  if ( isTinyMceActive() ) {
394
  setTimeout( resetTinyMce, 0 );
395
  } else {
428
  }
429
  );
430
 
431
+ settings.setup = editor => {
432
+ if ( addFocusEvents ) {
433
+ function focusInCallback() {
434
+ jQuery( editor.targetElm ).trigger( 'focusin' );
435
+ editor.off( 'focusin', '**' );
436
+ }
437
+
438
+ editor.on( 'focusin', focusInCallback );
439
+
440
+ editor.on( 'focusout', function() {
441
+ editor.on( 'focusin', focusInCallback );
442
+ });
443
+ }
444
+ if ( setupCallback ) {
445
+ setupCallback( editor );
446
+ }
447
+ };
448
+
449
  if ( height ) {
450
  settings.height = height;
451
  }
js/admin/embed.js CHANGED
@@ -377,13 +377,13 @@
377
  let examples = [
378
  {
379
  label: __( 'WordPress shortcode', 'formidable' ),
380
- example: '[formidable id=' + formId + ' title=true description=true]',
381
  link: 'https://formidableforms.com/knowledgebase/publish-a-form/#kb-insert-the-shortcode-manually',
382
  linkLabel: __( 'How to use shortcodes in WordPress', 'formidable' )
383
  },
384
  {
385
  label: __( 'Use PHP code', 'formidable' ),
386
- example: '<?php echo FrmFormsController::get_form_shortcode( array( \'id\' => ' + formId + ', \'title\' => true, \'description\' => true ) ); ?>'
387
  }
388
  ];
389
 
377
  let examples = [
378
  {
379
  label: __( 'WordPress shortcode', 'formidable' ),
380
+ example: '[formidable id=' + formId + ']',
381
  link: 'https://formidableforms.com/knowledgebase/publish-a-form/#kb-insert-the-shortcode-manually',
382
  linkLabel: __( 'How to use shortcodes in WordPress', 'formidable' )
383
  },
384
  {
385
  label: __( 'Use PHP code', 'formidable' ),
386
+ example: '<?php echo FrmFormsController::get_form_shortcode( array( \'id\' => ' + formId + ' ) ); ?>'
387
  }
388
  ];
389
 
js/formidable_admin.js CHANGED
@@ -324,17 +324,18 @@ function frmAdminBuildJS() {
324
  drag: svg({ href: '#frm_drag_icon', classList: [ 'frm_drag_icon', 'frm-drag' ] })
325
  };
326
 
327
- var $newFields = jQuery( document.getElementById( 'frm-show-fields' ) ),
328
  builderForm = document.getElementById( 'new_fields' ),
329
  thisForm = document.getElementById( 'form_id' ),
330
- cancelSort = false,
331
  copyHelper = false,
332
  fieldsUpdated = 0,
333
  thisFormId = 0,
334
  autoId = 0,
335
  optionMap = {},
336
- lastNewActionIdReturned = 0,
337
- __ = wp.i18n.__;
 
 
338
 
339
  if ( thisForm !== null ) {
340
  thisFormId = thisForm.value;
@@ -814,280 +815,418 @@ function frmAdminBuildJS() {
814
  }
815
  }
816
 
817
- /* Form Builder */
818
- function setupSortable( sort ) {
819
- var startSort, container, $previousFieldContainer, opts;
 
 
820
 
821
- startSort = false;
822
- container = jQuery( '#post-body-content' );
 
 
 
 
 
 
823
 
824
- opts = {
825
- connectWith: 'ul.frm_sorting',
826
- items: 'li.frm_field_box',
827
- placeholder: 'sortable-placeholder',
828
- axis: 'y',
829
- cancel: '.widget,.frm_field_opts_list,input,textarea,select,.edit_field_type_end_divider,.frm_sortable_field_opts,.frm_noallow',
830
- accepts: 'field_type_list',
831
- forcePlaceholderSize: false,
832
- tolerance: 'pointer',
833
- handle: '.frm-move',
834
- over: function() {
835
- this.classList.add( 'drop-me' );
836
- },
837
- out: function() {
838
- this.classList.remove( 'drop-me' );
839
- },
840
- receive: function( event, ui ) {
841
- // Receive event occurs when an item in one sortable list is dragged into another sortable list
842
 
843
- if ( cancelSort ) {
844
- ui.item.addClass( 'frm_cancel_sort' );
845
- return;
846
- }
847
 
848
- if ( typeof ui.item.attr( 'id' ) !== 'undefined' ) {
849
- if ( ui.item.attr( 'id' ).indexOf( 'frm_field_id' ) > -1 ) {
850
- // An existing field was dragged and dropped into, out of, or between sections
851
- updateFieldAfterMovingBetweenSections( ui.item );
852
- } else {
853
- // A new field was dragged into the form
854
- insertNewFieldByDragging( this, ui.item, opts );
855
- }
856
- } else if ( ui.item.hasClass( 'frm_field_box' ) ) {
857
- // dragging a group.
858
- getFieldsInRow( ui.item.children( 'ul' ) ).each(
859
- function() {
860
- updateFieldAfterMovingBetweenSections( jQuery( this ) );
861
- }
862
- );
863
- }
864
- },
865
- change: function( event, ui ) {
866
- // don't allow some field types inside section
867
- if ( allowDrop( ui ) ) {
868
- ui.placeholder.addClass( 'sortable-placeholder' ).removeClass( 'no-drop-placeholder' );
869
- cancelSort = false;
870
- } else {
871
- ui.placeholder.addClass( 'no-drop-placeholder' ).removeClass( 'sortable-placeholder' );
872
- cancelSort = true;
873
- }
874
- },
875
- start: function( event, ui ) {
876
- unselectFieldGroups();
877
- deleteEmptyDividerWrappers();
878
- maybeRemoveGroupHoverTarget();
879
- closeOpenFieldDropdowns();
880
- container.get( 0 ).classList.add( 'frm-dragging-field' );
881
- if ( ui.item[0].offsetHeight > 120 ) {
882
- jQuery( sort ).sortable( 'refreshPositions' );
883
- }
884
- if ( ui.item[0].classList.contains( 'frm-page-collapsed' ) ) {
885
- // If a page if collapsed, expand it before dragging since only the page break will move.
886
- toggleCollapsePage( jQuery( ui.item[0]) );
887
- }
888
- $previousFieldContainer = ui.item.closest( 'ul.frm_sorting' );
889
- },
890
- helper: function( e, li ) {
891
- copyHelper = li.clone().insertAfter( li );
892
- return li.clone().addClass( 'frm-sortable-helper' );
893
- },
894
- beforeStop: function( event, ui ) {
895
- // If this was dropped at the beginning of a collpased page, open it.
896
- var previous = ui.item[0].previousElementSibling;
897
- if ( previous !== null && previous.classList.contains( 'frm-page-collapsed' ) ) {
898
- toggleCollapsePage( jQuery( previous ) );
899
- }
900
- },
901
- stop: function( event, ui ) {
902
- var moving, $previousContainerFields, $closestFieldBox;
903
 
904
- container.get( 0 ).classList.remove( 'frm-dragging-field' );
905
- moving = jQuery( this );
906
- copyHelper && copyHelper.remove();
 
907
 
908
- if ( cancelSort ) {
909
- moving.sortable( 'cancel' );
910
- syncAfterDragAndDrop();
911
- return;
912
- }
 
 
 
 
 
 
 
 
913
 
914
- $previousContainerFields = $previousFieldContainer.length ? getFieldsInRow( $previousFieldContainer ) : [];
915
- if ( $previousFieldContainer.length ) {
916
- if ( ! $previousContainerFields.length ) {
917
- $closestFieldBox = $previousFieldContainer.closest( 'li.frm_field_box' );
918
- if ( ! $closestFieldBox.hasClass( 'edit_field_type_divider' ) ) {
919
- // remove an empty field group, but don't remove an empty section.
920
- $closestFieldBox.remove();
921
- }
922
- } else {
923
- syncLayoutClasses( $previousContainerFields.first() );
924
- }
925
- }
926
 
927
- if ( ( 'frm-show-fields' === ui.item.parent().attr( 'id' ) || ui.item.parent().hasClass( 'start_divider' ) ) && ui.item.hasClass( 'form-field' ) ) {
928
- // dragging an item into a new row.
929
- wrapFieldLiInPlace( ui.item );
930
- if ( $previousContainerFields.length ) {
931
- // only if the previous container had other sibling fields, remove the previous layout class.
932
- syncLayoutClasses( ui.item );
933
- }
934
- } else {
935
- syncLayoutClasses( ui.item );
936
- }
 
 
 
 
 
 
 
 
937
 
938
- syncAfterDragAndDrop();
939
- },
940
- sort: function( event, ui ) {
941
- var $row, $children, $lastChild, currentIndex, left;
942
 
943
- container.scrollTop( function( i, v ) {
944
- var moved, h, relativePos, y;
 
 
 
 
 
 
945
 
946
- if ( startSort === false ) {
947
- startSort = event.clientY;
948
- return v;
949
- }
 
 
 
 
950
 
951
- moved = event.clientY - startSort;
952
- h = this.offsetHeight;
953
- relativePos = event.clientY - this.offsetTop;
954
- y = relativePos - h / 2;
955
- if ( relativePos > ( h - 50 ) && moved > 5 ) {
956
- // scrolling down
957
- return v + y * 0.1;
958
- } else if ( relativePos < 50 && moved < -5 ) {
959
- //scrolling up
960
- return v - Math.abs( y * 0.1 );
961
- }
962
- });
963
 
964
- maybeFixPlaceholderParent( ui, event );
965
 
966
- $row = ui.placeholder.parent();
967
- $children = getFieldsInRow( $row );
968
- currentIndex = determineIndexBasedOffOfMousePositionInRow( $row, event.clientX );
 
969
 
970
- if ( ! $children.length ) {
971
- return;
972
- }
973
 
974
- if ( currentIndex === $children.length ) {
975
- $lastChild = jQuery( $children.get( currentIndex - 1 ) );
976
- left = $lastChild.offset().left - ui.placeholder.parent().offset().left + $lastChild.outerWidth();
977
- $row.append( ui.placeholder );
978
- } else {
979
- left = jQuery( $children.get( currentIndex ) ).offset().left - $row.offset().left;
980
- jQuery( $children.get( currentIndex ) ).before( ui.placeholder );
981
- }
982
 
983
- ui.placeholder.get( 0 ).style.left = left + 'px';
984
- }
985
- };
986
 
987
- jQuery( sort ).sortable( opts );
988
 
989
- setupFieldOptionSorting( jQuery( '#frm_builder_page' ) );
 
 
 
 
990
  }
991
 
992
- function syncAfterDragAndDrop() {
993
- maybeRemoveNewCancelledFields();
994
- maybeUncancelFields();
995
- maybeFixEndDividers();
996
- fixUnwrappedListItems();
997
- toggleSectionHolder();
998
- updateFieldOrder();
999
 
1000
- const event = new Event( 'frm_sync_after_drag_and_drop', { bubbles: false });
1001
- document.dispatchEvent( event );
 
 
1002
  }
1003
 
1004
- function maybeRemoveNewCancelledFields() {
1005
- Array.from( document.getElementById( 'frm-show-fields' ).children ).forEach(
1006
- function( fieldBox ) {
1007
- if ( fieldBox.classList.contains( 'frmbutton' ) && fieldBox.classList.contains( 'ui-draggable' ) ) {
1008
- fieldBox.remove();
1009
- }
 
 
 
1010
  }
1011
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1012
  }
1013
 
1014
- function maybeUncancelFields() {
1015
- document.querySelectorAll( '.frm_cancel_sort' ).forEach(
1016
- function( field ) {
1017
- field.classList.remove( 'frm_cancel_sort' );
1018
- }
1019
- );
 
 
 
1020
  }
1021
 
1022
- /**
1023
- * Make sure the end dividers are always a child of a start divider, at the bottom at the list.
1024
- */
1025
- function maybeFixEndDividers() {
1026
- var endDividers = document.querySelectorAll( '.edit_field_type_end_divider' );
1027
- if ( ! endDividers.length ) {
 
1028
  return;
1029
  }
1030
- endDividers.forEach(
1031
- function( endDivider ) {
1032
- if ( endDivider.parentNode.classList.contains( 'start_divider' ) ) {
1033
- // avoid having to call closest, but still append it as it might not be the last child.
1034
- endDivider.parentNode.appendChild( endDivider );
1035
- return;
1036
- }
1037
- endDivider.closest( '.start_divider' ).appendChild( endDivider );
1038
- }
1039
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1040
  }
1041
 
1042
  /**
1043
- * Sortable struggles to put the field into the proper section if there are multiple in a field group. This helps fix some of those issues.
 
 
 
1044
  */
1045
- function maybeFixPlaceholderParent( ui, event ) {
1046
- var elementFromPoint, wrapper, shouldAppend;
1047
- elementFromPoint = document.elementFromPoint( event.clientX, event.clientY );
1048
- if ( null === elementFromPoint ) {
1049
  return;
1050
  }
1051
- wrapper = elementFromPoint.closest( '.frm_sorting' );
1052
- if ( null === wrapper ) {
 
1053
  return;
1054
  }
1055
- if ( ui.placeholder.closest( '.start_divider' ).parent().parent().find( '.start_divider' ).length < 2 ) {
1056
- // placeholder is not in a problematic position that needs to be fixed so leave it.
 
 
 
 
 
 
 
1057
  return;
1058
  }
1059
- shouldAppend = false;
1060
- if ( wrapper.classList.contains( 'start_divider' ) ) {
1061
- shouldAppend = jQuery( wrapper ).parent().parent().find( '.start_divider' ).length >= 2;
1062
- } else if ( null !== wrapper.closest( '.start_divider' ) ) {
1063
- shouldAppend = jQuery( wrapper ).closest( '.start_divider' ).parent().parent().find( '.start_divider' ).length >= 2;
 
 
 
 
 
 
1064
  }
1065
- if ( null !== wrapper.closest( '.frm-sortable-helper' ) ) {
1066
- // avoid ever appending to the sortable helper.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1067
  return;
1068
  }
1069
- if ( shouldAppend ) {
1070
- // TODO instead of appendTo, we might need to look for the closest item, and appear above/below it.
1071
- ui.placeholder.appendTo( wrapper );
 
 
 
 
 
 
 
 
 
 
 
1072
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1073
  }
1074
 
1075
  function fixUnwrappedListItems() {
1076
- document.querySelectorAll( 'ul.start_divider > li.form-field:not(.edit_field_type_end_divider)' ).forEach(
1077
- function( field ) {
1078
- wrapFieldLiInPlace( field );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1079
  }
1080
  );
1081
  }
1082
 
1083
  function deleteEmptyDividerWrappers() {
1084
- var dividers = document.querySelectorAll( 'ul.start_divider' );
1085
  if ( ! dividers.length ) {
1086
  return;
1087
  }
1088
  dividers.forEach(
1089
  function( divider ) {
1090
- var children = [].slice.call( divider.children );
1091
  children.forEach(
1092
  function( child ) {
1093
  if ( 0 === child.children.length ) {
@@ -1101,23 +1240,29 @@ function frmAdminBuildJS() {
1101
  );
1102
  }
1103
 
1104
- /**
1105
- * @returns {bool} true if the placeholder parent should be fixed.
1106
- */
1107
- function shouldTryFixingPlaceholderParent( $placeholder ) {
1108
- var closestSection = $placeholder.closest( '.start_divider' );
1109
- if ( null === closestSection ) {
1110
- return false;
1111
  }
1112
- return jQuery( closestSection ).siblings( 'li.start_divider' ).length >= 1;
1113
- }
1114
 
1115
- function getFieldsInRow( $row ) {
1116
- return $row.children( 'li.form-field' ).not( '.ui-sortable-helper' ).not( '.edit_field_type_end_divider' ).filter(
1117
- function() {
1118
- return 'none' !== this.style.display;
 
 
 
 
 
 
 
 
1119
  }
1120
  );
 
1121
  }
1122
 
1123
  function determineIndexBasedOffOfMousePositionInRow( $row, x ) {
@@ -1339,7 +1484,6 @@ function frmAdminBuildJS() {
1339
  resetDisplayedOpts( fieldId );
1340
  }
1341
  };
1342
-
1343
  jQuery( sort ).sortable( opts );
1344
  }
1345
 
@@ -1388,23 +1532,24 @@ function frmAdminBuildJS() {
1388
  * @param {object} currentItem
1389
  */
1390
  function updateFieldAfterMovingBetweenSections( currentItem ) {
1391
- var fieldId, section, formId, sectionId;
1392
-
1393
- fieldId = currentItem.attr( 'id' ).replace( 'frm_field_id_', '' );
1394
- section = getSectionForFieldPlacement( currentItem );
1395
- formId = getFormIdForFieldPlacement( section );
1396
- sectionId = getSectionIdForFieldPlacement( section );
1397
-
1398
- if ( currentItem.parent().hasClass( 'start_divider' ) ) {
1399
- wrapFieldLiInPlace( currentItem );
1400
  }
1401
 
1402
- currentItem[0].addEventListener( 'click', function() {
1403
- maybeAddSaveAndDragIcons( this.dataset.fid );
1404
- });
 
1405
 
1406
  jQuery.ajax({
1407
- type: 'POST', url: ajaxurl,
 
1408
  data: {
1409
  action: 'frm_update_field_after_move',
1410
  form_id: formId,
@@ -1427,25 +1572,26 @@ function frmAdminBuildJS() {
1427
  /**
1428
  * Add a new field by dragging and dropping it from the Fields sidebar
1429
  *
1430
- * @param {object} selectedItem
1431
- * @param {object} fieldButton
1432
- * @param {object} opts
1433
  */
1434
- function insertNewFieldByDragging( selectedItem, fieldButton ) {
1435
- const fieldType = fieldButton.attr( 'id' );
1436
-
1437
- const sortableData = jQuery( selectedItem ).data().uiSortable;
1438
- const currentItem = sortableData.currentItem;
1439
- const insertAtIndex = determineIndexBasedOffOfMousePositionInRow( currentItem.parent(), currentItem.offset().left );
1440
- jQuery( getFieldsInRow( currentItem.parent() ).get( insertAtIndex ) ).before( currentItem );
1441
- const section = getSectionForFieldPlacement( currentItem );
1442
- const formId = getFormIdForFieldPlacement( section );
1443
- const sectionId = getSectionIdForFieldPlacement( section );
1444
-
1445
  const loadingID = fieldType.replace( '|', '-' ) + '_' + getAutoId();
1446
- const $placeholder = jQuery( '<li class="frm-wait frmbutton_loadingnow" id="' + loadingID + '" ></li>' );
1447
- currentItem.replaceWith( $placeholder );
1448
-
 
 
 
 
 
 
 
 
 
 
 
 
1449
  syncLayoutClasses( $placeholder );
1450
 
1451
  let hasBreak = 0;
@@ -1472,7 +1618,11 @@ function frmAdminBuildJS() {
1472
  // if dragging into a new row, we need to wrap the li first.
1473
  replaceWith = wrapFieldLi( msg );
1474
  } else {
1475
- replaceWith = msg;
 
 
 
 
1476
  }
1477
  $placeholder.replaceWith( replaceWith );
1478
  updateFieldOrder();
@@ -1481,11 +1631,29 @@ function frmAdminBuildJS() {
1481
  syncLayoutClasses( $siblings.first() );
1482
  }
1483
  toggleSectionHolder();
 
 
 
 
 
 
 
 
1484
  },
1485
  error: handleInsertFieldError
1486
  });
1487
  }
1488
 
 
 
 
 
 
 
 
 
 
 
1489
  function handleInsertFieldError( jqXHR, _, errorThrown ) {
1490
  maybeShowInsertFieldError( errorThrown, jqXHR );
1491
  }
@@ -1511,94 +1679,140 @@ function frmAdminBuildJS() {
1511
  return ++autoId;
1512
  }
1513
 
1514
- // don't allow page break, embed form, or section inside section field
1515
- // don't allow page breaks inside of field groups.
1516
- // don't allow field groups with sections inside of sections.
1517
- // don't allow field groups in field groups.
1518
- // don't allow hidden fields inside of field groups but allow them in sections.
1519
- function allowDrop( ui ) {
1520
- var fieldsInRow, insideFieldGroup, insideSection, isNewField, isPageBreak, isFieldGroup, isSection;
1521
-
1522
- fieldsInRow = getFieldsInRow( ui.placeholder.parent() );
1523
-
1524
- if ( ! groupCanFitAnotherField( fieldsInRow, ui.item ) ) {
1525
  return false;
1526
  }
1527
 
1528
- insideFieldGroup = fieldsInRow.length > 0;
1529
- insideSection = ui.placeholder.closest( '.start_divider' ).length > 0;
 
 
1530
 
1531
- if ( ! insideSection && ! insideFieldGroup ) {
 
1532
  return true;
1533
  }
1534
 
1535
- if ( insideFieldGroup && ui.placeholder.siblings( '.edit_field_type_break, .edit_field_type_hidden' ).length ) {
1536
- // never allow any field beside a page break or a hidden field.
1537
- return false;
 
 
 
1538
  }
1539
 
1540
- if ( insideSection && ui.placeholder.siblings().length > 1 && ui.placeholder.prev().hasClass( 'edit_field_type_end_divider' ) ) {
1541
- return false;
 
1542
  }
1543
 
1544
- isNewField = ui.item.hasClass( 'frmbutton' );
1545
-
1546
- if ( isNewField ) {
1547
- isPageBreak = ui.item.hasClass( 'frm_tbreak' );
1548
 
1549
- if ( isPageBreak ) {
1550
- // do not allow page break in both sections and field groups.
1551
- return false;
1552
- }
 
 
 
 
 
1553
 
1554
- if ( insideFieldGroup && ( ui.item.hasClass( 'frm_thidden' ) || ui.item.hasClass( 'frm_tsummary' ) ) ) {
1555
- // do not allow a hidden field or summary field in a field group.
1556
- return false;
1557
- }
1558
 
1559
- if ( ! insideSection ) {
1560
- return true;
1561
- }
 
 
1562
 
1563
- return ! ui.item.hasClass( 'frm_tform' ) && ! ui.item.hasClass( 'frm_tdivider' ) && ! ui.item.hasClass( 'frm_tdivider-repeat' );
 
 
1564
  }
1565
 
1566
- isPageBreak = ui.item.hasClass( 'edit_field_type_break' );
 
 
 
 
 
 
1567
 
 
1568
  if ( isPageBreak ) {
1569
- // do not allow page break in both sections and field groups.
1570
  return false;
1571
  }
1572
 
1573
- isFieldGroup = ui.item.find( 'ul.frm_sorting' ).length > 0;
1574
- isSection = ui.item.hasClass( 'edit_field_type_divider' );
 
1575
 
1576
- if ( insideSection && isSection ) {
1577
- // but do not allow a section inside of a section.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1578
  return false;
1579
  }
1580
 
1581
- if ( isFieldGroup && insideFieldGroup ) {
1582
- // allow a field group inside of a field group if it is being placed within a section above/below another field group.
1583
- return insideSection && ui.placeholder.siblings( 'li.edit_field_type_end_divider' ).length > 0;
 
1584
  }
1585
 
1586
- if ( insideFieldGroup && ui.item.hasClass( 'edit_field_type_hidden' ) ) {
1587
- // do not allow a hidden field inside of a field group.
 
 
 
 
 
1588
  return false;
1589
  }
1590
 
1591
- if ( ! insideSection ) {
1592
- return true;
 
 
1593
  }
1594
 
1595
- if ( ui.item.find( '.edit_field_type_divider' ).length ) {
1596
- // if we are dragging a field group with a section, do not allow it in section.
 
 
 
1597
  return false;
1598
  }
1599
 
1600
- // moving an existing field
1601
- return ! ui.item.hasClass( 'edit_field_type_form' ) && ! isSection;
1602
  }
1603
 
1604
  function groupCanFitAnotherField( fieldsInRow, $field ) {
@@ -1615,20 +1829,18 @@ function frmAdminBuildJS() {
1615
  }
1616
 
1617
  function loadFields( fieldId ) {
1618
- var addHtmlToField, nextElement,
1619
- thisField = document.getElementById( fieldId ),
1620
- $thisField = jQuery( thisField ),
1621
- field = [];
1622
-
1623
- addHtmlToField = function( element ) {
1624
- var frmHiddenFdata = element.querySelector( '.frm_hidden_fdata' );
1625
  element.classList.add( 'frm_load_now' );
1626
  if ( frmHiddenFdata !== null ) {
1627
  field.push( frmHiddenFdata.innerHTML );
1628
  }
1629
  };
1630
 
1631
- nextElement = thisField;
1632
  addHtmlToField( nextElement );
1633
  while ( nextElement.nextElementSibling && field.length < 15 ) {
1634
  addHtmlToField( nextElement.nextElementSibling );
@@ -1636,49 +1848,52 @@ function frmAdminBuildJS() {
1636
  }
1637
 
1638
  jQuery.ajax({
1639
- type: 'POST', url: ajaxurl,
 
1640
  data: {
1641
  action: 'frm_load_field',
1642
  field: field,
1643
  form_id: thisFormId,
1644
  nonce: frmGlobal.nonce
1645
  },
1646
- success: function( html ) {
1647
- var key, $nextSet;
 
1648
 
1649
- html = html.replace( /^\s+|\s+$/g, '' );
1650
- if ( html.indexOf( '{' ) !== 0 ) {
1651
- jQuery( '.frm_load_now' ).removeClass( '.frm_load_now' ).html( 'Error' );
1652
- return;
1653
- }
1654
 
1655
- html = JSON.parse( html );
 
 
 
 
1656
 
1657
- for ( key in html ) {
1658
- jQuery( '#frm_field_id_' + key ).replaceWith( html[key]);
1659
- setupSortable( '#frm_field_id_' + key + '.edit_field_type_divider ul.frm_sorting' );
1660
- }
 
 
1661
 
1662
- $nextSet = $thisField.nextAll( '.frm_field_loading:not(.frm_load_now)' );
1663
- if ( $nextSet.length ) {
1664
- loadFields( $nextSet.attr( 'id' ) );
1665
- } else {
1666
- // go up a level
1667
- $nextSet = jQuery( document.getElementById( 'frm-show-fields' ) ).find( '.frm_field_loading:not(.frm_load_now)' );
1668
- if ( $nextSet.length ) {
1669
- loadFields( $nextSet.attr( 'id' ) );
1670
- }
1671
- }
1672
 
1673
- initiateMultiselect();
1674
- renumberPageBreaks();
1675
- maybeHideQuantityProductFieldOption();
1676
 
1677
- const loadedEvent = new Event( 'frm_ajax_loaded_field', { bubbles: false });
1678
- loadedEvent.frmFields = field.map( f => JSON.parse( f ) );
1679
- document.dispatchEvent( loadedEvent );
1680
- }
1681
- });
1682
  }
1683
 
1684
  function addFieldClick() {
@@ -1711,8 +1926,16 @@ function frmAdminBuildJS() {
1711
  },
1712
  success: function( msg ) {
1713
  document.getElementById( 'frm_form_editor_container' ).classList.add( 'frm-has-fields' );
1714
- $newFields.append( wrapFieldLi( msg ) );
 
1715
  afterAddField( msg, true );
 
 
 
 
 
 
 
1716
  },
1717
  error: handleInsertFieldError
1718
  });
@@ -1768,10 +1991,14 @@ function frmAdminBuildJS() {
1768
  success: function( msg ) {
1769
  var newRow;
1770
 
 
 
1771
  if ( null !== newRowId ) {
1772
  newRow = document.getElementById( newRowId );
1773
  if ( null !== newRow ) {
1774
- jQuery( newRow ).append( msg );
 
 
1775
  if ( null !== fieldOrder ) {
1776
  newRow.lastElementChild.setAttribute( 'frm-field-order', fieldOrder );
1777
  }
@@ -1788,10 +2015,15 @@ function frmAdminBuildJS() {
1788
  }
1789
 
1790
  if ( $field.siblings( 'li.form-field' ).length ) {
1791
- $field.after( msg );
 
1792
  syncLayoutClasses( $field );
 
1793
  } else {
1794
- $field.parent().parent().after( wrapFieldLi( msg ) );
 
 
 
1795
  }
1796
 
1797
  updateFieldOrder();
@@ -2041,16 +2273,51 @@ function frmAdminBuildJS() {
2041
  return option;
2042
  }
2043
 
2044
- function wrapFieldLi( li ) {
2045
- return jQuery( '<li>' )
2046
- .addClass( 'frm_field_box' )
2047
- .html(
2048
- jQuery( '<ul>' ).addClass( 'frm_grid_container frm_sorting' ).append( li )
2049
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2050
  }
2051
 
2052
  function wrapFieldLiInPlace( li ) {
2053
- jQuery( li ).wrap( '<li class="frm_field_box"><ul class="frm_grid_container frm_sorting"></ul></li>' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2054
  }
2055
 
2056
  function afterAddField( msg, addFocus ) {
@@ -3764,12 +4031,14 @@ function frmAdminBuildJS() {
3764
  }
3765
 
3766
  function breakRow( row ) {
3767
- getFieldsInRow( jQuery( row ) ).each(
 
3768
  function( index ) {
 
3769
  if ( 0 !== index ) {
3770
- jQuery( row ).closest( 'li' ).after( wrapFieldLi( this ) );
3771
  }
3772
- stripLayoutFromFields( jQuery( this ) );
3773
  }
3774
  );
3775
  }
@@ -4095,7 +4364,6 @@ function frmAdminBuildJS() {
4095
  function getSelectedFieldIds() {
4096
  var deleteFieldIds = [];
4097
  jQuery( '.frm-selected-field-group > li.form-field' )
4098
- .not( '.ui-sortable-helper' )
4099
  .each(
4100
  function() {
4101
  deleteFieldIds.push( this.dataset.fid );
@@ -4114,7 +4382,7 @@ function frmAdminBuildJS() {
4114
  function deleteAllSelectedFieldGroups( deleteFieldIds ) {
4115
  deleteFieldIds.forEach(
4116
  function( fieldId ) {
4117
- deleteField( fieldId );
4118
  }
4119
  );
4120
  }
@@ -5229,35 +5497,6 @@ function frmAdminBuildJS() {
5229
  }
5230
  }
5231
 
5232
- function setScaleValues() {
5233
- /*jshint validthis:true */
5234
- var isMin = this.id.indexOf( 'minnum' ) !== -1;
5235
- var fieldID = this.id.replace( 'scale_maxnum_', '' ).replace( 'scale_minnum_', '' );
5236
- var min = this.value;
5237
- var max = this.value;
5238
- if ( isMin ) {
5239
- max = document.getElementById( 'scale_maxnum_' + fieldID ).value;
5240
- } else {
5241
- min = document.getElementById( 'scale_minnum_' + fieldID ).value;
5242
- }
5243
-
5244
- updateScaleValues( parseInt( min, 10 ), parseInt( max, 10 ), fieldID );
5245
- }
5246
-
5247
- function updateScaleValues( min, max, fieldID ) {
5248
- var container = jQuery( '#field_' + fieldID + '_inner_container .frm_form_fields' );
5249
- container.html( '' );
5250
-
5251
- if ( min >= max ) {
5252
- max = min + 1;
5253
- }
5254
-
5255
- for ( var i = min; i <= max; i++ ) {
5256
- container.append( '<div class="frm_scale"><label><input type="hidden" name="field_options[options_' + fieldID + '][' + i + ']" value="' + i + '"> <input type="radio" name="item_meta[' + fieldID + ']" value="' + i + '"> ' + i + ' </label></div>' );
5257
- }
5258
- container.append( '<div class="clear"></div>' );
5259
- }
5260
-
5261
  function getFieldValues() {
5262
  /*jshint validthis:true */
5263
  var isTaxonomy,
@@ -7011,8 +7250,6 @@ function frmAdminBuildJS() {
7011
 
7012
  if ( rich ) {
7013
  wpActiveEditor = elementId;
7014
- send_to_editor( variable );
7015
- return;
7016
  }
7017
 
7018
  if ( ! contentBox.length ) {
@@ -7032,13 +7269,24 @@ function frmAdminBuildJS() {
7032
  plain_text: p,
7033
  nonce: frmGlobal.nonce
7034
  },
 
7035
  success: function( msg ) {
7036
- insertContent( contentBox, msg );
 
 
 
 
 
 
7037
  }
7038
  });
7039
  } else {
7040
  variable = maybeAddSanitizeUrlToShortcodeVariable( variable, element, contentBox );
7041
- insertContent( contentBox, variable );
 
 
 
 
7042
  }
7043
  return false;
7044
  }
@@ -7535,25 +7783,11 @@ function frmAdminBuildJS() {
7535
  const wysiwyg = settings.querySelector( '.wp-editor-area' );
7536
  if ( wysiwyg ) {
7537
  frmDom.wysiwyg.init(
7538
- wysiwyg,
7539
- { setupCallback: addFocusEvents, height: 160 }
7540
  );
7541
  }
7542
  }
7543
 
7544
- function addFocusEvents( editor ) {
7545
- function focusInCallback() {
7546
- jQuery( editor.targetElm ).trigger( 'focusin' );
7547
- editor.off( 'focusin', '**' );
7548
- }
7549
-
7550
- editor.on( 'focusin', focusInCallback );
7551
-
7552
- editor.on( 'focusout', function() {
7553
- editor.on( 'focusin', focusInCallback );
7554
- });
7555
- }
7556
-
7557
  /* Styling */
7558
  function setPosClass() {
7559
  /*jshint validthis:true */
@@ -8688,18 +8922,27 @@ function frmAdminBuildJS() {
8688
  jQuery( '.spinner' ).css( 'visibility', 'hidden' );
8689
 
8690
  // Show response.message
8691
- if ( response.message && typeof form.elements.show_response !== 'undefined' ) {
8692
- const showError = document.getElementById( form.elements.show_response.value );
8693
- if ( showError !== null ) {
8694
- showError.innerHTML = response.message;
8695
- showError.classList.remove( 'frm_hidden' );
8696
- }
8697
  }
8698
  }
8699
  button.classList.remove( 'frm_loading_button' );
8700
  });
8701
  }
8702
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8703
  function handleCaptchaTypeChange( e ) {
8704
  const thresholdContainer = document.getElementById( 'frm_captcha_threshold_container' );
8705
  if ( thresholdContainer ) {
@@ -9388,7 +9631,9 @@ function frmAdminBuildJS() {
9388
  },
9389
 
9390
  buildInit: function() {
9391
- var loadFieldId, $builderForm, builderArea;
 
 
9392
 
9393
  if ( jQuery( '.frm_field_loading' ).length ) {
9394
  loadFieldId = jQuery( '.frm_field_loading' ).first().attr( 'id' );
@@ -9397,13 +9642,8 @@ function frmAdminBuildJS() {
9397
 
9398
  setupSortable( 'ul.frm_sorting' );
9399
 
9400
- jQuery( '.field_type_list > li:not(.frm_noallow)' ).draggable({
9401
- connectToSortable: '#frm-show-fields',
9402
- helper: 'clone',
9403
- revert: 'invalid',
9404
- delay: 10,
9405
- cancel: '.frm-dropdown-menu'
9406
- });
9407
  jQuery( 'ul.field_type_list, .field_type_list li, ul.frm_code_list, .frm_code_list li, .frm_code_list li a, #frm_adv_info #category-tabs li, #frm_adv_info #category-tabs li a' ).disableSelection();
9408
 
9409
  jQuery( '.frm_submit_ajax' ).on( 'click', submitBuild );
@@ -9412,7 +9652,7 @@ function frmAdminBuildJS() {
9412
  jQuery( 'a.edit-form-status' ).on( 'click', slideDown );
9413
  jQuery( '.cancel-form-status' ).on( 'click', slideUp );
9414
  jQuery( '.save-form-status' ).on( 'click', function() {
9415
- var newStatus = jQuery( document.getElementById( 'form_change_status' ) ).val();
9416
  jQuery( 'input[name="new_status"]' ).val( newStatus );
9417
  jQuery( document.getElementById( 'form-status-display' ) ).html( newStatus );
9418
  jQuery( '.cancel-form-status' ).trigger( 'click' );
@@ -9432,7 +9672,6 @@ function frmAdminBuildJS() {
9432
  $builderForm.on( 'click', '.frm_add_watch_lookup_row', addWatchLookupRow );
9433
  $builderForm.on( 'change', '.frm_get_values_form', updateGetValueFieldSelection );
9434
  $builderForm.on( 'change', '.frm_logic_field_opts', getFieldValues );
9435
- $builderForm.on( 'change', '.scale_maxnum, .scale_minnum', setScaleValues );
9436
  $builderForm.on( 'change', '.radio_maxnum', setStarValues );
9437
  $builderForm.on( 'frm-multiselect-changed', 'select[name^="field_options[admin_only_"]', adjustVisibilityValuesForEveryoneValues );
9438
 
324
  drag: svg({ href: '#frm_drag_icon', classList: [ 'frm_drag_icon', 'frm-drag' ] })
325
  };
326
 
327
+ let $newFields = jQuery( document.getElementById( 'frm-show-fields' ) ),
328
  builderForm = document.getElementById( 'new_fields' ),
329
  thisForm = document.getElementById( 'form_id' ),
 
330
  copyHelper = false,
331
  fieldsUpdated = 0,
332
  thisFormId = 0,
333
  autoId = 0,
334
  optionMap = {},
335
+ lastNewActionIdReturned = 0;
336
+
337
+ const { __ } = wp.i18n;
338
+ let debouncedSyncAfterDragAndDrop;
339
 
340
  if ( thisForm !== null ) {
341
  thisFormId = thisForm.value;
815
  }
816
  }
817
 
818
+ function setupSortable( sortableSelector ) {
819
+ document.querySelectorAll( sortableSelector ).forEach(
820
+ list => {
821
+ makeDroppable( list );
822
+ Array.from( list.children ).forEach( child => makeDraggable( child, '.frm-move' ) );
823
 
824
+ const $sectionTitle = jQuery( list ).children( '[data-type="divider"]' ).children( '.divider_section_only' );
825
+ if ( $sectionTitle.length ) {
826
+ makeDroppable( $sectionTitle );
827
+ }
828
+ }
829
+ );
830
+ setupFieldOptionSorting( jQuery( '#frm_builder_page' ) );
831
+ }
832
 
833
+ function makeDroppable( list ) {
834
+ jQuery( list ).droppable({
835
+ accept: '.frmbutton, li.frm_field_box',
836
+ deactivate: handleFieldDrop,
837
+ over: onDragOverDroppable,
838
+ out: onDraggableLeavesDroppable,
839
+ tolerance: 'pointer'
840
+ });
841
+ }
 
 
 
 
 
 
 
 
 
842
 
843
+ function onDragOverDroppable( event, ui ) {
844
+ const droppable = getDroppableForOnDragOver( event.target );
845
+ const draggable = ui.draggable[0];
 
846
 
847
+ if ( ! allowDrop( draggable, droppable ) ) {
848
+ droppable.classList.remove( 'frm-over-droppable' );
849
+ jQuery( droppable ).parents( 'ul.frm_sorting' ).addClass( 'frm-over-droppable' );
850
+ return;
851
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
852
 
853
+ document.querySelectorAll( '.frm-over-droppable' ).forEach( droppable => droppable.classList.remove( 'frm-over-droppable' ) );
854
+ droppable.classList.add( 'frm-over-droppable' );
855
+ jQuery( droppable ).parents( 'ul.frm_sorting' ).addClass( 'frm-over-droppable' );
856
+ }
857
 
858
+ /**
859
+ * Maybe change the droppable.
860
+ * Section titles are made droppable, but are not a list, so we need to change the droppable to the section's list instead.
861
+ *
862
+ * @param {Element} droppable
863
+ * @returns {Element}
864
+ */
865
+ function getDroppableForOnDragOver( droppable ) {
866
+ if ( droppable.classList.contains( 'divider_section_only' ) ) {
867
+ droppable = jQuery( droppable ).nextAll( '.start_divider.frm_sorting' ).get( 0 );
868
+ }
869
+ return droppable;
870
+ }
871
 
872
+ function onDraggableLeavesDroppable( event ) {
873
+ const droppable = event.target;
874
+ droppable.classList.remove( 'frm-over-droppable' );
875
+ }
 
 
 
 
 
 
 
 
876
 
877
+ function makeDraggable( draggable, handle ) {
878
+ const settings = {
879
+ helper: getDraggableHelper,
880
+ revert: 'invalid',
881
+ delay: 10,
882
+ start: handleDragStart,
883
+ stop: handleDragStop,
884
+ drag: handleDrag,
885
+ cursorAt: {
886
+ top: 0,
887
+ left: 90 // The width of draggable button is 180. 90 should center the draggable on the cursor.
888
+ }
889
+ };
890
+ if ( 'string' === typeof handle ) {
891
+ settings.handle = handle;
892
+ }
893
+ jQuery( draggable ).draggable( settings );
894
+ }
895
 
896
+ function getDraggableHelper( event ) {
897
+ const draggable = event.delegateTarget;
 
 
898
 
899
+ if ( isFieldGroup( draggable ) ) {
900
+ const newTextFieldClone = document.getElementById( 'frm-insert-fields' ).querySelector( '.frm_ttext' ).cloneNode( true );
901
+ newTextFieldClone.querySelector( 'use' ).setAttributeNS( 'http://www.w3.org/1999/xlink', 'href', '#frm_field_group_layout_icon' );
902
+ newTextFieldClone.querySelector( 'span' ).textContent = __( 'Field Group' );
903
+ newTextFieldClone.classList.add( 'frm_field_box' );
904
+ newTextFieldClone.classList.add( 'ui-sortable-helper' );
905
+ return newTextFieldClone;
906
+ }
907
 
908
+ let copyTarget;
909
+ const isNewField = draggable.classList.contains( 'frmbutton' );
910
+ if ( isNewField ) {
911
+ copyTarget = draggable.cloneNode( true );
912
+ copyTarget.classList.add( 'ui-sortable-helper' );
913
+ draggable.classList.add( 'frm-new-field' );
914
+ return copyTarget;
915
+ }
916
 
917
+ if ( draggable.hasAttribute( 'data-ftype' ) ) {
918
+ const fieldType = draggable.getAttribute( 'data-ftype' );
919
+ copyTarget = document.getElementById( 'frm-insert-fields' ).querySelector( '.frm_t' + fieldType );
920
+ copyTarget = copyTarget.cloneNode( true );
921
+ copyTarget.classList.add( 'form-field' );
 
 
 
 
 
 
 
922
 
923
+ copyTarget.classList.add( 'ui-sortable-helper' );
924
 
925
+ if ( copyTarget ) {
926
+ return copyTarget.cloneNode( true );
927
+ }
928
+ }
929
 
930
+ return div({ className: 'frmbutton' });
931
+ }
 
932
 
933
+ function handleDragStart( event, ui ) {
934
+ const container = document.getElementById( 'post-body-content' );
935
+ container.classList.add( 'frm-dragging-field' );
 
 
 
 
 
936
 
937
+ document.body.classList.add( 'frm-dragging' );
938
+ ui.helper.addClass( 'frm-sortable-helper' );
 
939
 
940
+ event.target.classList.add( 'frm-drag-fade' );
941
 
942
+ unselectFieldGroups();
943
+ deleteEmptyDividerWrappers();
944
+ maybeRemoveGroupHoverTarget();
945
+ closeOpenFieldDropdowns();
946
+ deleteTooltips();
947
  }
948
 
949
+ function handleDragStop() {
950
+ const container = document.getElementById( 'post-body-content' );
951
+ container.classList.remove( 'frm-dragging-field' );
952
+ document.body.classList.remove( 'frm-dragging' );
 
 
 
953
 
954
+ const fade = document.querySelector( '.frm-drag-fade' );
955
+ if ( fade ) {
956
+ fade.classList.remove( 'frm-drag-fade' );
957
+ }
958
  }
959
 
960
+ function handleDrag( event ) {
961
+ const draggable = event.target;
962
+ const droppable = getDroppableTarget();
963
+
964
+ let placeholder = document.getElementById( 'frm_drag_placeholder' );
965
+
966
+ if ( ! allowDrop( draggable, droppable ) ) {
967
+ if ( placeholder ) {
968
+ placeholder.remove();
969
  }
970
+ return;
971
+ }
972
+
973
+ if ( ! placeholder ) {
974
+ placeholder = tag( 'li', {
975
+ id: 'frm_drag_placeholder',
976
+ className: 'sortable-placeholder'
977
+ });
978
+ }
979
+
980
+ if ( 'frm-show-fields' === droppable.id || droppable.classList.contains( 'start_divider' ) ) {
981
+ placeholder.style.left = 0;
982
+ handleDragOverYAxis({ droppable, y: event.clientY, placeholder });
983
+ return;
984
+ }
985
+
986
+ placeholder.style.top = '';
987
+ handleDragOverFieldGroup({ droppable, x: event.clientX, placeholder });
988
  }
989
 
990
+ function getDroppableTarget() {
991
+ let droppable = document.getElementById( 'frm-show-fields' );
992
+ while ( droppable.querySelector( '.frm-over-droppable' ) ) {
993
+ droppable = droppable.querySelector( '.frm-over-droppable' );
994
+ }
995
+ if ( 'frm-show-fields' === droppable.id && ! droppable.classList.contains( 'frm-over-droppable' ) ) {
996
+ droppable = false;
997
+ }
998
+ return droppable;
999
  }
1000
 
1001
+ function handleFieldDrop( _, ui ) {
1002
+ const draggable = ui.draggable[0];
1003
+ const placeholder = document.getElementById( 'frm_drag_placeholder' );
1004
+
1005
+ if ( ! placeholder ) {
1006
+ ui.helper.remove();
1007
+ debouncedSyncAfterDragAndDrop();
1008
  return;
1009
  }
1010
+
1011
+ maybeOpenCollapsedPage( placeholder );
1012
+
1013
+ const $previousFieldContainer = ui.helper.parent();
1014
+ const previousSection = ui.helper.get( 0 ).closest( 'ul.frm_sorting' );
1015
+ const newSection = placeholder.closest( 'ul.frm_sorting' );
1016
+
1017
+ if ( draggable.classList.contains( 'frm-new-field' ) ) {
1018
+ insertNewFieldByDragging( draggable.id );
1019
+ } else {
1020
+ moveFieldThatAlreadyExists( draggable, placeholder );
1021
+ }
1022
+
1023
+ const previousSectionId = previousSection && previousSection.classList.contains( 'start_divider' ) ? parseInt( previousSection.closest( '.edit_field_type_divider' ).getAttribute( 'data-fid' ) ) : 0;
1024
+ const newSectionId = newSection.classList.contains( 'start_divider' ) ? parseInt( newSection.closest( '.edit_field_type_divider' ).getAttribute( 'data-fid' ) ) : 0;
1025
+
1026
+ placeholder.remove();
1027
+ ui.helper.remove();
1028
+
1029
+ const $previousContainerFields = $previousFieldContainer.length ? getFieldsInRow( $previousFieldContainer ) : [];
1030
+ maybeUpdatePreviousFieldContainerAfterDrop( $previousFieldContainer, $previousContainerFields );
1031
+ maybeUpdateDraggableClassAfterDrop( draggable, $previousContainerFields );
1032
+
1033
+ if ( previousSectionId !== newSectionId ) {
1034
+ updateFieldAfterMovingBetweenSections( jQuery( draggable ) );
1035
+ }
1036
+
1037
+ debouncedSyncAfterDragAndDrop();
1038
  }
1039
 
1040
  /**
1041
+ * If a page if collapsed, expand it before dragging since only the page break will move.
1042
+ *
1043
+ * @param {Element} placeholder
1044
+ * @returns {void}
1045
  */
1046
+ function maybeOpenCollapsedPage( placeholder ) {
1047
+ if ( ! placeholder.previousElementSibling || ! placeholder.previousElementSibling.classList.contains( 'frm-is-collapsed' ) ) {
 
 
1048
  return;
1049
  }
1050
+
1051
+ const $pageBreakField = jQuery( placeholder ).prevUntil( '[data-type="break"]' );
1052
+ if ( ! $pageBreakField.length ) {
1053
  return;
1054
  }
1055
+
1056
+ const collapseButton = $pageBreakField.find( '.frm-collapse-page' ).get( 0 );
1057
+ if ( collapseButton ) {
1058
+ collapseButton.click();
1059
+ }
1060
+ }
1061
+
1062
+ function maybeUpdatePreviousFieldContainerAfterDrop( $previousFieldContainer, $previousContainerFields ) {
1063
+ if ( ! $previousFieldContainer.length ) {
1064
  return;
1065
  }
1066
+
1067
+ if ( $previousContainerFields.length ) {
1068
+ syncLayoutClasses( $previousContainerFields.first() );
1069
+ } else {
1070
+ maybeDeleteAnEmptyFieldGroup( $previousFieldContainer.get( 0 ) );
1071
+ }
1072
+ }
1073
+
1074
+ function maybeUpdateDraggableClassAfterDrop( draggable, $previousContainerFields ) {
1075
+ if ( 0 !== $previousContainerFields.length || 1 !== getFieldsInRow( jQuery( draggable.parentNode ) ).length ) {
1076
+ syncLayoutClasses( jQuery( draggable ) );
1077
  }
1078
+ }
1079
+
1080
+ /**
1081
+ * Remove an empty field group, but don't remove an empty section.
1082
+ *
1083
+ * @param {Element} previousFieldContainer
1084
+ * @returns {void}
1085
+ */
1086
+ function maybeDeleteAnEmptyFieldGroup( previousFieldContainer ) {
1087
+ const closestFieldBox = previousFieldContainer.closest( 'li.frm_field_box' );
1088
+ if ( closestFieldBox && ! closestFieldBox.classList.contains( 'edit_field_type_divider' ) ) {
1089
+ closestFieldBox.remove();
1090
+ }
1091
+ }
1092
+
1093
+ function handleDragOverYAxis({ droppable, y, placeholder }) {
1094
+ const $list = jQuery( droppable );
1095
+
1096
+ let top;
1097
+
1098
+ $children = $list.children().not( '.edit_field_type_end_divider' );
1099
+ if ( 0 === $children.length ) {
1100
+ $list.prepend( placeholder );
1101
+ top = 0;
1102
+ } else {
1103
+ const insertAtIndex = determineIndexBasedOffOfMousePositionInList( $list, y );
1104
+
1105
+ if ( insertAtIndex === $children.length ) {
1106
+ const $lastChild = jQuery( $children.get( insertAtIndex - 1 ) );
1107
+ top = $lastChild.offset().top + $lastChild.outerHeight();
1108
+ $list.append( placeholder );
1109
+
1110
+ // Make sure nothing gets inserted after the end divider.
1111
+ const $endDivider = $list.children( '.edit_field_type_end_divider' );
1112
+ if ( $endDivider.length ) {
1113
+ $list.append( $endDivider );
1114
+ }
1115
+ } else {
1116
+ top = jQuery( $children.get( insertAtIndex ) ).offset().top;
1117
+ jQuery( $children.get( insertAtIndex ) ).before( placeholder );
1118
+ }
1119
+ }
1120
+
1121
+ top -= $list.offset().top;
1122
+ placeholder.style.top = top + 'px';
1123
+ }
1124
+
1125
+ function determineIndexBasedOffOfMousePositionInList( $list, y ) {
1126
+ const $items = $list.children().not( '.edit_field_type_end_divider' );
1127
+ const length = $items.length;
1128
+
1129
+ let index, item, itemTop, returnIndex;
1130
+
1131
+ returnIndex = 0;
1132
+ for ( index = length - 1; index >= 0; --index ) {
1133
+ item = $items.get( index );
1134
+ itemTop = jQuery( item ).offset().top;
1135
+ if ( y > itemTop ) {
1136
+ returnIndex = index;
1137
+ if ( y > itemTop + ( jQuery( item ).outerHeight() / 2 ) ) {
1138
+ returnIndex = index + 1;
1139
+ }
1140
+ break;
1141
+ }
1142
+ }
1143
+
1144
+ return returnIndex;
1145
+ }
1146
+
1147
+ function handleDragOverFieldGroup({ droppable, x, placeholder }) {
1148
+ const $row = jQuery( droppable );
1149
+ const $children = getFieldsInRow( $row );
1150
+
1151
+ if ( ! $children.length ) {
1152
  return;
1153
  }
1154
+
1155
+ let left;
1156
+ const insertAtIndex = determineIndexBasedOffOfMousePositionInRow( $row, x );
1157
+
1158
+ if ( insertAtIndex === $children.length ) {
1159
+ const $lastChild = jQuery( $children.get( insertAtIndex - 1 ) );
1160
+ left = $lastChild.offset().left + $lastChild.outerWidth();
1161
+ $row.append( placeholder );
1162
+ } else {
1163
+ left = jQuery( $children.get( insertAtIndex ) ).offset().left;
1164
+ jQuery( $children.get( insertAtIndex ) ).before( placeholder );
1165
+
1166
+ const amountToOffsetLeftBy = 0 === insertAtIndex ? 4 : 8; // Offset by 8 in between rows, but only 4 for the first item in a group.
1167
+ left -= amountToOffsetLeftBy; // Offset the placeholder slightly so it appears between two fields.
1168
  }
1169
+
1170
+ left -= $row.offset().left;
1171
+
1172
+ placeholder.style.left = left + 'px';
1173
+ }
1174
+
1175
+ function syncAfterDragAndDrop() {
1176
+ fixUnwrappedListItems();
1177
+ toggleSectionHolder();
1178
+ maybeFixEndDividers();
1179
+ maybeDeleteEmptyFieldGroups();
1180
+ updateFieldOrder();
1181
+
1182
+ const event = new Event( 'frm_sync_after_drag_and_drop', { bubbles: false });
1183
+ document.dispatchEvent( event );
1184
+ }
1185
+
1186
+ function maybeFixEndDividers() {
1187
+ document.querySelectorAll( '.edit_field_type_end_divider' ).forEach(
1188
+ endDivider => endDivider.parentNode.appendChild( endDivider )
1189
+ );
1190
+ }
1191
+
1192
+ function maybeDeleteEmptyFieldGroups() {
1193
+ document.querySelectorAll( 'li.form_field_box:not(.form-field)' ).forEach(
1194
+ fieldGroup => ! fieldGroup.children.length && fieldGroup.remove()
1195
+ );
1196
  }
1197
 
1198
  function fixUnwrappedListItems() {
1199
+ const lists = document.querySelectorAll( 'ul#frm-show-fields, ul.start_divider' );
1200
+ lists.forEach(
1201
+ list => {
1202
+ list.childNodes.forEach(
1203
+ child => {
1204
+ if ( 'undefined' === typeof child.classList ) {
1205
+ return;
1206
+ }
1207
+
1208
+ if ( child.classList.contains( 'edit_field_type_end_divider' ) ) {
1209
+ // Never wrap end divider in place.
1210
+ return;
1211
+ }
1212
+
1213
+ if ( 'undefined' !== typeof child.classList && child.classList.contains( 'form-field' ) ) {
1214
+ wrapFieldLiInPlace( child );
1215
+ }
1216
+ }
1217
+ );
1218
  }
1219
  );
1220
  }
1221
 
1222
  function deleteEmptyDividerWrappers() {
1223
+ const dividers = document.querySelectorAll( 'ul.start_divider' );
1224
  if ( ! dividers.length ) {
1225
  return;
1226
  }
1227
  dividers.forEach(
1228
  function( divider ) {
1229
+ const children = [].slice.call( divider.children );
1230
  children.forEach(
1231
  function( child ) {
1232
  if ( 0 === child.children.length ) {
1240
  );
1241
  }
1242
 
1243
+ function getFieldsInRow( $row ) {
1244
+ let $fields = jQuery();
1245
+
1246
+ const row = $row.get( 0 );
1247
+ if ( ! row.children ) {
1248
+ return $fields;
 
1249
  }
 
 
1250
 
1251
+ Array.from( row.children ).forEach(
1252
+ child => {
1253
+ if ( 'none' === child.style.display ) {
1254
+ return;
1255
+ }
1256
+
1257
+ const classes = child.classList;
1258
+ if ( ! classes.contains( 'form-field' ) || classes.contains( 'edit_field_type_end_divider' ) || classes.contains( 'frm-sortable-helper' ) ) {
1259
+ return;
1260
+ }
1261
+
1262
+ $fields = $fields.add( child );
1263
  }
1264
  );
1265
+ return $fields;
1266
  }
1267
 
1268
  function determineIndexBasedOffOfMousePositionInRow( $row, x ) {
1484
  resetDisplayedOpts( fieldId );
1485
  }
1486
  };
 
1487
  jQuery( sort ).sortable( opts );
1488
  }
1489
 
1532
  * @param {object} currentItem
1533
  */
1534
  function updateFieldAfterMovingBetweenSections( currentItem ) {
1535
+ if ( ! currentItem.hasClass( 'form-field' ) ) {
1536
+ // currentItem is a field group. Call for children recursively.
1537
+ getFieldsInRow( jQuery( currentItem.get( 0 ).firstChild ) ).each(
1538
+ function() {
1539
+ updateFieldAfterMovingBetweenSections( jQuery( this ) );
1540
+ }
1541
+ );
1542
+ return;
 
1543
  }
1544
 
1545
+ const fieldId = currentItem.attr( 'id' ).replace( 'frm_field_id_', '' );
1546
+ const section = getSectionForFieldPlacement( currentItem );
1547
+ const formId = getFormIdForFieldPlacement( section );
1548
+ const sectionId = getSectionIdForFieldPlacement( section );
1549
 
1550
  jQuery.ajax({
1551
+ type: 'POST',
1552
+ url: ajaxurl,
1553
  data: {
1554
  action: 'frm_update_field_after_move',
1555
  form_id: formId,
1572
  /**
1573
  * Add a new field by dragging and dropping it from the Fields sidebar
1574
  *
1575
+ * @param {string} fieldType
 
 
1576
  */
1577
+ function insertNewFieldByDragging( fieldType ) {
1578
+ const placeholder = document.getElementById( 'frm_drag_placeholder' );
 
 
 
 
 
 
 
 
 
1579
  const loadingID = fieldType.replace( '|', '-' ) + '_' + getAutoId();
1580
+ const loading = tag(
1581
+ 'li',
1582
+ {
1583
+ id: loadingID,
1584
+ className: 'frm-wait frmbutton_loadingnow'
1585
+ }
1586
+ );
1587
+ const $placeholder = jQuery( loading );
1588
+ const currentItem = jQuery( placeholder );
1589
+ const section = getSectionForFieldPlacement( currentItem );
1590
+ const formId = getFormIdForFieldPlacement( section );
1591
+ const sectionId = getSectionIdForFieldPlacement( section );
1592
+
1593
+ placeholder.parentNode.insertBefore( loading, placeholder );
1594
+ placeholder.remove();
1595
  syncLayoutClasses( $placeholder );
1596
 
1597
  let hasBreak = 0;
1618
  // if dragging into a new row, we need to wrap the li first.
1619
  replaceWith = wrapFieldLi( msg );
1620
  } else {
1621
+ replaceWith = msgAsjQueryObject( msg );
1622
+ if ( ! $placeholder.get( 0 ).parentNode.parentNode.classList.contains( 'ui-draggable' ) ) {
1623
+ // If a field group wasn't draggable because it only had a single field, make it draggable.
1624
+ makeDraggable( $placeholder.get( 0 ).parentNode.parentNode, '.frm-move' );
1625
+ }
1626
  }
1627
  $placeholder.replaceWith( replaceWith );
1628
  updateFieldOrder();
1631
  syncLayoutClasses( $siblings.first() );
1632
  }
1633
  toggleSectionHolder();
1634
+
1635
+ if ( ! $siblings.length ) {
1636
+ makeDroppable( replaceWith.get( 0 ).querySelector( 'ul.frm_sorting' ) );
1637
+ makeDraggable( replaceWith.get( 0 ).querySelector( 'li.form-field' ), '.frm-move' );
1638
+ } else {
1639
+ makeDraggable( replaceWith.get( 0 ), '.frm-move' );
1640
+ }
1641
+
1642
  },
1643
  error: handleInsertFieldError
1644
  });
1645
  }
1646
 
1647
+ function moveFieldThatAlreadyExists( draggable, placeholder ) {
1648
+ placeholder.parentNode.insertBefore( draggable, placeholder );
1649
+ }
1650
+
1651
+ function msgAsjQueryObject( msg ) {
1652
+ const element = div();
1653
+ element.innerHTML = msg;
1654
+ return jQuery( element.firstChild );
1655
+ }
1656
+
1657
  function handleInsertFieldError( jqXHR, _, errorThrown ) {
1658
  maybeShowInsertFieldError( errorThrown, jqXHR );
1659
  }
1679
  return ++autoId;
1680
  }
1681
 
1682
+ // Don't allow page break, embed form, or section inside section field
1683
+ // Don't allow page breaks inside of field groups.
1684
+ // Don't allow field groups with sections inside of sections.
1685
+ // Don't allow field groups in field groups.
1686
+ // Don't allow hidden fields inside of field groups but allow them in sections.
1687
+ function allowDrop( draggable, droppable ) {
1688
+ if ( false === droppable ) {
1689
+ // Don't show drop placeholder if dragging somewhere off of the droppable area.
 
 
 
1690
  return false;
1691
  }
1692
 
1693
+ if ( droppable.closest( '.frm-sortable-helper' ) ) {
1694
+ // Do not allow drop into draggable.
1695
+ return false;
1696
+ }
1697
 
1698
+ if ( 'frm-show-fields' === droppable.id ) {
1699
+ // Everything can be dropped into the main list of fields.
1700
  return true;
1701
  }
1702
 
1703
+ if ( ! droppable.classList.contains( 'start_divider' ) ) {
1704
+ const $fieldsInRow = getFieldsInRow( jQuery( droppable ) );
1705
+ if ( ! groupCanFitAnotherField( $fieldsInRow, jQuery( draggable ) ) ) {
1706
+ // Field group is full and cannot accept another field.
1707
+ return false;
1708
+ }
1709
  }
1710
 
1711
+ const isNewField = draggable.classList.contains( 'frm-new-field' );
1712
+ if ( isNewField ) {
1713
+ return allowNewFieldDrop( draggable, droppable );
1714
  }
1715
 
1716
+ return allowMoveField( draggable, droppable );
1717
+ }
 
 
1718
 
1719
+ // Don't allow a new page break or hidden field in a field group.
1720
+ // Don't allow a new section inside of a section.
1721
+ // Don't allow an embedded form in a section.
1722
+ function allowNewFieldDrop( draggable, droppable ) {
1723
+ const classes = draggable.classList;
1724
+ const newPageBreakField = classes.contains( 'frm_tbreak' );
1725
+ const newHiddenField = classes.contains( 'frm_thidden' );
1726
+ const newSectionField = classes.contains( 'frm_tdivider' );
1727
+ const newEmbedField = classes.contains( 'frm_tform' );
1728
 
1729
+ const fieldTypeIsAlwaysAllowed = ! newPageBreakField && ! newHiddenField && ! newSectionField && ! newEmbedField;
1730
+ if ( fieldTypeIsAlwaysAllowed ) {
1731
+ return true;
1732
+ }
1733
 
1734
+ const newFieldWillBeAddedToASection = droppable.classList.contains( 'start_divider' ) || null !== droppable.closest( '.start_divider' );
1735
+ if ( newFieldWillBeAddedToASection ) {
1736
+ // Don't allow a section or an embedded form in a section.
1737
+ return ! newEmbedField && ! newSectionField;
1738
+ }
1739
 
1740
+ const newFieldWillBeAddedToAGroup = ! ( 'frm-show-fields' === droppable.id || droppable.classList.contains( 'start_divider' ) );
1741
+ if ( newFieldWillBeAddedToAGroup ) {
1742
+ return ! newHiddenField && ! newPageBreakField;
1743
  }
1744
 
1745
+ return true;
1746
+ }
1747
+
1748
+ function allowMoveField( draggable, droppable ) {
1749
+ if ( isFieldGroup( draggable ) ) {
1750
+ return allowMoveFieldGroup( draggable, droppable );
1751
+ }
1752
 
1753
+ const isPageBreak = draggable.classList.contains( 'edit_field_type_break' );
1754
  if ( isPageBreak ) {
1755
+ // Page breaks are only allowed in the main list of fields, not in sections or in field groups.
1756
  return false;
1757
  }
1758
 
1759
+ if ( droppable.classList.contains( 'start_divider' ) ) {
1760
+ return allowMoveFieldToSection( draggable );
1761
+ }
1762
 
1763
+ return allowMoveFieldToGroup( draggable, droppable );
1764
+ }
1765
+
1766
+ function isFieldGroup( draggable ) {
1767
+ return draggable.classList.contains( 'frm_field_box' ) && ! draggable.classList.contains( 'form-field' );
1768
+ }
1769
+
1770
+ function allowMoveFieldGroup( fieldGroup, droppable ) {
1771
+ if ( droppable.classList.contains( 'start_divider' ) && null === fieldGroup.querySelector( '.start_divider' ) ) {
1772
+ // Allow a field group with no section inside of a section.
1773
+ return true;
1774
+ }
1775
+ return false;
1776
+ }
1777
+
1778
+ function allowMoveFieldToSection( draggable ) {
1779
+ const draggableIncludeEmbedForm = draggable.classList.contains( 'edit_field_type_form' ) || draggable.querySelector( '.edit_field_type_form' );
1780
+ if ( draggableIncludeEmbedForm ) {
1781
+ // Do not allow an embedded form inside of a section.
1782
  return false;
1783
  }
1784
 
1785
+ const draggableIncludesSection = draggable.classList.contains( 'edit_field_type_divider' ) || draggable.querySelector( '.edit_field_type_divider' );
1786
+ if ( draggableIncludesSection ) {
1787
+ // Do not allow a section inside of a section.
1788
+ return false;
1789
  }
1790
 
1791
+ return true;
1792
+ }
1793
+
1794
+ function allowMoveFieldToGroup( draggable, group ) {
1795
+ const groupIncludesBreakOrHidden = null !== group.querySelector( '.edit_field_type_break, .edit_field_type_hidden' );
1796
+ if ( groupIncludesBreakOrHidden ) {
1797
+ // Never allow any field beside a page break or a hidden field.
1798
  return false;
1799
  }
1800
 
1801
+ const isFieldGroup = jQuery( draggable ).children( 'ul.frm_sorting' ).not( '.start_divider' ).length > 0;
1802
+ if ( isFieldGroup ) {
1803
+ // Do not allow a field group directly inside of a field group unless it's in a section.
1804
+ return false;
1805
  }
1806
 
1807
+ const draggableIncludesASection = draggable.classList.contains( 'edit_field_type_divider' ) || draggable.querySelector( '.edit_field_type_divider' );
1808
+ const draggableIsEmbedField = draggable.classList.contains( 'edit_field_type_form' );
1809
+ const groupIsInASection = null !== group.closest( '.start_divider' );
1810
+ if ( groupIsInASection && ( draggableIncludesASection || draggableIsEmbedField ) ) {
1811
+ // Do not allow a section or an embed field inside of a section.
1812
  return false;
1813
  }
1814
 
1815
+ return true;
 
1816
  }
1817
 
1818
  function groupCanFitAnotherField( fieldsInRow, $field ) {
1829
  }
1830
 
1831
  function loadFields( fieldId ) {
1832
+ const thisField = document.getElementById( fieldId );
1833
+ const $thisField = jQuery( thisField );
1834
+ const field = [];
1835
+ const addHtmlToField = element => {
1836
+ const frmHiddenFdata = element.querySelector( '.frm_hidden_fdata' );
 
 
1837
  element.classList.add( 'frm_load_now' );
1838
  if ( frmHiddenFdata !== null ) {
1839
  field.push( frmHiddenFdata.innerHTML );
1840
  }
1841
  };
1842
 
1843
+ let nextElement = thisField;
1844
  addHtmlToField( nextElement );
1845
  while ( nextElement.nextElementSibling && field.length < 15 ) {
1846
  addHtmlToField( nextElement.nextElementSibling );
1848
  }
1849
 
1850
  jQuery.ajax({
1851
+ type: 'POST',
1852
+ url: ajaxurl,
1853
  data: {
1854
  action: 'frm_load_field',
1855
  field: field,
1856
  form_id: thisFormId,
1857
  nonce: frmGlobal.nonce
1858
  },
1859
+ success: html => handleAjaxLoadFieldSuccess( html, $thisField, field )
1860
+ });
1861
+ }
1862
 
1863
+ function handleAjaxLoadFieldSuccess( html, $thisField, field ) {
1864
+ let key, $nextSet;
 
 
 
1865
 
1866
+ html = html.replace( /^\s+|\s+$/g, '' );
1867
+ if ( html.indexOf( '{' ) !== 0 ) {
1868
+ jQuery( '.frm_load_now' ).removeClass( '.frm_load_now' ).html( 'Error' );
1869
+ return;
1870
+ }
1871
 
1872
+ html = JSON.parse( html );
1873
+ for ( key in html ) {
1874
+ jQuery( '#frm_field_id_' + key ).replaceWith( html[key]);
1875
+ setupSortable( '#frm_field_id_' + key + '.edit_field_type_divider ul.frm_sorting' );
1876
+ makeDraggable( document.getElementById( 'frm_field_id_' + key ) );
1877
+ }
1878
 
1879
+ $nextSet = $thisField.nextAll( '.frm_field_loading:not(.frm_load_now)' );
1880
+ if ( $nextSet.length ) {
1881
+ loadFields( $nextSet.attr( 'id' ) );
1882
+ } else {
1883
+ // go up a level
1884
+ $nextSet = jQuery( document.getElementById( 'frm-show-fields' ) ).find( '.frm_field_loading:not(.frm_load_now)' );
1885
+ if ( $nextSet.length ) {
1886
+ loadFields( $nextSet.attr( 'id' ) );
1887
+ }
1888
+ }
1889
 
1890
+ initiateMultiselect();
1891
+ renumberPageBreaks();
1892
+ maybeHideQuantityProductFieldOption();
1893
 
1894
+ const loadedEvent = new Event( 'frm_ajax_loaded_field', { bubbles: false });
1895
+ loadedEvent.frmFields = field.map( f => JSON.parse( f ) );
1896
+ document.dispatchEvent( loadedEvent );
 
 
1897
  }
1898
 
1899
  function addFieldClick() {
1926
  },
1927
  success: function( msg ) {
1928
  document.getElementById( 'frm_form_editor_container' ).classList.add( 'frm-has-fields' );
1929
+ const replaceWith = wrapFieldLi( msg );
1930
+ $newFields.append( replaceWith );
1931
  afterAddField( msg, true );
1932
+
1933
+ replaceWith.each(
1934
+ function() {
1935
+ makeDroppable( this.querySelector( 'ul.frm_sorting' ) );
1936
+ makeDraggable( this.querySelector( '.form-field' ), '.frm-move' );
1937
+ }
1938
+ );
1939
  },
1940
  error: handleInsertFieldError
1941
  });
1991
  success: function( msg ) {
1992
  var newRow;
1993
 
1994
+ let replaceWith;
1995
+
1996
  if ( null !== newRowId ) {
1997
  newRow = document.getElementById( newRowId );
1998
  if ( null !== newRow ) {
1999
+ replaceWith = msgAsjQueryObject( msg );
2000
+ jQuery( newRow ).append( replaceWith );
2001
+ makeDraggable( replaceWith.get( 0 ), '.frm-move' );
2002
  if ( null !== fieldOrder ) {
2003
  newRow.lastElementChild.setAttribute( 'frm-field-order', fieldOrder );
2004
  }
2015
  }
2016
 
2017
  if ( $field.siblings( 'li.form-field' ).length ) {
2018
+ replaceWith = msgAsjQueryObject( msg );
2019
+ $field.after( replaceWith );
2020
  syncLayoutClasses( $field );
2021
+ makeDraggable( replaceWith.get( 0 ), '.frm-move' );
2022
  } else {
2023
+ replaceWith = wrapFieldLi( msg );
2024
+ $field.parent().parent().after( replaceWith );
2025
+ makeDroppable( replaceWith.get( 0 ).querySelector( 'ul.frm_sorting' ) );
2026
+ makeDraggable( replaceWith.get( 0 ).querySelector( 'li.form-field' ), '.frm-move' );
2027
  }
2028
 
2029
  updateFieldOrder();
2273
  return option;
2274
  }
2275
 
2276
+ function wrapFieldLi( field ) {
2277
+ const wrapper = div();
2278
+
2279
+ if ( 'string' === typeof field ) {
2280
+ wrapper.innerHTML = field;
2281
+ } else {
2282
+ wrapper.appendChild( field );
2283
+ }
2284
+
2285
+ let result = jQuery();
2286
+ Array.from( wrapper.children ).forEach(
2287
+ li => {
2288
+ result = result.add(
2289
+ jQuery( '<li>' )
2290
+ .addClass( 'frm_field_box' )
2291
+ .html(
2292
+ jQuery( '<ul>' ).addClass( 'frm_grid_container frm_sorting' ).append( li )
2293
+ )
2294
+ );
2295
+ }
2296
+ );
2297
+
2298
+ return result;
2299
  }
2300
 
2301
  function wrapFieldLiInPlace( li ) {
2302
+ const ul = tag(
2303
+ 'ul',
2304
+ {
2305
+ className: 'frm_grid_container frm_sorting'
2306
+ }
2307
+ );
2308
+ const wrapper = tag(
2309
+ 'li',
2310
+ {
2311
+ className: 'frm_field_box',
2312
+ child: ul
2313
+ }
2314
+ );
2315
+
2316
+ li.replaceWith( wrapper );
2317
+ ul.appendChild( li );
2318
+
2319
+ makeDroppable( ul );
2320
+ makeDraggable( wrapper, '.frm-move' );
2321
  }
2322
 
2323
  function afterAddField( msg, addFocus ) {
4031
  }
4032
 
4033
  function breakRow( row ) {
4034
+ const $row = jQuery( row );
4035
+ getFieldsInRow( $row ).each(
4036
  function( index ) {
4037
+ const field = this;
4038
  if ( 0 !== index ) {
4039
+ $row.parent().after( wrapFieldLi( field ) );
4040
  }
4041
+ stripLayoutFromFields( jQuery( field ) );
4042
  }
4043
  );
4044
  }
4364
  function getSelectedFieldIds() {
4365
  var deleteFieldIds = [];
4366
  jQuery( '.frm-selected-field-group > li.form-field' )
 
4367
  .each(
4368
  function() {
4369
  deleteFieldIds.push( this.dataset.fid );
4382
  function deleteAllSelectedFieldGroups( deleteFieldIds ) {
4383
  deleteFieldIds.forEach(
4384
  function( fieldId ) {
4385
+ deleteFields( fieldId );
4386
  }
4387
  );
4388
  }
5497
  }
5498
  }
5499
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5500
  function getFieldValues() {
5501
  /*jshint validthis:true */
5502
  var isTaxonomy,
7250
 
7251
  if ( rich ) {
7252
  wpActiveEditor = elementId;
 
 
7253
  }
7254
 
7255
  if ( ! contentBox.length ) {
7269
  plain_text: p,
7270
  nonce: frmGlobal.nonce
7271
  },
7272
+ elementId: elementId,
7273
  success: function( msg ) {
7274
+ if ( rich ) {
7275
+ let p = document.createElement( 'p' );
7276
+ p.innerText = msg;
7277
+ send_to_editor( p.innerHTML );
7278
+ } else {
7279
+ insertContent( contentBox, msg );
7280
+ }
7281
  }
7282
  });
7283
  } else {
7284
  variable = maybeAddSanitizeUrlToShortcodeVariable( variable, element, contentBox );
7285
+ if ( rich ) {
7286
+ send_to_editor( variable );
7287
+ } else {
7288
+ insertContent( contentBox, variable );
7289
+ }
7290
  }
7291
  return false;
7292
  }
7783
  const wysiwyg = settings.querySelector( '.wp-editor-area' );
7784
  if ( wysiwyg ) {
7785
  frmDom.wysiwyg.init(
7786
+ wysiwyg, { height: 160, addFocusEvents: true }
 
7787
  );
7788
  }
7789
  }
7790
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7791
  /* Styling */
7792
  function setPosClass() {
7793
  /*jshint validthis:true */
8922
  jQuery( '.spinner' ).css( 'visibility', 'hidden' );
8923
 
8924
  // Show response.message
8925
+ if ( 'string' === typeof response.message ) {
8926
+ showInstallFormErrorModal( response.message );
 
 
 
 
8927
  }
8928
  }
8929
  button.classList.remove( 'frm_loading_button' );
8930
  });
8931
  }
8932
 
8933
+ function showInstallFormErrorModal( message ) {
8934
+ const modalContent = div( message );
8935
+ modalContent.style.padding = '20px 40px';
8936
+ const modal = frmDom.modal.maybeCreateModal(
8937
+ 'frmInstallFormErrorModal',
8938
+ {
8939
+ title: __( 'Unable to install template', 'formidable' ),
8940
+ content: modalContent
8941
+ }
8942
+ );
8943
+ modal.classList.add( 'frm_common_modal' );
8944
+ }
8945
+
8946
  function handleCaptchaTypeChange( e ) {
8947
  const thresholdContainer = document.getElementById( 'frm_captcha_threshold_container' );
8948
  if ( thresholdContainer ) {
9631
  },
9632
 
9633
  buildInit: function() {
9634
+ let loadFieldId, $builderForm, builderArea;
9635
+
9636
+ debouncedSyncAfterDragAndDrop = debounce( syncAfterDragAndDrop, 10 );
9637
 
9638
  if ( jQuery( '.frm_field_loading' ).length ) {
9639
  loadFieldId = jQuery( '.frm_field_loading' ).first().attr( 'id' );
9642
 
9643
  setupSortable( 'ul.frm_sorting' );
9644
 
9645
+ document.querySelectorAll( '.field_type_list > li' ).forEach( makeDraggable );
9646
+
 
 
 
 
 
9647
  jQuery( 'ul.field_type_list, .field_type_list li, ul.frm_code_list, .frm_code_list li, .frm_code_list li a, #frm_adv_info #category-tabs li, #frm_adv_info #category-tabs li a' ).disableSelection();
9648
 
9649
  jQuery( '.frm_submit_ajax' ).on( 'click', submitBuild );
9652
  jQuery( 'a.edit-form-status' ).on( 'click', slideDown );
9653
  jQuery( '.cancel-form-status' ).on( 'click', slideUp );
9654
  jQuery( '.save-form-status' ).on( 'click', function() {
9655
+ const newStatus = jQuery( document.getElementById( 'form_change_status' ) ).val();
9656
  jQuery( 'input[name="new_status"]' ).val( newStatus );
9657
  jQuery( document.getElementById( 'form-status-display' ) ).html( newStatus );
9658
  jQuery( '.cancel-form-status' ).trigger( 'click' );
9672
  $builderForm.on( 'click', '.frm_add_watch_lookup_row', addWatchLookupRow );
9673
  $builderForm.on( 'change', '.frm_get_values_form', updateGetValueFieldSelection );
9674
  $builderForm.on( 'change', '.frm_logic_field_opts', getFieldValues );
 
9675
  $builderForm.on( 'change', '.radio_maxnum', setStarValues );
9676
  $builderForm.on( 'frm-multiselect-changed', 'select[name^="field_options[admin_only_"]', adjustVisibilityValuesForEveryoneValues );
9677
 
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.5.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-09-28T18:22:08+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"
@@ -138,7 +138,7 @@ msgstr ""
138
 
139
  #: classes/controllers/FrmAddonsController.php:29
140
  #: classes/controllers/FrmAddonsController.php:30
141
- #: classes/helpers/FrmFormsHelper.php:1374
142
  #: classes/views/frm-fields/back-end/smart-values.php:16
143
  #: classes/views/shared/admin-header.php:25
144
  msgid "Upgrade"
@@ -148,33 +148,33 @@ msgstr ""
148
  msgid "There are no plugins on your site that require a license"
149
  msgstr ""
150
 
151
- #: classes/controllers/FrmAddonsController.php:625
152
  msgid "Installed"
153
  msgstr ""
154
 
155
- #: classes/controllers/FrmAddonsController.php:630
156
  #: classes/helpers/FrmAppHelper.php:2856
157
  msgid "Active"
158
  msgstr ""
159
 
160
- #: classes/controllers/FrmAddonsController.php:635
161
  msgid "Not Installed"
162
  msgstr ""
163
 
164
- #: classes/controllers/FrmAddonsController.php:932
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:996
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:1115
173
  msgid "Could not install an upgrade. Please download from formidableforms.com and install manually."
174
  msgstr ""
175
 
176
- #: classes/controllers/FrmAddonsController.php:1200
177
- #: classes/controllers/FrmAddonsController.php:1201
178
  #: classes/controllers/FrmWelcomeController.php:141
179
  #: classes/views/frm-forms/new-form-overlay.php:105
180
  #: classes/views/shared/reports-info.php:23
@@ -196,8 +196,8 @@ msgstr ""
196
  #: classes/controllers/FrmAppController.php:182
197
  #: classes/controllers/FrmEntriesController.php:11
198
  #: classes/controllers/FrmEntriesController.php:100
199
- #: classes/controllers/FrmFormsController.php:846
200
- #: classes/controllers/FrmXMLController.php:260
201
  #: classes/views/xml/import_form.php:121
202
  msgid "Entries"
203
  msgstr ""
@@ -229,14 +229,14 @@ msgid "Applications"
229
  msgstr ""
230
 
231
  #: classes/controllers/FrmEntriesController.php:79
232
- #: classes/controllers/FrmFormsController.php:1440
233
  #: classes/views/frm-entries/form.php:69
234
  #: classes/views/frm-entries/sidebar-shared.php:57
235
  msgid "Entry Key"
236
  msgstr ""
237
 
238
  #: classes/controllers/FrmEntriesController.php:84
239
- #: classes/controllers/FrmFormsController.php:705
240
  #: classes/views/xml/import_form.php:152
241
  #: classes/widgets/FrmElementorWidget.php:37
242
  #: classes/widgets/FrmShowForm.php:59
@@ -322,9 +322,9 @@ msgid "%s form actions"
322
  msgstr ""
323
 
324
  #: classes/controllers/FrmFormsController.php:9
325
- #: classes/controllers/FrmFormsController.php:856
326
  #: classes/controllers/FrmStylesController.php:51
327
- #: classes/controllers/FrmXMLController.php:259
328
  #: classes/views/frm-forms/list.php:10
329
  #: classes/widgets/FrmElementorWidget.php:14
330
  #: js/admin/applications.js:338
@@ -349,7 +349,7 @@ msgid "Settings Successfully Updated"
349
  msgstr ""
350
 
351
  #: classes/controllers/FrmFormsController.php:179
352
- #: classes/controllers/FrmFormsController.php:1070
353
  msgid "Form was successfully updated."
354
  msgstr ""
355
 
@@ -358,84 +358,84 @@ msgstr ""
358
  msgid "However, your form is very long and may be %1$sreaching server limits%2$s."
359
  msgstr ""
360
 
361
- #: classes/controllers/FrmFormsController.php:388
362
  msgid "Form Preview"
363
  msgstr ""
364
 
365
  #. translators: %1$s: Number of forms
366
- #: classes/controllers/FrmFormsController.php:433
367
- #: classes/controllers/FrmFormsController.php:494
368
  msgid "%1$s form restored from the Trash."
369
  msgid_plural "%1$s forms restored from the Trash."
370
  msgstr[0] ""
371
  msgstr[1] ""
372
 
373
  #. translators: %1$s: Number of forms, %2$s: Start link HTML, %3$s: End link HTML
374
- #: classes/controllers/FrmFormsController.php:497
375
- #: classes/controllers/FrmFormsController.php:522
376
  msgid "%1$s form moved to the Trash. %2$sUndo%3$s"
377
  msgid_plural "%1$s forms moved to the Trash. %2$sUndo%3$s"
378
  msgstr[0] ""
379
  msgstr[1] ""
380
 
381
  #. translators: %1$s: Number of forms
382
- #: classes/controllers/FrmFormsController.php:545
383
  msgid "%1$s Form Permanently Deleted"
384
  msgid_plural "%1$s Forms Permanently Deleted"
385
  msgstr[0] ""
386
  msgstr[1] ""
387
 
388
  #. translators: %1$s: Number of forms
389
- #: classes/controllers/FrmFormsController.php:562
390
- #: classes/controllers/FrmFormsController.php:579
391
  msgid "%1$s form permanently deleted."
392
  msgid_plural "%1$s forms permanently deleted."
393
  msgstr[0] ""
394
  msgstr[1] ""
395
 
396
- #: classes/controllers/FrmFormsController.php:643
397
  msgid "There was an error creating a template."
398
  msgstr ""
399
 
400
- #: classes/controllers/FrmFormsController.php:687
401
  msgid "Add forms and content"
402
  msgstr ""
403
 
404
- #: classes/controllers/FrmFormsController.php:706
405
  #: classes/views/frm-forms/insert_form_popup.php:33
406
  msgid "Insert a Form"
407
  msgstr ""
408
 
409
- #: classes/controllers/FrmFormsController.php:759
410
  msgid "Display form title"
411
  msgstr ""
412
 
413
- #: classes/controllers/FrmFormsController.php:763
414
  msgid "Display form description"
415
  msgstr ""
416
 
417
- #: classes/controllers/FrmFormsController.php:767
418
  msgid "Minimize form HTML"
419
  msgstr ""
420
 
421
- #: classes/controllers/FrmFormsController.php:841
422
  #: classes/views/frm-forms/new-form-overlay.php:46
423
  msgid "Template Name"
424
  msgstr ""
425
 
426
- #: classes/controllers/FrmFormsController.php:842
427
  #: classes/views/xml/import_form.php:120
428
  msgid "Type"
429
  msgstr ""
430
 
431
- #: classes/controllers/FrmFormsController.php:843
432
- #: classes/controllers/FrmFormsController.php:847
433
  #: classes/helpers/FrmCSVExportHelper.php:349
434
  #: classes/views/shared/mb_adv_info.php:98
435
  msgid "Key"
436
  msgstr ""
437
 
438
- #: classes/controllers/FrmFormsController.php:845
439
  #: classes/controllers/FrmStylesController.php:401
440
  #: classes/views/frm-forms/settings-advanced.php:13
441
  #: classes/views/styles/manage.php:39
@@ -444,212 +444,212 @@ msgstr ""
444
  msgid "Form Title"
445
  msgstr ""
446
 
447
- #: classes/controllers/FrmFormsController.php:848
448
  msgid "Actions"
449
  msgstr ""
450
 
451
- #: classes/controllers/FrmFormsController.php:851
452
  #: classes/models/FrmField.php:87
453
  msgid "Date"
454
  msgstr ""
455
 
456
- #: classes/controllers/FrmFormsController.php:976
457
  #: classes/helpers/FrmFormsHelper.php:1317
458
  msgid "My Templates"
459
  msgstr ""
460
 
461
- #: classes/controllers/FrmFormsController.php:1035
462
  msgid "You are trying to edit a form that does not exist."
463
  msgstr ""
464
 
465
  #. translators: %1$s: Start link HTML, %2$s: End link HTML
466
- #: classes/controllers/FrmFormsController.php:1040
467
  msgid "You are trying to edit a child form. Please edit from %1$shere%2$s"
468
  msgstr ""
469
 
470
- #: classes/controllers/FrmFormsController.php:1072
471
  msgid "Template was successfully updated."
472
  msgstr ""
473
 
474
- #: classes/controllers/FrmFormsController.php:1096
475
  msgid "Form was Successfully Copied"
476
  msgstr ""
477
 
478
- #: classes/controllers/FrmFormsController.php:1161
479
  #: classes/controllers/FrmStylesController.php:400
480
  msgid "General"
481
  msgstr ""
482
 
483
- #: classes/controllers/FrmFormsController.php:1162
484
  msgid "General Form Settings"
485
  msgstr ""
486
 
487
- #: classes/controllers/FrmFormsController.php:1167
488
  msgid "Actions & Notifications"
489
  msgstr ""
490
 
491
- #: classes/controllers/FrmFormsController.php:1173
492
- #: classes/controllers/FrmFormsController.php:1178
493
  msgid "Form Permissions"
494
  msgstr ""
495
 
496
- #: classes/controllers/FrmFormsController.php:1179
497
  msgid "Allow editing, protect forms and files, limit entries, and save drafts. Upgrade to get form and entry permissions."
498
  msgstr ""
499
 
500
- #: classes/controllers/FrmFormsController.php:1184
501
  msgid "Form Scheduling"
502
  msgstr ""
503
 
504
- #: classes/controllers/FrmFormsController.php:1189
505
  msgid "Form scheduling settings"
506
  msgstr ""
507
 
508
- #: classes/controllers/FrmFormsController.php:1194
509
  msgid "Styling & Buttons"
510
  msgstr ""
511
 
512
- #: classes/controllers/FrmFormsController.php:1200
513
  msgid "Form Landing Page"
514
  msgstr ""
515
 
516
- #: classes/controllers/FrmFormsController.php:1206
517
- #: classes/controllers/FrmFormsController.php:1212
518
  msgid "Conversational Forms"
519
  msgstr ""
520
 
521
- #: classes/controllers/FrmFormsController.php:1213
522
  msgid "Ask one question at a time for automated conversations."
523
  msgstr ""
524
 
525
- #: classes/controllers/FrmFormsController.php:1219
526
  msgid "Customize HTML"
527
  msgstr ""
528
 
529
- #: classes/controllers/FrmFormsController.php:1355
530
  msgid "Customize field values with the following parameters."
531
  msgstr ""
532
 
533
- #: classes/controllers/FrmFormsController.php:1393
534
  msgid "Separator"
535
  msgstr ""
536
 
537
- #: classes/controllers/FrmFormsController.php:1394
538
  msgid "Use a different separator for checkbox fields"
539
  msgstr ""
540
 
541
- #: classes/controllers/FrmFormsController.php:1397
542
  msgid "Date Format"
543
  msgstr ""
544
 
545
- #: classes/controllers/FrmFormsController.php:1400
546
  #: classes/views/frm-fields/back-end/settings.php:27
547
  msgid "Field Label"
548
  msgstr ""
549
 
550
- #: classes/controllers/FrmFormsController.php:1403
551
  msgid "No Auto P"
552
  msgstr ""
553
 
554
- #: classes/controllers/FrmFormsController.php:1404
555
  msgid "Do not automatically add any paragraphs or line breaks"
556
  msgstr ""
557
 
558
- #: classes/controllers/FrmFormsController.php:1419
559
  #: classes/models/FrmField.php:62
560
  msgid "User ID"
561
  msgstr ""
562
 
563
- #: classes/controllers/FrmFormsController.php:1420
564
  msgid "First Name"
565
  msgstr ""
566
 
567
- #: classes/controllers/FrmFormsController.php:1421
568
  msgid "Last Name"
569
  msgstr ""
570
 
571
- #: classes/controllers/FrmFormsController.php:1422
572
  msgid "Display Name"
573
  msgstr ""
574
 
575
- #: classes/controllers/FrmFormsController.php:1423
576
  msgid "User Login"
577
  msgstr ""
578
 
579
- #: classes/controllers/FrmFormsController.php:1424
580
  #: classes/models/FrmField.php:34
581
  msgid "Email"
582
  msgstr ""
583
 
584
- #: classes/controllers/FrmFormsController.php:1425
585
  msgid "Avatar"
586
  msgstr ""
587
 
588
- #: classes/controllers/FrmFormsController.php:1426
589
  msgid "Author Link"
590
  msgstr ""
591
 
592
- #: classes/controllers/FrmFormsController.php:1439
593
  #: classes/views/frm-entries/sidebar-shared.php:51
594
  msgid "Entry ID"
595
  msgstr ""
596
 
597
- #: classes/controllers/FrmFormsController.php:1441
598
  msgid "Post ID"
599
  msgstr ""
600
 
601
- #: classes/controllers/FrmFormsController.php:1442
602
  msgid "User IP"
603
  msgstr ""
604
 
605
- #: classes/controllers/FrmFormsController.php:1443
606
  msgid "Entry created"
607
  msgstr ""
608
 
609
- #: classes/controllers/FrmFormsController.php:1444
610
  msgid "Entry updated"
611
  msgstr ""
612
 
613
- #: classes/controllers/FrmFormsController.php:1446
614
  msgid "Site URL"
615
  msgstr ""
616
 
617
- #: classes/controllers/FrmFormsController.php:1447
618
  msgid "Site Name"
619
  msgstr ""
620
 
621
- #: classes/controllers/FrmFormsController.php:1455
622
  msgid "Default Msg"
623
  msgstr ""
624
 
625
- #: classes/controllers/FrmFormsController.php:1456
626
  msgid "Default HTML"
627
  msgstr ""
628
 
629
- #: classes/controllers/FrmFormsController.php:1457
630
  msgid "Default Plain"
631
  msgstr ""
632
 
633
- #: classes/controllers/FrmFormsController.php:1458
634
  #: classes/helpers/FrmFormsHelper.php:539
635
  #: classes/views/frm-forms/new-form-overlay.php:46
636
  #: classes/views/frm-forms/new-form-overlay.php:47
637
  msgid "Form Name"
638
  msgstr ""
639
 
640
- #: classes/controllers/FrmFormsController.php:1595
641
  msgid "No forms were specified"
642
  msgstr ""
643
 
644
- #: classes/controllers/FrmFormsController.php:1704
645
  msgid "There was a problem duplicating the form"
646
  msgstr ""
647
 
648
- #: classes/controllers/FrmFormsController.php:1715
649
  msgid "Abnormal HTML characters prevented your form from saving correctly"
650
  msgstr ""
651
 
652
- #: classes/controllers/FrmFormsController.php:1830
653
  #: classes/helpers/FrmFormsHelper.php:57
654
  #: classes/helpers/FrmFormsHelper.php:112
655
  #: classes/helpers/FrmFormsHelper.php:166
@@ -662,21 +662,21 @@ msgstr ""
662
  msgid "(no title)"
663
  msgstr ""
664
 
665
- #: classes/controllers/FrmFormsController.php:1896
666
- #: classes/controllers/FrmFormsController.php:1918
667
  msgid "Please select a valid form"
668
  msgstr ""
669
 
670
- #: classes/controllers/FrmFormsController.php:2152
671
  msgid "Please wait while you are redirected."
672
  msgstr ""
673
 
674
  #. translators: %1$s: Start link HTML, %2$s: End link HTML
675
- #: classes/controllers/FrmFormsController.php:2187
676
  msgid "%1$sClick here%2$s if you are not automatically redirected."
677
  msgstr ""
678
 
679
- #: classes/controllers/FrmFormsController.php:2547
680
  #: classes/helpers/FrmAppHelper.php:1395
681
  #: classes/views/frm-forms/settings-advanced.php:93
682
  msgid "Select a Page"
@@ -893,7 +893,7 @@ msgstr ""
893
  #: classes/controllers/FrmSMTPController.php:322
894
  #: classes/models/FrmPluginSearch.php:306
895
  #: classes/views/addons/settings.php:31
896
- #: js/formidable_admin.js:5929
897
  msgid "Activate"
898
  msgstr ""
899
 
@@ -995,35 +995,39 @@ msgstr ""
995
  msgid "Import/Export"
996
  msgstr ""
997
 
998
- #: classes/controllers/FrmXMLController.php:54
999
- msgid "There was an error reading the form template"
1000
  msgstr ""
1001
 
1002
- #: classes/controllers/FrmXMLController.php:90
 
 
 
 
1003
  msgid "There was an error importing form"
1004
  msgstr ""
1005
 
1006
- #: classes/controllers/FrmXMLController.php:295
1007
  msgid "Oops, you didn't select a file."
1008
  msgstr ""
1009
 
1010
- #: classes/controllers/FrmXMLController.php:306
1011
  msgid "The file does not exist, please try again."
1012
  msgstr ""
1013
 
1014
- #: classes/controllers/FrmXMLController.php:335
1015
  msgid "XML import is not enabled on your server with the libxml_disable_entity_loader function."
1016
  msgstr ""
1017
 
1018
- #: classes/controllers/FrmXMLController.php:550
1019
  msgid "Please select a form"
1020
  msgstr ""
1021
 
1022
- #: classes/controllers/FrmXMLController.php:580
1023
  msgid "Form not found."
1024
  msgstr ""
1025
 
1026
- #: classes/controllers/FrmXMLController.php:612
1027
  msgid "There are no entries for that form."
1028
  msgstr ""
1029
 
@@ -1241,7 +1245,7 @@ msgstr ""
1241
  #: classes/views/frm-forms/new-form-overlay.php:132
1242
  #: classes/views/shared/admin-header.php:56
1243
  #: classes/views/shared/confirm-overlay.php:19
1244
- #: js/formidable_admin.js:3669
1245
  msgid "Cancel"
1246
  msgstr ""
1247
 
@@ -1268,7 +1272,7 @@ msgstr ""
1268
 
1269
  #: classes/helpers/FrmAppHelper.php:2822
1270
  #: classes/helpers/FrmListHelper.php:412
1271
- #: js/formidable_admin.js:4084
1272
  msgid "Heads up"
1273
  msgstr ""
1274
 
@@ -1369,7 +1373,7 @@ msgid "The parameter \"%s\" is reserved by WordPress. This may cause problems wh
1369
  msgstr ""
1370
 
1371
  #: classes/helpers/FrmAppHelper.php:2852
1372
- #: classes/helpers/FrmFormsHelper.php:1551
1373
  msgid "See the list of reserved words in WordPress."
1374
  msgstr ""
1375
 
@@ -1889,7 +1893,7 @@ msgstr ""
1889
  #: classes/helpers/FrmFormsHelper.php:1196
1890
  #: classes/helpers/FrmFormsListHelper.php:133
1891
  #: classes/views/frm-form-actions/form_action.php:25
1892
- #: js/formidable_admin.js:2034
1893
  msgid "Delete"
1894
  msgstr ""
1895
 
@@ -3340,29 +3344,29 @@ msgstr ""
3340
  msgid "Published"
3341
  msgstr ""
3342
 
3343
- #: classes/helpers/FrmFormsHelper.php:1361
3344
  msgid "Create Form"
3345
  msgstr ""
3346
 
3347
- #: classes/helpers/FrmFormsHelper.php:1369
3348
  msgid "Renew"
3349
  msgstr ""
3350
 
3351
- #: classes/helpers/FrmFormsHelper.php:1433
3352
  msgid "License plan required:"
3353
  msgstr ""
3354
 
3355
- #: classes/helpers/FrmFormsHelper.php:1550
3356
  msgid "Is this intentional?"
3357
  msgstr ""
3358
 
3359
  #. translators: %s: the name of a single parameter in the redirect URL
3360
- #: classes/helpers/FrmFormsHelper.php:1560
3361
  msgid "The redirect URL is using the parameter \"%s\", which is reserved by WordPress. "
3362
  msgstr ""
3363
 
3364
  #. translators: %s: the names of two or more parameters in the redirect URL, separated by commas
3365
- #: classes/helpers/FrmFormsHelper.php:1566
3366
  msgid "The redirect URL is using the parameters \"%s\", which are reserved by WordPress. "
3367
  msgstr ""
3368
 
@@ -4015,22 +4019,22 @@ msgstr ""
4015
  msgid "%1$s Form submitted on %2$s"
4016
  msgstr ""
4017
 
4018
- #: classes/models/FrmEmail.php:381
4019
  #: classes/views/frm-entries/sidebar-shared.php:74
4020
  msgid "User Information"
4021
  msgstr ""
4022
 
4023
- #: classes/models/FrmEmail.php:383
4024
  #: classes/models/FrmEntryValues.php:260
4025
  msgid "User-Agent (Browser/OS)"
4026
  msgstr ""
4027
 
4028
- #: classes/models/FrmEmail.php:384
4029
  #: classes/models/FrmEntryValues.php:264
4030
  msgid "Referrer"
4031
  msgstr ""
4032
 
4033
- #: classes/models/FrmEmail.php:400
4034
  #: classes/models/FrmEntryValues.php:256
4035
  msgid "IP Address"
4036
  msgstr ""
@@ -4624,7 +4628,7 @@ msgstr ""
4624
  #: classes/views/frm-fields/back-end/inline-modal.php:7
4625
  #: classes/views/frm-fields/back-end/inline-modal.php:8
4626
  #: classes/views/shared/admin-header.php:11
4627
- #: js/formidable_admin.js:8090
4628
  msgid "Close"
4629
  msgstr ""
4630
 
@@ -4921,7 +4925,7 @@ msgstr ""
4921
 
4922
  #: classes/views/frm-form-actions/form_action.php:21
4923
  #: classes/views/styles/_upsell-multiple-styles.php:15
4924
- #: js/formidable_admin.js:2040
4925
  msgid "Duplicate"
4926
  msgstr ""
4927
 
@@ -5025,15 +5029,15 @@ msgstr ""
5025
  msgid "Message"
5026
  msgstr ""
5027
 
5028
- #: classes/views/frm-form-actions/_email_settings.php:96
5029
  msgid "Append IP Address, Browser, and Referring URL to message"
5030
  msgstr ""
5031
 
5032
- #: classes/views/frm-form-actions/_email_settings.php:98
5033
  msgid "Append Browser and Referring URL to message"
5034
  msgstr ""
5035
 
5036
- #: classes/views/frm-form-actions/_email_settings.php:105
5037
  msgid "Send Emails in Plain Text"
5038
  msgstr ""
5039
 
@@ -5050,9 +5054,9 @@ msgid "Move Field"
5050
  msgstr ""
5051
 
5052
  #: classes/views/frm-forms/add_field.php:29
5053
- #: js/formidable_admin.js:1251
5054
- #: js/formidable_admin.js:1254
5055
- #: js/formidable_admin.js:1978
5056
  msgid "More Options"
5057
  msgstr ""
5058
 
@@ -6589,71 +6593,75 @@ msgstr ""
6589
  msgid "Successfully copied embed example"
6590
  msgstr ""
6591
 
6592
- #: js/formidable_admin.js:1212
6593
  msgid "Set Row Layout"
6594
  msgstr ""
6595
 
6596
- #: js/formidable_admin.js:1219
6597
  msgid "Move Field Group"
6598
  msgstr ""
6599
 
6600
- #: js/formidable_admin.js:2006
6601
  msgid "Field settings"
6602
  msgstr ""
6603
 
6604
- #: js/formidable_admin.js:2034
6605
  msgid "Delete Group"
6606
  msgstr ""
6607
 
6608
- #: js/formidable_admin.js:2040
6609
  msgid "Duplicate Group"
6610
  msgstr ""
6611
 
6612
- #: js/formidable_admin.js:3376
6613
  msgid "Custom layout"
6614
  msgstr ""
6615
 
6616
- #: js/formidable_admin.js:3399
6617
  msgid "Break into rows"
6618
  msgstr ""
6619
 
6620
- #: js/formidable_admin.js:3409
6621
  msgid "Row Layout"
6622
  msgstr ""
6623
 
6624
- #: js/formidable_admin.js:3654
6625
  msgid "Enter number of columns for each field"
6626
  msgstr ""
6627
 
6628
- #: js/formidable_admin.js:3658
6629
  msgid "Layouts are based on a 12-column grid system"
6630
  msgstr ""
6631
 
6632
- #: js/formidable_admin.js:3674
6633
  msgid "Save"
6634
  msgstr ""
6635
 
6636
- #: js/formidable_admin.js:3998
6637
  msgid "Merge into row"
6638
  msgstr ""
6639
 
6640
  #. translators: %1$s: Number of fields that are selected to be deleted.
6641
- #: js/formidable_admin.js:4086
6642
  msgid "Are you sure you want to delete these %1$s selected fields?"
6643
  msgstr ""
6644
 
6645
- #: js/formidable_admin.js:5210
6646
  msgid "Duplicate option value \"%s\" detected"
6647
  msgstr ""
6648
 
6649
- #: js/formidable_admin.js:7324
6650
  msgid "Ready Made Solution"
6651
  msgstr ""
6652
 
6653
- #: js/formidable_admin.js:7327
6654
  msgid "Check all applications"
6655
  msgstr ""
6656
 
6657
- #: js/formidable_admin.js:8075
6658
  msgid "Save and Reload"
6659
  msgstr ""
 
 
 
 
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.5.2\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-10-13T15:40:18+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"
138
 
139
  #: classes/controllers/FrmAddonsController.php:29
140
  #: classes/controllers/FrmAddonsController.php:30
141
+ #: classes/helpers/FrmFormsHelper.php:1376
142
  #: classes/views/frm-fields/back-end/smart-values.php:16
143
  #: classes/views/shared/admin-header.php:25
144
  msgid "Upgrade"
148
  msgid "There are no plugins on your site that require a license"
149
  msgstr ""
150
 
151
+ #: classes/controllers/FrmAddonsController.php:638
152
  msgid "Installed"
153
  msgstr ""
154
 
155
+ #: classes/controllers/FrmAddonsController.php:643
156
  #: classes/helpers/FrmAppHelper.php:2856
157
  msgid "Active"
158
  msgstr ""
159
 
160
+ #: classes/controllers/FrmAddonsController.php:648
161
  msgid "Not Installed"
162
  msgstr ""
163
 
164
+ #: classes/controllers/FrmAddonsController.php:961
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:1025
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:1144
173
  msgid "Could not install an upgrade. Please download from formidableforms.com and install manually."
174
  msgstr ""
175
 
176
+ #: classes/controllers/FrmAddonsController.php:1229
177
+ #: classes/controllers/FrmAddonsController.php:1230
178
  #: classes/controllers/FrmWelcomeController.php:141
179
  #: classes/views/frm-forms/new-form-overlay.php:105
180
  #: classes/views/shared/reports-info.php:23
196
  #: classes/controllers/FrmAppController.php:182
197
  #: classes/controllers/FrmEntriesController.php:11
198
  #: classes/controllers/FrmEntriesController.php:100
199
+ #: classes/controllers/FrmFormsController.php:862
200
+ #: classes/controllers/FrmXMLController.php:269
201
  #: classes/views/xml/import_form.php:121
202
  msgid "Entries"
203
  msgstr ""
229
  msgstr ""
230
 
231
  #: classes/controllers/FrmEntriesController.php:79
232
+ #: classes/controllers/FrmFormsController.php:1456
233
  #: classes/views/frm-entries/form.php:69
234
  #: classes/views/frm-entries/sidebar-shared.php:57
235
  msgid "Entry Key"
236
  msgstr ""
237
 
238
  #: classes/controllers/FrmEntriesController.php:84
239
+ #: classes/controllers/FrmFormsController.php:721
240
  #: classes/views/xml/import_form.php:152
241
  #: classes/widgets/FrmElementorWidget.php:37
242
  #: classes/widgets/FrmShowForm.php:59
322
  msgstr ""
323
 
324
  #: classes/controllers/FrmFormsController.php:9
325
+ #: classes/controllers/FrmFormsController.php:872
326
  #: classes/controllers/FrmStylesController.php:51
327
+ #: classes/controllers/FrmXMLController.php:268
328
  #: classes/views/frm-forms/list.php:10
329
  #: classes/widgets/FrmElementorWidget.php:14
330
  #: js/admin/applications.js:338
349
  msgstr ""
350
 
351
  #: classes/controllers/FrmFormsController.php:179
352
+ #: classes/controllers/FrmFormsController.php:1086
353
  msgid "Form was successfully updated."
354
  msgstr ""
355
 
358
  msgid "However, your form is very long and may be %1$sreaching server limits%2$s."
359
  msgstr ""
360
 
361
+ #: classes/controllers/FrmFormsController.php:404
362
  msgid "Form Preview"
363
  msgstr ""
364
 
365
  #. translators: %1$s: Number of forms
366
+ #: classes/controllers/FrmFormsController.php:449
367
+ #: classes/controllers/FrmFormsController.php:510
368
  msgid "%1$s form restored from the Trash."
369
  msgid_plural "%1$s forms restored from the Trash."
370
  msgstr[0] ""
371
  msgstr[1] ""
372
 
373
  #. translators: %1$s: Number of forms, %2$s: Start link HTML, %3$s: End link HTML
374
+ #: classes/controllers/FrmFormsController.php:513
375
+ #: classes/controllers/FrmFormsController.php:538
376
  msgid "%1$s form moved to the Trash. %2$sUndo%3$s"
377
  msgid_plural "%1$s forms moved to the Trash. %2$sUndo%3$s"
378
  msgstr[0] ""
379
  msgstr[1] ""
380
 
381
  #. translators: %1$s: Number of forms
382
+ #: classes/controllers/FrmFormsController.php:561
383
  msgid "%1$s Form Permanently Deleted"
384
  msgid_plural "%1$s Forms Permanently Deleted"
385
  msgstr[0] ""
386
  msgstr[1] ""
387
 
388
  #. translators: %1$s: Number of forms
389
+ #: classes/controllers/FrmFormsController.php:578
390
+ #: classes/controllers/FrmFormsController.php:595
391
  msgid "%1$s form permanently deleted."
392
  msgid_plural "%1$s forms permanently deleted."
393
  msgstr[0] ""
394
  msgstr[1] ""
395
 
396
+ #: classes/controllers/FrmFormsController.php:659
397
  msgid "There was an error creating a template."
398
  msgstr ""
399
 
400
+ #: classes/controllers/FrmFormsController.php:703
401
  msgid "Add forms and content"
402
  msgstr ""
403
 
404
+ #: classes/controllers/FrmFormsController.php:722
405
  #: classes/views/frm-forms/insert_form_popup.php:33
406
  msgid "Insert a Form"
407
  msgstr ""
408
 
409
+ #: classes/controllers/FrmFormsController.php:775
410
  msgid "Display form title"
411
  msgstr ""
412
 
413
+ #: classes/controllers/FrmFormsController.php:779
414
  msgid "Display form description"
415
  msgstr ""
416
 
417
+ #: classes/controllers/FrmFormsController.php:783
418
  msgid "Minimize form HTML"
419
  msgstr ""
420
 
421
+ #: classes/controllers/FrmFormsController.php:857
422
  #: classes/views/frm-forms/new-form-overlay.php:46
423
  msgid "Template Name"
424
  msgstr ""
425
 
426
+ #: classes/controllers/FrmFormsController.php:858
427
  #: classes/views/xml/import_form.php:120
428
  msgid "Type"
429
  msgstr ""
430
 
431
+ #: classes/controllers/FrmFormsController.php:859
432
+ #: classes/controllers/FrmFormsController.php:863
433
  #: classes/helpers/FrmCSVExportHelper.php:349
434
  #: classes/views/shared/mb_adv_info.php:98
435
  msgid "Key"
436
  msgstr ""
437
 
438
+ #: classes/controllers/FrmFormsController.php:861
439
  #: classes/controllers/FrmStylesController.php:401
440
  #: classes/views/frm-forms/settings-advanced.php:13
441
  #: classes/views/styles/manage.php:39
444
  msgid "Form Title"
445
  msgstr ""
446
 
447
+ #: classes/controllers/FrmFormsController.php:864
448
  msgid "Actions"
449
  msgstr ""
450
 
451
+ #: classes/controllers/FrmFormsController.php:867
452
  #: classes/models/FrmField.php:87
453
  msgid "Date"
454
  msgstr ""
455
 
456
+ #: classes/controllers/FrmFormsController.php:992
457
  #: classes/helpers/FrmFormsHelper.php:1317
458
  msgid "My Templates"
459
  msgstr ""
460
 
461
+ #: classes/controllers/FrmFormsController.php:1051
462
  msgid "You are trying to edit a form that does not exist."
463
  msgstr ""
464
 
465
  #. translators: %1$s: Start link HTML, %2$s: End link HTML
466
+ #: classes/controllers/FrmFormsController.php:1056
467
  msgid "You are trying to edit a child form. Please edit from %1$shere%2$s"
468
  msgstr ""
469
 
470
+ #: classes/controllers/FrmFormsController.php:1088
471
  msgid "Template was successfully updated."
472
  msgstr ""
473
 
474
+ #: classes/controllers/FrmFormsController.php:1112
475
  msgid "Form was Successfully Copied"
476
  msgstr ""
477
 
478
+ #: classes/controllers/FrmFormsController.php:1177
479
  #: classes/controllers/FrmStylesController.php:400
480
  msgid "General"
481
  msgstr ""
482
 
483
+ #: classes/controllers/FrmFormsController.php:1178
484
  msgid "General Form Settings"
485
  msgstr ""
486
 
487
+ #: classes/controllers/FrmFormsController.php:1183
488
  msgid "Actions & Notifications"
489
  msgstr ""
490
 
491
+ #: classes/controllers/FrmFormsController.php:1189
492
+ #: classes/controllers/FrmFormsController.php:1194
493
  msgid "Form Permissions"
494
  msgstr ""
495
 
496
+ #: classes/controllers/FrmFormsController.php:1195
497
  msgid "Allow editing, protect forms and files, limit entries, and save drafts. Upgrade to get form and entry permissions."
498
  msgstr ""
499
 
500
+ #: classes/controllers/FrmFormsController.php:1200
501
  msgid "Form Scheduling"
502
  msgstr ""
503
 
504
+ #: classes/controllers/FrmFormsController.php:1205
505
  msgid "Form scheduling settings"
506
  msgstr ""
507
 
508
+ #: classes/controllers/FrmFormsController.php:1210
509
  msgid "Styling & Buttons"
510
  msgstr ""
511
 
512
+ #: classes/controllers/FrmFormsController.php:1216
513
  msgid "Form Landing Page"
514
  msgstr ""
515
 
516
+ #: classes/controllers/FrmFormsController.php:1222
517
+ #: classes/controllers/FrmFormsController.php:1228
518
  msgid "Conversational Forms"
519
  msgstr ""
520
 
521
+ #: classes/controllers/FrmFormsController.php:1229
522
  msgid "Ask one question at a time for automated conversations."
523
  msgstr ""
524
 
525
+ #: classes/controllers/FrmFormsController.php:1235
526
  msgid "Customize HTML"
527
  msgstr ""
528
 
529
+ #: classes/controllers/FrmFormsController.php:1371
530
  msgid "Customize field values with the following parameters."
531
  msgstr ""
532
 
533
+ #: classes/controllers/FrmFormsController.php:1409
534
  msgid "Separator"
535
  msgstr ""
536
 
537
+ #: classes/controllers/FrmFormsController.php:1410
538
  msgid "Use a different separator for checkbox fields"
539
  msgstr ""
540
 
541
+ #: classes/controllers/FrmFormsController.php:1413
542
  msgid "Date Format"
543
  msgstr ""
544
 
545
+ #: classes/controllers/FrmFormsController.php:1416
546
  #: classes/views/frm-fields/back-end/settings.php:27
547
  msgid "Field Label"
548
  msgstr ""
549
 
550
+ #: classes/controllers/FrmFormsController.php:1419
551
  msgid "No Auto P"
552
  msgstr ""
553
 
554
+ #: classes/controllers/FrmFormsController.php:1420
555
  msgid "Do not automatically add any paragraphs or line breaks"
556
  msgstr ""
557
 
558
+ #: classes/controllers/FrmFormsController.php:1435
559
  #: classes/models/FrmField.php:62
560
  msgid "User ID"
561
  msgstr ""
562
 
563
+ #: classes/controllers/FrmFormsController.php:1436
564
  msgid "First Name"
565
  msgstr ""
566
 
567
+ #: classes/controllers/FrmFormsController.php:1437
568
  msgid "Last Name"
569
  msgstr ""
570
 
571
+ #: classes/controllers/FrmFormsController.php:1438
572
  msgid "Display Name"
573
  msgstr ""
574
 
575
+ #: classes/controllers/FrmFormsController.php:1439
576
  msgid "User Login"
577
  msgstr ""
578
 
579
+ #: classes/controllers/FrmFormsController.php:1440
580
  #: classes/models/FrmField.php:34
581
  msgid "Email"
582
  msgstr ""
583
 
584
+ #: classes/controllers/FrmFormsController.php:1441
585
  msgid "Avatar"
586
  msgstr ""
587
 
588
+ #: classes/controllers/FrmFormsController.php:1442
589
  msgid "Author Link"
590
  msgstr ""
591
 
592
+ #: classes/controllers/FrmFormsController.php:1455
593
  #: classes/views/frm-entries/sidebar-shared.php:51
594
  msgid "Entry ID"
595
  msgstr ""
596
 
597
+ #: classes/controllers/FrmFormsController.php:1457
598
  msgid "Post ID"
599
  msgstr ""
600
 
601
+ #: classes/controllers/FrmFormsController.php:1458
602
  msgid "User IP"
603
  msgstr ""
604
 
605
+ #: classes/controllers/FrmFormsController.php:1459
606
  msgid "Entry created"
607
  msgstr ""
608
 
609
+ #: classes/controllers/FrmFormsController.php:1460
610
  msgid "Entry updated"
611
  msgstr ""
612
 
613
+ #: classes/controllers/FrmFormsController.php:1462
614
  msgid "Site URL"
615
  msgstr ""
616
 
617
+ #: classes/controllers/FrmFormsController.php:1463
618
  msgid "Site Name"
619
  msgstr ""
620
 
621
+ #: classes/controllers/FrmFormsController.php:1471
622
  msgid "Default Msg"
623
  msgstr ""
624
 
625
+ #: classes/controllers/FrmFormsController.php:1472
626
  msgid "Default HTML"
627
  msgstr ""
628
 
629
+ #: classes/controllers/FrmFormsController.php:1473
630
  msgid "Default Plain"
631
  msgstr ""
632
 
633
+ #: classes/controllers/FrmFormsController.php:1474
634
  #: classes/helpers/FrmFormsHelper.php:539
635
  #: classes/views/frm-forms/new-form-overlay.php:46
636
  #: classes/views/frm-forms/new-form-overlay.php:47
637
  msgid "Form Name"
638
  msgstr ""
639
 
640
+ #: classes/controllers/FrmFormsController.php:1611
641
  msgid "No forms were specified"
642
  msgstr ""
643
 
644
+ #: classes/controllers/FrmFormsController.php:1720
645
  msgid "There was a problem duplicating the form"
646
  msgstr ""
647
 
648
+ #: classes/controllers/FrmFormsController.php:1731
649
  msgid "Abnormal HTML characters prevented your form from saving correctly"
650
  msgstr ""
651
 
652
+ #: classes/controllers/FrmFormsController.php:1846
653
  #: classes/helpers/FrmFormsHelper.php:57
654
  #: classes/helpers/FrmFormsHelper.php:112
655
  #: classes/helpers/FrmFormsHelper.php:166
662
  msgid "(no title)"
663
  msgstr ""
664
 
665
+ #: classes/controllers/FrmFormsController.php:1912
666
+ #: classes/controllers/FrmFormsController.php:1934
667
  msgid "Please select a valid form"
668
  msgstr ""
669
 
670
+ #: classes/controllers/FrmFormsController.php:2168
671
  msgid "Please wait while you are redirected."
672
  msgstr ""
673
 
674
  #. translators: %1$s: Start link HTML, %2$s: End link HTML
675
+ #: classes/controllers/FrmFormsController.php:2203
676
  msgid "%1$sClick here%2$s if you are not automatically redirected."
677
  msgstr ""
678
 
679
+ #: classes/controllers/FrmFormsController.php:2563
680
  #: classes/helpers/FrmAppHelper.php:1395
681
  #: classes/views/frm-forms/settings-advanced.php:93
682
  msgid "Select a Page"
893
  #: classes/controllers/FrmSMTPController.php:322
894
  #: classes/models/FrmPluginSearch.php:306
895
  #: classes/views/addons/settings.php:31
896
+ #: js/formidable_admin.js:6168
897
  msgid "Activate"
898
  msgstr ""
899
 
995
  msgid "Import/Export"
996
  msgstr ""
997
 
998
+ #: classes/controllers/FrmXMLController.php:46
999
+ msgid "Your server is missing the Simple XML extension. This is required to install a template."
1000
  msgstr ""
1001
 
1002
+ #: classes/controllers/FrmXMLController.php:63
1003
+ msgid "There was an error reading the form template."
1004
+ msgstr ""
1005
+
1006
+ #: classes/controllers/FrmXMLController.php:99
1007
  msgid "There was an error importing form"
1008
  msgstr ""
1009
 
1010
+ #: classes/controllers/FrmXMLController.php:304
1011
  msgid "Oops, you didn't select a file."
1012
  msgstr ""
1013
 
1014
+ #: classes/controllers/FrmXMLController.php:315
1015
  msgid "The file does not exist, please try again."
1016
  msgstr ""
1017
 
1018
+ #: classes/controllers/FrmXMLController.php:344
1019
  msgid "XML import is not enabled on your server with the libxml_disable_entity_loader function."
1020
  msgstr ""
1021
 
1022
+ #: classes/controllers/FrmXMLController.php:559
1023
  msgid "Please select a form"
1024
  msgstr ""
1025
 
1026
+ #: classes/controllers/FrmXMLController.php:589
1027
  msgid "Form not found."
1028
  msgstr ""
1029
 
1030
+ #: classes/controllers/FrmXMLController.php:621
1031
  msgid "There are no entries for that form."
1032
  msgstr ""
1033
 
1245
  #: classes/views/frm-forms/new-form-overlay.php:132
1246
  #: classes/views/shared/admin-header.php:56
1247
  #: classes/views/shared/confirm-overlay.php:19
1248
+ #: js/formidable_admin.js:3936
1249
  msgid "Cancel"
1250
  msgstr ""
1251
 
1272
 
1273
  #: classes/helpers/FrmAppHelper.php:2822
1274
  #: classes/helpers/FrmListHelper.php:412
1275
+ #: js/formidable_admin.js:4353
1276
  msgid "Heads up"
1277
  msgstr ""
1278
 
1373
  msgstr ""
1374
 
1375
  #: classes/helpers/FrmAppHelper.php:2852
1376
+ #: classes/helpers/FrmFormsHelper.php:1553
1377
  msgid "See the list of reserved words in WordPress."
1378
  msgstr ""
1379
 
1893
  #: classes/helpers/FrmFormsHelper.php:1196
1894
  #: classes/helpers/FrmFormsListHelper.php:133
1895
  #: classes/views/frm-form-actions/form_action.php:25
1896
+ #: js/formidable_admin.js:2266
1897
  msgid "Delete"
1898
  msgstr ""
1899
 
3344
  msgid "Published"
3345
  msgstr ""
3346
 
3347
+ #: classes/helpers/FrmFormsHelper.php:1363
3348
  msgid "Create Form"
3349
  msgstr ""
3350
 
3351
+ #: classes/helpers/FrmFormsHelper.php:1371
3352
  msgid "Renew"
3353
  msgstr ""
3354
 
3355
+ #: classes/helpers/FrmFormsHelper.php:1435
3356
  msgid "License plan required:"
3357
  msgstr ""
3358
 
3359
+ #: classes/helpers/FrmFormsHelper.php:1552
3360
  msgid "Is this intentional?"
3361
  msgstr ""
3362
 
3363
  #. translators: %s: the name of a single parameter in the redirect URL
3364
+ #: classes/helpers/FrmFormsHelper.php:1562
3365
  msgid "The redirect URL is using the parameter \"%s\", which is reserved by WordPress. "
3366
  msgstr ""
3367
 
3368
  #. translators: %s: the names of two or more parameters in the redirect URL, separated by commas
3369
+ #: classes/helpers/FrmFormsHelper.php:1568
3370
  msgid "The redirect URL is using the parameters \"%s\", which are reserved by WordPress. "
3371
  msgstr ""
3372
 
4019
  msgid "%1$s Form submitted on %2$s"
4020
  msgstr ""
4021
 
4022
+ #: classes/models/FrmEmail.php:387
4023
  #: classes/views/frm-entries/sidebar-shared.php:74
4024
  msgid "User Information"
4025
  msgstr ""
4026
 
4027
+ #: classes/models/FrmEmail.php:389
4028
  #: classes/models/FrmEntryValues.php:260
4029
  msgid "User-Agent (Browser/OS)"
4030
  msgstr ""
4031
 
4032
+ #: classes/models/FrmEmail.php:390
4033
  #: classes/models/FrmEntryValues.php:264
4034
  msgid "Referrer"
4035
  msgstr ""
4036
 
4037
+ #: classes/models/FrmEmail.php:408
4038
  #: classes/models/FrmEntryValues.php:256
4039
  msgid "IP Address"
4040
  msgstr ""
4628
  #: classes/views/frm-fields/back-end/inline-modal.php:7
4629
  #: classes/views/frm-fields/back-end/inline-modal.php:8
4630
  #: classes/views/shared/admin-header.php:11
4631
+ #: js/formidable_admin.js:8324
4632
  msgid "Close"
4633
  msgstr ""
4634
 
4925
 
4926
  #: classes/views/frm-form-actions/form_action.php:21
4927
  #: classes/views/styles/_upsell-multiple-styles.php:15
4928
+ #: js/formidable_admin.js:2272
4929
  msgid "Duplicate"
4930
  msgstr ""
4931
 
5029
  msgid "Message"
5030
  msgstr ""
5031
 
5032
+ #: classes/views/frm-form-actions/_email_settings.php:115
5033
  msgid "Append IP Address, Browser, and Referring URL to message"
5034
  msgstr ""
5035
 
5036
+ #: classes/views/frm-form-actions/_email_settings.php:117
5037
  msgid "Append Browser and Referring URL to message"
5038
  msgstr ""
5039
 
5040
+ #: classes/views/frm-form-actions/_email_settings.php:124
5041
  msgid "Send Emails in Plain Text"
5042
  msgstr ""
5043
 
5054
  msgstr ""
5055
 
5056
  #: classes/views/frm-forms/add_field.php:29
5057
+ #: js/formidable_admin.js:1396
5058
+ #: js/formidable_admin.js:1399
5059
+ #: js/formidable_admin.js:2210
5060
  msgid "More Options"
5061
  msgstr ""
5062
 
6593
  msgid "Successfully copied embed example"
6594
  msgstr ""
6595
 
6596
+ #: js/formidable_admin.js:1357
6597
  msgid "Set Row Layout"
6598
  msgstr ""
6599
 
6600
+ #: js/formidable_admin.js:1364
6601
  msgid "Move Field Group"
6602
  msgstr ""
6603
 
6604
+ #: js/formidable_admin.js:2238
6605
  msgid "Field settings"
6606
  msgstr ""
6607
 
6608
+ #: js/formidable_admin.js:2266
6609
  msgid "Delete Group"
6610
  msgstr ""
6611
 
6612
+ #: js/formidable_admin.js:2272
6613
  msgid "Duplicate Group"
6614
  msgstr ""
6615
 
6616
+ #: js/formidable_admin.js:3643
6617
  msgid "Custom layout"
6618
  msgstr ""
6619
 
6620
+ #: js/formidable_admin.js:3666
6621
  msgid "Break into rows"
6622
  msgstr ""
6623
 
6624
+ #: js/formidable_admin.js:3676
6625
  msgid "Row Layout"
6626
  msgstr ""
6627
 
6628
+ #: js/formidable_admin.js:3921
6629
  msgid "Enter number of columns for each field"
6630
  msgstr ""
6631
 
6632
+ #: js/formidable_admin.js:3925
6633
  msgid "Layouts are based on a 12-column grid system"
6634
  msgstr ""
6635
 
6636
+ #: js/formidable_admin.js:3941
6637
  msgid "Save"
6638
  msgstr ""
6639
 
6640
+ #: js/formidable_admin.js:4267
6641
  msgid "Merge into row"
6642
  msgstr ""
6643
 
6644
  #. translators: %1$s: Number of fields that are selected to be deleted.
6645
+ #: js/formidable_admin.js:4355
6646
  msgid "Are you sure you want to delete these %1$s selected fields?"
6647
  msgstr ""
6648
 
6649
+ #: js/formidable_admin.js:5478
6650
  msgid "Duplicate option value \"%s\" detected"
6651
  msgstr ""
6652
 
6653
+ #: js/formidable_admin.js:7572
6654
  msgid "Ready Made Solution"
6655
  msgstr ""
6656
 
6657
+ #: js/formidable_admin.js:7575
6658
  msgid "Check all applications"
6659
  msgstr ""
6660
 
6661
+ #: js/formidable_admin.js:8309
6662
  msgid "Save and Reload"
6663
  msgstr ""
6664
+
6665
+ #: js/formidable_admin.js:8939
6666
+ msgid "Unable to install template"
6667
+ msgstr ""
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: forms, form builder, survey, free, custom form, contact form, form maker,
5
  Requires at least: 5.2
6
  Tested up to: 6.0.2
7
  Requires PHP: 5.6
8
- Stable tag: 5.5.1
9
 
10
  The most advanced WordPress forms plugin. Go beyond contact forms with our drag and drop form builder for surveys, quizzes, and more.
11
 
@@ -440,14 +440,31 @@ Using our Zapier integration, you can easily connect your website with over 1000
440
  See all <a href="https://zapier.com/apps/formidable/integrations">Formidable Zapier Integrations</a>.
441
 
442
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
443
  = 5.5.1 =
444
  * New: Email actions now use a rich text editor.
445
  * New: Added new frm_before_title, frm_before_submit_btn, and frm_after_submit_btn actions.
446
  * New: Image URLs used in options for radio and checkbox fields will now be included in XML exports, and used on import when the option to import files is on.
447
- * Fix: Prevent a bug that would sometimes cause a form to repeat 10 times when previewing in-theme.
448
  * Fix: Shortcode popup will now appear below textareas to avoid visibility issues with overlapping over content.
449
- * Fix: Prevent a fatal error in PHP8 where a field's field options data is in an unsupported format.
450
- * Fix: An entry with a name longer than 255 characters long would throw an error and never submit. It will now be truncated to a maximum of 255 characters instead.
451
  * Removed icon fonts from front end CSS when only Lite is loaded to significantly reduce CSS size where it is not required.
452
  * Updated styles for back end modals.
453
 
@@ -756,29 +773,4 @@ See all <a href="https://zapier.com/apps/formidable/integrations">Formidable Zap
756
  * Tweak: Improve the admin listing pages when nothing has been created.
757
  * Fix: Update the recaptcha for better reliability to catch more spam.
758
 
759
- = 4.06.03 =
760
- * More consistent dropdown styling with multiselect dropdowns.
761
- * Prepare the code for handling permissions options as an array of roles.
762
- * Fix: WP 5.5 - Email subject lines were coming through encoded.
763
- * Fix: WP 5.5 - When WP Mail SMTP was installed, the Formidable SMTP page has an error.
764
-
765
- = 4.05.02 =
766
- * New: Added frm_message_placement hook to show the message below the form
767
- * New: New classes that can be used in the class setting: frm_plain_success (Removes styling from the success message) and frm_below_success (Moves the success message below).
768
- * Add Formidable back to the admin bar. This is now a setting if the default WordPress v5.2+ behavior is desired.
769
- * Fix: Review requests were added to the inbox too frequently for sites with multiple admins.
770
- * Fix: Elementor conflict by using the glost $post in the admin area.
771
- * Fix: The color picker position in the styling settings was off for some options.
772
-
773
- = 4.05.01 =
774
- * Fix: The entry list wasn't always showing the entries.
775
- * Better sync between review requests in inbox and message.
776
-
777
- = 4.05 =
778
- * Updates to the default styling.
779
- * New: Added an inbox as a centralized place for notices and communication.
780
- * New: Added frm_color_block and frm_total_big classes for more beautiful forms.
781
- * Help prevent common email issues by showing a warning in the email settings when the from and to email addresses are the same.
782
- * Fix: Forms edited after export and reimported were losing the required indicator in some cases.
783
-
784
  <a href="https://raw.githubusercontent.com/Strategy11/formidable-forms/master/changelog.txt">See changelog for all versions</a>
5
  Requires at least: 5.2
6
  Tested up to: 6.0.2
7
  Requires PHP: 5.6
8
+ Stable tag: 5.5.2
9
 
10
  The most advanced WordPress forms plugin. Go beyond contact forms with our drag and drop form builder for surveys, quizzes, and more.
11
 
440
  See all <a href="https://zapier.com/apps/formidable/integrations">Formidable Zapier Integrations</a>.
441
 
442
  == Changelog ==
443
+ = 5.5.2 =
444
+ * New: When dragging a field or field group, a smaller drag helper will be used that is more consistent with the field type options in the sidebar, and the field that is being dragged will gray out.
445
+ * New: Improved error handling when installing templates from XML. A message will be shown when the simple XML extension is not installed, and errors will now be shown in a pop up when a template falls to install.
446
+ * New: Added a new frm_before_simple_form_render action that triggers before a Gutenberg block is rendered.
447
+ * New: Added a new frm_rich_text_emails filter for cases when a plain textarea may be preferred over rich text.
448
+ * New: Fields with floating labels now take up less space in the front end.
449
+ * Fix: When inserting a [default-plain] or [default-html] shortcode into a rich text editor, the shortcode would insert instead of changing dynamically as expected.
450
+ * Fix: Rich text HTML emails were not automatically using wpautop so line breaks were not appearing in emails as expected.
451
+ * Fix: Improved how drag and drop works when dragging multiple sections in a field group.
452
+ * Fix: Prevent a warning that would trigger when previewing in-theme when using Twenty Twenty One.
453
+ * Fix: Prevent a fatal error that would only ever happen once, immediately when upgrading to version 5.5 or higher from an older version.
454
+ * Fix: Prevent a fatal error that was preventing add ons from installing via API.
455
+ * Fix: Updated radio button styling on the Edit Entry page to fix visual issues at mobile screen sizes.
456
+ * Embed examples no longer include title=true and description=true.
457
+ * License types will no longer appear as application template category options.
458
+ * Plain text email actions will no longer use a rich text editor.
459
+
460
  = 5.5.1 =
461
  * New: Email actions now use a rich text editor.
462
  * New: Added new frm_before_title, frm_before_submit_btn, and frm_after_submit_btn actions.
463
  * New: Image URLs used in options for radio and checkbox fields will now be included in XML exports, and used on import when the option to import files is on.
464
+ * Fix: Prevent a bug that would sometimes cause a form to repeat when previewing in-theme.
465
  * Fix: Shortcode popup will now appear below textareas to avoid visibility issues with overlapping over content.
466
+ * Fix: Prevent a fatal error in PHP8 where a field's options data is in an unsupported format.
467
+ * Fix: An entry with a name longer than 255 characters long would throw an error and never submit. It will now be truncated to a maximum of 255 characters.
468
  * Removed icon fonts from front end CSS when only Lite is loaded to significantly reduce CSS size where it is not required.
469
  * Updated styles for back end modals.
470
 
773
  * Tweak: Improve the admin listing pages when nothing has been created.
774
  * Fix: Update the recaptcha for better reliability to catch more spam.
775
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
776
  <a href="https://raw.githubusercontent.com/Strategy11/formidable-forms/master/changelog.txt">See changelog for all versions</a>