Formidable Forms – Form Builder for WordPress - Version 5.2

Version Description

  • Increased WP version requirement to 5.2.
  • New: Added a new Embed Form modal and a new Embed button that appears in the form builder and form settings pages beside Preview and Update. Now a form can be embedded into a new page or an existing page with just a few clicks.
  • Fix: A Notice was being logged that wp_enqueue_script() was called incorrectly when loading the new Widgets editor since WordPress 5.8.
  • Fix: An unexpected array value in form data would cause some text fields to break in PHP8.
  • Fix: Some AJAX calls for API loaded forms were occasionally targeting the wrong site, causing unwanted redirects.
  • Fix: Dropdown field options were including redundant class="" HTML that has been removed.
Download this release

Release Info

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

Code changes from version 5.1 to 5.2

classes/controllers/FrmAppController.php CHANGED
@@ -15,8 +15,11 @@ class FrmAppController {
15
  add_menu_page( 'Formidable', $menu_name, 'frm_view_forms', 'formidable', 'FrmFormsController::route', self::menu_icon(), self::get_menu_position() );
16
  }
17
 
 
 
 
18
  private static function get_menu_position() {
19
- return apply_filters( 'frm_menu_position', '29.3' );
20
  }
21
 
22
  /**
@@ -434,6 +437,9 @@ class FrmAppController {
434
  }
435
  }
436
 
 
 
 
437
  public static function admin_js() {
438
  $version = FrmAppHelper::plugin_version();
439
  FrmAppHelper::load_admin_wide_js();
@@ -458,6 +464,15 @@ class FrmAppController {
458
  wp_register_script( 'bootstrap_tooltip', FrmAppHelper::plugin_url() . '/js/bootstrap.min.js', array( 'jquery' ), '3.4.1' );
459
  wp_register_style( 'formidable-grids', FrmAppHelper::plugin_url() . '/css/frm_grids.css', array(), $version );
460
 
 
 
 
 
 
 
 
 
 
461
  // load multselect js
462
  $depends_on = array( 'jquery', 'bootstrap_tooltip' );
463
  wp_register_script( 'bootstrap-multiselect', FrmAppHelper::plugin_url() . '/js/bootstrap-multiselect.js', $depends_on, '1.1.1', true );
@@ -466,7 +481,7 @@ class FrmAppController {
466
  $post_type = FrmAppHelper::simple_get( 'post_type', 'sanitize_title' );
467
 
468
  global $pagenow;
469
- if ( strpos( $page, 'formidable' ) === 0 || ( $pagenow == 'edit.php' && $post_type == 'frm_display' ) ) {
470
 
471
  wp_enqueue_script( 'admin-widgets' );
472
  wp_enqueue_style( 'widgets' );
@@ -502,7 +517,7 @@ class FrmAppController {
502
  return;
503
  }
504
 
505
- if ( $post_type == 'frm_display' ) {
506
  wp_enqueue_style( 'formidable-grids' );
507
  wp_enqueue_script( 'jquery-ui-draggable' );
508
  wp_enqueue_script( 'formidable_admin' );
@@ -511,6 +526,95 @@ class FrmAppController {
511
  self::include_info_overlay();
512
  }
513
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
514
  }
515
 
516
  public static function load_lang() {
@@ -678,6 +782,17 @@ class FrmAppController {
678
  return $text;
679
  }
680
 
 
 
 
 
 
 
 
 
 
 
 
681
  /**
682
  * @deprecated 1.07.05
683
  * @codeCoverageIgnore
15
  add_menu_page( 'Formidable', $menu_name, 'frm_view_forms', 'formidable', 'FrmFormsController::route', self::menu_icon(), self::get_menu_position() );
16
  }
17
 
18
+ /**
19
+ * @return int
20
+ */
21
  private static function get_menu_position() {
22
+ return (int) apply_filters( 'frm_menu_position', 29 );
23
  }
24
 
25
  /**
437
  }
438
  }
439
 
440
+ /**
441
+ * @return void
442
+ */
443
  public static function admin_js() {
444
  $version = FrmAppHelper::plugin_version();
445
  FrmAppHelper::load_admin_wide_js();
464
  wp_register_script( 'bootstrap_tooltip', FrmAppHelper::plugin_url() . '/js/bootstrap.min.js', array( 'jquery' ), '3.4.1' );
465
  wp_register_style( 'formidable-grids', FrmAppHelper::plugin_url() . '/css/frm_grids.css', array(), $version );
466
 
467
+ if ( 'formidable' === FrmAppHelper::simple_get( 'page', 'sanitize_title' ) ) {
468
+ $action = FrmAppHelper::get_param( 'frm_action', '', 'sanitize_title' );
469
+ $is_form_index = ! $action || in_array( $action, array( 'list', 'trash' ), true );
470
+ if ( $is_form_index ) {
471
+ // For the existing page dropdown in the Form embed modal.
472
+ wp_enqueue_script( 'jquery-ui-autocomplete' );
473
+ }
474
+ }
475
+
476
  // load multselect js
477
  $depends_on = array( 'jquery', 'bootstrap_tooltip' );
478
  wp_register_script( 'bootstrap-multiselect', FrmAppHelper::plugin_url() . '/js/bootstrap-multiselect.js', $depends_on, '1.1.1', true );
481
  $post_type = FrmAppHelper::simple_get( 'post_type', 'sanitize_title' );
482
 
483
  global $pagenow;
484
+ if ( strpos( $page, 'formidable' ) === 0 || ( $pagenow === 'edit.php' && $post_type === 'frm_display' ) ) {
485
 
486
  wp_enqueue_script( 'admin-widgets' );
487
  wp_enqueue_style( 'widgets' );
517
  return;
518
  }
519
 
520
+ if ( $post_type === 'frm_display' ) {
521
  wp_enqueue_style( 'formidable-grids' );
522
  wp_enqueue_script( 'jquery-ui-draggable' );
523
  wp_enqueue_script( 'formidable_admin' );
526
  self::include_info_overlay();
527
  }
528
  }
529
+
530
+ self::maybe_force_formidable_block_on_gutenberg_page();
531
+ }
532
+
533
+ /**
534
+ * Automatically insert a Formidable block when loading Gutenberg with a $_GET['frmForm'] value set.
535
+ *
536
+ * @since 5.2
537
+ *
538
+ * @return void
539
+ */
540
+ private static function maybe_force_formidable_block_on_gutenberg_page() {
541
+ global $pagenow;
542
+ if ( 'post.php' !== $pagenow ) {
543
+ return;
544
+ }
545
+
546
+ $form_id = FrmAppHelper::simple_get( 'frmForm', 'absint' );
547
+ if ( ! $form_id ) {
548
+ return;
549
+ }
550
+
551
+ ?>
552
+ <script>
553
+ ( function() {
554
+ const handleDomReady = () => {
555
+ if ( 'undefined' === typeof wp || 'undefined' === typeof wp.data || 'function' !== typeof wp.data.subscribe ) {
556
+ return;
557
+ }
558
+
559
+ const closeListener = wp.data.subscribe(
560
+ () => {
561
+ const editor = wp.data.select( 'core/editor' );
562
+
563
+ if ( 'function' !== typeof editor.__unstableIsEditorReady ) {
564
+ closeListener();
565
+ return;
566
+ }
567
+
568
+ const isReady = editor.__unstableIsEditorReady();
569
+ if ( isReady ) {
570
+ closeListener();
571
+ requestAnimationFrame( () => injectFormidableBlock() );
572
+ }
573
+ }
574
+ );
575
+ }
576
+
577
+ document.addEventListener( 'DOMContentLoaded', handleDomReady );
578
+
579
+ const injectFormidableBlock = () => {
580
+ insertedBlock = wp.blocks.createBlock(
581
+ 'formidable/simple-form',
582
+ {
583
+ formId: '<?php echo absint( $form_id ); ?>'
584
+ }
585
+ );
586
+
587
+ const getBlocks = () => wp.data.select( 'core/editor' ).getBlocks();
588
+ const blockList = getBlocks();
589
+
590
+ const closeListener = wp.data.subscribe(
591
+ () => {
592
+ const currentBlocks = getBlocks();
593
+ if ( currentBlocks === blockList ) {
594
+ return;
595
+ }
596
+
597
+ closeListener();
598
+ const block = currentBlocks[ currentBlocks.length - 1 ];
599
+ const interval = setInterval(
600
+ () => {
601
+ const scrollTarget = document.getElementById( 'block-' + block.clientId );
602
+ const form = scrollTarget.querySelector( 'form' );
603
+ if ( form ) {
604
+ scrollTarget.scrollIntoView({ behavior: 'smooth' });
605
+ clearInterval( interval );
606
+ }
607
+ },
608
+ 50
609
+ );
610
+ }
611
+ );
612
+
613
+ wp.data.dispatch( 'core/block-editor' ).insertBlocks( insertedBlock );
614
+ };
615
+ }() );
616
+ </script>
617
+ <?php
618
  }
619
 
620
  public static function load_lang() {
782
  return $text;
783
  }
784
 
785
+ /**
786
+ * Include icons on page for Embed Form modal.
787
+ *
788
+ * @since 5.2
789
+ *
790
+ * @return void
791
+ */
792
+ public static function include_embed_form_icons() {
793
+ require_once FrmAppHelper::plugin_path() . '/classes/views/frm-forms/_embed_form_icons.php';
794
+ }
795
+
796
  /**
797
  * @deprecated 1.07.05
798
  * @codeCoverageIgnore
classes/controllers/FrmFormsController.php CHANGED
@@ -788,7 +788,7 @@ class FrmFormsController {
788
  $columns['name'] = __( 'Form Title', 'formidable' );
789
  $columns['entries'] = __( 'Entries', 'formidable' );
790
  $columns['form_key'] = __( 'Key', 'formidable' );
791
- $columns['shortcode'] = __( 'Shortcodes', 'formidable' );
792
  }
793
 
794
  $columns['created_at'] = __( 'Date', 'formidable' );
@@ -2285,6 +2285,79 @@ class FrmFormsController {
2285
  return FrmAppHelper::plugin_path() . '/classes/views/frm-forms/';
2286
  }
2287
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2288
  /**
2289
  * @deprecated 4.0
2290
  */
788
  $columns['name'] = __( 'Form Title', 'formidable' );
789
  $columns['entries'] = __( 'Entries', 'formidable' );
790
  $columns['form_key'] = __( 'Key', 'formidable' );
791
+ $columns['shortcode'] = __( 'Actions', 'formidable' );
792
  }
793
 
794
  $columns['created_at'] = __( 'Date', 'formidable' );
2285
  return FrmAppHelper::plugin_path() . '/classes/views/frm-forms/';
2286
  }
2287
 
2288
+ /**
2289
+ * Create a page with an embedded formidable Gutenberg block.
2290
+ *
2291
+ * @since 5.2
2292
+ *
2293
+ * @return never
2294
+ */
2295
+ public static function create_page_with_shortcode() {
2296
+ if ( ! current_user_can( 'publish_posts' ) ) {
2297
+ die( 0 );
2298
+ }
2299
+
2300
+ check_ajax_referer( 'frm_ajax', 'nonce' );
2301
+
2302
+ $form_id = FrmAppHelper::get_post_param( 'form_id', '', 'absint' );
2303
+ if ( ! $form_id ) {
2304
+ die( 0 );
2305
+ }
2306
+
2307
+ $postarr = array(
2308
+ 'post_type' => 'page',
2309
+ 'post_content' => '<!-- wp:formidable/simple-form {"formId":"' . $form_id . '"} --><div>[formidable id="' . $form_id . '"]</div><!-- /wp:formidable/simple-form -->',
2310
+ );
2311
+
2312
+ $name = FrmAppHelper::get_post_param( 'name', '', 'sanitize_text_field' );
2313
+ if ( $name ) {
2314
+ $postarr['post_title'] = $name;
2315
+ }
2316
+
2317
+ $success = wp_insert_post( $postarr );
2318
+ if ( ! is_numeric( $success ) || ! $success ) {
2319
+ die( 0 );
2320
+ }
2321
+
2322
+ wp_send_json(
2323
+ array(
2324
+ 'redirect' => get_edit_post_link( $success, 'redirect' ),
2325
+ )
2326
+ );
2327
+ }
2328
+
2329
+ /**
2330
+ * Get page dropdown for AJAX request for embedding form in an existing page.
2331
+ *
2332
+ * @return never
2333
+ */
2334
+ public static function get_page_dropdown() {
2335
+ if ( ! current_user_can( 'publish_posts' ) ) {
2336
+ die( 0 );
2337
+ }
2338
+
2339
+ check_ajax_referer( 'frm_ajax', 'nonce' );
2340
+
2341
+ $html = FrmAppHelper::clip(
2342
+ function() {
2343
+ FrmAppHelper::maybe_autocomplete_pages_options(
2344
+ array(
2345
+ 'field_name' => 'frm_page_dropdown',
2346
+ 'page_id' => '',
2347
+ 'placeholder' => __( 'Select a Page', 'formidable' ),
2348
+ )
2349
+ );
2350
+ }
2351
+ );
2352
+ $post_type_object = get_post_type_object( 'page' );
2353
+ wp_send_json(
2354
+ array(
2355
+ 'html' => $html,
2356
+ 'edit_page_url' => admin_url( sprintf( $post_type_object->_edit_link . '&action=edit', 0 ) ),
2357
+ )
2358
+ );
2359
+ }
2360
+
2361
  /**
2362
  * @deprecated 4.0
2363
  */
classes/controllers/FrmHooksController.php CHANGED
@@ -201,6 +201,8 @@ class FrmHooksController {
201
  add_action( 'wp_ajax_frm_forms_trash', 'FrmFormsController::ajax_trash' );
202
  add_action( 'wp_ajax_frm_install_form', 'FrmFormsController::build_new_form' );
203
  add_action( 'wp_ajax_frm_build_template', 'FrmFormsController::build_template' );
 
 
204
 
205
  add_action( 'wp_ajax_frm_dismiss_migrator', 'FrmFormMigratorsHelper::dismiss_migrator' );
206
 
201
  add_action( 'wp_ajax_frm_forms_trash', 'FrmFormsController::ajax_trash' );
202
  add_action( 'wp_ajax_frm_install_form', 'FrmFormsController::build_new_form' );
203
  add_action( 'wp_ajax_frm_build_template', 'FrmFormsController::build_template' );
204
+ add_action( 'wp_ajax_frm_create_page_with_shortcode', 'FrmFormsController::create_page_with_shortcode' );
205
+ add_action( 'wp_ajax_get_page_dropdown', 'FrmFormsController::get_page_dropdown' );
206
 
207
  add_action( 'wp_ajax_frm_dismiss_migrator', 'FrmFormMigratorsHelper::dismiss_migrator' );
208
 
classes/controllers/FrmSimpleBlocksController.php CHANGED
@@ -14,7 +14,7 @@ class FrmSimpleBlocksController {
14
  wp_register_script(
15
  'formidable-form-selector',
16
  FrmAppHelper::plugin_url() . '/js/formidable_blocks.js',
17
- array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components', 'wp-editor' ),
18
  $version,
19
  true
20
  );
14
  wp_register_script(
15
  'formidable-form-selector',
16
  FrmAppHelper::plugin_url() . '/js/formidable_blocks.js',
17
+ array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components', 'wp-block-editor' ),
18
  $version,
19
  true
20
  );
classes/controllers/FrmStylesController.php CHANGED
@@ -448,19 +448,31 @@ class FrmStylesController {
448
  $defaults = $frm_style->get_defaults();
449
  $style = '';
450
 
451
- include( FrmAppHelper::plugin_path() . '/css/_single_theme.css.php' );
452
  wp_die();
453
  }
454
 
 
 
 
455
  public static function load_saved_css() {
456
  $css = get_transient( 'frmpro_css' );
457
 
458
  ob_start();
459
- include( FrmAppHelper::plugin_path() . '/css/custom_theme.css.php' );
460
  $output = ob_get_clean();
 
461
 
462
- echo self::replace_relative_url( $output ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
 
 
 
 
 
 
 
463
 
 
464
  wp_die();
465
  }
466
 
448
  $defaults = $frm_style->get_defaults();
449
  $style = '';
450
 
451
+ include FrmAppHelper::plugin_path() . '/css/_single_theme.css.php';
452
  wp_die();
453
  }
454
 
455
+ /**
456
+ * @return void
457
+ */
458
  public static function load_saved_css() {
459
  $css = get_transient( 'frmpro_css' );
460
 
461
  ob_start();
462
+ include FrmAppHelper::plugin_path() . '/css/custom_theme.css.php';
463
  $output = ob_get_clean();
464
+ $output = self::replace_relative_url( $output );
465
 
466
+ /**
467
+ * The API needs to load font icons through a custom URL.
468
+ *
469
+ * @since 5.2
470
+ *
471
+ * @param string $output
472
+ */
473
+ $output = apply_filters( 'frm_saved_css', $output );
474
 
475
+ echo $output; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
476
  wp_die();
477
  }
478
 
classes/helpers/FrmAppHelper.php CHANGED
@@ -11,7 +11,7 @@ class FrmAppHelper {
11
  /**
12
  * @since 2.0
13
  */
14
- public static $plug_version = '5.1';
15
 
16
  /**
17
  * @since 1.07.02
11
  /**
12
  * @since 2.0
13
  */
14
+ public static $plug_version = '5.2';
15
 
16
  /**
17
  * @since 1.07.02
classes/helpers/FrmFormsListHelper.php CHANGED
@@ -249,10 +249,8 @@ class FrmFormsListHelper extends FrmListHelper {
249
  $val = '<abbr title="' . esc_attr( gmdate( 'Y/m/d g:i:s A', strtotime( $item->created_at ) ) ) . '">' . $date . '</abbr>';
250
  break;
251
  case 'shortcode':
252
- $val = '<input type="text" readonly="readonly" class="frm_select_box" value="' . esc_attr( '[formidable id=' . $item->id . ']' ) . '" /><br/>';
253
- if ( 'excerpt' == $mode ) {
254
- $val .= '<input type="text" readonly="readonly" class="frm_select_box" value="' . esc_attr( '[formidable key=' . $item->form_key . ']' ) . '" />';
255
- }
256
  break;
257
  case 'entries':
258
  if ( isset( $item->options['no_save'] ) && $item->options['no_save'] ) {
249
  $val = '<abbr title="' . esc_attr( gmdate( 'Y/m/d g:i:s A', strtotime( $item->created_at ) ) ) . '">' . $date . '</abbr>';
250
  break;
251
  case 'shortcode':
252
+ $val = '<a href="#" class="frm-embed-form" role="button" aria-label="' . esc_html__( 'Embed Form', 'formidable' ) . '">' . FrmAppHelper::icon_by_class( 'frmfont frm_code_icon', array( 'echo' => false ) ) . '</a>';
253
+ $val = apply_filters( 'frm_form_list_actions', $val, array( 'form' => $item ) );
 
 
254
  break;
255
  case 'entries':
256
  if ( isset( $item->options['no_save'] ) && $item->options['no_save'] ) {
classes/models/fields/FrmFieldType.php CHANGED
@@ -859,9 +859,14 @@ DEFAULT_HTML;
859
  * If the value includes intentional entities, don't lose them.
860
  *
861
  * @since 4.03.01
 
 
862
  */
863
  protected function prepare_esc_value() {
864
  $value = $this->field['value'];
 
 
 
865
  if ( strpos( $value, '&lt;' ) !== false ) {
866
  $value = htmlentities( $value );
867
  }
859
  * If the value includes intentional entities, don't lose them.
860
  *
861
  * @since 4.03.01
862
+ *
863
+ * @return string
864
  */
865
  protected function prepare_esc_value() {
866
  $value = $this->field['value'];
867
+ if ( is_array( $value ) ) {
868
+ $value = implode( ', ', $value );
869
+ }
870
  if ( strpos( $value, '&lt;' ) !== false ) {
871
  $value = htmlentities( $value );
872
  }
classes/views/frm-fields/front-end/dropdown-field.php CHANGED
@@ -23,16 +23,18 @@ if ( isset( $field['post_field'] ) && $field['post_field'] == 'post_category' &&
23
 
24
  $placeholder = FrmFieldsController::add_placeholder_to_select( $field );
25
 
26
- $skipped = false;
27
- $other_opt = false;
28
  $other_checked = false;
 
29
  if ( empty( $field['options'] ) ) {
30
  $field['options'] = array();
31
  }
 
32
  foreach ( $field['options'] as $opt_key => $opt ) {
33
  $field_val = FrmFieldsHelper::get_value_from_array( $opt, $opt_key, $field );
34
- $opt = FrmFieldsHelper::get_label_from_array( $opt, $opt_key, $field );
35
- $selected = FrmAppHelper::check_selected( $field['value'], $field_val );
36
  if ( $other_opt === false ) {
37
  $other_args = FrmFieldsHelper::prepare_other_input( compact( 'field', 'field_name', 'opt_key' ), $other_opt, $selected );
38
  if ( FrmFieldsHelper::is_other_opt( $opt_key ) && $selected ) {
@@ -44,11 +46,24 @@ if ( isset( $field['post_field'] ) && $field['post_field'] == 'post_category' &&
44
  $skipped = true;
45
  continue;
46
  }
 
 
 
 
 
 
 
 
 
 
47
  ?>
48
- <option value="<?php echo esc_attr( $field_val ); ?>" <?php echo $selected ? ' selected="selected"' : ''; ?> class="<?php echo esc_attr( FrmFieldsHelper::is_other_opt( $opt_key ) ? 'frm_other_trigger' : '' ); ?>">
49
  <?php echo esc_html( $opt == '' ? ' ' : $opt ); ?>
50
  </option>
51
- <?php } ?>
 
 
 
52
  </select>
53
  <?php
54
 
@@ -57,12 +72,12 @@ if ( isset( $field['post_field'] ) && $field['post_field'] == 'post_category' &&
57
  array(
58
  'other_opt' => $other_opt,
59
  'read_only' => $read_only,
60
- 'checked' => $other_checked,
61
- 'name' => $other_args['name'],
62
- 'value' => $other_args['value'],
63
- 'field' => $field,
64
- 'html_id' => $html_id,
65
- 'opt_key' => false,
66
  )
67
  );
68
  }
23
 
24
  $placeholder = FrmFieldsController::add_placeholder_to_select( $field );
25
 
26
+ $skipped = false;
27
+ $other_opt = false;
28
  $other_checked = false;
29
+
30
  if ( empty( $field['options'] ) ) {
31
  $field['options'] = array();
32
  }
33
+
34
  foreach ( $field['options'] as $opt_key => $opt ) {
35
  $field_val = FrmFieldsHelper::get_value_from_array( $opt, $opt_key, $field );
36
+ $opt = FrmFieldsHelper::get_label_from_array( $opt, $opt_key, $field );
37
+ $selected = FrmAppHelper::check_selected( $field['value'], $field_val );
38
  if ( $other_opt === false ) {
39
  $other_args = FrmFieldsHelper::prepare_other_input( compact( 'field', 'field_name', 'opt_key' ), $other_opt, $selected );
40
  if ( FrmFieldsHelper::is_other_opt( $opt_key ) && $selected ) {
46
  $skipped = true;
47
  continue;
48
  }
49
+
50
+ $option_params = array(
51
+ 'value' => $field_val,
52
+ );
53
+ if ( $selected ) {
54
+ $option_params['selected'] = 'selected';
55
+ }
56
+ if ( FrmFieldsHelper::is_other_opt( $opt_key ) ) {
57
+ $option_params['class'] = 'frm_other_trigger';
58
+ }
59
  ?>
60
+ <option <?php FrmAppHelper::array_to_html_params( $option_params, true ); ?>>
61
  <?php echo esc_html( $opt == '' ? ' ' : $opt ); ?>
62
  </option>
63
+ <?php
64
+ unset( $option_params );
65
+ }
66
+ ?>
67
  </select>
68
  <?php
69
 
72
  array(
73
  'other_opt' => $other_opt,
74
  'read_only' => $read_only,
75
+ 'checked' => $other_checked,
76
+ 'name' => $other_args['name'],
77
+ 'value' => $other_args['value'],
78
+ 'field' => $field,
79
+ 'html_id' => $html_id,
80
+ 'opt_key' => false,
81
  )
82
  );
83
  }
classes/views/frm-forms/_embed_form_icons.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ die( 'You are not allowed to call this page directly.' );
4
+ }
5
+ ?>
6
+ <div class="frm_hidden">
7
+ <?php
8
+ FrmAppHelper::icon_by_class( 'frmfont frm_clone_icon' );
9
+ FrmAppHelper::icon_by_class( 'frmfont frm_file_icon' );
10
+ ?>
11
+ <svg id="frm_copy_embed_form_icon" class="frmsvg">
12
+ <use xlink:href="#frm_clone_icon"></use>
13
+ </svg>
14
+ <svg id="frm_select_existing_page_icon" class="frmsvg">
15
+ <use xlink:href="#frm_file_icon"></use>
16
+ </svg>
17
+ <svg id="frm_create_new_page_icon" class="frmsvg">
18
+ <use xlink:href="#frm_plus_icon"></use>
19
+ </svg>
20
+ <svg id="frm_insert_manually_icon" class="frmsvg">
21
+ <use xlink:href="#frm_code_icon"></use>
22
+ </svg>
23
+ </div>
classes/views/frm-forms/_publish_box.php CHANGED
@@ -3,7 +3,9 @@ if ( ! defined( 'ABSPATH' ) ) {
3
  die( 'You are not allowed to call this page directly.' );
4
  }
5
 
6
- if ( 'settings' == FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ) ) {
 
 
7
  $class = 'frm_submit_settings_btn';
8
  } else {
9
  $class = 'frm_submit_' . ( ( isset( $values['ajax_load'] ) && $values['ajax_load'] ) ? '' : 'no_' ) . 'ajax';
@@ -42,4 +44,8 @@ if ( 'settings' == FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ) )
42
  <?php } ?>
43
  </div>
44
 
 
 
 
 
45
  <div class="clear"></div>
3
  die( 'You are not allowed to call this page directly.' );
4
  }
5
 
6
+ FrmAppController::include_embed_form_icons();
7
+
8
+ if ( 'settings' === FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ) ) {
9
  $class = 'frm_submit_settings_btn';
10
  } else {
11
  $class = 'frm_submit_' . ( ( isset( $values['ajax_load'] ) && $values['ajax_load'] ) ? '' : 'no_' ) . 'ajax';
44
  <?php } ?>
45
  </div>
46
 
47
+ <a id="frm-embed-action" href="#" role="button" class="frm_submit_form button-secondary frm-button-secondary frm_button_submit">
48
+ <?php esc_html_e( 'Embed', 'formidable' ); ?>
49
+ </a>
50
+
51
  <div class="clear"></div>
classes/views/frm-forms/list.php CHANGED
@@ -12,6 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
12
  'import_link' => true,
13
  )
14
  );
 
15
  ?>
16
  <div class="wrap">
17
  <?php
@@ -46,3 +47,4 @@ if ( $wp_list_table->total_items === 1 && empty( $_REQUEST['s'] ) && $wp_list_ta
46
  <?php do_action( 'frm_page_footer', array( 'table' => $wp_list_table ) ); ?>
47
  </div>
48
  </div>
 
12
  'import_link' => true,
13
  )
14
  );
15
+ FrmAppController::include_embed_form_icons();
16
  ?>
17
  <div class="wrap">
18
  <?php
47
  <?php do_action( 'frm_page_footer', array( 'table' => $wp_list_table ) ); ?>
48
  </div>
49
  </div>
50
+
classes/views/frm-forms/new-form-overlay.php CHANGED
@@ -3,7 +3,7 @@ if ( ! defined( 'ABSPATH' ) ) {
3
  die( 'You are not allowed to call this page directly.' );
4
  }
5
  ?>
6
- <div id="frm_new_form_modal" class="frm_hidden <?php echo esc_attr( $modal_class ); ?>" frm-page="create">
7
  <div class="metabox-holder">
8
  <div class="postbox">
9
  <div>
3
  die( 'You are not allowed to call this page directly.' );
4
  }
5
  ?>
6
+ <div id="frm_new_form_modal" class="frm_hidden frm_common_modal <?php echo esc_attr( $modal_class ); ?>" frm-page="create">
7
  <div class="metabox-holder">
8
  <div class="postbox">
9
  <div>
classes/views/frm-forms/settings-advanced.php CHANGED
@@ -29,26 +29,7 @@ if ( ! defined( 'ABSPATH' ) ) {
29
  <textarea id="frm_form_description" name="description" cols="50" rows="4"><?php echo FrmAppHelper::esc_textarea( $values['description'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></textarea>
30
  </p>
31
 
32
-
33
  <?php if ( ! $values['is_template'] ) { ?>
34
- <p class="frm6 frm_form_field">
35
- <label>
36
- <?php esc_html_e( 'Embed Shortcode', 'formidable' ); ?>
37
- </label>
38
- <input type="text" readonly="readonly" class="frm_select_box" value="[formidable id=<?php echo esc_attr( $values['id'] ); ?>]" />
39
- </p>
40
- <p class="frm6 frm_form_field">
41
- <label>&nbsp;</label>
42
- <input type="text" readonly="readonly" class="frm_select_box" value="[formidable id=<?php echo esc_attr( $values['id'] ); ?> title=true description=true]" />
43
- </p>
44
-
45
- <a href="#edit_frm_shortcode" class="edit-frm_shortcode hide-if-no-js" tabindex='4'><?php esc_html_e( 'Insert with PHP', 'formidable' ); ?></a>
46
- <p id="frm_shortcodediv" class="hide-if-js">
47
- <label>
48
- <?php esc_html_e( 'Embed in Template', 'formidable' ); ?>
49
- </label>
50
- <input type="text" readonly="readonly" class="frm_select_box frm_insert_in_template" value="&lt;?php echo FrmFormsController::get_form_shortcode( array( 'id' => <?php echo absint( $values['id'] ); ?>, 'title' => false, 'description' => false ) ); ?&gt;" />
51
- </p>
52
  <?php $first_h3 = ''; ?>
53
 
54
  <?php if ( has_action( 'frm_settings_buttons' ) ) { ?>
29
  <textarea id="frm_form_description" name="description" cols="50" rows="4"><?php echo FrmAppHelper::esc_textarea( $values['description'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></textarea>
30
  </p>
31
 
 
32
  <?php if ( ! $values['is_template'] ) { ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  <?php $first_h3 = ''; ?>
34
 
35
  <?php if ( has_action( 'frm_settings_buttons' ) ) { ?>
css/frm_admin.css CHANGED
@@ -309,6 +309,10 @@ ul.frm_form_nav > li {
309
  display: inline-block;
310
  }
311
 
 
 
 
 
312
  .post-type-frm_display #advanced-sortables h2.hndle,
313
  .post-type-frm_display #side-sortables h2.hndle,
314
  .post-type-frm_display #normal-sortables h2.hndle,
@@ -451,7 +455,8 @@ ul.frm_form_nav > li {
451
  #frm-preview-action,
452
  #frm-publishing > input[type=submit],
453
  #frm-publishing > .button,
454
- #frm-publishing > button {
 
455
  float: right;
456
  margin: 0 10px 0 0;
457
  }
@@ -1867,25 +1872,25 @@ h2.frm-h2 + .howto {
1867
  overflow: hidden;
1868
  }
1869
 
1870
- #frm_new_form_modal .postbox > div:first-child {
1871
  padding: 30px 20px;
1872
  position: relative;
1873
  border-bottom: 1px solid var(--grey-border);
1874
  }
1875
 
1876
- #frm_new_form_modal .postbox > div:first-child > div:first-child {
1877
  display: inline-block;
1878
  font-size: 24px;
1879
  color: #282F36;
1880
  }
1881
 
1882
- #frm_new_form_modal .postbox > div:first-child > div:last-child {
1883
  position: absolute;
1884
  right: 20px;
1885
  top: 37px;
1886
  }
1887
 
1888
- #frm_new_form_modal .postbox > div:first-child > div:last-child a {
1889
  color: var(--grey);
1890
  }
1891
 
@@ -2359,6 +2364,112 @@ li[data-preview] .frm-hover-icons .frm-preview-form,
2359
  margin-left: -1em;
2360
  }
2361
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2362
  /* Bulk Options */
2363
  #frm-bulk-modal .frm_grid_container {
2364
  border-top: 1px solid var(--grey-border);
309
  display: inline-block;
310
  }
311
 
312
+ ul.frm_form_nav > li:last-of-type {
313
+ margin-right: 0;
314
+ }
315
+
316
  .post-type-frm_display #advanced-sortables h2.hndle,
317
  .post-type-frm_display #side-sortables h2.hndle,
318
  .post-type-frm_display #normal-sortables h2.hndle,
455
  #frm-preview-action,
456
  #frm-publishing > input[type=submit],
457
  #frm-publishing > .button,
458
+ #frm-publishing > button,
459
+ #frm-embed-action {
460
  float: right;
461
  margin: 0 10px 0 0;
462
  }
1872
  overflow: hidden;
1873
  }
1874
 
1875
+ #wpwrap ~ .frm-dialog .frm_common_modal .postbox > div:first-child {
1876
  padding: 30px 20px;
1877
  position: relative;
1878
  border-bottom: 1px solid var(--grey-border);
1879
  }
1880
 
1881
+ #wpwrap ~ .frm-dialog .frm_common_modal .postbox > div:first-child > div:first-child {
1882
  display: inline-block;
1883
  font-size: 24px;
1884
  color: #282F36;
1885
  }
1886
 
1887
+ #wpwrap ~ .frm-dialog .frm_common_modal .postbox > div:first-child > div:last-child {
1888
  position: absolute;
1889
  right: 20px;
1890
  top: 37px;
1891
  }
1892
 
1893
+ #wpwrap ~ .frm-dialog .frm_common_modal .postbox > div:first-child > div:last-child a {
1894
  color: var(--grey);
1895
  }
1896
 
2364
  margin-left: -1em;
2365
  }
2366
 
2367
+ /* Embed Form Modal */
2368
+
2369
+ #frm_form_embed_modal label {
2370
+ font-size: 14px;
2371
+ line-height: 25px;
2372
+ color: rgba(40, 47, 54, 0.8);
2373
+ font-weight: 600;
2374
+ }
2375
+
2376
+ .frm_embed_form_content {
2377
+ padding: 20px;
2378
+ }
2379
+
2380
+ .frm_embed_form_content.frm-loading-page-options {
2381
+ display: flex;
2382
+ justify-content: center;
2383
+ }
2384
+
2385
+ #frm_form_embed_modal .frm_embed_example {
2386
+ background: #F6F7FB;
2387
+ border: 1px solid #E3E8EB;
2388
+ border-radius: 6px;
2389
+ color: rgba(40, 47, 54, 0.85);
2390
+ font-size: 14px;
2391
+ padding: 10px 30px 10px 10px;
2392
+ width: 100%;
2393
+ margin-bottom: 15px;
2394
+ height: auto !important;
2395
+ resize: none;
2396
+ }
2397
+
2398
+ #frm_form_embed_modal textarea.frm_embed_example {
2399
+ padding-bottom: 0;
2400
+ }
2401
+
2402
+ .frm_embed_form_content > div a {
2403
+ position: absolute;
2404
+ right: 0;
2405
+ top: 8px;
2406
+ }
2407
+
2408
+ .frm_embed_form_content > div {
2409
+ position: relative;
2410
+ }
2411
+
2412
+ .frm_embed_form_content svg[id^="frm_copy_embed_"] {
2413
+ position: absolute;
2414
+ top: 35px;
2415
+ right: 10px;
2416
+ cursor: pointer;
2417
+ opacity: 0.5;
2418
+ }
2419
+
2420
+ .frm-embed-modal-option {
2421
+ border-radius: 6px;
2422
+ border: 1px solid #E3E8EB;
2423
+ padding: 20px;
2424
+ cursor: pointer;
2425
+ }
2426
+
2427
+ .frm-embed-modal-option + .frm-embed-modal-option {
2428
+ margin-top: 10px;
2429
+ }
2430
+
2431
+ #frm_form_embed_modal .frm-modal-cancel {
2432
+ display: none;
2433
+ }
2434
+
2435
+ #frm_form_embed_modal.frm-on-page-2 .frm-modal-cancel {
2436
+ display: inline;
2437
+ }
2438
+
2439
+ .frm-embed-form-icon-wrapper {
2440
+ background: var(--primary-color);
2441
+ border-radius: 4px;
2442
+ padding: 10px;
2443
+ color: #fff;
2444
+ display: inline-block;
2445
+ vertical-align: top;
2446
+ }
2447
+
2448
+ .frm-embed-form-icon-wrapper + div {
2449
+ display: inline-block;
2450
+ padding-left: 13px;
2451
+ transform: translateY(-4px);
2452
+ }
2453
+
2454
+ .frm-embed-modal-option:after {
2455
+ content: "\e913" !important;
2456
+ font-family: "s11-fp" !important;
2457
+ font-size: 18px;
2458
+ position: absolute;
2459
+ right: 10px;
2460
+ top: 50%;
2461
+ transform: translateY(-50%);
2462
+ }
2463
+
2464
+ .frm_embed_form_content ul {
2465
+ max-height: 300px;
2466
+ overflow-y: scroll;
2467
+ }
2468
+
2469
+ .frm-embed-form-modal-wrapper.frm-dialog {
2470
+ overflow: visible;
2471
+ }
2472
+
2473
  /* Bulk Options */
2474
  #frm-bulk-modal .frm_grid_container {
2475
  border-top: 1px solid var(--grey-border);
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.1
6
  Plugin URI: https://formidableforms.com/
7
  Author URI: https://formidableforms.com/
8
  Author: Strategy11
2
  /*
3
  Plugin Name: Formidable Forms
4
  Description: Quickly and easily create drag-and-drop forms
5
+ Version: 5.2
6
  Plugin URI: https://formidableforms.com/
7
  Author URI: https://formidableforms.com/
8
  Author: Strategy11
images/icons.svg CHANGED
@@ -359,9 +359,9 @@
359
  </symbol>
360
  <symbol id="frm_calendar_icon" viewBox="0 0 18 18"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.4.8c.4 0 .7.3.7.7v.8H11v-.8a.8.8 0 011.5 0v.8h3.3c.9 0 1.6.6 1.6 1.5v12c0 .8-.7 1.4-1.6 1.4H2.3c-.9 0-1.5-.6-1.5-1.4v-12c0-.9.6-1.5 1.4-1.5h3.4v-.8c0-.4.4-.8.8-.8zm-.8 3H2.3v3h13.4v-3h-3.3v.7a.8.8 0 01-1.5 0v-.8H7v.8a.8.8 0 01-1.5 0v-.8zm10.2 4.5h-3.4v3h3.3v-3zm0 4.4h-3.4v3h3.3v-3zm-5 3v-3H7.2v3H11zm-5.2 0v-3H2.3v3h3.3zm-3.3-4.4h3.3v-3H2.3v3zm4.8-3v3H11v-3H7z"/>
361
  </symbol>
362
- <symbol id="frm_code_icon" viewBox="0 0 23 20">
363
  <title>code</title>
364
- <path d="M9.2 18l-1.5-.4c-.2 0-.3-.1-.3-.3L13 2.2l.4-.2 1.5.4c.2 0 .3.1.3.3L9.6 17.8c0 .2-.3.2-.4.2zm-3.3-2.7L7 14c.2-.1.2-.3 0-.4L3 10l4-3.7c.2 0 .2-.3 0-.4L6 4.7a.3.3 0 0 0-.4 0L0 9.7v.5l5.4 5c.1.2.3.2.4 0zm11.1 0l5.4-5v-.5l-5.4-5a.3.3 0 0 0-.4 0l-1 1c-.2.2-.2.4 0 .5l4 3.7-4 3.7c-.2 0-.2.3 0 .4l1 1.2h.4z"/>
365
  </symbol>
366
  <symbol id="frm_tag_icon" viewBox="0 0 20 20">
367
  <title>tag</title>
359
  </symbol>
360
  <symbol id="frm_calendar_icon" viewBox="0 0 18 18"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.4.8c.4 0 .7.3.7.7v.8H11v-.8a.8.8 0 011.5 0v.8h3.3c.9 0 1.6.6 1.6 1.5v12c0 .8-.7 1.4-1.6 1.4H2.3c-.9 0-1.5-.6-1.5-1.4v-12c0-.9.6-1.5 1.4-1.5h3.4v-.8c0-.4.4-.8.8-.8zm-.8 3H2.3v3h13.4v-3h-3.3v.7a.8.8 0 01-1.5 0v-.8H7v.8a.8.8 0 01-1.5 0v-.8zm10.2 4.5h-3.4v3h3.3v-3zm0 4.4h-3.4v3h3.3v-3zm-5 3v-3H7.2v3H11zm-5.2 0v-3H2.3v3h3.3zm-3.3-4.4h3.3v-3H2.3v3zm4.8-3v3H11v-3H7z"/>
361
  </symbol>
362
+ <symbol id="frm_code_icon" viewBox="0 0 20 20" fill="none">
363
  <title>code</title>
364
+ <path d="M13.3335 15L18.3335 10L13.3335 5" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/><path d="M6.6665 5L1.6665 10L6.6665 15" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>
365
  </symbol>
366
  <symbol id="frm_tag_icon" viewBox="0 0 20 20">
367
  <title>tag</title>
js/formidable.js CHANGED
@@ -533,7 +533,7 @@ function frmFrontFormJS() {
533
  }
534
 
535
  function getFormErrors( object, action ) {
536
- var fieldset;
537
 
538
  if ( typeof action === 'undefined' ) {
539
  jQuery( object ).find( 'input[name="frm_action"]' ).val();
@@ -541,141 +541,167 @@ function frmFrontFormJS() {
541
 
542
  fieldset = jQuery( object ).find( '.frm_form_field' );
543
  fieldset.addClass( 'frm_doing_ajax' );
544
- jQuery.ajax({
545
- type: 'POST', url: frm_js.ajax_url,
546
- data: jQuery( object ).serialize() + '&action=frm_entries_' + action + '&nonce=' + frm_js.nonce,
547
- success: function( response ) {
548
- var formID, replaceContent, pageOrder, formReturned, contSubmit, delay,
549
- $fieldCont, key, inCollapsedSection, frmTrigger,
550
- defaultResponse = { 'content': '', 'errors': {}, 'pass': false };
551
- if ( response === null ) {
552
- response = defaultResponse;
553
- }
554
 
555
- response = response.replace( /^\s+|\s+$/g, '' );
556
- if ( response.indexOf( '{' ) === 0 ) {
557
- response = JSON.parse( response );
558
- } else {
559
- response = defaultResponse;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
560
  }
 
 
 
 
 
561
 
562
- if ( typeof response.redirect !== 'undefined' ) {
563
- jQuery( document ).trigger( 'frmBeforeFormRedirect', [ object, response ]);
564
- window.location = response.redirect;
565
- } else if ( response.content !== '' ) {
566
- // the form or success message was returned
567
 
568
- removeSubmitLoading( jQuery( object ) );
569
- if ( frm_js.offset != -1 ) {
570
- frmFrontForm.scrollMsg( jQuery( object ), false );
571
- }
572
- formID = jQuery( object ).find( 'input[name="form_id"]' ).val();
573
- response.content = response.content.replace( / frm_pro_form /g, ' frm_pro_form frm_no_hide ' );
574
- replaceContent = jQuery( object ).closest( '.frm_forms' );
575
- removeAddedScripts( replaceContent, formID );
576
- delay = maybeSlideOut( replaceContent, response.content );
577
 
578
- setTimeout(
579
- function() {
580
- var container, input, previousInput;
581
 
582
- replaceContent.replaceWith( response.content );
 
 
 
 
583
 
584
- addUrlParam( response );
 
 
 
585
 
586
- if ( typeof frmThemeOverride_frmAfterSubmit === 'function' ) { // eslint-disable-line camelcase
587
- pageOrder = jQuery( 'input[name="frm_page_order_' + formID + '"]' ).val();
588
- formReturned = jQuery( response.content ).find( 'input[name="form_id"]' ).val();
589
- frmThemeOverride_frmAfterSubmit( formReturned, pageOrder, response.content, object );
590
  }
 
591
 
592
- if ( typeof response.recaptcha !== 'undefined' ) {
593
- container = jQuery( '#frm_form_' + formID + '_container' ).find( '.frm_fields_container' );
594
- input = '<input type="hidden" name="recaptcha_checked" value="' + response.recaptcha + '">';
595
- previousInput = container.find( 'input[name="recaptcha_checked"]' );
 
 
596
 
597
- if ( previousInput.length ) {
598
- previousInput.replaceWith( input );
599
- } else {
600
- container.append( input );
601
- }
602
- }
603
 
604
- afterFormSubmitted( object, response );
605
- },
606
- delay
607
- );
608
- } else if ( Object.keys( response.errors ).length ) {
609
- // errors were returned
610
-
611
- removeSubmitLoading( jQuery( object ), 'enable' );
612
-
613
- //show errors
614
- contSubmit = true;
615
- removeAllErrors();
616
-
617
- $fieldCont = null;
618
-
619
- for ( key in response.errors ) {
620
- $fieldCont = jQuery( object ).find( '#frm_field_' + key + '_container' );
621
-
622
- if ( $fieldCont.length ) {
623
- if ( ! $fieldCont.is( ':visible' ) ) {
624
- inCollapsedSection = $fieldCont.closest( '.frm_toggle_container' );
625
- if ( inCollapsedSection.length ) {
626
- frmTrigger = inCollapsedSection.prev();
627
- if ( ! frmTrigger.hasClass( 'frm_trigger' ) ) {
628
- // If the frmTrigger object is the section description, check to see if the previous element is the trigger
629
- frmTrigger = frmTrigger.prev( '.frm_trigger' );
630
- }
631
- frmTrigger.trigger( 'click' );
632
  }
 
633
  }
 
634
 
635
- if ( $fieldCont.is( ':visible' ) ) {
636
- addFieldError( $fieldCont, key, response.errors );
637
- contSubmit = false;
638
- }
639
  }
640
  }
 
641
 
642
- jQuery( object ).find( '.frm-g-recaptcha, .g-recaptcha' ).each( function() {
643
- var $recaptcha = jQuery( this ),
644
- recaptchaID = $recaptcha.data( 'rid' );
645
 
646
- if ( typeof grecaptcha !== 'undefined' && grecaptcha ) {
647
- if ( recaptchaID ) {
648
- grecaptcha.reset( recaptchaID );
649
- } else {
650
- grecaptcha.reset();
651
- }
652
  }
653
- });
 
654
 
655
- jQuery( document ).trigger( 'frmFormErrors', [ object, response ]);
656
 
657
- fieldset.removeClass( 'frm_doing_ajax' );
658
- scrollToFirstField( object );
659
 
660
- if ( contSubmit ) {
661
- object.submit();
662
- } else {
663
- jQuery( object ).prepend( response.error_message );
664
- checkForErrorsAndMaybeSetFocus();
665
- }
666
  } else {
667
- // there may have been a plugin conflict, or the form is not set to submit with ajax
 
 
 
 
668
 
669
- showFileLoading( object );
670
 
671
- object.submit();
672
- }
673
- },
674
- error: function() {
675
- jQuery( object ).find( 'input[type="submit"], input[type="button"]' ).prop( 'disabled', false );
676
  object.submit();
677
  }
678
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
679
  }
680
 
681
  function afterFormSubmitted( object, response ) {
533
  }
534
 
535
  function getFormErrors( object, action ) {
536
+ var fieldset, data, success, error;
537
 
538
  if ( typeof action === 'undefined' ) {
539
  jQuery( object ).find( 'input[name="frm_action"]' ).val();
541
 
542
  fieldset = jQuery( object ).find( '.frm_form_field' );
543
  fieldset.addClass( 'frm_doing_ajax' );
 
 
 
 
 
 
 
 
 
 
544
 
545
+ data = jQuery( object ).serialize() + '&action=frm_entries_' + action + '&nonce=' + frm_js.nonce;
546
+
547
+ success = function( response ) {
548
+ var formID, replaceContent, pageOrder, formReturned, contSubmit, delay,
549
+ $fieldCont, key, inCollapsedSection, frmTrigger,
550
+ defaultResponse = { 'content': '', 'errors': {}, 'pass': false };
551
+ if ( response === null ) {
552
+ response = defaultResponse;
553
+ }
554
+
555
+ response = response.replace( /^\s+|\s+$/g, '' );
556
+ if ( response.indexOf( '{' ) === 0 ) {
557
+ response = JSON.parse( response );
558
+ } else {
559
+ response = defaultResponse;
560
+ }
561
+
562
+ if ( typeof response.redirect !== 'undefined' ) {
563
+ jQuery( document ).trigger( 'frmBeforeFormRedirect', [ object, response ]);
564
+ window.location = response.redirect;
565
+ } else if ( response.content !== '' ) {
566
+ // the form or success message was returned
567
+
568
+ removeSubmitLoading( jQuery( object ) );
569
+ if ( frm_js.offset != -1 ) {
570
+ frmFrontForm.scrollMsg( jQuery( object ), false );
571
  }
572
+ formID = jQuery( object ).find( 'input[name="form_id"]' ).val();
573
+ response.content = response.content.replace( / frm_pro_form /g, ' frm_pro_form frm_no_hide ' );
574
+ replaceContent = jQuery( object ).closest( '.frm_forms' );
575
+ removeAddedScripts( replaceContent, formID );
576
+ delay = maybeSlideOut( replaceContent, response.content );
577
 
578
+ setTimeout(
579
+ function() {
580
+ var container, input, previousInput;
 
 
581
 
582
+ replaceContent.replaceWith( response.content );
 
 
 
 
 
 
 
 
583
 
584
+ addUrlParam( response );
 
 
585
 
586
+ if ( typeof frmThemeOverride_frmAfterSubmit === 'function' ) { // eslint-disable-line camelcase
587
+ pageOrder = jQuery( 'input[name="frm_page_order_' + formID + '"]' ).val();
588
+ formReturned = jQuery( response.content ).find( 'input[name="form_id"]' ).val();
589
+ frmThemeOverride_frmAfterSubmit( formReturned, pageOrder, response.content, object );
590
+ }
591
 
592
+ if ( typeof response.recaptcha !== 'undefined' ) {
593
+ container = jQuery( '#frm_form_' + formID + '_container' ).find( '.frm_fields_container' );
594
+ input = '<input type="hidden" name="recaptcha_checked" value="' + response.recaptcha + '">';
595
+ previousInput = container.find( 'input[name="recaptcha_checked"]' );
596
 
597
+ if ( previousInput.length ) {
598
+ previousInput.replaceWith( input );
599
+ } else {
600
+ container.append( input );
601
  }
602
+ }
603
 
604
+ afterFormSubmitted( object, response );
605
+ },
606
+ delay
607
+ );
608
+ } else if ( Object.keys( response.errors ).length ) {
609
+ // errors were returned
610
 
611
+ removeSubmitLoading( jQuery( object ), 'enable' );
 
 
 
 
 
612
 
613
+ //show errors
614
+ contSubmit = true;
615
+ removeAllErrors();
616
+
617
+ $fieldCont = null;
618
+
619
+ for ( key in response.errors ) {
620
+ $fieldCont = jQuery( object ).find( '#frm_field_' + key + '_container' );
621
+
622
+ if ( $fieldCont.length ) {
623
+ if ( ! $fieldCont.is( ':visible' ) ) {
624
+ inCollapsedSection = $fieldCont.closest( '.frm_toggle_container' );
625
+ if ( inCollapsedSection.length ) {
626
+ frmTrigger = inCollapsedSection.prev();
627
+ if ( ! frmTrigger.hasClass( 'frm_trigger' ) ) {
628
+ // If the frmTrigger object is the section description, check to see if the previous element is the trigger
629
+ frmTrigger = frmTrigger.prev( '.frm_trigger' );
 
 
 
 
 
 
 
 
 
 
 
630
  }
631
+ frmTrigger.trigger( 'click' );
632
  }
633
+ }
634
 
635
+ if ( $fieldCont.is( ':visible' ) ) {
636
+ addFieldError( $fieldCont, key, response.errors );
637
+ contSubmit = false;
 
638
  }
639
  }
640
+ }
641
 
642
+ jQuery( object ).find( '.frm-g-recaptcha, .g-recaptcha' ).each( function() {
643
+ var $recaptcha = jQuery( this ),
644
+ recaptchaID = $recaptcha.data( 'rid' );
645
 
646
+ if ( typeof grecaptcha !== 'undefined' && grecaptcha ) {
647
+ if ( recaptchaID ) {
648
+ grecaptcha.reset( recaptchaID );
649
+ } else {
650
+ grecaptcha.reset();
 
651
  }
652
+ }
653
+ });
654
 
655
+ jQuery( document ).trigger( 'frmFormErrors', [ object, response ]);
656
 
657
+ fieldset.removeClass( 'frm_doing_ajax' );
658
+ scrollToFirstField( object );
659
 
660
+ if ( contSubmit ) {
661
+ object.submit();
 
 
 
 
662
  } else {
663
+ jQuery( object ).prepend( response.error_message );
664
+ checkForErrorsAndMaybeSetFocus();
665
+ }
666
+ } else {
667
+ // there may have been a plugin conflict, or the form is not set to submit with ajax
668
 
669
+ showFileLoading( object );
670
 
 
 
 
 
 
671
  object.submit();
672
  }
673
+ };
674
+
675
+ error = function() {
676
+ jQuery( object ).find( 'input[type="submit"], input[type="button"]' ).prop( 'disabled', false );
677
+ object.submit();
678
+ };
679
+
680
+ postToAjaxUrl( object, data, success, error );
681
+ }
682
+
683
+ function postToAjaxUrl( form, data, success, error ) {
684
+ var ajaxUrl, action, ajaxParams;
685
+
686
+ ajaxUrl = frm_js.ajax_url;
687
+ action = form.getAttribute( 'action' );
688
+
689
+ if ( 'string' === typeof action && -1 !== action.indexOf( '?action=frm_forms_preview' ) ) {
690
+ ajaxUrl = action.split( '?action=frm_forms_preview' )[0];
691
+ }
692
+
693
+ ajaxParams = {
694
+ type: 'POST',
695
+ url: ajaxUrl,
696
+ data: data,
697
+ success: success
698
+ };
699
+
700
+ if ( 'function' === typeof error ) {
701
+ ajaxParams.error = error;
702
+ }
703
+
704
+ jQuery.ajax( ajaxParams );
705
  }
706
 
707
  function afterFormSubmitted( object, response ) {
js/formidable.min.js CHANGED
@@ -18,41 +18,41 @@ getFieldId(field,true);if(!(fieldID in errors))errors[fieldID]=getFieldValidatio
18
  recaptchaID,alreadyChecked;if(isGoingToPrevPage(object))return false;recaptcha=jQuery(object).find('.frm-g-recaptcha[data-size="invisible"], .g-recaptcha[data-size="invisible"]');if(recaptcha.length){recaptchaID=recaptcha.data("rid");alreadyChecked=grecaptcha.getResponse(recaptchaID);if(alreadyChecked.length===0)return recaptcha;else return false}else return false}function executeInvisibleRecaptcha(invisibleRecaptcha){var recaptchaID=invisibleRecaptcha.data("rid");grecaptcha.reset(recaptchaID);grecaptcha.execute(recaptchaID)}
19
  function validateRecaptcha(form,errors){var recaptchaID,response,fieldContainer,fieldID,$recaptcha=jQuery(form).find(".frm-g-recaptcha");if($recaptcha.length){recaptchaID=$recaptcha.data("rid");try{response=grecaptcha.getResponse(recaptchaID)}catch(e){if(jQuery(form).find('input[name="recaptcha_checked"]').length)return errors;else response=""}if(response.length===0){fieldContainer=$recaptcha.closest(".frm_form_field");fieldID=fieldContainer.attr("id").replace("frm_field_","").replace("_container",
20
  "");errors[fieldID]=""}}return errors}function getFieldValidationMessage(field,messageType){var msg,errorHtml;msg=field.getAttribute(messageType);if(null===msg)msg="";if(""!==msg&&shouldWrapErrorHtmlAroundMessageType(messageType)){errorHtml=field.getAttribute("data-error-html");if(null!==errorHtml){errorHtml=errorHtml.replace(/\+/g,"%20");msg=decodeURIComponent(errorHtml).replace("[error]",msg);msg=msg.replace("[key]",getFieldId(field,false))}}return msg}function shouldWrapErrorHtmlAroundMessageType(type){return"pattern"!==
21
- type}function shouldJSValidate(object){var validate=jQuery(object).hasClass("frm_js_validate");if(validate&&typeof frmProForm!=="undefined"&&(frmProForm.savingDraft(object)||frmProForm.goingToPreviousPage(object)))validate=false;return validate}function getFormErrors(object,action){var fieldset;if(typeof action==="undefined")jQuery(object).find('input[name="frm_action"]').val();fieldset=jQuery(object).find(".frm_form_field");fieldset.addClass("frm_doing_ajax");jQuery.ajax({type:"POST",url:frm_js.ajax_url,
22
- data:jQuery(object).serialize()+"&action=frm_entries_"+action+"&nonce="+frm_js.nonce,success:function(response){var formID,replaceContent,pageOrder,formReturned,contSubmit,delay,$fieldCont,key,inCollapsedSection,frmTrigger,defaultResponse={"content":"","errors":{},"pass":false};if(response===null)response=defaultResponse;response=response.replace(/^\s+|\s+$/g,"");if(response.indexOf("{")===0)response=JSON.parse(response);else response=defaultResponse;if(typeof response.redirect!=="undefined"){jQuery(document).trigger("frmBeforeFormRedirect",
23
  [object,response]);window.location=response.redirect}else if(response.content!==""){removeSubmitLoading(jQuery(object));if(frm_js.offset!=-1)frmFrontForm.scrollMsg(jQuery(object),false);formID=jQuery(object).find('input[name="form_id"]').val();response.content=response.content.replace(/ frm_pro_form /g," frm_pro_form frm_no_hide ");replaceContent=jQuery(object).closest(".frm_forms");removeAddedScripts(replaceContent,formID);delay=maybeSlideOut(replaceContent,response.content);setTimeout(function(){var container,
24
  input,previousInput;replaceContent.replaceWith(response.content);addUrlParam(response);if(typeof frmThemeOverride_frmAfterSubmit==="function"){pageOrder=jQuery('input[name="frm_page_order_'+formID+'"]').val();formReturned=jQuery(response.content).find('input[name="form_id"]').val();frmThemeOverride_frmAfterSubmit(formReturned,pageOrder,response.content,object)}if(typeof response.recaptcha!=="undefined"){container=jQuery("#frm_form_"+formID+"_container").find(".frm_fields_container");input='<input type="hidden" name="recaptcha_checked" value="'+
25
  response.recaptcha+'">';previousInput=container.find('input[name="recaptcha_checked"]');if(previousInput.length)previousInput.replaceWith(input);else container.append(input)}afterFormSubmitted(object,response)},delay)}else if(Object.keys(response.errors).length){removeSubmitLoading(jQuery(object),"enable");contSubmit=true;removeAllErrors();$fieldCont=null;for(key in response.errors){$fieldCont=jQuery(object).find("#frm_field_"+key+"_container");if($fieldCont.length){if(!$fieldCont.is(":visible")){inCollapsedSection=
26
  $fieldCont.closest(".frm_toggle_container");if(inCollapsedSection.length){frmTrigger=inCollapsedSection.prev();if(!frmTrigger.hasClass("frm_trigger"))frmTrigger=frmTrigger.prev(".frm_trigger");frmTrigger.trigger("click")}}if($fieldCont.is(":visible")){addFieldError($fieldCont,key,response.errors);contSubmit=false}}}jQuery(object).find(".frm-g-recaptcha, .g-recaptcha").each(function(){var $recaptcha=jQuery(this),recaptchaID=$recaptcha.data("rid");if(typeof grecaptcha!=="undefined"&&grecaptcha)if(recaptchaID)grecaptcha.reset(recaptchaID);
27
- else grecaptcha.reset()});jQuery(document).trigger("frmFormErrors",[object,response]);fieldset.removeClass("frm_doing_ajax");scrollToFirstField(object);if(contSubmit)object.submit();else{jQuery(object).prepend(response.error_message);checkForErrorsAndMaybeSetFocus()}}else{showFileLoading(object);object.submit()}},error:function(){jQuery(object).find('input[type="submit"], input[type="button"]').prop("disabled",false);object.submit()}})}function afterFormSubmitted(object,response){var formCompleted=
28
- jQuery(response.content).find(".frm_message");if(formCompleted.length)jQuery(document).trigger("frmFormComplete",[object,response]);else jQuery(document).trigger("frmPageChanged",[object,response])}function removeAddedScripts(formContainer,formID){var endReplace=jQuery(".frm_end_ajax_"+formID);if(endReplace.length){formContainer.nextUntil(".frm_end_ajax_"+formID).remove();endReplace.remove()}}function maybeSlideOut(oldContent,newContent){var c,newClass="frm_slideout";if(newContent.indexOf(" frm_slide")!==
29
- -1){c=oldContent.children();if(newContent.indexOf(" frm_going_back")!==-1)newClass+=" frm_going_back";c.removeClass("frm_going_back");c.addClass(newClass);return 300}return 0}function addUrlParam(response){var url;if(history.pushState&&typeof response.page!=="undefined"){url=addQueryVar("frm_page",response.page);window.history.pushState({"html":response.html},"","?"+url)}}function addQueryVar(key,value){var kvp,i,x;key=encodeURI(key);value=encodeURI(value);kvp=document.location.search.substr(1).split("&");
30
- i=kvp.length;while(i--){x=kvp[i].split("=");if(x[0]==key){x[1]=value;kvp[i]=x.join("=");break}}if(i<0)kvp[kvp.length]=[key,value].join("=");return kvp.join("&")}function addFieldError($fieldCont,key,jsErrors){var input,id,describedBy;if($fieldCont.length&&$fieldCont.is(":visible")){$fieldCont.addClass("frm_blank_field");input=$fieldCont.find("input, select, textarea");id="frm_error_field_"+key;describedBy=input.attr("aria-describedby");if(typeof frmThemeOverride_frmPlaceError==="function")frmThemeOverride_frmPlaceError(key,
31
- jsErrors);else{if(-1!==jsErrors[key].indexOf("<div"))$fieldCont.append(jsErrors[key]);else $fieldCont.append('<div class="frm_error" role="alert" id="'+id+'">'+jsErrors[key]+"</div>");if(typeof describedBy==="undefined")describedBy=id;else if(describedBy.indexOf(id)===-1)describedBy=describedBy+" "+id;input.attr("aria-describedby",describedBy)}input.attr("aria-invalid",true);input.attr("aria-describedby",id);jQuery(document).trigger("frmAddFieldError",[$fieldCont,key,jsErrors])}}function removeFieldError($fieldCont){var errorMessage=
32
- $fieldCont.find(".frm_error"),errorId=errorMessage.attr("id"),input=$fieldCont.find("input, select, textarea"),describedBy=input.attr("aria-describedby");$fieldCont.removeClass("frm_blank_field has-error");errorMessage.remove();input.attr("aria-invalid",false);input.removeAttr("aria-describedby");if(typeof describedBy!=="undefined"){describedBy=describedBy.replace(errorId,"");input.attr("aria-describedby",describedBy)}}function removeAllErrors(){jQuery(".form-field").removeClass("frm_blank_field has-error");
33
- jQuery(".form-field .frm_error").replaceWith("");jQuery(".frm_error_style").remove()}function scrollToFirstField(object){var field=jQuery(object).find(".frm_blank_field").first();if(field.length)frmFrontForm.scrollMsg(field,object,true)}function showSubmitLoading($object){showLoadingIndicator($object);disableSubmitButton($object);disableSaveDraft($object)}function showLoadingIndicator($object){if(!$object.hasClass("frm_loading_form")&&!$object.hasClass("frm_loading_prev")){addLoadingClass($object);
34
- $object.trigger("frmStartFormLoading")}}function addLoadingClass($object){var loadingClass=isGoingToPrevPage($object)?"frm_loading_prev":"frm_loading_form";$object.addClass(loadingClass)}function isGoingToPrevPage($object){return typeof frmProForm!=="undefined"&&frmProForm.goingToPreviousPage($object)}function removeSubmitLoading($object,enable,processesRunning){var loadingForm;if(processesRunning>0)return;loadingForm=jQuery(".frm_loading_form");loadingForm.removeClass("frm_loading_form");loadingForm.removeClass("frm_loading_prev");
35
- loadingForm.trigger("frmEndFormLoading");if(enable==="enable"){enableSubmitButton(loadingForm);enableSaveDraft(loadingForm)}}function showFileLoading(object){var fileval,loading=document.getElementById("frm_loading");if(loading!==null){fileval=jQuery(object).find("input[type=file]").val();if(typeof fileval!=="undefined"&&fileval!=="")setTimeout(function(){jQuery(loading).fadeIn("slow")},2E3)}}function clearDefault(){toggleDefault(jQuery(this),"clear")}function replaceDefault(){toggleDefault(jQuery(this),
36
- "replace")}function toggleDefault($thisField,e){var thisVal,v=$thisField.data("frmval").replace(/(\n|\r\n)/g,"\r");if(v===""||typeof v==="undefined")return false;thisVal=$thisField.val().replace(/(\n|\r\n)/g,"\r");if("replace"===e){if(thisVal==="")$thisField.addClass("frm_default").val(v)}else if(thisVal==v)$thisField.removeClass("frm_default").val("")}function resendEmail(){var $link=jQuery(this),entryId=this.getAttribute("data-eid"),formId=this.getAttribute("data-fid"),label=$link.find(".frm_link_label");
37
- if(label.length<1)label=$link;label.append('<span class="frm-wait"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_send_email",entry_id:entryId,form_id:formId,nonce:frm_js.nonce},success:function(msg){var admin=document.getElementById("wpbody");if(admin===null)label.html(msg);else{label.html("");$link.after(msg)}}});return false}function confirmClick(){var message=jQuery(this).data("frmconfirm");return confirm(message)}function toggleDiv(){var div=jQuery(this).data("frmtoggle");
38
- if(jQuery(div).is(":visible"))jQuery(div).slideUp("fast");else jQuery(div).slideDown("fast");return false}function addIndexOfFallbackForIE8(){var len,from;if(!Array.prototype.indexOf)Array.prototype.indexOf=function(elt){len=this.length>>>0;from=Number(arguments[1])||0;from=from<0?Math.ceil(from):Math.floor(from);if(from<0)from+=len;for(;from<len;from++)if(from in this&&this[from]===elt)return from;return-1}}function addTrimFallbackForIE8(){if(typeof String.prototype.trim!=="function")String.prototype.trim=
39
- function(){return this.replace(/^\s+|\s+$/g,"")}}function addFilterFallbackForIE8(){var t,len,res,thisp,i,val;if(!Array.prototype.filter)Array.prototype.filter=function(fun){if(this===void 0||this===null)throw new TypeError;t=Object(this);len=t.length>>>0;if(typeof fun!=="function")throw new TypeError;res=[];thisp=arguments[1];for(i=0;i<len;i++)if(i in t){val=t[i];if(fun.call(thisp,val,i,t))res.push(val)}return res}}function addKeysFallbackForIE8(){var keys,i;if(!Object.keys)Object.keys=function(obj){keys=
40
- [];for(i in obj)if(obj.hasOwnProperty(i))keys.push(i);return keys}}function onHoneypotFieldChange(){var css=jQuery(this).css("box-shadow");if(css.match(/inset/))this.parentNode.removeChild(this)}function changeFocusWhenClickComboFieldLabel(){var label;var comboInputsContainer=document.querySelectorAll(".frm_combo_inputs_container");comboInputsContainer.forEach(function(inputsContainer){if(!inputsContainer.closest(".frm_form_field"))return;label=inputsContainer.closest(".frm_form_field").querySelector(".frm_primary_label");
41
- if(!label)return;label.addEventListener("click",function(e){inputsContainer.querySelector(".frm_form_field:first-child input, .frm_form_field:first-child select, .frm_form_field:first-child textarea").focus()})})}function checkForErrorsAndMaybeSetFocus(){var errors,element,timeoutCallback;errors=document.querySelectorAll(".frm_form_field .frm_error");if(!errors.length)return;element=errors[0];do{element=element.previousSibling;if(-1!==["input","select","textarea"].indexOf(element.nodeName.toLowerCase())){element.focus();
42
- break}if("undefined"!==typeof element.classList){if(element.classList.contains("html-active"))timeoutCallback=function(){var textarea=element.querySelector("textarea");if(null!==textarea)textarea.focus()};else if(element.classList.contains("tmce-active"))timeoutCallback=function(){tinyMCE.activeEditor.focus()};if("function"===typeof timeoutCallback){setTimeout(timeoutCallback,0);break}}}while(element.previousSibling)}return{init:function(){jQuery(document).off("submit.formidable",".frm-show-form");
43
- jQuery(document).on("submit.formidable",".frm-show-form",frmFrontForm.submitForm);jQuery(".frm-show-form input[onblur], .frm-show-form textarea[onblur]").each(function(){if(jQuery(this).val()==="")jQuery(this).trigger("blur")});jQuery(document).on("focus",".frm_toggle_default",clearDefault);jQuery(document).on("blur",".frm_toggle_default",replaceDefault);jQuery(".frm_toggle_default").trigger("blur");jQuery(document.getElementById("frm_resend_email")).on("click",resendEmail);jQuery(document).on("change",
44
- '.frm-show-form input[name^="item_meta"], .frm-show-form select[name^="item_meta"], .frm-show-form textarea[name^="item_meta"]',frmFrontForm.fieldValueChanged);jQuery(document).on("change keyup",".frm-show-form .frm_inside_container input, .frm-show-form .frm_inside_container select, .frm-show-form .frm_inside_container textarea",maybeShowLabel);jQuery(document).on("change","[id^=frm_email_]",onHoneypotFieldChange);jQuery(document).on("click","a[data-frmconfirm]",confirmClick);jQuery("a[data-frmtoggle]").on("click",
45
- toggleDiv);checkForErrorsAndMaybeSetFocus();changeFocusWhenClickComboFieldLabel();addIndexOfFallbackForIE8();addTrimFallbackForIE8();addFilterFallbackForIE8();addKeysFallbackForIE8()},getFieldId:function(field,fullID){return getFieldId(field,fullID)},renderRecaptcha:function(captcha){var formID,recaptchaID,size=captcha.getAttribute("data-size"),rendered=captcha.getAttribute("data-rid")!==null,params={"sitekey":captcha.getAttribute("data-sitekey"),"size":size,"theme":captcha.getAttribute("data-theme")};
46
- if(rendered)return;if(size==="invisible"){formID=jQuery(captcha).closest("form").find('input[name="form_id"]').val();jQuery(captcha).closest(".frm_form_field .frm_primary_label").hide();params.callback=function(token){frmFrontForm.afterRecaptcha(token,formID)}}recaptchaID=grecaptcha.render(captcha.id,params);captcha.setAttribute("data-rid",recaptchaID)},afterSingleRecaptcha:function(){var object=jQuery(".frm-show-form .g-recaptcha").closest("form")[0];frmFrontForm.submitFormNow(object)},afterRecaptcha:function(token,
47
- formID){var object=jQuery("#frm_form_"+formID+"_container form")[0];frmFrontForm.submitFormNow(object)},submitForm:function(e){frmFrontForm.submitFormManual(e,this)},submitFormManual:function(e,object){var isPro,errors,invisibleRecaptcha=hasInvisibleRecaptcha(object),classList=object.className.trim().split(/\s+/gi);if(classList&&invisibleRecaptcha.length<1){isPro=classList.indexOf("frm_pro_form")>-1;if(!isPro)return}if(jQuery("body").hasClass("wp-admin")&&jQuery(object).closest(".frmapi-form").length<
48
- 1)return;e.preventDefault();if(typeof frmProForm!=="undefined"&&typeof frmProForm.submitAllowed==="function")if(!frmProForm.submitAllowed(object))return;if(invisibleRecaptcha.length){showLoadingIndicator(jQuery(object));executeInvisibleRecaptcha(invisibleRecaptcha)}else{errors=frmFrontForm.validateFormSubmit(object);if(Object.keys(errors).length===0){showSubmitLoading(jQuery(object));frmFrontForm.submitFormNow(object,classList)}}},submitFormNow:function(object){var hasFileFields,antispamInput,classList=
49
- object.className.trim().split(/\s+/gi);if(object.hasAttribute("data-token")&&null===object.querySelector('[name="antispam_token"]')){antispamInput=document.createElement("input");antispamInput.type="hidden";antispamInput.name="antispam_token";antispamInput.value=object.getAttribute("data-token");object.appendChild(antispamInput)}if(classList.indexOf("frm_ajax_submit")>-1){hasFileFields=jQuery(object).find('input[type="file"]').filter(function(){return!!this.value}).length;if(hasFileFields<1){action=
50
- jQuery(object).find('input[name="frm_action"]').val();frmFrontForm.checkFormErrors(object,action)}else object.submit()}else object.submit()},validateFormSubmit:function(object){if(typeof tinyMCE!=="undefined"&&jQuery(object).find(".wp-editor-wrap").length)tinyMCE.triggerSave();jsErrors=[];if(shouldJSValidate(object)){frmFrontForm.getAjaxFormErrors(object);if(Object.keys(jsErrors).length)frmFrontForm.addAjaxFormErrors(object)}return jsErrors},getAjaxFormErrors:function(object){var customErrors,key;
51
- jsErrors=validateForm(object);if(typeof frmThemeOverride_jsErrors==="function"){action=jQuery(object).find('input[name="frm_action"]').val();customErrors=frmThemeOverride_jsErrors(action,object);if(Object.keys(customErrors).length)for(key in customErrors)jsErrors[key]=customErrors[key]}return jsErrors},addAjaxFormErrors:function(object){var key,$fieldCont;removeAllErrors();for(key in jsErrors){$fieldCont=jQuery(object).find("#frm_field_"+key+"_container");if($fieldCont.length)addFieldError($fieldCont,
52
- key,jsErrors);else delete jsErrors[key]}scrollToFirstField(object);checkForErrorsAndMaybeSetFocus()},checkFormErrors:function(object,action){getFormErrors(object,action)},checkRequiredField:function(field,errors){return checkRequiredField(field,errors)},showSubmitLoading:function($object){showSubmitLoading($object)},removeSubmitLoading:function($object,enable,processesRunning){removeSubmitLoading($object,enable,processesRunning)},scrollToID:function(id){var object=jQuery(document.getElementById(id));
53
- frmFrontForm.scrollMsg(object,false)},scrollMsg:function(id,object,animate){var newPos,m,b,screenTop,screenBottom,scrollObj="";if(typeof object==="undefined"){scrollObj=jQuery(document.getElementById("frm_form_"+id+"_container"));if(scrollObj.length<1)return}else if(typeof id==="string")scrollObj=jQuery(object).find("#frm_field_"+id+"_container");else scrollObj=id;jQuery(scrollObj).trigger("focus");newPos=scrollObj.offset().top;if(!newPos||frm_js.offset==="-1")return;newPos=newPos-frm_js.offset;m=
54
- jQuery("html").css("margin-top");b=jQuery("body").css("margin-top");if(m||b)newPos=newPos-parseInt(m)-parseInt(b);if(newPos&&window.innerHeight){screenTop=document.documentElement.scrollTop||document.body.scrollTop;screenBottom=screenTop+window.innerHeight;if(newPos>screenBottom||newPos<screenTop){if(typeof animate==="undefined")jQuery(window).scrollTop(newPos);else jQuery("html,body").animate({scrollTop:newPos},500);return false}}},fieldValueChanged:function(e){var fieldId=frmFrontForm.getFieldId(this,
55
- false);if(!fieldId||typeof fieldId==="undefined")return;if(e.frmTriggered&&e.frmTriggered==fieldId)return;jQuery(document).trigger("frmFieldChanged",[this,fieldId,e]);if(e.selfTriggered!==true)maybeValidateChange(this)},savingDraft:function(object){console.warn("DEPRECATED: function frmFrontForm.savingDraft in v3.0 use frmProForm.savingDraft");if(typeof frmProForm!=="undefined")return frmProForm.savingDraft(object)},goingToPreviousPage:function(object){console.warn("DEPRECATED: function frmFrontForm.goingToPreviousPage in v3.0 use frmProForm.goingToPreviousPage");
56
  if(typeof frmProForm!=="undefined")return frmProForm.goingToPreviousPage(object)},hideOrShowFields:function(){console.warn("DEPRECATED: function frmFrontForm.hideOrShowFields in v3.0 use frmProForm.hideOrShowFields");if(typeof frmProForm!=="undefined")frmProForm.hideOrShowFields()},hidePreviouslyHiddenFields:function(){console.warn("DEPRECATED: function frmFrontForm.hidePreviouslyHiddenFields in v3.0 use frmProForm.hidePreviouslyHiddenFields");if(typeof frmProForm!=="undefined")frmProForm.hidePreviouslyHiddenFields()},
57
  checkDependentDynamicFields:function(ids){console.warn("DEPRECATED: function frmFrontForm.checkDependentDynamicFields in v3.0 use frmProForm.checkDependentDynamicFields");if(typeof frmProForm!=="undefined")frmProForm.checkDependentDynamicFields(ids)},checkDependentLookupFields:function(ids){console.warn("DEPRECATED: function frmFrontForm.checkDependentLookupFields in v3.0 use frmProForm.checkDependentLookupFields");if(typeof frmProForm!=="undefined")frmProForm.checkDependentLookupFields(ids)},loadGoogle:function(){console.warn("DEPRECATED: function frmFrontForm.loadGoogle in v3.0 use frmProForm.loadGoogle");
58
  frmProForm.loadGoogle()},escapeHtml:function(text){return text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},invisible:function(classes){jQuery(classes).css("visibility","hidden")},visible:function(classes){jQuery(classes).css("visibility","visible")}}}frmFrontForm=frmFrontFormJS();jQuery(document).ready(function(){frmFrontForm.init()});
18
  recaptchaID,alreadyChecked;if(isGoingToPrevPage(object))return false;recaptcha=jQuery(object).find('.frm-g-recaptcha[data-size="invisible"], .g-recaptcha[data-size="invisible"]');if(recaptcha.length){recaptchaID=recaptcha.data("rid");alreadyChecked=grecaptcha.getResponse(recaptchaID);if(alreadyChecked.length===0)return recaptcha;else return false}else return false}function executeInvisibleRecaptcha(invisibleRecaptcha){var recaptchaID=invisibleRecaptcha.data("rid");grecaptcha.reset(recaptchaID);grecaptcha.execute(recaptchaID)}
19
  function validateRecaptcha(form,errors){var recaptchaID,response,fieldContainer,fieldID,$recaptcha=jQuery(form).find(".frm-g-recaptcha");if($recaptcha.length){recaptchaID=$recaptcha.data("rid");try{response=grecaptcha.getResponse(recaptchaID)}catch(e){if(jQuery(form).find('input[name="recaptcha_checked"]').length)return errors;else response=""}if(response.length===0){fieldContainer=$recaptcha.closest(".frm_form_field");fieldID=fieldContainer.attr("id").replace("frm_field_","").replace("_container",
20
  "");errors[fieldID]=""}}return errors}function getFieldValidationMessage(field,messageType){var msg,errorHtml;msg=field.getAttribute(messageType);if(null===msg)msg="";if(""!==msg&&shouldWrapErrorHtmlAroundMessageType(messageType)){errorHtml=field.getAttribute("data-error-html");if(null!==errorHtml){errorHtml=errorHtml.replace(/\+/g,"%20");msg=decodeURIComponent(errorHtml).replace("[error]",msg);msg=msg.replace("[key]",getFieldId(field,false))}}return msg}function shouldWrapErrorHtmlAroundMessageType(type){return"pattern"!==
21
+ type}function shouldJSValidate(object){var validate=jQuery(object).hasClass("frm_js_validate");if(validate&&typeof frmProForm!=="undefined"&&(frmProForm.savingDraft(object)||frmProForm.goingToPreviousPage(object)))validate=false;return validate}function getFormErrors(object,action){var fieldset,data,success,error;if(typeof action==="undefined")jQuery(object).find('input[name="frm_action"]').val();fieldset=jQuery(object).find(".frm_form_field");fieldset.addClass("frm_doing_ajax");data=jQuery(object).serialize()+
22
+ "&action=frm_entries_"+action+"&nonce="+frm_js.nonce;success=function(response){var formID,replaceContent,pageOrder,formReturned,contSubmit,delay,$fieldCont,key,inCollapsedSection,frmTrigger,defaultResponse={"content":"","errors":{},"pass":false};if(response===null)response=defaultResponse;response=response.replace(/^\s+|\s+$/g,"");if(response.indexOf("{")===0)response=JSON.parse(response);else response=defaultResponse;if(typeof response.redirect!=="undefined"){jQuery(document).trigger("frmBeforeFormRedirect",
23
  [object,response]);window.location=response.redirect}else if(response.content!==""){removeSubmitLoading(jQuery(object));if(frm_js.offset!=-1)frmFrontForm.scrollMsg(jQuery(object),false);formID=jQuery(object).find('input[name="form_id"]').val();response.content=response.content.replace(/ frm_pro_form /g," frm_pro_form frm_no_hide ");replaceContent=jQuery(object).closest(".frm_forms");removeAddedScripts(replaceContent,formID);delay=maybeSlideOut(replaceContent,response.content);setTimeout(function(){var container,
24
  input,previousInput;replaceContent.replaceWith(response.content);addUrlParam(response);if(typeof frmThemeOverride_frmAfterSubmit==="function"){pageOrder=jQuery('input[name="frm_page_order_'+formID+'"]').val();formReturned=jQuery(response.content).find('input[name="form_id"]').val();frmThemeOverride_frmAfterSubmit(formReturned,pageOrder,response.content,object)}if(typeof response.recaptcha!=="undefined"){container=jQuery("#frm_form_"+formID+"_container").find(".frm_fields_container");input='<input type="hidden" name="recaptcha_checked" value="'+
25
  response.recaptcha+'">';previousInput=container.find('input[name="recaptcha_checked"]');if(previousInput.length)previousInput.replaceWith(input);else container.append(input)}afterFormSubmitted(object,response)},delay)}else if(Object.keys(response.errors).length){removeSubmitLoading(jQuery(object),"enable");contSubmit=true;removeAllErrors();$fieldCont=null;for(key in response.errors){$fieldCont=jQuery(object).find("#frm_field_"+key+"_container");if($fieldCont.length){if(!$fieldCont.is(":visible")){inCollapsedSection=
26
  $fieldCont.closest(".frm_toggle_container");if(inCollapsedSection.length){frmTrigger=inCollapsedSection.prev();if(!frmTrigger.hasClass("frm_trigger"))frmTrigger=frmTrigger.prev(".frm_trigger");frmTrigger.trigger("click")}}if($fieldCont.is(":visible")){addFieldError($fieldCont,key,response.errors);contSubmit=false}}}jQuery(object).find(".frm-g-recaptcha, .g-recaptcha").each(function(){var $recaptcha=jQuery(this),recaptchaID=$recaptcha.data("rid");if(typeof grecaptcha!=="undefined"&&grecaptcha)if(recaptchaID)grecaptcha.reset(recaptchaID);
27
+ else grecaptcha.reset()});jQuery(document).trigger("frmFormErrors",[object,response]);fieldset.removeClass("frm_doing_ajax");scrollToFirstField(object);if(contSubmit)object.submit();else{jQuery(object).prepend(response.error_message);checkForErrorsAndMaybeSetFocus()}}else{showFileLoading(object);object.submit()}};error=function(){jQuery(object).find('input[type="submit"], input[type="button"]').prop("disabled",false);object.submit()};postToAjaxUrl(object,data,success,error)}function postToAjaxUrl(form,
28
+ data,success,error){var ajaxUrl,action,ajaxParams;ajaxUrl=frm_js.ajax_url;action=form.getAttribute("action");if("string"===typeof action&&-1!==action.indexOf("?action=frm_forms_preview"))ajaxUrl=action.split("?action=frm_forms_preview")[0];ajaxParams={type:"POST",url:ajaxUrl,data:data,success:success};if("function"===typeof error)ajaxParams.error=error;jQuery.ajax(ajaxParams)}function afterFormSubmitted(object,response){var formCompleted=jQuery(response.content).find(".frm_message");if(formCompleted.length)jQuery(document).trigger("frmFormComplete",
29
+ [object,response]);else jQuery(document).trigger("frmPageChanged",[object,response])}function removeAddedScripts(formContainer,formID){var endReplace=jQuery(".frm_end_ajax_"+formID);if(endReplace.length){formContainer.nextUntil(".frm_end_ajax_"+formID).remove();endReplace.remove()}}function maybeSlideOut(oldContent,newContent){var c,newClass="frm_slideout";if(newContent.indexOf(" frm_slide")!==-1){c=oldContent.children();if(newContent.indexOf(" frm_going_back")!==-1)newClass+=" frm_going_back";c.removeClass("frm_going_back");
30
+ c.addClass(newClass);return 300}return 0}function addUrlParam(response){var url;if(history.pushState&&typeof response.page!=="undefined"){url=addQueryVar("frm_page",response.page);window.history.pushState({"html":response.html},"","?"+url)}}function addQueryVar(key,value){var kvp,i,x;key=encodeURI(key);value=encodeURI(value);kvp=document.location.search.substr(1).split("&");i=kvp.length;while(i--){x=kvp[i].split("=");if(x[0]==key){x[1]=value;kvp[i]=x.join("=");break}}if(i<0)kvp[kvp.length]=[key,value].join("=");
31
+ return kvp.join("&")}function addFieldError($fieldCont,key,jsErrors){var input,id,describedBy;if($fieldCont.length&&$fieldCont.is(":visible")){$fieldCont.addClass("frm_blank_field");input=$fieldCont.find("input, select, textarea");id="frm_error_field_"+key;describedBy=input.attr("aria-describedby");if(typeof frmThemeOverride_frmPlaceError==="function")frmThemeOverride_frmPlaceError(key,jsErrors);else{if(-1!==jsErrors[key].indexOf("<div"))$fieldCont.append(jsErrors[key]);else $fieldCont.append('<div class="frm_error" role="alert" id="'+
32
+ id+'">'+jsErrors[key]+"</div>");if(typeof describedBy==="undefined")describedBy=id;else if(describedBy.indexOf(id)===-1)describedBy=describedBy+" "+id;input.attr("aria-describedby",describedBy)}input.attr("aria-invalid",true);input.attr("aria-describedby",id);jQuery(document).trigger("frmAddFieldError",[$fieldCont,key,jsErrors])}}function removeFieldError($fieldCont){var errorMessage=$fieldCont.find(".frm_error"),errorId=errorMessage.attr("id"),input=$fieldCont.find("input, select, textarea"),describedBy=
33
+ input.attr("aria-describedby");$fieldCont.removeClass("frm_blank_field has-error");errorMessage.remove();input.attr("aria-invalid",false);input.removeAttr("aria-describedby");if(typeof describedBy!=="undefined"){describedBy=describedBy.replace(errorId,"");input.attr("aria-describedby",describedBy)}}function removeAllErrors(){jQuery(".form-field").removeClass("frm_blank_field has-error");jQuery(".form-field .frm_error").replaceWith("");jQuery(".frm_error_style").remove()}function scrollToFirstField(object){var field=
34
+ jQuery(object).find(".frm_blank_field").first();if(field.length)frmFrontForm.scrollMsg(field,object,true)}function showSubmitLoading($object){showLoadingIndicator($object);disableSubmitButton($object);disableSaveDraft($object)}function showLoadingIndicator($object){if(!$object.hasClass("frm_loading_form")&&!$object.hasClass("frm_loading_prev")){addLoadingClass($object);$object.trigger("frmStartFormLoading")}}function addLoadingClass($object){var loadingClass=isGoingToPrevPage($object)?"frm_loading_prev":
35
+ "frm_loading_form";$object.addClass(loadingClass)}function isGoingToPrevPage($object){return typeof frmProForm!=="undefined"&&frmProForm.goingToPreviousPage($object)}function removeSubmitLoading($object,enable,processesRunning){var loadingForm;if(processesRunning>0)return;loadingForm=jQuery(".frm_loading_form");loadingForm.removeClass("frm_loading_form");loadingForm.removeClass("frm_loading_prev");loadingForm.trigger("frmEndFormLoading");if(enable==="enable"){enableSubmitButton(loadingForm);enableSaveDraft(loadingForm)}}
36
+ function showFileLoading(object){var fileval,loading=document.getElementById("frm_loading");if(loading!==null){fileval=jQuery(object).find("input[type=file]").val();if(typeof fileval!=="undefined"&&fileval!=="")setTimeout(function(){jQuery(loading).fadeIn("slow")},2E3)}}function clearDefault(){toggleDefault(jQuery(this),"clear")}function replaceDefault(){toggleDefault(jQuery(this),"replace")}function toggleDefault($thisField,e){var thisVal,v=$thisField.data("frmval").replace(/(\n|\r\n)/g,"\r");if(v===
37
+ ""||typeof v==="undefined")return false;thisVal=$thisField.val().replace(/(\n|\r\n)/g,"\r");if("replace"===e){if(thisVal==="")$thisField.addClass("frm_default").val(v)}else if(thisVal==v)$thisField.removeClass("frm_default").val("")}function resendEmail(){var $link=jQuery(this),entryId=this.getAttribute("data-eid"),formId=this.getAttribute("data-fid"),label=$link.find(".frm_link_label");if(label.length<1)label=$link;label.append('<span class="frm-wait"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,
38
+ data:{action:"frm_entries_send_email",entry_id:entryId,form_id:formId,nonce:frm_js.nonce},success:function(msg){var admin=document.getElementById("wpbody");if(admin===null)label.html(msg);else{label.html("");$link.after(msg)}}});return false}function confirmClick(){var message=jQuery(this).data("frmconfirm");return confirm(message)}function toggleDiv(){var div=jQuery(this).data("frmtoggle");if(jQuery(div).is(":visible"))jQuery(div).slideUp("fast");else jQuery(div).slideDown("fast");return false}function addIndexOfFallbackForIE8(){var len,
39
+ from;if(!Array.prototype.indexOf)Array.prototype.indexOf=function(elt){len=this.length>>>0;from=Number(arguments[1])||0;from=from<0?Math.ceil(from):Math.floor(from);if(from<0)from+=len;for(;from<len;from++)if(from in this&&this[from]===elt)return from;return-1}}function addTrimFallbackForIE8(){if(typeof String.prototype.trim!=="function")String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}}function addFilterFallbackForIE8(){var t,len,res,thisp,i,val;if(!Array.prototype.filter)Array.prototype.filter=
40
+ function(fun){if(this===void 0||this===null)throw new TypeError;t=Object(this);len=t.length>>>0;if(typeof fun!=="function")throw new TypeError;res=[];thisp=arguments[1];for(i=0;i<len;i++)if(i in t){val=t[i];if(fun.call(thisp,val,i,t))res.push(val)}return res}}function addKeysFallbackForIE8(){var keys,i;if(!Object.keys)Object.keys=function(obj){keys=[];for(i in obj)if(obj.hasOwnProperty(i))keys.push(i);return keys}}function onHoneypotFieldChange(){var css=jQuery(this).css("box-shadow");if(css.match(/inset/))this.parentNode.removeChild(this)}
41
+ function changeFocusWhenClickComboFieldLabel(){var label;var comboInputsContainer=document.querySelectorAll(".frm_combo_inputs_container");comboInputsContainer.forEach(function(inputsContainer){if(!inputsContainer.closest(".frm_form_field"))return;label=inputsContainer.closest(".frm_form_field").querySelector(".frm_primary_label");if(!label)return;label.addEventListener("click",function(e){inputsContainer.querySelector(".frm_form_field:first-child input, .frm_form_field:first-child select, .frm_form_field:first-child textarea").focus()})})}
42
+ function checkForErrorsAndMaybeSetFocus(){var errors,element,timeoutCallback;errors=document.querySelectorAll(".frm_form_field .frm_error");if(!errors.length)return;element=errors[0];do{element=element.previousSibling;if(-1!==["input","select","textarea"].indexOf(element.nodeName.toLowerCase())){element.focus();break}if("undefined"!==typeof element.classList){if(element.classList.contains("html-active"))timeoutCallback=function(){var textarea=element.querySelector("textarea");if(null!==textarea)textarea.focus()};
43
+ else if(element.classList.contains("tmce-active"))timeoutCallback=function(){tinyMCE.activeEditor.focus()};if("function"===typeof timeoutCallback){setTimeout(timeoutCallback,0);break}}}while(element.previousSibling)}return{init:function(){jQuery(document).off("submit.formidable",".frm-show-form");jQuery(document).on("submit.formidable",".frm-show-form",frmFrontForm.submitForm);jQuery(".frm-show-form input[onblur], .frm-show-form textarea[onblur]").each(function(){if(jQuery(this).val()==="")jQuery(this).trigger("blur")});
44
+ jQuery(document).on("focus",".frm_toggle_default",clearDefault);jQuery(document).on("blur",".frm_toggle_default",replaceDefault);jQuery(".frm_toggle_default").trigger("blur");jQuery(document.getElementById("frm_resend_email")).on("click",resendEmail);jQuery(document).on("change",'.frm-show-form input[name^="item_meta"], .frm-show-form select[name^="item_meta"], .frm-show-form textarea[name^="item_meta"]',frmFrontForm.fieldValueChanged);jQuery(document).on("change keyup",".frm-show-form .frm_inside_container input, .frm-show-form .frm_inside_container select, .frm-show-form .frm_inside_container textarea",
45
+ maybeShowLabel);jQuery(document).on("change","[id^=frm_email_]",onHoneypotFieldChange);jQuery(document).on("click","a[data-frmconfirm]",confirmClick);jQuery("a[data-frmtoggle]").on("click",toggleDiv);checkForErrorsAndMaybeSetFocus();changeFocusWhenClickComboFieldLabel();addIndexOfFallbackForIE8();addTrimFallbackForIE8();addFilterFallbackForIE8();addKeysFallbackForIE8()},getFieldId:function(field,fullID){return getFieldId(field,fullID)},renderRecaptcha:function(captcha){var formID,recaptchaID,size=
46
+ captcha.getAttribute("data-size"),rendered=captcha.getAttribute("data-rid")!==null,params={"sitekey":captcha.getAttribute("data-sitekey"),"size":size,"theme":captcha.getAttribute("data-theme")};if(rendered)return;if(size==="invisible"){formID=jQuery(captcha).closest("form").find('input[name="form_id"]').val();jQuery(captcha).closest(".frm_form_field .frm_primary_label").hide();params.callback=function(token){frmFrontForm.afterRecaptcha(token,formID)}}recaptchaID=grecaptcha.render(captcha.id,params);
47
+ captcha.setAttribute("data-rid",recaptchaID)},afterSingleRecaptcha:function(){var object=jQuery(".frm-show-form .g-recaptcha").closest("form")[0];frmFrontForm.submitFormNow(object)},afterRecaptcha:function(token,formID){var object=jQuery("#frm_form_"+formID+"_container form")[0];frmFrontForm.submitFormNow(object)},submitForm:function(e){frmFrontForm.submitFormManual(e,this)},submitFormManual:function(e,object){var isPro,errors,invisibleRecaptcha=hasInvisibleRecaptcha(object),classList=object.className.trim().split(/\s+/gi);
48
+ if(classList&&invisibleRecaptcha.length<1){isPro=classList.indexOf("frm_pro_form")>-1;if(!isPro)return}if(jQuery("body").hasClass("wp-admin")&&jQuery(object).closest(".frmapi-form").length<1)return;e.preventDefault();if(typeof frmProForm!=="undefined"&&typeof frmProForm.submitAllowed==="function")if(!frmProForm.submitAllowed(object))return;if(invisibleRecaptcha.length){showLoadingIndicator(jQuery(object));executeInvisibleRecaptcha(invisibleRecaptcha)}else{errors=frmFrontForm.validateFormSubmit(object);
49
+ if(Object.keys(errors).length===0){showSubmitLoading(jQuery(object));frmFrontForm.submitFormNow(object,classList)}}},submitFormNow:function(object){var hasFileFields,antispamInput,classList=object.className.trim().split(/\s+/gi);if(object.hasAttribute("data-token")&&null===object.querySelector('[name="antispam_token"]')){antispamInput=document.createElement("input");antispamInput.type="hidden";antispamInput.name="antispam_token";antispamInput.value=object.getAttribute("data-token");object.appendChild(antispamInput)}if(classList.indexOf("frm_ajax_submit")>
50
+ -1){hasFileFields=jQuery(object).find('input[type="file"]').filter(function(){return!!this.value}).length;if(hasFileFields<1){action=jQuery(object).find('input[name="frm_action"]').val();frmFrontForm.checkFormErrors(object,action)}else object.submit()}else object.submit()},validateFormSubmit:function(object){if(typeof tinyMCE!=="undefined"&&jQuery(object).find(".wp-editor-wrap").length)tinyMCE.triggerSave();jsErrors=[];if(shouldJSValidate(object)){frmFrontForm.getAjaxFormErrors(object);if(Object.keys(jsErrors).length)frmFrontForm.addAjaxFormErrors(object)}return jsErrors},
51
+ getAjaxFormErrors:function(object){var customErrors,key;jsErrors=validateForm(object);if(typeof frmThemeOverride_jsErrors==="function"){action=jQuery(object).find('input[name="frm_action"]').val();customErrors=frmThemeOverride_jsErrors(action,object);if(Object.keys(customErrors).length)for(key in customErrors)jsErrors[key]=customErrors[key]}return jsErrors},addAjaxFormErrors:function(object){var key,$fieldCont;removeAllErrors();for(key in jsErrors){$fieldCont=jQuery(object).find("#frm_field_"+key+
52
+ "_container");if($fieldCont.length)addFieldError($fieldCont,key,jsErrors);else delete jsErrors[key]}scrollToFirstField(object);checkForErrorsAndMaybeSetFocus()},checkFormErrors:function(object,action){getFormErrors(object,action)},checkRequiredField:function(field,errors){return checkRequiredField(field,errors)},showSubmitLoading:function($object){showSubmitLoading($object)},removeSubmitLoading:function($object,enable,processesRunning){removeSubmitLoading($object,enable,processesRunning)},scrollToID:function(id){var object=
53
+ jQuery(document.getElementById(id));frmFrontForm.scrollMsg(object,false)},scrollMsg:function(id,object,animate){var newPos,m,b,screenTop,screenBottom,scrollObj="";if(typeof object==="undefined"){scrollObj=jQuery(document.getElementById("frm_form_"+id+"_container"));if(scrollObj.length<1)return}else if(typeof id==="string")scrollObj=jQuery(object).find("#frm_field_"+id+"_container");else scrollObj=id;jQuery(scrollObj).trigger("focus");newPos=scrollObj.offset().top;if(!newPos||frm_js.offset==="-1")return;
54
+ newPos=newPos-frm_js.offset;m=jQuery("html").css("margin-top");b=jQuery("body").css("margin-top");if(m||b)newPos=newPos-parseInt(m)-parseInt(b);if(newPos&&window.innerHeight){screenTop=document.documentElement.scrollTop||document.body.scrollTop;screenBottom=screenTop+window.innerHeight;if(newPos>screenBottom||newPos<screenTop){if(typeof animate==="undefined")jQuery(window).scrollTop(newPos);else jQuery("html,body").animate({scrollTop:newPos},500);return false}}},fieldValueChanged:function(e){var fieldId=
55
+ frmFrontForm.getFieldId(this,false);if(!fieldId||typeof fieldId==="undefined")return;if(e.frmTriggered&&e.frmTriggered==fieldId)return;jQuery(document).trigger("frmFieldChanged",[this,fieldId,e]);if(e.selfTriggered!==true)maybeValidateChange(this)},savingDraft:function(object){console.warn("DEPRECATED: function frmFrontForm.savingDraft in v3.0 use frmProForm.savingDraft");if(typeof frmProForm!=="undefined")return frmProForm.savingDraft(object)},goingToPreviousPage:function(object){console.warn("DEPRECATED: function frmFrontForm.goingToPreviousPage in v3.0 use frmProForm.goingToPreviousPage");
56
  if(typeof frmProForm!=="undefined")return frmProForm.goingToPreviousPage(object)},hideOrShowFields:function(){console.warn("DEPRECATED: function frmFrontForm.hideOrShowFields in v3.0 use frmProForm.hideOrShowFields");if(typeof frmProForm!=="undefined")frmProForm.hideOrShowFields()},hidePreviouslyHiddenFields:function(){console.warn("DEPRECATED: function frmFrontForm.hidePreviouslyHiddenFields in v3.0 use frmProForm.hidePreviouslyHiddenFields");if(typeof frmProForm!=="undefined")frmProForm.hidePreviouslyHiddenFields()},
57
  checkDependentDynamicFields:function(ids){console.warn("DEPRECATED: function frmFrontForm.checkDependentDynamicFields in v3.0 use frmProForm.checkDependentDynamicFields");if(typeof frmProForm!=="undefined")frmProForm.checkDependentDynamicFields(ids)},checkDependentLookupFields:function(ids){console.warn("DEPRECATED: function frmFrontForm.checkDependentLookupFields in v3.0 use frmProForm.checkDependentLookupFields");if(typeof frmProForm!=="undefined")frmProForm.checkDependentLookupFields(ids)},loadGoogle:function(){console.warn("DEPRECATED: function frmFrontForm.loadGoogle in v3.0 use frmProForm.loadGoogle");
58
  frmProForm.loadGoogle()},escapeHtml:function(text){return text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},invisible:function(classes){jQuery(classes).css("visibility","hidden")},visible:function(classes){jQuery(classes).css("visibility","visible")}}}frmFrontForm=frmFrontFormJS();jQuery(document).ready(function(){frmFrontForm.init()});
js/formidable_admin.js CHANGED
@@ -3564,9 +3564,19 @@ function frmAdminBuildJS() {
3564
  function div( atts ) {
3565
  var element = document.createElement( 'div' );
3566
  if ( 'object' === typeof atts ) {
3567
- if ( 'undefined' !== typeof atts.id ) {
3568
  element.id = atts.id;
3569
  }
 
 
 
 
 
 
 
 
 
 
3570
  }
3571
  return element;
3572
  }
@@ -7100,6 +7110,7 @@ function frmAdminBuildJS() {
7100
  dismiss.setAttribute( 'tabindex', -1 );
7101
 
7102
  $modal = initModal( '#frm_new_form_modal', '600px' );
 
7103
  $modal.attr( 'frm-page', 'create' );
7104
  $modal.find( '#template-search-input' ).val( '' ).trigger( 'change' );
7105
  $modal.dialog( 'open' );
@@ -8277,6 +8288,465 @@ function frmAdminBuildJS() {
8277
  }
8278
  }
8279
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8280
  function initSelectionAutocomplete() {
8281
  if ( jQuery.fn.autocomplete ) {
8282
  initAutocomplete( 'page' );
@@ -8588,8 +9058,8 @@ function frmAdminBuildJS() {
8588
  }
8589
 
8590
  function initModal( id, width ) {
8591
- var $info = jQuery( id );
8592
- if ( $info.length < 1 ) {
8593
  return false;
8594
  }
8595
 
@@ -8597,7 +9067,7 @@ function frmAdminBuildJS() {
8597
  width = '550px';
8598
  }
8599
 
8600
- $info.dialog({
8601
  dialogClass: 'frm-dialog',
8602
  modal: true,
8603
  autoOpen: false,
@@ -8622,7 +9092,9 @@ function frmAdminBuildJS() {
8622
  optionType.value = '';
8623
  }
8624
  }
8625
- });
 
 
8626
 
8627
  return $info;
8628
  }
@@ -8952,6 +9424,7 @@ function frmAdminBuildJS() {
8952
  }
8953
 
8954
  loadTooltips();
 
8955
  initUpgradeModal();
8956
 
8957
  // used on build, form settings, and view settings
3564
  function div( atts ) {
3565
  var element = document.createElement( 'div' );
3566
  if ( 'object' === typeof atts ) {
3567
+ if ( 'string' === typeof atts.id ) {
3568
  element.id = atts.id;
3569
  }
3570
+ if ( 'string' === typeof atts.class ) {
3571
+ element.className = atts.class;
3572
+ }
3573
+ if ( 'object' === typeof atts.child ) {
3574
+ element.appendChild( atts.child );
3575
+ } else if ( 'undefined' !== typeof atts.children ) {
3576
+ atts.children.forEach( child => element.appendChild( child ) );
3577
+ } else if ( 'undefined' !== typeof atts.text ) {
3578
+ element.appendChild( document.createTextNode( atts.text ) );
3579
+ }
3580
  }
3581
  return element;
3582
  }
7110
  dismiss.setAttribute( 'tabindex', -1 );
7111
 
7112
  $modal = initModal( '#frm_new_form_modal', '600px' );
7113
+ offsetModalY( $modal, '50px' );
7114
  $modal.attr( 'frm-page', 'create' );
7115
  $modal.find( '#template-search-input' ).val( '' ).trigger( 'change' );
7116
  $modal.dialog( 'open' );
8288
  }
8289
  }
8290
 
8291
+ function initEmbedFormModal() {
8292
+ document.addEventListener( 'click', listenForFormEmbedClick );
8293
+ }
8294
+
8295
+ function listenForFormEmbedClick( event ) {
8296
+ var clicked = false;
8297
+
8298
+ const element = event.target;
8299
+ const tag = element.tagName.toLowerCase();
8300
+
8301
+ switch ( tag ) {
8302
+ case 'a':
8303
+ clicked = 'frm-embed-action' === element.id || element.classList.contains( 'frm-embed-form' );
8304
+ break;
8305
+
8306
+ case 'svg':
8307
+ clicked = element.parentNode.classList.contains( 'frm-embed-form' );
8308
+ break;
8309
+ }
8310
+
8311
+ if ( clicked ) {
8312
+ event.preventDefault();
8313
+
8314
+ const row = element.closest( 'tr' );
8315
+ let formId, formKey;
8316
+
8317
+ if ( row ) {
8318
+ formId = parseInt( row.querySelector( '.column-id' ).textContent );
8319
+ formKey = row.querySelector( '.column-form_key' ).textContent;
8320
+ } else {
8321
+ formId = document.getElementById( 'form_id' ).value;
8322
+
8323
+ const formKeyInput = document.getElementById( 'frm_form_key' );
8324
+ if ( formKeyInput ) {
8325
+ formKey = formKeyInput.value;
8326
+ } else {
8327
+ const previewDrop = document.getElementById( 'frm-previewDrop' );
8328
+ if ( previewDrop ) {
8329
+ formKey = previewDrop.nextElementSibling.querySelector( 'li a' ).getAttribute( 'href' ).split( 'form=' )[1];
8330
+ }
8331
+ }
8332
+ }
8333
+
8334
+ openFormEmbedModal( formId, formKey );
8335
+ }
8336
+ }
8337
+
8338
+ function openFormEmbedModal( formId, formKey ) {
8339
+ const modalId = 'frm_form_embed_modal';
8340
+
8341
+ let modal = document.getElementById( modalId );
8342
+
8343
+ if ( ! modal ) {
8344
+ modal = createEmptyModal( modalId );
8345
+ modal.classList.add( 'frm_common_modal' );
8346
+
8347
+ const title = div({ child: document.createTextNode( __( 'Embed form', 'formidable' ) ), class: 'frm-modal-title' });
8348
+
8349
+ const a = document.createElement( 'a' );
8350
+ a.textContent = __( 'Cancel', 'formidable' );
8351
+ a.className = 'dismiss';
8352
+
8353
+ const postbox = modal.querySelector( '.postbox' );
8354
+
8355
+ postbox.appendChild(
8356
+ div({
8357
+ class: 'frm_modal_top',
8358
+ children: [
8359
+ title,
8360
+ div({ child: a })
8361
+ ]
8362
+ })
8363
+ );
8364
+ postbox.appendChild(
8365
+ div({ class: 'frm_modal_content' })
8366
+ );
8367
+ postbox.appendChild(
8368
+ div({ class: 'frm_modal_footer' })
8369
+ );
8370
+ } else {
8371
+ modal.classList.remove( 'frm-on-page-2' );
8372
+ }
8373
+
8374
+ const content = modal.querySelector( '.frm_modal_content' );
8375
+ content.innerHTML = '';
8376
+ content.appendChild( getEmbedFormModalOptions( formId, formKey ) );
8377
+
8378
+ const footer = modal.querySelector( '.frm_modal_footer' );
8379
+ if ( ! footer.querySelector( 'a' ) ) {
8380
+ const doneButton = document.createElement( 'a' );
8381
+ doneButton.textContent = __( 'Done', 'formidable' );
8382
+ doneButton.className = 'button button-primary frm-button-primary dismiss';
8383
+ doneButton.href = '#';
8384
+ footer.appendChild( doneButton );
8385
+
8386
+ const cancelButton = document.createElement( 'a' );
8387
+ cancelButton.href = '#';
8388
+ cancelButton.className = 'button button-secondary frm-modal-cancel';
8389
+ cancelButton.textContent = __( 'Back', 'formidable' );
8390
+ cancelButton.addEventListener(
8391
+ 'click',
8392
+ function( event ) {
8393
+ event.preventDefault();
8394
+ openFormEmbedModal( formId, formKey );
8395
+ }
8396
+ );
8397
+ footer.appendChild( cancelButton );
8398
+ } else {
8399
+ const doneButton = modal.querySelector( '.frm_modal_footer .button-primary' );
8400
+ doneButton.textContent = __( 'Done', 'formidable' );
8401
+ doneButton.parentNode.replaceChild( doneButton.cloneNode( true ), doneButton );
8402
+ }
8403
+
8404
+ const $modal = jQuery( modal );
8405
+ if ( ! $modal.hasClass( 'frm-dialog' ) ) {
8406
+ initModal( $modal );
8407
+ }
8408
+
8409
+ offsetModalY( $modal, '50px' );
8410
+
8411
+ scrollToTop();
8412
+ $modal.dialog( 'open' );
8413
+
8414
+ $modal.parent().addClass( 'frm-embed-form-modal-wrapper' );
8415
+ }
8416
+
8417
+ function createEmptyModal( id ) {
8418
+ const modal = div({ id: id, class: 'frm-modal' });
8419
+ const postbox = div({ class: 'postbox' });
8420
+ const metaboxHolder = div({ class: 'metabox-holder', child: postbox });
8421
+ modal.appendChild( metaboxHolder );
8422
+ document.body.appendChild( modal );
8423
+ return modal;
8424
+ }
8425
+
8426
+ function scrollToTop() {
8427
+ if ( 'scrollRestoration' in history ) {
8428
+ history.scrollRestoration = 'manual';
8429
+ }
8430
+ window.scrollTo( 0, 0 );
8431
+ }
8432
+
8433
+ function offsetModalY( $modal, amount ) {
8434
+ const position = {
8435
+ my: 'top',
8436
+ at: 'top+' + amount,
8437
+ of: window
8438
+ };
8439
+ $modal.dialog( 'option', 'position', position );
8440
+ }
8441
+
8442
+ function getEmbedFormModalOptions( formId, formKey ) {
8443
+ const content = div({ class: 'frm_embed_form_content frm_wrap' });
8444
+
8445
+ const options = [
8446
+ {
8447
+ icon: 'frm_select_existing_page_icon',
8448
+ label: __( 'Select existing page', 'formidable' ),
8449
+ description: __( 'Embed your form into an existing page.', 'formidable' ),
8450
+ callback: () => {
8451
+ content.innerHTML = '';
8452
+
8453
+ const spinner = document.createElement( 'span' );
8454
+ spinner.className = 'frm-wait frm_spinner';
8455
+ spinner.style.visibility = 'visible';
8456
+ content.appendChild( spinner );
8457
+
8458
+ const gap = div();
8459
+ gap.style.height = '20px';
8460
+ content.appendChild( gap );
8461
+
8462
+ content.classList.add( 'frm-loading-page-options' );
8463
+
8464
+ jQuery.ajax({
8465
+ type: 'POST',
8466
+ url: ajaxurl,
8467
+ data: {
8468
+ action: 'get_page_dropdown',
8469
+ nonce: frmGlobal.nonce
8470
+ },
8471
+ dataType: 'json',
8472
+ success: function( response ) {
8473
+ if ( 'object' === typeof response && 'string' === typeof response.html ) {
8474
+ content.classList.remove( 'frm-loading-page-options' );
8475
+ content.innerHTML = '';
8476
+
8477
+ const title = getLabel( __( 'Select the page you want to embed your form into.', 'formidable' ) );
8478
+ title.setAttribute( 'for', 'frm_page_dropdown' );
8479
+ content.appendChild( title );
8480
+
8481
+ let editPageUrl;
8482
+
8483
+ const modal = document.getElementById( 'frm_form_embed_modal' );
8484
+ doneButton = modal.querySelector( '.frm_modal_footer .button-primary' );
8485
+ doneButton.classList.remove( 'dismiss' );
8486
+ doneButton.textContent = __( 'Insert Form', 'formidable' );
8487
+ doneButton.addEventListener(
8488
+ 'click',
8489
+ function( event ) {
8490
+ event.preventDefault();
8491
+
8492
+ const pageDropdown = modal.querySelector( '[name="frm_page_dropdown"]' );
8493
+ modal.querySelectorAll( '.frm_error_style' ).forEach( error => error.remove() );
8494
+
8495
+ const pageId = pageDropdown.value;
8496
+
8497
+ if ( '0' === pageId || '' === pageId ) {
8498
+ const error = div({ class: 'frm_error_style' });
8499
+ error.setAttribute( 'role', 'alert' );
8500
+ error.textContent = __( 'Please select a page', 'formidable' );
8501
+ content.insertBefore( error, title.nextElementSibling );
8502
+ return;
8503
+ }
8504
+
8505
+ window.location.href = editPageUrl.replace( 'post=0', 'post=' + pageId );
8506
+ }
8507
+ );
8508
+
8509
+ const dropdownWrapper = div();
8510
+ dropdownWrapper.innerHTML = response.html;
8511
+ content.appendChild( dropdownWrapper );
8512
+ editPageUrl = response.edit_page_url + '&frmForm=' + formId;
8513
+ initSelectionAutocomplete();
8514
+ }
8515
+ }
8516
+ });
8517
+ }
8518
+ },
8519
+ {
8520
+ icon: 'frm_create_new_page_icon',
8521
+ label: __( 'Create new page', 'formidable' ),
8522
+ description: __( 'Put your form on a newly created page.', 'formidable' ),
8523
+ callback: () => {
8524
+ content.innerHTML = '';
8525
+
8526
+ const wrapper = div({ class: 'field-group' });
8527
+ const form = document.createElement( 'form' );
8528
+
8529
+ const createPageWithShortcode = () => {
8530
+ jQuery.ajax({
8531
+ type: 'POST',
8532
+ url: ajaxurl,
8533
+ data: {
8534
+ action: 'frm_create_page_with_shortcode',
8535
+ form_id: formId,
8536
+ name: input.value,
8537
+ nonce: frmGlobal.nonce
8538
+ },
8539
+ dataType: 'json',
8540
+ success: function( response ) {
8541
+ if ( 'object' === typeof response && 'string' === typeof response.redirect ) {
8542
+ window.location.href = response.redirect;
8543
+ }
8544
+ }
8545
+ });
8546
+ };
8547
+
8548
+ form.addEventListener(
8549
+ 'submit',
8550
+ function( event ) {
8551
+ event.preventDefault();
8552
+ createPageWithShortcode();
8553
+ return false;
8554
+ },
8555
+ true
8556
+ );
8557
+
8558
+ const title = getLabel( __( 'What will you call the new page?', 'formidable' ) );
8559
+ title.setAttribute( 'for', 'frm_name_your_page' );
8560
+ form.appendChild( title );
8561
+
8562
+ const input = document.createElement( 'input' );
8563
+ input.id = 'frm_name_your_page';
8564
+ input.placeholder = __( 'Name your page', 'formidable' );
8565
+ form.appendChild( input );
8566
+
8567
+ wrapper.appendChild( form );
8568
+ content.appendChild( wrapper );
8569
+
8570
+ input.type = 'text';
8571
+ input.focus();
8572
+
8573
+ const modal = document.getElementById( 'frm_form_embed_modal' );
8574
+ doneButton = modal.querySelector( '.frm_modal_footer .button-primary' );
8575
+ doneButton.textContent = __( 'Create page', 'formidable' );
8576
+ doneButton.addEventListener(
8577
+ 'click',
8578
+ function( event ) {
8579
+ event.preventDefault();
8580
+ createPageWithShortcode();
8581
+ }
8582
+ );
8583
+ }
8584
+ },
8585
+ {
8586
+ icon: 'frm_insert_manually_icon',
8587
+ label: __( 'Insert manually', 'formidable' ),
8588
+ description: __( 'Use WP shortcodes or PHP code to put the form in any place.', 'formidable' ),
8589
+ callback: () => {
8590
+ content.innerHTML = '';
8591
+ getEmbedFormManualExamples( formId, formKey ).forEach( example => content.appendChild( getEmbedExample( example ) ) );
8592
+ }
8593
+ }
8594
+ ];
8595
+
8596
+ options.forEach(
8597
+ option => content.appendChild( getEmbedFormModalOption( option ) )
8598
+ );
8599
+
8600
+ return content;
8601
+ }
8602
+
8603
+ function getEmbedFormModalOption({ icon, label, description, callback }) {
8604
+ const output = div();
8605
+ output.appendChild( wrapEmbedFormModalOptionIcon( icon ) );
8606
+ output.className = 'frm-embed-modal-option';
8607
+ output.setAttribute( 'tabindex', 0 );
8608
+ output.setAttribute( 'role', 'button' );
8609
+
8610
+ const textWrapper = div();
8611
+ textWrapper.appendChild( getLabel( label ) );
8612
+ textWrapper.appendChild( div({ text: description }) );
8613
+ output.appendChild( textWrapper );
8614
+
8615
+ output.addEventListener(
8616
+ 'click',
8617
+ function() {
8618
+ document.getElementById( 'frm_form_embed_modal' ).classList.add( 'frm-on-page-2' );
8619
+ callback();
8620
+ }
8621
+ );
8622
+ return output;
8623
+ }
8624
+
8625
+ function wrapEmbedFormModalOptionIcon( sourceIconId ) {
8626
+ const clone = document.getElementById( sourceIconId ).cloneNode( true );
8627
+ const wrapper = div({ child: clone });
8628
+ wrapper.className = 'frm-embed-form-icon-wrapper';
8629
+ return wrapper;
8630
+ }
8631
+
8632
+ function getEmbedFormManualExamples( formId, formKey ) {
8633
+ let examples = [
8634
+ {
8635
+ label: __( 'WordPress shortcode', 'formidable' ),
8636
+ example: '[formidable id=' + formId + ' title=true description=true]',
8637
+ link: 'https://formidableforms.com/knowledgebase/publish-a-form/#kb-insert-the-shortcode-manually',
8638
+ linkLabel: __( 'How to use shortcodes in WordPress', 'formidable' )
8639
+ },
8640
+ {
8641
+ label: __( 'Use PHP code', 'formidable' ),
8642
+ example: '<?php echo FrmFormsController::get_form_shortcode( array( \'id\' => ' + formId + ', \'title\' => true, \'description\' => true ) ); ?>'
8643
+ }
8644
+ ];
8645
+
8646
+ const filterArgs = { formId, formKey };
8647
+ examples = frmAdminBuild.hooks.applyFilters( 'frmEmbedFormExamples', examples, filterArgs );
8648
+
8649
+ return examples;
8650
+ }
8651
+
8652
+ function getEmbedExample({ label, example, link, linkLabel }) {
8653
+ let unique, element, labelElement, exampleElement, linkElement;
8654
+
8655
+ unique = getAutoId();
8656
+ element = div();
8657
+
8658
+ labelElement = getLabel( label );
8659
+ labelElement.id = 'frm_embed_example_label_' + unique;
8660
+ element.appendChild( labelElement );
8661
+
8662
+ if ( example.length > 80 ) {
8663
+ exampleElement = document.createElement( 'textarea' );
8664
+ } else {
8665
+ exampleElement = document.createElement( 'input' );
8666
+ exampleElement.type = 'text';
8667
+ }
8668
+
8669
+ exampleElement.id = 'frm_embed_example_' + unique;
8670
+ exampleElement.className = 'frm_embed_example';
8671
+ exampleElement.value = example;
8672
+ exampleElement.readOnly = true;
8673
+ exampleElement.setAttribute( 'tabindex', -1 );
8674
+
8675
+ if ( 'undefined' !== typeof link && 'undefined' !== typeof linkLabel ) {
8676
+ linkElement = document.createElement( 'a' );
8677
+ linkElement.href = link;
8678
+ linkElement.textContent = linkLabel;
8679
+ linkElement.setAttribute( 'target', '_blank' );
8680
+ element.appendChild( linkElement );
8681
+ }
8682
+
8683
+ element.appendChild( exampleElement );
8684
+ element.appendChild( getCopyIcon( label ) );
8685
+
8686
+ return element;
8687
+ }
8688
+
8689
+ function getLabel( text ) {
8690
+ const label = document.createElement( 'label' );
8691
+ label.textContent = text;
8692
+ return label;
8693
+ }
8694
+
8695
+ function getCopyIcon( label ) {
8696
+ const icon = document.getElementById( 'frm_copy_embed_form_icon' );
8697
+ let clone = icon.cloneNode( true );
8698
+ clone.id = 'frm_copy_embed_' + getAutoId();
8699
+ clone.setAttribute( 'tabindex', 0 );
8700
+ clone.setAttribute( 'role', 'button' );
8701
+ /* translators: %s: Example type (ie. WordPress shortcode, API Form script) */
8702
+ clone.setAttribute( 'aria-label', __( 'Copy %s', 'formidable' ).replace( '%s', label ) );
8703
+ clone.addEventListener(
8704
+ 'click',
8705
+ () => copyExampleToClipboard( clone.parentNode.querySelector( '.frm_embed_example' ) )
8706
+ );
8707
+ return clone;
8708
+ }
8709
+
8710
+ function copyExampleToClipboard( example ) {
8711
+ let copySuccess;
8712
+
8713
+ example.focus();
8714
+ example.select();
8715
+ example.setSelectionRange( 0, 99999 );
8716
+
8717
+ try {
8718
+ copySuccess = document.execCommand( 'copy' );
8719
+ } catch ( error ) {
8720
+ copySuccess = false;
8721
+ }
8722
+
8723
+ if ( copySuccess ) {
8724
+ speak( __( 'Successfully copied embed example', 'formidable' ) );
8725
+ }
8726
+
8727
+ return copySuccess;
8728
+ }
8729
+
8730
+ function speak( message ) {
8731
+ let element, id;
8732
+
8733
+ element = document.createElement( 'div' );
8734
+ id = 'speak-' + Date.now();
8735
+
8736
+ element.setAttribute( 'aria-live', 'assertive' );
8737
+ element.setAttribute( 'id', id );
8738
+ element.className = 'frm_screen_reader frm_hidden';
8739
+ element.textContent = message;
8740
+ document.body.appendChild( element );
8741
+
8742
+ setTimeout(
8743
+ function() {
8744
+ document.body.removeChild( element );
8745
+ },
8746
+ 1000
8747
+ );
8748
+ }
8749
+
8750
  function initSelectionAutocomplete() {
8751
  if ( jQuery.fn.autocomplete ) {
8752
  initAutocomplete( 'page' );
9058
  }
9059
 
9060
  function initModal( id, width ) {
9061
+ const $info = jQuery( id );
9062
+ if ( ! $info.length ) {
9063
  return false;
9064
  }
9065
 
9067
  width = '550px';
9068
  }
9069
 
9070
+ const dialogArgs = {
9071
  dialogClass: 'frm-dialog',
9072
  modal: true,
9073
  autoOpen: false,
9092
  optionType.value = '';
9093
  }
9094
  }
9095
+ };
9096
+
9097
+ $info.dialog( dialogArgs );
9098
 
9099
  return $info;
9100
  }
9424
  }
9425
 
9426
  loadTooltips();
9427
+ initEmbedFormModal();
9428
  initUpgradeModal();
9429
 
9430
  // used on build, form settings, and view settings
js/formidable_blocks.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateAttribute=function(e,t,n){n(function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({},e,t))},t.setTextAttribute=function(e,t){if(e)return" "+t+'="'+e+'"';return""},t.getSubDir=function(){var e=window.location.pathname,t=e.indexOf("wp-admin"),n="/";t>-1&&(n=e.substr(0,t));return n};t.cssHideAdvancedSettings="\n .components-panel__body.editor-block-inspector__advanced {\n display:none;\n }\n"},function(e,t,n){e.exports=n(8)()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var a=function(e){function t(){return i(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"render",value:function(){return wp.element.createElement("div",null,"[formidable",(e=this.props,t=e.formId,n=e.title,r=e.description,i=e.minimize,l="",l+=(0,o.setTextAttribute)(t,"id"),l+=(0,o.setTextAttribute)(n,"title"),l+=(0,o.setTextAttribute)(r,"description"),l+=(0,o.setTextAttribute)(i,"minimize")),"]");var e,t,n,r,i,l}}]),t}(wp.element.Component);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=l(n(10)),i=l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=wp.i18n.__,s=function(e){function t(){return a(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"render",value:function(){var e=this.props,t=e.formId,n=e.setAttributes,r=e.forms;return wp.element.createElement(o.default,{selected:t,itemName:u("form","formidable"),itemNamePlural:u("forms","formidable"),items:r,onChange:function(e){n({formId:e})}})}}]),t}(wp.element.Component);t.default=s,s.propTypes={formId:i.default.string,setAttributes:i.default.func.isRequired}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=wp.element.Component,a=wp.components.Dashicon,c=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"render",value:function(){return"svg"!==formidable_form_selector.icon?wp.element.createElement(a,{icon:formidable_form_selector.icon,size:"120"}):wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 599.68 601.37",width:"120",height:"120"},wp.element.createElement("path",{className:"cls-1 orange",d:"M289.6 384h140v76h-140z"}),wp.element.createElement("path",{className:"cls-1",d:"M400.2 147h-200c-17 0-30.6 12.2-30.6 29.3V218h260v-71zM397.9 264H169.6v196h75V340H398a32.2 32.2 0 0 0 30.1-21.4 24.3 24.3 0 0 0 1.7-8.7V264z"}),wp.element.createElement("path",{className:"cls-1",d:"M299.8 601.4A300.3 300.3 0 0 1 0 300.7a299.8 299.8 0 1 1 511.9 212.6 297.4 297.4 0 0 1-212 88zm0-563A262 262 0 0 0 38.3 300.7a261.6 261.6 0 1 0 446.5-185.5 259.5 259.5 0 0 0-185-76.8z"}))}}]),t}(l);t.default=c},function(e,t,n){"use strict";n(6),n(11)},function(e,t,n){"use strict";var r=c(n(2)),o=c(n(7)),i=c(n(4)),l=c(n(3)),a=n(0);function c(e){return e&&e.__esModule?e:{default:e}}var u=wp.element.Fragment,s=wp.i18n.__,f=wp.blocks.registerBlockType,p=wp.components,m=p.ServerSideRender,d=p.Notice;f("formidable/simple-form",{title:formidable_form_selector.name,description:s("Display a Form","formidable"),icon:i.default,category:"widgets",keywords:[s("contact forms","formidable"),"formidable"],edit:function(e){var t=e.setAttributes,n=e.attributes,r=e.isSelected,c=n.formId,f=formidable_form_selector.forms;return 0===f.length?wp.element.createElement(d,{status:"warning",isDismissible:!1},s("This site does not have any forms.","formidable")):c?wp.element.createElement(u,null,wp.element.createElement(o.default,{attributes:n,setAttributes:t,forms:f}),r&&wp.element.createElement("style",null,a.cssHideAdvancedSettings),wp.element.createElement(m,{block:"formidable/simple-form",attributes:n})):wp.element.createElement("div",{className:"frm-block-intro-screen"},wp.element.createElement("div",{className:"frm-block-intro-content"},wp.element.createElement(i.default,null),wp.element.createElement("div",{className:"frm-block-title"},formidable_form_selector.name),wp.element.createElement("div",{className:"frm-block-selector-screen"},wp.element.createElement(l.default,{formId:c,setAttributes:t,forms:f}))))},save:function(e){var t=e.attributes;return void 0===t.formId?"":wp.element.createElement(u,null,wp.element.createElement(r.default,t))}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=c(n(1)),i=c(n(3)),l=c(n(2)),a=n(0);function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var f=wp.i18n.__,p=wp.element.Component,m=wp.editor.InspectorControls,d=wp.components,b=d.PanelBody,y=d.PanelRow,w=d.ToggleControl,h=d.ExternalLink,v=function(e){function t(){return u(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"render",value:function(){var e=this.props,t=e.setAttributes,n=e.attributes,r=e.forms,o=n.formId,c=n.title,u=n.description,s=n.minimize;return wp.element.createElement(m,null,wp.element.createElement(b,{title:f("Select Form","formidable"),initialOpen:!0},wp.element.createElement(y,null,wp.element.createElement(i.default,{formId:o,setAttributes:t,forms:r})),o&&wp.element.createElement(y,null,wp.element.createElement(h,{href:(0,a.getSubDir)()+"wp-admin/admin.php?page=formidable&frm_action=edit&id="+o},f("Go to form","formidable")))),wp.element.createElement(b,{title:f("Options","formidable"),initialOpen:!1},wp.element.createElement(w,{label:f("Show Form Title","formidable"),checked:c,onChange:function(e){(0,a.updateAttribute)("title",e?"1":"",t)}}),wp.element.createElement(w,{label:f("Show Form Description","formidable"),checked:u,onChange:function(e){(0,a.updateAttribute)("description",e?"1":"",t)}}),wp.element.createElement(w,{label:f("Minimize HTML","formidable"),checked:s,onChange:function(e){(0,a.updateAttribute)("minimize",e?"1":"",t)}})),wp.element.createElement(b,{title:f("Shortcode","formidable"),initialOpen:!1},wp.element.createElement(y,null,wp.element.createElement(l.default,this.props.attributes))))}}]),t}(p);t.default=v,v.propTypes={attributes:o.default.object,setAttributes:o.default.func}},function(e,t,n){"use strict";var r=n(9);function o(){}e.exports=function(){function e(e,t,n,o,i,l){if(l!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(1),l=(r=i)&&r.__esModule?r:{default:r};function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=wp.i18n,s=u.__,f=u.sprintf,p=wp.element.Component,m=wp.components.SelectControl,d=function(e){function t(){return a(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"createOptions",value:function(e,t){var n=e.map((function(e){return{label:e.label,value:e.value}}));return[{label:f(s("Select a %s","formidable"),t),value:""}].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(n))}},{key:"render",value:function(){var e=this.props,t=e.selected,n=e.items,r=e.onChange,o=e.itemName,i=e.itemNamePlural,l=e.label,a=e.help;return n&&0!==n.length?wp.element.createElement(m,{value:t,options:this.createOptions(n,o),label:l,help:a,onChange:r}):wp.element.createElement("p",{className:"frm-block-select-no-items"},f(s("Currently, there are no %s","formidable"),i))}}]),t}(p);t.default=d,d.defaultProps={itemName:"item",itemNamePlural:"items"},d.propTypes={selected:l.default.oneOfType([l.default.string,l.default.number]),items:l.default.array,onChange:l.default.func,itemName:l.default.string,itemNamePlural:l.default.string,label:l.default.string,help:l.default.string}},function(e,t,n){"use strict";var r,o=n(4),i=(r=o)&&r.__esModule?r:{default:r};var l=wp.i18n.__,a=wp.blocks.registerBlockType,c=wp.components.Notice,u=wp.element.createElement("svg",{width:20,height:20},wp.element.createElement("path",{d:"M16.9 0H3a2 2 0 0 0-1.9 1.9V18a2 2 0 0 0 2 1.9h13.7a2 2 0 0 0 1.9-1.9V2a2 2 0 0 0-2-1.9zm0 18.1H3v-10H17v10zm0-11.9H3V2H17v4.3zM5.5 12.6H7c.3 0 .5-.3.5-.5v-1.5c0-.3-.3-.5-.5-.5H5.5c-.3 0-.5.3-.5.5V12c0 .3.3.5.5.5zm7.5 3.8h1.5c.3 0 .5-.3.5-.6v-5.2c0-.3-.3-.5-.5-.5H13c-.3 0-.5.3-.5.5v5.3c0 .2.3.4.5.4zm-7.5 0H7c.3 0 .5-.3.5-.6v-1.4c0-.3-.3-.6-.5-.6H5.5c-.3 0-.5.3-.5.6v1.4c0 .3.3.6.5.6zm3.8-3.8h1.4c.3 0 .6-.3.6-.5v-1.5c0-.3-.3-.5-.6-.5H9.3c-.3 0-.6.3-.6.5V12c0 .3.3.5.6.5zm0 3.8h1.4c.3 0 .6-.3.6-.6v-1.4c0-.3-.3-.6-.6-.6H9.3c-.3 0-.6.3-.6.6v1.4c0 .3.3.6.6.6z"}));a("formidable/calculator",{title:l("Calculator Form","formidable"),description:l("Display a Calculator Form","formidable"),icon:u,category:"widgets",keywords:["calculation","formidable"],edit:function(e){e.setAttributes,e.attributes.formId;return 0===formidable_form_selector.forms.length?wp.element.createElement(c,{status:"warning",isDismissible:!1},l("This site does not have any forms.","formidable")):wp.element.createElement("div",{className:"frm-block-intro-screen"},wp.element.createElement("div",{className:"frm-block-intro-content"},wp.element.createElement(i.default,null),wp.element.createElement("div",{className:"frm-block-title"},l("Calculator Form","formidable")),wp.element.createElement("div",{className:"frm-block-selector-screen frm_pro_tip"},wp.element.createElement(c,{status:"warning",isDismissible:!1},l("This site does not have any calculator forms.","formidable"),wp.element.createElement("br",null),wp.element.createElement("a",{href:formidable_form_selector.link,target:"_blank"},l("Upgrade Formidable Forms.","formidable"))),wp.element.createElement("img",{src:formidable_form_selector.url+"/images/conversion-calc.jpg",alt:l("Calculator Form","formidable")}))))}})}]);
1
+ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateAttribute=function(e,t,n){n(function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({},e,t))},t.setTextAttribute=function(e,t){if(e)return" "+t+'="'+e+'"';return""},t.getSubDir=function(){var e=window.location.pathname,t=e.indexOf("wp-admin"),n="/";t>-1&&(n=e.substr(0,t));return n};t.cssHideAdvancedSettings="\n .components-panel__body.editor-block-inspector__advanced {\n display:none;\n }\n"},function(e,t,n){e.exports=n(8)()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0);function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var a=function(e){function t(){return l(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"render",value:function(){return wp.element.createElement("div",null,"[formidable",(e=this.props,t=e.formId,n=e.title,r=e.description,l=e.minimize,i="",i+=(0,o.setTextAttribute)(t,"id"),i+=(0,o.setTextAttribute)(n,"title"),i+=(0,o.setTextAttribute)(r,"description"),i+=(0,o.setTextAttribute)(l,"minimize")),"]");var e,t,n,r,l,i}}]),t}(wp.element.Component);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=i(n(10)),l=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=wp.i18n.__,s=function(e){function t(){return a(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"render",value:function(){var e=this.props,t=e.formId,n=e.setAttributes,r=e.forms;return wp.element.createElement(o.default,{selected:t,itemName:u("form","formidable"),itemNamePlural:u("forms","formidable"),items:r,onChange:function(e){n({formId:e})}})}}]),t}(wp.element.Component);t.default=s,s.propTypes={formId:l.default.string,setAttributes:l.default.func.isRequired}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var i=wp.element.Component,a=wp.components.Dashicon,c=function(e){function t(){return o(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"render",value:function(){return"svg"!==formidable_form_selector.icon?wp.element.createElement(a,{icon:formidable_form_selector.icon,size:"120"}):wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 599.68 601.37",width:"120",height:"120"},wp.element.createElement("path",{className:"cls-1 orange",d:"M289.6 384h140v76h-140z"}),wp.element.createElement("path",{className:"cls-1",d:"M400.2 147h-200c-17 0-30.6 12.2-30.6 29.3V218h260v-71zM397.9 264H169.6v196h75V340H398a32.2 32.2 0 0 0 30.1-21.4 24.3 24.3 0 0 0 1.7-8.7V264z"}),wp.element.createElement("path",{className:"cls-1",d:"M299.8 601.4A300.3 300.3 0 0 1 0 300.7a299.8 299.8 0 1 1 511.9 212.6 297.4 297.4 0 0 1-212 88zm0-563A262 262 0 0 0 38.3 300.7a261.6 261.6 0 1 0 446.5-185.5 259.5 259.5 0 0 0-185-76.8z"}))}}]),t}(i);t.default=c},function(e,t,n){"use strict";n(6),n(11)},function(e,t,n){"use strict";var r=c(n(2)),o=c(n(7)),l=c(n(4)),i=c(n(3)),a=n(0);function c(e){return e&&e.__esModule?e:{default:e}}var u=wp.element.Fragment,s=wp.i18n.__,f=wp.blocks.registerBlockType,p=wp.components,m=p.ServerSideRender,d=p.Notice;f("formidable/simple-form",{title:formidable_form_selector.name,description:s("Display a Form","formidable"),icon:l.default,category:"widgets",keywords:[s("contact forms","formidable"),"formidable"],edit:function(e){var t=e.setAttributes,n=e.attributes,r=e.isSelected,c=n.formId,f=formidable_form_selector.forms;return 0===f.length?wp.element.createElement(d,{status:"warning",isDismissible:!1},s("This site does not have any forms.","formidable")):c?wp.element.createElement(u,null,wp.element.createElement(o.default,{attributes:n,setAttributes:t,forms:f}),r&&wp.element.createElement("style",null,a.cssHideAdvancedSettings),wp.element.createElement(m,{block:"formidable/simple-form",attributes:n})):wp.element.createElement("div",{className:"frm-block-intro-screen"},wp.element.createElement("div",{className:"frm-block-intro-content"},wp.element.createElement(l.default,null),wp.element.createElement("div",{className:"frm-block-title"},formidable_form_selector.name),wp.element.createElement("div",{className:"frm-block-selector-screen"},wp.element.createElement(i.default,{formId:c,setAttributes:t,forms:f}))))},save:function(e){var t=e.attributes;return void 0===t.formId?"":wp.element.createElement(u,null,wp.element.createElement(r.default,t))}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=c(n(1)),l=c(n(3)),i=c(n(2)),a=n(0);function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var f=wp.i18n.__,p=wp.element.Component,m=wp.blockEditor.InspectorControls,d=wp.components,b=d.PanelBody,y=d.PanelRow,w=d.ToggleControl,h=d.ExternalLink,v=function(e){function t(){return u(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"render",value:function(){var e=this.props,t=e.setAttributes,n=e.attributes,r=e.forms,o=n.formId,c=n.title,u=n.description,s=n.minimize;return wp.element.createElement(m,null,wp.element.createElement(b,{title:f("Select Form","formidable"),initialOpen:!0},wp.element.createElement(y,null,wp.element.createElement(l.default,{formId:o,setAttributes:t,forms:r})),o&&wp.element.createElement(y,null,wp.element.createElement(h,{href:(0,a.getSubDir)()+"wp-admin/admin.php?page=formidable&frm_action=edit&id="+o},f("Go to form","formidable")))),wp.element.createElement(b,{title:f("Options","formidable"),initialOpen:!1},wp.element.createElement(w,{label:f("Show Form Title","formidable"),checked:c,onChange:function(e){(0,a.updateAttribute)("title",e?"1":"",t)}}),wp.element.createElement(w,{label:f("Show Form Description","formidable"),checked:u,onChange:function(e){(0,a.updateAttribute)("description",e?"1":"",t)}}),wp.element.createElement(w,{label:f("Minimize HTML","formidable"),checked:s,onChange:function(e){(0,a.updateAttribute)("minimize",e?"1":"",t)}})),wp.element.createElement(b,{title:f("Shortcode","formidable"),initialOpen:!1},wp.element.createElement(y,null,wp.element.createElement(i.default,this.props.attributes))))}}]),t}(p);t.default=v,v.propTypes={attributes:o.default.object,setAttributes:o.default.func}},function(e,t,n){"use strict";var r=n(9);function o(){}e.exports=function(){function e(e,t,n,o,l,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),i=(r=l)&&r.__esModule?r:{default:r};function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=wp.i18n,s=u.__,f=u.sprintf,p=wp.element.Component,m=wp.components.SelectControl,d=function(e){function t(){return a(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"createOptions",value:function(e,t){var n=e.map((function(e){return{label:e.label,value:e.value}}));return[{label:f(s("Select a %s","formidable"),t),value:""}].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(n))}},{key:"render",value:function(){var e=this.props,t=e.selected,n=e.items,r=e.onChange,o=e.itemName,l=e.itemNamePlural,i=e.label,a=e.help;return n&&0!==n.length?wp.element.createElement(m,{value:t,options:this.createOptions(n,o),label:i,help:a,onChange:r}):wp.element.createElement("p",{className:"frm-block-select-no-items"},f(s("Currently, there are no %s","formidable"),l))}}]),t}(p);t.default=d,d.defaultProps={itemName:"item",itemNamePlural:"items"},d.propTypes={selected:i.default.oneOfType([i.default.string,i.default.number]),items:i.default.array,onChange:i.default.func,itemName:i.default.string,itemNamePlural:i.default.string,label:i.default.string,help:i.default.string}},function(e,t,n){"use strict";var r,o=n(4),l=(r=o)&&r.__esModule?r:{default:r};var i=wp.i18n.__,a=wp.blocks.registerBlockType,c=wp.components.Notice,u=wp.element.createElement("svg",{width:20,height:20},wp.element.createElement("path",{d:"M16.9 0H3a2 2 0 0 0-1.9 1.9V18a2 2 0 0 0 2 1.9h13.7a2 2 0 0 0 1.9-1.9V2a2 2 0 0 0-2-1.9zm0 18.1H3v-10H17v10zm0-11.9H3V2H17v4.3zM5.5 12.6H7c.3 0 .5-.3.5-.5v-1.5c0-.3-.3-.5-.5-.5H5.5c-.3 0-.5.3-.5.5V12c0 .3.3.5.5.5zm7.5 3.8h1.5c.3 0 .5-.3.5-.6v-5.2c0-.3-.3-.5-.5-.5H13c-.3 0-.5.3-.5.5v5.3c0 .2.3.4.5.4zm-7.5 0H7c.3 0 .5-.3.5-.6v-1.4c0-.3-.3-.6-.5-.6H5.5c-.3 0-.5.3-.5.6v1.4c0 .3.3.6.5.6zm3.8-3.8h1.4c.3 0 .6-.3.6-.5v-1.5c0-.3-.3-.5-.6-.5H9.3c-.3 0-.6.3-.6.5V12c0 .3.3.5.6.5zm0 3.8h1.4c.3 0 .6-.3.6-.6v-1.4c0-.3-.3-.6-.6-.6H9.3c-.3 0-.6.3-.6.6v1.4c0 .3.3.6.6.6z"}));a("formidable/calculator",{title:i("Calculator Form","formidable"),description:i("Display a Calculator Form","formidable"),icon:u,category:"widgets",keywords:["calculation","formidable"],edit:function(e){e.setAttributes,e.attributes.formId;return 0===formidable_form_selector.forms.length?wp.element.createElement(c,{status:"warning",isDismissible:!1},i("This site does not have any forms.","formidable")):wp.element.createElement("div",{className:"frm-block-intro-screen"},wp.element.createElement("div",{className:"frm-block-intro-content"},wp.element.createElement(l.default,null),wp.element.createElement("div",{className:"frm-block-title"},i("Calculator Form","formidable")),wp.element.createElement("div",{className:"frm-block-selector-screen frm_pro_tip"},wp.element.createElement(c,{status:"warning",isDismissible:!1},i("This site does not have any calculator forms.","formidable"),wp.element.createElement("br",null),wp.element.createElement("a",{href:formidable_form_selector.link,target:"_blank"},i("Upgrade Formidable Forms.","formidable"))),wp.element.createElement("img",{src:formidable_form_selector.url+"/images/conversion-calc.jpg",alt:i("Calculator Form","formidable")}))))}})}]);
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.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-01-27T13:54:08+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: formidable\n"
@@ -184,18 +184,18 @@ msgstr ""
184
  msgid "Upgrade Now"
185
  msgstr ""
186
 
187
- #: classes/controllers/FrmAppController.php:151
188
  msgid "Build"
189
  msgstr ""
190
 
191
- #: classes/controllers/FrmAppController.php:158
192
- #: classes/helpers/FrmFormsListHelper.php:302
193
  #: classes/views/frm-forms/settings.php:13
194
  #: classes/views/frm-settings/form.php:14
195
  msgid "Settings"
196
  msgstr ""
197
 
198
- #: classes/controllers/FrmAppController.php:165
199
  #: classes/controllers/FrmEntriesController.php:11
200
  #: classes/controllers/FrmEntriesController.php:100
201
  #: classes/controllers/FrmFormsController.php:789
@@ -204,22 +204,22 @@ msgstr ""
204
  msgid "Entries"
205
  msgstr ""
206
 
207
- #: classes/controllers/FrmAppController.php:177
208
  #: classes/controllers/FrmEntriesController.php:15
209
  #: classes/views/shared/views-info.php:11
210
  msgid "Views"
211
  msgstr ""
212
 
213
- #: classes/controllers/FrmAppController.php:191
214
  #: classes/views/shared/reports-info.php:11
215
  msgid "Reports"
216
  msgstr ""
217
 
218
- #: classes/controllers/FrmAppController.php:214
219
  msgid "Upgrade to Pro"
220
  msgstr ""
221
 
222
- #: classes/controllers/FrmAppController.php:217
223
  msgid "Build a Form"
224
  msgstr ""
225
 
@@ -457,7 +457,7 @@ msgid "Form Title"
457
  msgstr ""
458
 
459
  #: classes/controllers/FrmFormsController.php:791
460
- msgid "Shortcodes"
461
  msgstr ""
462
 
463
  #: classes/controllers/FrmFormsController.php:794
@@ -651,7 +651,7 @@ msgstr ""
651
  #: classes/helpers/FrmFormsHelper.php:112
652
  #: classes/helpers/FrmFormsHelper.php:166
653
  #: classes/helpers/FrmFormsHelper.php:1058
654
- #: classes/helpers/FrmFormsListHelper.php:315
655
  #: classes/views/frm-forms/create-template-from-an-existing-form.php:25
656
  #: classes/views/styles/manage.php:59
657
  #: classes/views/xml/import_form.php:133
@@ -673,6 +673,12 @@ msgstr ""
673
  msgid "%1$sClick here%2$s if you are not automatically redirected."
674
  msgstr ""
675
 
 
 
 
 
 
 
676
  #: classes/controllers/FrmInboxController.php:16
677
  #: classes/controllers/FrmSettingsController.php:70
678
  #: classes/views/inbox/list.php:11
@@ -725,7 +731,7 @@ msgid "Plugin Licenses"
725
  msgstr ""
726
 
727
  #: classes/controllers/FrmSettingsController.php:104
728
- #: classes/views/frm-forms/settings-advanced.php:181
729
  msgid "Miscellaneous"
730
  msgstr ""
731
 
@@ -738,7 +744,7 @@ msgstr ""
738
  #: classes/helpers/FrmStylesHelper.php:73
739
  #: classes/views/frm-forms/add_field_links.php:173
740
  #: classes/views/frm-forms/edit.php:28
741
- #: classes/views/frm-forms/_publish_box.php:13
742
  #: classes/views/styles/header-buttons.php:12
743
  #: classes/views/styles/manage.php:89
744
  #: deprecated/FrmDeprecated.php:66
@@ -912,7 +918,7 @@ msgid "Style"
912
  msgstr ""
913
 
914
  #: classes/controllers/FrmStylesController.php:41
915
- #: classes/helpers/FrmFormsListHelper.php:301
916
  #: classes/views/frm-entries/sidebar-shared.php:40
917
  msgid "Edit"
918
  msgstr ""
@@ -1026,17 +1032,12 @@ msgstr ""
1026
 
1027
  #: classes/helpers/FrmAppHelper.php:1120
1028
  #: classes/views/frm-entries/list.php:47
1029
- #: classes/views/frm-forms/list.php:27
1030
  #: classes/views/shared/mb_adv_info.php:40
1031
  #: classes/views/shared/mb_adv_info.php:183
1032
  msgid "Search"
1033
  msgstr ""
1034
 
1035
- #: classes/helpers/FrmAppHelper.php:1341
1036
- #: classes/views/frm-forms/settings-advanced.php:98
1037
- msgid "Select a Page"
1038
- msgstr ""
1039
-
1040
  #: classes/helpers/FrmAppHelper.php:1442
1041
  msgid "View Forms"
1042
  msgstr ""
@@ -1239,7 +1240,8 @@ msgstr ""
1239
  #: classes/views/frm-forms/new-form-overlay.php:139
1240
  #: classes/views/shared/admin-header.php:64
1241
  #: classes/views/shared/confirm-overlay.php:19
1242
- #: js/formidable_admin.js:3677
 
1243
  msgid "Cancel"
1244
  msgstr ""
1245
 
@@ -1266,7 +1268,7 @@ msgstr ""
1266
 
1267
  #: classes/helpers/FrmAppHelper.php:2718
1268
  #: classes/helpers/FrmListHelper.php:412
1269
- #: js/formidable_admin.js:4069
1270
  msgid "Heads up"
1271
  msgstr ""
1272
 
@@ -1694,7 +1696,7 @@ msgstr ""
1694
 
1695
  #: classes/helpers/FrmCSVExportHelper.php:346
1696
  #: classes/helpers/FrmFormsHelper.php:1244
1697
- #: classes/helpers/FrmFormsListHelper.php:342
1698
  msgid "Draft"
1699
  msgstr ""
1700
 
@@ -3301,16 +3303,21 @@ msgstr ""
3301
  msgid "%1$s <span class=\"count\">(%2$s)</span>"
3302
  msgstr ""
3303
 
3304
- #: classes/helpers/FrmFormsListHelper.php:262
 
 
 
 
 
3305
  msgid "Saving entries is disabled for this form"
3306
  msgstr ""
3307
 
3308
- #: classes/helpers/FrmFormsListHelper.php:306
3309
- #: classes/views/frm-forms/_publish_box.php:20
3310
  msgid "Preview"
3311
  msgstr ""
3312
 
3313
- #: classes/helpers/FrmFormsListHelper.php:360
3314
  msgid "ALL selected forms and their entries will be permanently deleted. Want to proceed?"
3315
  msgstr ""
3316
 
@@ -4048,10 +4055,6 @@ msgstr ""
4048
  msgid "Page Break"
4049
  msgstr ""
4050
 
4051
- #: classes/models/FrmField.php:140
4052
- msgid "Embed Form"
4053
- msgstr ""
4054
-
4055
  #: classes/models/FrmField.php:144
4056
  msgid "Likert Scale"
4057
  msgstr ""
@@ -4439,12 +4442,12 @@ msgid "See the %1$sform documentation%2$s for instructions on publishing your fo
4439
  msgstr ""
4440
 
4441
  #: classes/views/frm-entries/no_entries.php:46
4442
- #: classes/views/frm-forms/list.php:37
4443
  msgid "You have not created any forms yet"
4444
  msgstr ""
4445
 
4446
  #: classes/views/frm-entries/no_entries.php:47
4447
- #: classes/views/frm-forms/list.php:38
4448
  msgid "Start collecting leads and data today."
4449
  msgstr ""
4450
 
@@ -4521,7 +4524,7 @@ msgstr ""
4521
  #: classes/views/frm-fields/back-end/inline-modal.php:7
4522
  #: classes/views/frm-fields/back-end/inline-modal.php:8
4523
  #: classes/views/shared/admin-header.php:19
4524
- #: js/formidable_admin.js:7789
4525
  msgid "Close"
4526
  msgstr ""
4527
 
@@ -5075,6 +5078,7 @@ msgid "Templates"
5075
  msgstr ""
5076
 
5077
  #: classes/views/frm-forms/new-form-overlay.php:11
 
5078
  msgid "Back"
5079
  msgstr ""
5080
 
@@ -5261,96 +5265,84 @@ msgstr ""
5261
  msgid "Modify the basic form settings here."
5262
  msgstr ""
5263
 
5264
- #: classes/views/frm-forms/settings-advanced.php:36
5265
- msgid "Embed Shortcode"
5266
- msgstr ""
5267
-
5268
- #: classes/views/frm-forms/settings-advanced.php:45
5269
- msgid "Insert with PHP"
5270
- msgstr ""
5271
-
5272
- #: classes/views/frm-forms/settings-advanced.php:48
5273
- msgid "Embed in Template"
5274
- msgstr ""
5275
-
5276
- #: classes/views/frm-forms/settings-advanced.php:56
5277
  msgid "Form Settings"
5278
  msgstr ""
5279
 
5280
- #: classes/views/frm-forms/settings-advanced.php:67
5281
- #: classes/views/frm-forms/settings-advanced.php:172
5282
  msgid "On Submit"
5283
  msgstr ""
5284
 
5285
- #: classes/views/frm-forms/settings-advanced.php:68
5286
  msgid "Choose what will happen after the user submits this form."
5287
  msgstr ""
5288
 
5289
- #: classes/views/frm-forms/settings-advanced.php:76
5290
  msgid "Show Message"
5291
  msgstr ""
5292
 
5293
- #: classes/views/frm-forms/settings-advanced.php:79
5294
  msgid "Redirect to URL"
5295
  msgstr ""
5296
 
5297
- #: classes/views/frm-forms/settings-advanced.php:82
5298
  msgid "Show Page Content"
5299
  msgstr ""
5300
 
5301
- #: classes/views/frm-forms/settings-advanced.php:108
5302
  msgid "Show the form with the confirmation message"
5303
  msgstr ""
5304
 
5305
- #: classes/views/frm-forms/settings-advanced.php:115
5306
  msgid "Do not store entries submitted from this form"
5307
  msgstr ""
5308
 
5309
- #: classes/views/frm-forms/settings-advanced.php:125
5310
  msgid "AJAX"
5311
  msgstr ""
5312
 
5313
- #: classes/views/frm-forms/settings-advanced.php:126
5314
  msgid "Make stuff happen in the background without a page refresh"
5315
  msgstr ""
5316
 
5317
- #: classes/views/frm-forms/settings-advanced.php:133
5318
  msgid "Load and save form builder page with AJAX"
5319
  msgstr ""
5320
 
5321
- #: classes/views/frm-forms/settings-advanced.php:134
5322
  msgid "Recommended for long forms."
5323
  msgstr ""
5324
 
5325
- #: classes/views/frm-forms/settings-advanced.php:142
5326
  msgid "AJAX Form Submissions"
5327
  msgstr ""
5328
 
5329
- #: classes/views/frm-forms/settings-advanced.php:142
5330
  msgid "Want to submit forms without reloading the page?"
5331
  msgstr ""
5332
 
5333
- #: classes/views/frm-forms/settings-advanced.php:144
5334
  msgid "Submit this form with AJAX"
5335
  msgstr ""
5336
 
5337
- #: classes/views/frm-forms/settings-advanced.php:145
5338
  msgid "Submit the form without refreshing the page."
5339
  msgstr ""
5340
 
5341
- #: classes/views/frm-forms/settings-advanced.php:154
5342
  msgid "Validate this form with javascript"
5343
  msgstr ""
5344
 
5345
- #: classes/views/frm-forms/settings-advanced.php:155
5346
  msgid "Required fields, email format, and number format can be checked instantly in your browser. You may want to turn this option off if you have any customizations to remove validation messages on certain fields."
5347
  msgstr ""
5348
 
5349
- #: classes/views/frm-forms/settings-advanced.php:166
5350
  msgid "Messages"
5351
  msgstr ""
5352
 
5353
- #: classes/views/frm-forms/settings-advanced.php:167
5354
  msgid "Set up your confirmation messages."
5355
  msgstr ""
5356
 
@@ -5456,14 +5448,18 @@ msgstr ""
5456
  msgid "Add New Form"
5457
  msgstr ""
5458
 
5459
- #: classes/views/frm-forms/_publish_box.php:27
5460
  msgid "On Blank Page"
5461
  msgstr ""
5462
 
5463
- #: classes/views/frm-forms/_publish_box.php:32
5464
  msgid "In Theme"
5465
  msgstr ""
5466
 
 
 
 
 
5467
  #: classes/views/frm-settings/general.php:7
5468
  msgid "License Key"
5469
  msgstr ""
@@ -6368,27 +6364,105 @@ msgstr ""
6368
  msgid "Row Layout"
6369
  msgstr ""
6370
 
6371
- #: js/formidable_admin.js:3662
6372
  msgid "Enter number of columns for each field"
6373
  msgstr ""
6374
 
6375
- #: js/formidable_admin.js:3666
6376
  msgid "Layouts are based on a 12-column grid system"
6377
  msgstr ""
6378
 
6379
- #: js/formidable_admin.js:3682
6380
  msgid "Save"
6381
  msgstr ""
6382
 
6383
- #: js/formidable_admin.js:3983
6384
  msgid "Merge into row"
6385
  msgstr ""
6386
 
6387
  #. translators: %1$s: Number of fields that are selected to be deleted.
6388
- #: js/formidable_admin.js:4071
6389
  msgid "Are you sure you want to delete these %1$s selected fields?"
6390
  msgstr ""
6391
 
6392
- #: js/formidable_admin.js:7781
6393
  msgid "Save and Reload"
6394
  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.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-02-10T13:16:37+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: formidable\n"
184
  msgid "Upgrade Now"
185
  msgstr ""
186
 
187
+ #: classes/controllers/FrmAppController.php:154
188
  msgid "Build"
189
  msgstr ""
190
 
191
+ #: classes/controllers/FrmAppController.php:161
192
+ #: classes/helpers/FrmFormsListHelper.php:300
193
  #: classes/views/frm-forms/settings.php:13
194
  #: classes/views/frm-settings/form.php:14
195
  msgid "Settings"
196
  msgstr ""
197
 
198
+ #: classes/controllers/FrmAppController.php:168
199
  #: classes/controllers/FrmEntriesController.php:11
200
  #: classes/controllers/FrmEntriesController.php:100
201
  #: classes/controllers/FrmFormsController.php:789
204
  msgid "Entries"
205
  msgstr ""
206
 
207
+ #: classes/controllers/FrmAppController.php:180
208
  #: classes/controllers/FrmEntriesController.php:15
209
  #: classes/views/shared/views-info.php:11
210
  msgid "Views"
211
  msgstr ""
212
 
213
+ #: classes/controllers/FrmAppController.php:194
214
  #: classes/views/shared/reports-info.php:11
215
  msgid "Reports"
216
  msgstr ""
217
 
218
+ #: classes/controllers/FrmAppController.php:217
219
  msgid "Upgrade to Pro"
220
  msgstr ""
221
 
222
+ #: classes/controllers/FrmAppController.php:220
223
  msgid "Build a Form"
224
  msgstr ""
225
 
457
  msgstr ""
458
 
459
  #: classes/controllers/FrmFormsController.php:791
460
+ msgid "Actions"
461
  msgstr ""
462
 
463
  #: classes/controllers/FrmFormsController.php:794
651
  #: classes/helpers/FrmFormsHelper.php:112
652
  #: classes/helpers/FrmFormsHelper.php:166
653
  #: classes/helpers/FrmFormsHelper.php:1058
654
+ #: classes/helpers/FrmFormsListHelper.php:313
655
  #: classes/views/frm-forms/create-template-from-an-existing-form.php:25
656
  #: classes/views/styles/manage.php:59
657
  #: classes/views/xml/import_form.php:133
673
  msgid "%1$sClick here%2$s if you are not automatically redirected."
674
  msgstr ""
675
 
676
+ #: classes/controllers/FrmFormsController.php:2347
677
+ #: classes/helpers/FrmAppHelper.php:1341
678
+ #: classes/views/frm-forms/settings-advanced.php:79
679
+ msgid "Select a Page"
680
+ msgstr ""
681
+
682
  #: classes/controllers/FrmInboxController.php:16
683
  #: classes/controllers/FrmSettingsController.php:70
684
  #: classes/views/inbox/list.php:11
731
  msgstr ""
732
 
733
  #: classes/controllers/FrmSettingsController.php:104
734
+ #: classes/views/frm-forms/settings-advanced.php:162
735
  msgid "Miscellaneous"
736
  msgstr ""
737
 
744
  #: classes/helpers/FrmStylesHelper.php:73
745
  #: classes/views/frm-forms/add_field_links.php:173
746
  #: classes/views/frm-forms/edit.php:28
747
+ #: classes/views/frm-forms/_publish_box.php:15
748
  #: classes/views/styles/header-buttons.php:12
749
  #: classes/views/styles/manage.php:89
750
  #: deprecated/FrmDeprecated.php:66
918
  msgstr ""
919
 
920
  #: classes/controllers/FrmStylesController.php:41
921
+ #: classes/helpers/FrmFormsListHelper.php:299
922
  #: classes/views/frm-entries/sidebar-shared.php:40
923
  msgid "Edit"
924
  msgstr ""
1032
 
1033
  #: classes/helpers/FrmAppHelper.php:1120
1034
  #: classes/views/frm-entries/list.php:47
1035
+ #: classes/views/frm-forms/list.php:28
1036
  #: classes/views/shared/mb_adv_info.php:40
1037
  #: classes/views/shared/mb_adv_info.php:183
1038
  msgid "Search"
1039
  msgstr ""
1040
 
 
 
 
 
 
1041
  #: classes/helpers/FrmAppHelper.php:1442
1042
  msgid "View Forms"
1043
  msgstr ""
1240
  #: classes/views/frm-forms/new-form-overlay.php:139
1241
  #: classes/views/shared/admin-header.php:64
1242
  #: classes/views/shared/confirm-overlay.php:19
1243
+ #: js/formidable_admin.js:3687
1244
+ #: js/formidable_admin.js:8350
1245
  msgid "Cancel"
1246
  msgstr ""
1247
 
1268
 
1269
  #: classes/helpers/FrmAppHelper.php:2718
1270
  #: classes/helpers/FrmListHelper.php:412
1271
+ #: js/formidable_admin.js:4079
1272
  msgid "Heads up"
1273
  msgstr ""
1274
 
1696
 
1697
  #: classes/helpers/FrmCSVExportHelper.php:346
1698
  #: classes/helpers/FrmFormsHelper.php:1244
1699
+ #: classes/helpers/FrmFormsListHelper.php:340
1700
  msgid "Draft"
1701
  msgstr ""
1702
 
3303
  msgid "%1$s <span class=\"count\">(%2$s)</span>"
3304
  msgstr ""
3305
 
3306
+ #: classes/helpers/FrmFormsListHelper.php:252
3307
+ #: classes/models/FrmField.php:140
3308
+ msgid "Embed Form"
3309
+ msgstr ""
3310
+
3311
+ #: classes/helpers/FrmFormsListHelper.php:260
3312
  msgid "Saving entries is disabled for this form"
3313
  msgstr ""
3314
 
3315
+ #: classes/helpers/FrmFormsListHelper.php:304
3316
+ #: classes/views/frm-forms/_publish_box.php:22
3317
  msgid "Preview"
3318
  msgstr ""
3319
 
3320
+ #: classes/helpers/FrmFormsListHelper.php:358
3321
  msgid "ALL selected forms and their entries will be permanently deleted. Want to proceed?"
3322
  msgstr ""
3323
 
4055
  msgid "Page Break"
4056
  msgstr ""
4057
 
 
 
 
 
4058
  #: classes/models/FrmField.php:144
4059
  msgid "Likert Scale"
4060
  msgstr ""
4442
  msgstr ""
4443
 
4444
  #: classes/views/frm-entries/no_entries.php:46
4445
+ #: classes/views/frm-forms/list.php:38
4446
  msgid "You have not created any forms yet"
4447
  msgstr ""
4448
 
4449
  #: classes/views/frm-entries/no_entries.php:47
4450
+ #: classes/views/frm-forms/list.php:39
4451
  msgid "Start collecting leads and data today."
4452
  msgstr ""
4453
 
4524
  #: classes/views/frm-fields/back-end/inline-modal.php:7
4525
  #: classes/views/frm-fields/back-end/inline-modal.php:8
4526
  #: classes/views/shared/admin-header.php:19
4527
+ #: js/formidable_admin.js:7800
4528
  msgid "Close"
4529
  msgstr ""
4530
 
5078
  msgstr ""
5079
 
5080
  #: classes/views/frm-forms/new-form-overlay.php:11
5081
+ #: js/formidable_admin.js:8389
5082
  msgid "Back"
5083
  msgstr ""
5084
 
5265
  msgid "Modify the basic form settings here."
5266
  msgstr ""
5267
 
5268
+ #: classes/views/frm-forms/settings-advanced.php:37
 
 
 
 
 
 
 
 
 
 
 
 
5269
  msgid "Form Settings"
5270
  msgstr ""
5271
 
5272
+ #: classes/views/frm-forms/settings-advanced.php:48
5273
+ #: classes/views/frm-forms/settings-advanced.php:153
5274
  msgid "On Submit"
5275
  msgstr ""
5276
 
5277
+ #: classes/views/frm-forms/settings-advanced.php:49
5278
  msgid "Choose what will happen after the user submits this form."
5279
  msgstr ""
5280
 
5281
+ #: classes/views/frm-forms/settings-advanced.php:57
5282
  msgid "Show Message"
5283
  msgstr ""
5284
 
5285
+ #: classes/views/frm-forms/settings-advanced.php:60
5286
  msgid "Redirect to URL"
5287
  msgstr ""
5288
 
5289
+ #: classes/views/frm-forms/settings-advanced.php:63
5290
  msgid "Show Page Content"
5291
  msgstr ""
5292
 
5293
+ #: classes/views/frm-forms/settings-advanced.php:89
5294
  msgid "Show the form with the confirmation message"
5295
  msgstr ""
5296
 
5297
+ #: classes/views/frm-forms/settings-advanced.php:96
5298
  msgid "Do not store entries submitted from this form"
5299
  msgstr ""
5300
 
5301
+ #: classes/views/frm-forms/settings-advanced.php:106
5302
  msgid "AJAX"
5303
  msgstr ""
5304
 
5305
+ #: classes/views/frm-forms/settings-advanced.php:107
5306
  msgid "Make stuff happen in the background without a page refresh"
5307
  msgstr ""
5308
 
5309
+ #: classes/views/frm-forms/settings-advanced.php:114
5310
  msgid "Load and save form builder page with AJAX"
5311
  msgstr ""
5312
 
5313
+ #: classes/views/frm-forms/settings-advanced.php:115
5314
  msgid "Recommended for long forms."
5315
  msgstr ""
5316
 
5317
+ #: classes/views/frm-forms/settings-advanced.php:123
5318
  msgid "AJAX Form Submissions"
5319
  msgstr ""
5320
 
5321
+ #: classes/views/frm-forms/settings-advanced.php:123
5322
  msgid "Want to submit forms without reloading the page?"
5323
  msgstr ""
5324
 
5325
+ #: classes/views/frm-forms/settings-advanced.php:125
5326
  msgid "Submit this form with AJAX"
5327
  msgstr ""
5328
 
5329
+ #: classes/views/frm-forms/settings-advanced.php:126
5330
  msgid "Submit the form without refreshing the page."
5331
  msgstr ""
5332
 
5333
+ #: classes/views/frm-forms/settings-advanced.php:135
5334
  msgid "Validate this form with javascript"
5335
  msgstr ""
5336
 
5337
+ #: classes/views/frm-forms/settings-advanced.php:136
5338
  msgid "Required fields, email format, and number format can be checked instantly in your browser. You may want to turn this option off if you have any customizations to remove validation messages on certain fields."
5339
  msgstr ""
5340
 
5341
+ #: classes/views/frm-forms/settings-advanced.php:147
5342
  msgid "Messages"
5343
  msgstr ""
5344
 
5345
+ #: classes/views/frm-forms/settings-advanced.php:148
5346
  msgid "Set up your confirmation messages."
5347
  msgstr ""
5348
 
5448
  msgid "Add New Form"
5449
  msgstr ""
5450
 
5451
+ #: classes/views/frm-forms/_publish_box.php:29
5452
  msgid "On Blank Page"
5453
  msgstr ""
5454
 
5455
+ #: classes/views/frm-forms/_publish_box.php:34
5456
  msgid "In Theme"
5457
  msgstr ""
5458
 
5459
+ #: classes/views/frm-forms/_publish_box.php:48
5460
+ msgid "Embed"
5461
+ msgstr ""
5462
+
5463
  #: classes/views/frm-settings/general.php:7
5464
  msgid "License Key"
5465
  msgstr ""
6364
  msgid "Row Layout"
6365
  msgstr ""
6366
 
6367
+ #: js/formidable_admin.js:3672
6368
  msgid "Enter number of columns for each field"
6369
  msgstr ""
6370
 
6371
+ #: js/formidable_admin.js:3676
6372
  msgid "Layouts are based on a 12-column grid system"
6373
  msgstr ""
6374
 
6375
+ #: js/formidable_admin.js:3692
6376
  msgid "Save"
6377
  msgstr ""
6378
 
6379
+ #: js/formidable_admin.js:3993
6380
  msgid "Merge into row"
6381
  msgstr ""
6382
 
6383
  #. translators: %1$s: Number of fields that are selected to be deleted.
6384
+ #: js/formidable_admin.js:4081
6385
  msgid "Are you sure you want to delete these %1$s selected fields?"
6386
  msgstr ""
6387
 
6388
+ #: js/formidable_admin.js:7792
6389
  msgid "Save and Reload"
6390
  msgstr ""
6391
+
6392
+ #: js/formidable_admin.js:8347
6393
+ msgid "Embed form"
6394
+ msgstr ""
6395
+
6396
+ #: js/formidable_admin.js:8381
6397
+ #: js/formidable_admin.js:8400
6398
+ msgid "Done"
6399
+ msgstr ""
6400
+
6401
+ #: js/formidable_admin.js:8448
6402
+ msgid "Select existing page"
6403
+ msgstr ""
6404
+
6405
+ #: js/formidable_admin.js:8449
6406
+ msgid "Embed your form into an existing page."
6407
+ msgstr ""
6408
+
6409
+ #: js/formidable_admin.js:8477
6410
+ msgid "Select the page you want to embed your form into."
6411
+ msgstr ""
6412
+
6413
+ #: js/formidable_admin.js:8486
6414
+ msgid "Insert Form"
6415
+ msgstr ""
6416
+
6417
+ #: js/formidable_admin.js:8500
6418
+ msgid "Please select a page"
6419
+ msgstr ""
6420
+
6421
+ #: js/formidable_admin.js:8521
6422
+ msgid "Create new page"
6423
+ msgstr ""
6424
+
6425
+ #: js/formidable_admin.js:8522
6426
+ msgid "Put your form on a newly created page."
6427
+ msgstr ""
6428
+
6429
+ #: js/formidable_admin.js:8558
6430
+ msgid "What will you call the new page?"
6431
+ msgstr ""
6432
+
6433
+ #: js/formidable_admin.js:8564
6434
+ msgid "Name your page"
6435
+ msgstr ""
6436
+
6437
+ #: js/formidable_admin.js:8575
6438
+ msgid "Create page"
6439
+ msgstr ""
6440
+
6441
+ #: js/formidable_admin.js:8587
6442
+ msgid "Insert manually"
6443
+ msgstr ""
6444
+
6445
+ #: js/formidable_admin.js:8588
6446
+ msgid "Use WP shortcodes or PHP code to put the form in any place."
6447
+ msgstr ""
6448
+
6449
+ #: js/formidable_admin.js:8635
6450
+ msgid "WordPress shortcode"
6451
+ msgstr ""
6452
+
6453
+ #: js/formidable_admin.js:8638
6454
+ msgid "How to use shortcodes in WordPress"
6455
+ msgstr ""
6456
+
6457
+ #: js/formidable_admin.js:8641
6458
+ msgid "Use PHP code"
6459
+ msgstr ""
6460
+
6461
+ #. translators: %s: Example type (ie. WordPress shortcode, API Form script)
6462
+ #: js/formidable_admin.js:8702
6463
+ msgid "Copy %s"
6464
+ msgstr ""
6465
+
6466
+ #: js/formidable_admin.js:8724
6467
+ msgid "Successfully copied embed example"
6468
+ msgstr ""
readme.txt CHANGED
@@ -2,10 +2,10 @@
2
  Plugin Name: Formidable Forms - Contact Form, Survey & Quiz Forms Plugin for WordPress
3
  Contributors: formidableforms, sswells, srwells
4
  Tags: forms, contact form, form builder, survey, free, form maker, form creator, paypal form, paypal, stripe, stripe form, aweber, aweber form, getresponse, getresponse form, calculator, price calculator, quote form, contact button, form manager, Akismet, payment form, survey form, donation form, email subscription, contact form widget, user registration form, wordpress registration, wordpress login form, constant contact, mailpoet, active campaign, salesforce, hubspot, campaign monitor, quiz builder, quiz, feedback form, mailchimp form
5
- Requires at least: 5.0
6
  Tested up to: 5.9
7
  Requires PHP: 5.6
8
- Stable tag: 5.1
9
 
10
  The most advanced WordPress forms plugin. Go beyond contact forms with our drag & drop form builder for surveys, quizzes, and more.
11
 
@@ -438,28 +438,24 @@ Using our Zapier integration, you can easily connect Formidable with over 1000+
438
  See all <a href="https://zapier.com/apps/formidable/integrations">Formidable Zapier Integrations</a>.
439
 
440
  == Changelog ==
 
 
 
 
 
 
 
 
441
  = 5.1 =
442
- - Updated Bootstrap Multiselect to version 1.1.1, fixing issues with the accessibility of backend multiselect dropdowns for blind users.
443
- - New: Inputs with errors will now add the aria-describedby attribute during JavaScript validation for more accessible errors.
444
- - New: Form errors will now always include the role="alert" attribute for more accessible errors. New fields will now also include role="alert" in custom field HTML.
445
- - New: Added a new frm_entries_column_value filter hook.
446
 
447
  = 5.0.17 =
448
- - The embedded CodeMirror code for compatibility with versions of WordPress before 4.9 has been removed.
449
- - New: The ctype PHP extension is no longer a requirement.
450
- - Fix: The custom CSS page would appear without any textarea on some configurations where CodeMirror may be disabled.
451
- - Fix: Removed padding styles from radio buttons because of a conflict with the Sensational theme.
452
-
453
- = 5.0.16 =
454
- - New: Field shortcodes now support sanitize_url=1 and sanitize=1 options which were previously only processed in Pro. For more information on how these options work, see https://formidableforms.com/knowledgebase/advanced/#kb-sanitize-url
455
- - New: The sanitize_url=1 option will now be inserted automatically when inserting most field shortcodes to a redirect url. This is to avoid issues with redirects stripping characters like ' and @ which may cause a redirect to fail in some cases.
456
- - New: Updated styling for radio buttons and checkboxes, with improvements to appearance on mobile devices as well.
457
- - New: Extended the FrmCSVExportHelper::generate_csv function so it has the option to generate a CSV file in a temporary directory, and pass along an array of meta information to most CSV filter hooks.
458
- - New: A new action_id variable has been added to the arguments passed to the frm_notification_attachment filter to make it easier to filter attachments by email action ID.
459
- - New: Added new frm_entry_formatter_class, frm_prepend_and_or_where, frm_entry_formatter_format, frm_formatted_entry_values_content, and frm_entries_show_args filter hooks.
460
- - New: Allow more colors in the styler to be transparent including background colors and border colors for active, hovered, and disabled inputs.
461
- - Fix: Selected radio buttons were appearing incorrectly when using the Twenty Twenty One theme in Chrome or Safari.
462
- - Fix: Radio buttons and checkboxes were appearing overlapped with labels when using the H-Code theme.
463
- - Fix: Field pop ups were displaying upgrade messages even for licenses that had access to the add on.
464
 
465
  <a href="https://raw.githubusercontent.com/Strategy11/formidable-forms/master/changelog.txt">See changelog for all versions</a>
2
  Plugin Name: Formidable Forms - Contact Form, Survey & Quiz Forms Plugin for WordPress
3
  Contributors: formidableforms, sswells, srwells
4
  Tags: forms, contact form, form builder, survey, free, form maker, form creator, paypal form, paypal, stripe, stripe form, aweber, aweber form, getresponse, getresponse form, calculator, price calculator, quote form, contact button, form manager, Akismet, payment form, survey form, donation form, email subscription, contact form widget, user registration form, wordpress registration, wordpress login form, constant contact, mailpoet, active campaign, salesforce, hubspot, campaign monitor, quiz builder, quiz, feedback form, mailchimp form
5
+ Requires at least: 5.2
6
  Tested up to: 5.9
7
  Requires PHP: 5.6
8
+ Stable tag: 5.2
9
 
10
  The most advanced WordPress forms plugin. Go beyond contact forms with our drag & drop form builder for surveys, quizzes, and more.
11
 
438
  See all <a href="https://zapier.com/apps/formidable/integrations">Formidable Zapier Integrations</a>.
439
 
440
  == Changelog ==
441
+ = 5.2 =
442
+ * Increased WP version requirement to 5.2.
443
+ * New: Added a new Embed Form modal and a new Embed button that appears in the form builder and form settings pages beside Preview and Update. Now a form can be embedded into a new page or an existing page with just a few clicks.
444
+ * Fix: A Notice was being logged that wp_enqueue_script() was called incorrectly when loading the new Widgets editor since WordPress 5.8.
445
+ * Fix: An unexpected array value in form data would cause some text fields to break in PHP8.
446
+ * Fix: Some AJAX calls for API loaded forms were occasionally targeting the wrong site, causing unwanted redirects.
447
+ * Fix: Dropdown field options were including redundant class="" HTML that has been removed.
448
+
449
  = 5.1 =
450
+ * Updated Bootstrap Multiselect to version 1.1.1, fixing issues with the accessibility of backend multiselect dropdowns for blind users.
451
+ * New: Inputs with errors will now add the aria-describedby attribute during JavaScript validation for more accessible errors.
452
+ * New: Form errors will now always include the role="alert" attribute for more accessible errors. New fields will now also include role="alert" in custom field HTML.
453
+ * New: Added a new frm_entries_column_value filter hook.
454
 
455
  = 5.0.17 =
456
+ * The embedded CodeMirror code for compatibility with versions of WordPress before 4.9 has been removed.
457
+ * New: The ctype PHP extension is no longer a requirement.
458
+ * Fix: The custom CSS page would appear without any textarea on some configurations where CodeMirror may be disabled.
459
+ * Fix: Removed padding styles from radio buttons because of a conflict with the Sensational theme.
 
 
 
 
 
 
 
 
 
 
 
 
460
 
461
  <a href="https://raw.githubusercontent.com/Strategy11/formidable-forms/master/changelog.txt">See changelog for all versions</a>