Formidable Forms – Form Builder for WordPress - Version 4.09.03

Version Description

  • New: Added frm_run_honeypot hook to turn off honeypot. Return false to disable or 'limit' to hide from screenreader.
  • Moved honeypot back to front of form to catch more spam.
  • Fix: dropdown fields were cut off in the admin area in WordPress 5.6.
  • Fix: Update a few deprecated jQuery functions.
  • Fix: Prevent some duplicate database queries on the back end.
Download this release

Release Info

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

Code changes from version 4.09.02 to 4.09.03

classes/controllers/FrmXMLController.php CHANGED
@@ -10,13 +10,13 @@ class FrmXMLController {
10
  }
11
 
12
  public static function add_default_templates() {
13
- if ( ! function_exists( 'libxml_disable_entity_loader' ) ) {
14
  // XML import is not enabled on your server
15
  return;
16
  }
17
 
18
  $set_err = libxml_use_internal_errors( true );
19
- $loader = libxml_disable_entity_loader( true );
20
 
21
  $files = apply_filters( 'frm_default_templates_files', array() );
22
 
@@ -28,7 +28,7 @@ class FrmXMLController {
28
  unset( $files );
29
 
30
  libxml_use_internal_errors( $set_err );
31
- libxml_disable_entity_loader( $loader );
32
  }
33
 
34
  /**
@@ -330,7 +330,7 @@ class FrmXMLController {
330
  }
331
  unset( $file_type );
332
 
333
- if ( ! function_exists( 'libxml_disable_entity_loader' ) ) {
334
  $errors[] = __( 'XML import is not enabled on your server with the libxml_disable_entity_loader function.', 'formidable' );
335
  self::form( $errors );
336
 
@@ -338,7 +338,7 @@ class FrmXMLController {
338
  }
339
 
340
  $set_err = libxml_use_internal_errors( true );
341
- $loader = libxml_disable_entity_loader( true );
342
 
343
  $result = FrmXMLHelper::import_xml( $file );
344
  FrmXMLHelper::parse_message( $result, $message, $errors );
@@ -346,7 +346,7 @@ class FrmXMLController {
346
  unset( $file );
347
 
348
  libxml_use_internal_errors( $set_err );
349
- libxml_disable_entity_loader( $loader );
350
 
351
  self::form( $errors, $message );
352
  }
10
  }
11
 
12
  public static function add_default_templates() {
13
+ if ( FrmXMLHelper::check_if_libxml_disable_entity_loader_exists() ) {
14
  // XML import is not enabled on your server
15
  return;
16
  }
17
 
18
  $set_err = libxml_use_internal_errors( true );
19
+ $loader = FrmXMLHelper::maybe_libxml_disable_entity_loader( true );
20
 
21
  $files = apply_filters( 'frm_default_templates_files', array() );
22
 
28
  unset( $files );
29
 
30
  libxml_use_internal_errors( $set_err );
31
+ FrmXMLHelper::maybe_libxml_disable_entity_loader( $loader );
32
  }
33
 
34
  /**
330
  }
331
  unset( $file_type );
332
 
333
+ if ( FrmXMLHelper::check_if_libxml_disable_entity_loader_exists() ) {
334
  $errors[] = __( 'XML import is not enabled on your server with the libxml_disable_entity_loader function.', 'formidable' );
335
  self::form( $errors );
336
 
338
  }
339
 
340
  $set_err = libxml_use_internal_errors( true );
341
+ $loader = FrmXMLHelper::maybe_libxml_disable_entity_loader( true );
342
 
343
  $result = FrmXMLHelper::import_xml( $file );
344
  FrmXMLHelper::parse_message( $result, $message, $errors );
346
  unset( $file );
347
 
348
  libxml_use_internal_errors( $set_err );
349
+ FrmXMLHelper::maybe_libxml_disable_entity_loader( $loader );
350
 
351
  self::form( $errors, $message );
352
  }
classes/helpers/FrmAppHelper.php CHANGED
@@ -11,7 +11,7 @@ class FrmAppHelper {
11
  /**
12
  * @since 2.0
13
  */
14
- public static $plug_version = '4.09.02';
15
 
16
  /**
17
  * @since 1.07.02
@@ -1546,12 +1546,13 @@ class FrmAppHelper {
1546
  }
1547
 
1548
  /**
 
1549
  * @param string $table_name
1550
  * @param string $column
1551
  * @param int $id
1552
  * @param int $num_chars
1553
  */
1554
- public static function get_unique_key( $name = '', $table_name, $column, $id = 0, $num_chars = 5 ) {
1555
  $key = '';
1556
 
1557
  if ( ! empty( $name ) ) {
@@ -2208,7 +2209,9 @@ class FrmAppHelper {
2208
  // Loop through array to strip slashes and add only the needed ones.
2209
  foreach ( $post_content as $key => $val ) {
2210
  // Replace problematic characters (like ")
2211
- $val = str_replace( '"', '"', $val );
 
 
2212
 
2213
  self::prepare_action_slashes( $val, $key, $post_content );
2214
  unset( $key, $val );
11
  /**
12
  * @since 2.0
13
  */
14
+ public static $plug_version = '4.09.03';
15
 
16
  /**
17
  * @since 1.07.02
1546
  }
1547
 
1548
  /**
1549
+ * @param string $name
1550
  * @param string $table_name
1551
  * @param string $column
1552
  * @param int $id
1553
  * @param int $num_chars
1554
  */
1555
+ public static function get_unique_key( $name, $table_name, $column, $id = 0, $num_chars = 5 ) {
1556
  $key = '';
1557
 
1558
  if ( ! empty( $name ) ) {
2209
  // Loop through array to strip slashes and add only the needed ones.
2210
  foreach ( $post_content as $key => $val ) {
2211
  // Replace problematic characters (like ")
2212
+ if ( is_string( $val ) ) {
2213
+ $val = str_replace( '"', '"', $val );
2214
+ }
2215
 
2216
  self::prepare_action_slashes( $val, $key, $post_content );
2217
  unset( $key, $val );
classes/helpers/FrmFieldsHelper.php CHANGED
@@ -1288,8 +1288,10 @@ class FrmFieldsHelper {
1288
  }
1289
  if ( is_array( $val ) ) {
1290
  foreach ( $val as $k => $v ) {
1291
- $val[ $k ] = str_replace( $replace, $replace_with, $v );
1292
- unset( $k, $v );
 
 
1293
  }
1294
  } else {
1295
  $val = str_replace( $replace, $replace_with, $val );
1288
  }
1289
  if ( is_array( $val ) ) {
1290
  foreach ( $val as $k => $v ) {
1291
+ if ( is_string( $v ) ) {
1292
+ $val[ $k ] = str_replace( $replace, $replace_with, $v );
1293
+ unset( $k, $v );
1294
+ }
1295
  }
1296
  } else {
1297
  $val = str_replace( $replace, $replace_with, $val );
classes/helpers/FrmTipsHelper.php CHANGED
@@ -72,8 +72,8 @@ class FrmTipsHelper {
72
  'content' => 'page-breaks',
73
  'param' => 'wordpress-multi-page-forms',
74
  ),
75
- 'tip' => __( 'Stop intimidating users with long forms.', 'formidable' ),
76
- 'call' => __( 'Use page breaks.', 'formidable' ),
77
  ),
78
  array(
79
  'link' => array(
@@ -97,7 +97,7 @@ class FrmTipsHelper {
97
  'param' => 'auto-fill-forms',
98
  ),
99
  'tip' => __( 'Save time.', 'formidable' ),
100
- 'call' => __( 'Prefill fields with user info.', 'formidable' ),
101
  ),
102
  );
103
 
@@ -119,8 +119,8 @@ class FrmTipsHelper {
119
  'content' => 'save-drafts',
120
  'param' => 'save-drafts-wordpress-form',
121
  ),
122
- 'tip' => __( 'Have a long form that takes time to complete?', 'formidable' ),
123
- 'call' => __( 'Let logged-in users save a draft and return later.', 'formidable' ),
124
  ),
125
  array(
126
  'link' => array(
@@ -134,7 +134,7 @@ class FrmTipsHelper {
134
  'content' => 'form-scheduling',
135
  'param' => 'schedule-forms-wordpress',
136
  ),
137
- 'tip' => __( 'Need to open and close your form on specific days?', 'formidable' ),
138
  'call' => __( 'Add form scheduling.', 'formidable' ),
139
  ),
140
  );
@@ -165,7 +165,7 @@ class FrmTipsHelper {
165
  'content' => 'user-submit',
166
  'param' => 'create-posts-pages-wordpress-forms',
167
  ),
168
- 'tip' => __( 'Make front-end posting easy.', 'formidable' ),
169
  'call' => __( 'Upgrade to Pro.', 'formidable' ),
170
  ),
171
  array(
@@ -197,15 +197,15 @@ class FrmTipsHelper {
197
  'content' => 'registration',
198
  'page' => 'registration-tip',
199
  ),
200
- 'tip' => __( 'Boost your site membership.', 'formidable' ),
201
- 'call' => __( 'Automatically create user accounts.', 'formidable' ),
202
  ),
203
  array(
204
  'link' => array(
205
  'content' => 'profile',
206
  'page' => 'registration-profile-editing-tip',
207
  ),
208
- 'tip' => __( 'Make front-end profile editing possible.', 'formidable' ),
209
  'call' => __( 'Add user registration.', 'formidable' ),
210
  ),
211
  array(
@@ -213,16 +213,16 @@ class FrmTipsHelper {
213
  'content' => 'twilio-payment',
214
  'page' => 'twilio-tip',
215
  ),
216
- 'tip' => __( 'Want a text when this form is submitted or when a payment is received?', 'formidable' ),
217
- 'call' => __( 'Use Twilio with this form.', 'formidable' ),
218
  ),
219
  array(
220
  'link' => array(
221
  'content' => 'twilio',
222
  'page' => 'twilio-send-tip',
223
  ),
224
- 'tip' => __( 'Send a text when this form is submitted.', 'formidable' ),
225
- 'call' => __( 'Get Twilio.', 'formidable' ),
226
  ),
227
  );
228
 
72
  'content' => 'page-breaks',
73
  'param' => 'wordpress-multi-page-forms',
74
  ),
75
+ 'tip' => __( 'Use page breaks for easier forms.', 'formidable' ),
76
+ 'call' => __( 'Upgrade to Pro.', 'formidable' ),
77
  ),
78
  array(
79
  'link' => array(
97
  'param' => 'auto-fill-forms',
98
  ),
99
  'tip' => __( 'Save time.', 'formidable' ),
100
+ 'call' => __( 'Fill out forms automatically!', 'formidable' ),
101
  ),
102
  );
103
 
119
  'content' => 'save-drafts',
120
  'param' => 'save-drafts-wordpress-form',
121
  ),
122
+ 'tip' => __( 'Have long forms?', 'formidable' ),
123
+ 'call' => __( 'Let users save drafts and return later!', 'formidable' ),
124
  ),
125
  array(
126
  'link' => array(
134
  'content' => 'form-scheduling',
135
  'param' => 'schedule-forms-wordpress',
136
  ),
137
+ 'tip' => __( 'Want your form open only for a certain time period?', 'formidable' ),
138
  'call' => __( 'Add form scheduling.', 'formidable' ),
139
  ),
140
  );
165
  'content' => 'user-submit',
166
  'param' => 'create-posts-pages-wordpress-forms',
167
  ),
168
+ 'tip' => __( 'Let your users submit posts on the front-end.', 'formidable' ),
169
  'call' => __( 'Upgrade to Pro.', 'formidable' ),
170
  ),
171
  array(
197
  'content' => 'registration',
198
  'page' => 'registration-tip',
199
  ),
200
+ 'tip' => __( 'Automatically create user accounts.', 'formidable' ),
201
+ 'call' => __( 'Upgrade to boost your site membership.', 'formidable' ),
202
  ),
203
  array(
204
  'link' => array(
205
  'content' => 'profile',
206
  'page' => 'registration-profile-editing-tip',
207
  ),
208
+ 'tip' => __( 'Need front-end profile editing?', 'formidable' ),
209
  'call' => __( 'Add user registration.', 'formidable' ),
210
  ),
211
  array(
213
  'content' => 'twilio-payment',
214
  'page' => 'twilio-tip',
215
  ),
216
+ 'tip' => __( 'Want an SMS notification when a form is submitted or a payment received?', 'formidable' ),
217
+ 'call' => __( 'Get the Twilio integration.', 'formidable' ),
218
  ),
219
  array(
220
  'link' => array(
221
  'content' => 'twilio',
222
  'page' => 'twilio-send-tip',
223
  ),
224
+ 'tip' => __( 'Send an SMS message when a form is submitted.', 'formidable' ),
225
+ 'call' => __( 'Get the Twilio integration.', 'formidable' ),
226
  ),
227
  );
228
 
classes/helpers/FrmXMLHelper.php CHANGED
@@ -1667,5 +1667,24 @@ class FrmXMLHelper {
1667
  unset( $new_notification2 );
1668
  }
1669
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1670
  }
1671
 
1667
  unset( $new_notification2 );
1668
  }
1669
  }
1670
+
1671
+ /**
1672
+ * PHP 8 backward compatibility for the libxml_disable_entity_loader function
1673
+ *
1674
+ * @param boolean $disable
1675
+ *
1676
+ * @return boolean
1677
+ */
1678
+ public static function maybe_libxml_disable_entity_loader( $loader ) {
1679
+ if ( version_compare( phpversion(), '8.0', '<' ) && function_exists( 'libxml_disable_entity_loader' ) ) {
1680
+ $loader = libxml_disable_entity_loader( $loader ); // phpcs:disable Generic.PHP.DeprecatedFunctions.Deprecated
1681
+ }
1682
+
1683
+ return $loader;
1684
+ }
1685
+
1686
+ public static function check_if_libxml_disable_entity_loader_exists() {
1687
+ return version_compare( phpversion(), '8.0', '<' ) && ! function_exists( 'libxml_disable_entity_loader' );
1688
+ }
1689
  }
1690
 
classes/models/FrmEntryMeta.php CHANGED
@@ -8,7 +8,7 @@ class FrmEntryMeta {
8
  /**
9
  * @param string $meta_key
10
  */
11
- public static function add_entry_meta( $entry_id, $field_id, $meta_key = null, $meta_value ) {
12
  global $wpdb;
13
 
14
  if ( FrmAppHelper::is_empty_value( $meta_value ) ) {
@@ -47,7 +47,7 @@ class FrmEntryMeta {
47
  *
48
  * @return bool|false|int
49
  */
50
- public static function update_entry_meta( $entry_id, $field_id, $meta_key = null, $meta_value ) {
51
  if ( ! $field_id ) {
52
  return false;
53
  }
@@ -423,7 +423,7 @@ class FrmEntryMeta {
423
  $query[] = FrmDb::prepend_and_or_where( ' WHERE ', $where ) . $order_by . $limit;
424
  }
425
 
426
- public static function search_entry_metas( $search, $field_id = '', $operator ) {
427
  $cache_key = 'search_' . FrmAppHelper::maybe_json_encode( $search ) . $field_id . $operator;
428
  $results = wp_cache_get( $cache_key, 'frm_entry' );
429
  if ( false !== $results ) {
8
  /**
9
  * @param string $meta_key
10
  */
11
+ public static function add_entry_meta( $entry_id, $field_id, $meta_key, $meta_value ) {
12
  global $wpdb;
13
 
14
  if ( FrmAppHelper::is_empty_value( $meta_value ) ) {
47
  *
48
  * @return bool|false|int
49
  */
50
+ public static function update_entry_meta( $entry_id, $field_id, $meta_key, $meta_value ) {
51
  if ( ! $field_id ) {
52
  return false;
53
  }
423
  $query[] = FrmDb::prepend_and_or_where( ' WHERE ', $where ) . $order_by . $limit;
424
  }
425
 
426
+ public static function search_entry_metas( $search, $field_id, $operator ) {
427
  $cache_key = 'search_' . FrmAppHelper::maybe_json_encode( $search ) . $field_id . $operator;
428
  $results = wp_cache_get( $cache_key, 'frm_entry' );
429
  if ( false !== $results ) {
classes/models/FrmInbox.php CHANGED
@@ -84,6 +84,10 @@ class FrmInbox extends FrmFormApi {
84
  return;
85
  }
86
 
 
 
 
 
87
  if ( isset( $this->messages[ $message['key'] ] ) ) {
88
  // Move up and mark as new.
89
  unset( $this->messages[ $message['key'] ] );
84
  return;
85
  }
86
 
87
+ if ( $this->is_expired( $message ) ) {
88
+ return;
89
+ }
90
+
91
  if ( isset( $this->messages[ $message['key'] ] ) ) {
92
  // Move up and mark as new.
93
  unset( $this->messages[ $message['key'] ] );
classes/models/FrmMigrate.php CHANGED
@@ -173,19 +173,19 @@ class FrmMigrate {
173
  * @since 3.06
174
  */
175
  private function add_default_template() {
176
- if ( ! function_exists( 'libxml_disable_entity_loader' ) ) {
177
  // XML import is not enabled on your server.
178
  return;
179
  }
180
 
181
  $set_err = libxml_use_internal_errors( true );
182
- $loader = libxml_disable_entity_loader( true );
183
 
184
  $file = FrmAppHelper::plugin_path() . '/classes/views/xml/default-templates.xml';
185
  FrmXMLHelper::import_xml( $file );
186
 
187
  libxml_use_internal_errors( $set_err );
188
- libxml_disable_entity_loader( $loader );
189
  }
190
 
191
  /**
173
  * @since 3.06
174
  */
175
  private function add_default_template() {
176
+ if ( FrmXMLHelper::check_if_libxml_disable_entity_loader_exists() ) {
177
  // XML import is not enabled on your server.
178
  return;
179
  }
180
 
181
  $set_err = libxml_use_internal_errors( true );
182
+ $loader = FrmXMLHelper::maybe_libxml_disable_entity_loader( true );
183
 
184
  $file = FrmAppHelper::plugin_path() . '/classes/views/xml/default-templates.xml';
185
  FrmXMLHelper::import_xml( $file );
186
 
187
  libxml_use_internal_errors( $set_err );
188
+ FrmXMLHelper::maybe_libxml_disable_entity_loader( $loader );
189
  }
190
 
191
  /**
classes/views/frm-entries/form.php CHANGED
@@ -57,6 +57,17 @@ if ( FrmAppHelper::is_admin() ) {
57
  <?php } else { ?>
58
  <input type="hidden" name="item_key" value="<?php echo esc_attr( $values['item_key'] ); ?>" />
59
  <?php
 
 
 
 
 
 
 
 
 
 
 
60
  }
61
 
62
  do_action( 'frm_entry_form', $form, $form_action, $errors );
@@ -97,12 +108,6 @@ if ( FrmForm::show_submit( $form ) ) {
97
  }
98
  }
99
  ?>
100
- <div class="frm_verify" aria-hidden="true">
101
- <label for="frm_verify_<?php echo esc_attr( $form->id ); ?>">
102
- <?php esc_html_e( 'If you are human, leave this field blank.', 'formidable' ); ?>
103
- </label>
104
- <input type="text" class="frm_verify" id="frm_verify_<?php echo esc_attr( $form->id ); ?>" name="frm_verify" value="<?php echo esc_attr( FrmAppHelper::get_param( 'frm_verify', '', 'get', 'wp_kses_post' ) ); ?>" <?php FrmFormsHelper::maybe_hide_inline(); ?> />
105
- </div>
106
  </div>
107
  </fieldset>
108
  </div>
57
  <?php } else { ?>
58
  <input type="hidden" name="item_key" value="<?php echo esc_attr( $values['item_key'] ); ?>" />
59
  <?php
60
+ $honeypot = apply_filters( 'frm_run_honeypot', true, compact( 'form' ) );
61
+ if ( $honeypot ) {
62
+ ?>
63
+ <div class="frm_verify" <?php echo ( $honeypot === true ) ? '' : 'aria-hidden="true"'; ?>>
64
+ <label for="frm_email_<?php echo esc_attr( $form->id ); ?>">
65
+ <?php esc_html_e( 'If you are human, leave this field blank.', 'formidable' ); ?>
66
+ </label>
67
+ <input type="email" class="frm_verify" id="frm_email_<?php echo esc_attr( $form->id ); ?>" name="frm_verify" value="<?php echo esc_attr( FrmAppHelper::get_param( 'frm_verify', '', 'get', 'wp_kses_post' ) ); ?>" <?php FrmFormsHelper::maybe_hide_inline(); ?> />
68
+ </div>
69
+ <?php
70
+ }
71
  }
72
 
73
  do_action( 'frm_entry_form', $form, $form_action, $errors );
108
  }
109
  }
110
  ?>
 
 
 
 
 
 
111
  </div>
112
  </fieldset>
113
  </div>
css/frm_admin.css CHANGED
@@ -7330,16 +7330,9 @@ button.frm_choose_image_box,
7330
  width: 100%;
7331
  }
7332
 
7333
- /** TODO: After 5.5, remove the branch clases **/
7334
- .branch-5-5 #postbox-container-2 select,
7335
- .branch-5-5.wp-admin .frm_wrap select,
7336
- .branch-5-5 .frm_wrap .frm_form_builder select,
7337
- .branch-5-4 #postbox-container-2 select,
7338
- .branch-5-4.wp-admin .frm_wrap select,
7339
- .branch-5-4 .frm_wrap .frm_form_builder select,
7340
- .branch-5-3 #postbox-container-2 select,
7341
- .branch-5-3.wp-admin .frm_wrap select,
7342
- .branch-5-3 .frm_wrap .frm_form_builder select {
7343
  height: auto;
7344
  padding: 0 24px 0 12px;
7345
  }
7330
  width: 100%;
7331
  }
7332
 
7333
+ #postbox-container-2 select,
7334
+ .wp-admin .frm_wrap select,
7335
+ .frm_wrap .frm_form_builder select {
 
 
 
 
 
 
 
7336
  height: auto;
7337
  padding: 0 24px 0 12px;
7338
  }
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: 4.09.02
6
  Plugin URI: https://formidableforms.com/
7
  Author URI: https://formidableforms.com/
8
  Author: Strategy11
2
  /*
3
  Plugin Name: Formidable Forms
4
  Description: Quickly and easily create drag-and-drop forms
5
+ Version: 4.09.03
6
  Plugin URI: https://formidableforms.com/
7
  Author URI: https://formidableforms.com/
8
  Author: Strategy11
js/formidable.js CHANGED
@@ -501,7 +501,7 @@ function frmFrontFormJS() {
501
 
502
  response = response.replace( /^\s+|\s+$/g, '' );
503
  if ( response.indexOf( '{' ) === 0 ) {
504
- response = jQuery.parseJSON( response );
505
  } else {
506
  response = defaultResponse;
507
  }
@@ -575,7 +575,7 @@ function frmFrontFormJS() {
575
  // If the frmTrigger object is the section description, check to see if the previous element is the trigger
576
  frmTrigger = frmTrigger.prev( '.frm_trigger' );
577
  }
578
- frmTrigger.click();
579
  }
580
  }
581
 
@@ -739,7 +739,7 @@ function frmFrontFormJS() {
739
  }
740
 
741
  function scrollToFirstField( object ) {
742
- var field = jQuery( object ).find( '.frm_blank_field:first' );
743
  if ( field.length ) {
744
  frmFrontForm.scrollMsg( field, object, true );
745
  }
@@ -983,13 +983,13 @@ function frmFrontFormJS() {
983
  jQuery( document ).on( 'blur', '.frm_toggle_default', replaceDefault );
984
  jQuery( '.frm_toggle_default' ).blur();
985
 
986
- jQuery( document.getElementById( 'frm_resend_email' ) ).click( resendEmail );
987
 
988
  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 );
989
  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 );
990
 
991
  jQuery( document ).on( 'click', 'a[data-frmconfirm]', confirmClick );
992
- jQuery( 'a[data-frmtoggle]' ).click( toggleDiv );
993
 
994
  // Add fallbacks for the beloved IE8
995
  addIndexOfFallbackForIE8();
501
 
502
  response = response.replace( /^\s+|\s+$/g, '' );
503
  if ( response.indexOf( '{' ) === 0 ) {
504
+ response = JSON.parse( response );
505
  } else {
506
  response = defaultResponse;
507
  }
575
  // If the frmTrigger object is the section description, check to see if the previous element is the trigger
576
  frmTrigger = frmTrigger.prev( '.frm_trigger' );
577
  }
578
+ frmTrigger.trigger( 'click' );
579
  }
580
  }
581
 
739
  }
740
 
741
  function scrollToFirstField( object ) {
742
+ var field = jQuery( object ).find( '.frm_blank_field' ).first();
743
  if ( field.length ) {
744
  frmFrontForm.scrollMsg( field, object, true );
745
  }
983
  jQuery( document ).on( 'blur', '.frm_toggle_default', replaceDefault );
984
  jQuery( '.frm_toggle_default' ).blur();
985
 
986
+ jQuery( document.getElementById( 'frm_resend_email' ) ).on( 'click', resendEmail );
987
 
988
  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 );
989
  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 );
990
 
991
  jQuery( document ).on( 'click', 'a[data-frmconfirm]', confirmClick );
992
+ jQuery( 'a[data-frmtoggle]' ).on( 'click', toggleDiv );
993
 
994
  // Add fallbacks for the beloved IE8
995
  addIndexOfFallbackForIE8();
js/formidable.min.js CHANGED
@@ -17,31 +17,31 @@ field.value,format=getFieldValidationMessage(field,"pattern");if(format!==""&&te
17
  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)}function validateRecaptcha(form,errors){var recaptchaID,response,fieldContainer,fieldID,$recaptcha=jQuery(form).find(".frm-g-recaptcha");if($recaptcha.length){recaptchaID=
18
  $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","");errors[fieldID]=""}}return errors}function getFieldValidationMessage(field,messageType){var msg=field.getAttribute(messageType);if(msg===null)msg="";return msg}function shouldJSValidate(object){var validate=
19
  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,data:jQuery(object).serialize()+"&action=frm_entries_"+
20
- 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=jQuery.parseJSON(response);else response=defaultResponse;if(typeof response.redirect!=="undefined"){jQuery(document).trigger("frmBeforeFormRedirect",[object,
21
- 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,
22
- 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="'+
23
  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=
24
- $fieldCont.closest(".frm_toggle_container");if(inCollapsedSection.length){frmTrigger=inCollapsedSection.prev();if(!frmTrigger.hasClass("frm_trigger"))frmTrigger=frmTrigger.prev(".frm_trigger");frmTrigger.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);
25
  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)}else{showFileLoading(object);object.submit()}},error:function(){jQuery(object).find('input[type="submit"], input[type="button"]').removeAttr("disabled");object.submit()}})}function afterFormSubmitted(object,response){var formCompleted=jQuery(response.content).find(".frm_message");
26
  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")!==-1){c=oldContent.children();if(newContent.indexOf(" frm_going_back")!==
27
  -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("&");i=kvp.length;while(i--){x=kvp[i].split("=");if(x[0]==key){x[1]=
28
  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,jsErrors);else{$fieldCont.append('<div class="frm_error" id="'+
29
  id+'">'+jsErrors[key]+"</div>");if(typeof describedBy==="undefined")describedBy=id;else if(describedBy.indexOf(id)===-1)describedBy=describedBy+" "+id;input.attr("aria-describedby",describedBy)}input.attr("aria-invalid",true);jQuery(document).trigger("frmAddFieldError",[$fieldCont,key,jsErrors])}}function removeFieldError($fieldCont){var errorMessage=$fieldCont.find(".frm_error"),errorId=errorMessage.attr("id"),input=$fieldCont.find("input, select, textarea"),describedBy=input.attr("aria-describedby");
30
- $fieldCont.removeClass("frm_blank_field has-error");errorMessage.remove();input.attr("aria-invalid",false);if(typeof describedBy!=="undefined"){describedBy=describedBy.replace(errorId,"");input.attr("aria-describedby",describedBy)}}function removeAllErrors(){jQuery(".form-field").removeClass("frm_blank_field has-error");jQuery(".form-field .frm_error").replaceWith("");jQuery(".frm_error_style").remove()}function scrollToFirstField(object){var field=jQuery(object).find(".frm_blank_field:first");if(field.length)frmFrontForm.scrollMsg(field,
31
- object,true)}function showSubmitLoading($object){showLoadingIndicator($object);disableSubmitButton($object);disableSaveDraft($object)}function showLoadingIndicator($object){if(!$object.hasClass("frm_loading_form")&&!$object.hasClass("frm_loading_prev")){addLoadingClass($object);$object.trigger("frmStartFormLoading")}}function addLoadingClass($object){var loadingClass=isGoingToPrevPage($object)?"frm_loading_prev":"frm_loading_form";$object.addClass(loadingClass)}function isGoingToPrevPage($object){return typeof frmProForm!==
32
- "undefined"&&frmProForm.goingToPreviousPage($object)}function removeSubmitLoading($object,enable,processesRunning){var loadingForm;if(processesRunning>0)return;loadingForm=jQuery(".frm_loading_form");loadingForm.removeClass("frm_loading_form");loadingForm.removeClass("frm_loading_prev");loadingForm.trigger("frmEndFormLoading");if(enable==="enable"){enableSubmitButton(loadingForm);enableSaveDraft(loadingForm)}}function showFileLoading(object){var fileval,loading=document.getElementById("frm_loading");
33
- if(loading!==null){fileval=jQuery(object).find("input[type=file]").val();if(typeof fileval!=="undefined"&&fileval!=="")setTimeout(function(){jQuery(loading).fadeIn("slow")},2E3)}}function clearDefault(){toggleDefault(jQuery(this),"clear")}function replaceDefault(){toggleDefault(jQuery(this),"replace")}function toggleDefault($thisField,e){var thisVal,v=$thisField.data("frmval").replace(/(\n|\r\n)/g,"\r");if(v===""||typeof v==="undefined")return false;thisVal=$thisField.val().replace(/(\n|\r\n)/g,"\r");
34
- if("replace"===e){if(thisVal==="")$thisField.addClass("frm_default").val(v)}else if(thisVal==v)$thisField.removeClass("frm_default").val("")}function resendEmail(){var $link=jQuery(this),entryId=this.getAttribute("data-eid"),formId=this.getAttribute("data-fid"),label=$link.find(".frm_link_label");if(label.length<1)label=$link;label.append('<span class="frm-wait"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_send_email",entry_id:entryId,form_id:formId,nonce:frm_js.nonce},
35
- 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,from;if(!Array.prototype.indexOf)Array.prototype.indexOf=
36
- 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=function(fun){if(this===void 0||this===
37
- 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}}return{init:function(){jQuery(document).off("submit.formidable",".frm-show-form");jQuery(document).on("submit.formidable",
38
- ".frm-show-form",frmFrontForm.submitForm);jQuery(".frm-show-form input[onblur], .frm-show-form textarea[onblur]").each(function(){if(jQuery(this).val()==="")jQuery(this).blur()});jQuery(document).on("focus",".frm_toggle_default",clearDefault);jQuery(document).on("blur",".frm_toggle_default",replaceDefault);jQuery(".frm_toggle_default").blur();jQuery(document.getElementById("frm_resend_email")).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"]',
39
- 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("click","a[data-frmconfirm]",confirmClick);jQuery("a[data-frmtoggle]").click(toggleDiv);addIndexOfFallbackForIE8();addTrimFallbackForIE8();addFilterFallbackForIE8();addKeysFallbackForIE8()},getFieldId:function(field,fullID){return getFieldId(field,fullID)},renderRecaptcha:function(captcha){var formID,
40
- recaptchaID,size=captcha.getAttribute("data-size"),rendered=captcha.getAttribute("data-rid")!==null,params={"sitekey":captcha.getAttribute("data-sitekey"),"size":size,"theme":captcha.getAttribute("data-theme")};if(rendered)return;if(size==="invisible"){formID=jQuery(captcha).closest("form").find('input[name="form_id"]').val();jQuery(captcha).closest(".frm_form_field .frm_primary_label").hide();params.callback=function(token){frmFrontForm.afterRecaptcha(token,formID)}}recaptchaID=grecaptcha.render(captcha.id,
41
- params);captcha.setAttribute("data-rid",recaptchaID)},afterSingleRecaptcha:function(){var object=jQuery(".frm-show-form .g-recaptcha").closest("form")[0];frmFrontForm.submitFormNow(object)},afterRecaptcha:function(token,formID){var object=jQuery("#frm_form_"+formID+"_container form")[0];frmFrontForm.submitFormNow(object)},submitForm:function(e){frmFrontForm.submitFormManual(e,this)},submitFormManual:function(e,object){var isPro,errors,invisibleRecaptcha=hasInvisibleRecaptcha(object),classList=object.className.trim().split(/\s+/gi);
42
- 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);
43
- if(Object.keys(errors).length===0){showSubmitLoading(jQuery(object));frmFrontForm.submitFormNow(object,classList)}}},submitFormNow:function(object){var hasFileFields,classList=object.className.trim().split(/\s+/gi);if(classList.indexOf("frm_ajax_submit")>-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()},
44
- 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;jsErrors=validateForm(object);if(typeof frmThemeOverride_jsErrors==="function"){action=jQuery(object).find('input[name="frm_action"]').val();
45
  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,key,jsErrors);else delete jsErrors[key]}scrollToFirstField(object)},checkFormErrors:function(object,action){getFormErrors(object,action)},
46
  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));frmFrontForm.scrollMsg(object,false)},scrollMsg:function(id,object,animate){var newPos,m,b,screenTop,screenBottom,scrollObj="";if(typeof object==="undefined"){scrollObj=
47
  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;scrollObj.focus();newPos=scrollObj.offset().top;if(!newPos||frm_js.offset==="-1")return;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||
17
  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)}function validateRecaptcha(form,errors){var recaptchaID,response,fieldContainer,fieldID,$recaptcha=jQuery(form).find(".frm-g-recaptcha");if($recaptcha.length){recaptchaID=
18
  $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","");errors[fieldID]=""}}return errors}function getFieldValidationMessage(field,messageType){var msg=field.getAttribute(messageType);if(msg===null)msg="";return msg}function shouldJSValidate(object){var validate=
19
  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,data:jQuery(object).serialize()+"&action=frm_entries_"+
20
+ 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",[object,response]);
21
+ 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,input,
22
+ 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="'+
23
  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=
24
+ $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);
25
  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)}else{showFileLoading(object);object.submit()}},error:function(){jQuery(object).find('input[type="submit"], input[type="button"]').removeAttr("disabled");object.submit()}})}function afterFormSubmitted(object,response){var formCompleted=jQuery(response.content).find(".frm_message");
26
  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")!==-1){c=oldContent.children();if(newContent.indexOf(" frm_going_back")!==
27
  -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("&");i=kvp.length;while(i--){x=kvp[i].split("=");if(x[0]==key){x[1]=
28
  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,jsErrors);else{$fieldCont.append('<div class="frm_error" id="'+
29
  id+'">'+jsErrors[key]+"</div>");if(typeof describedBy==="undefined")describedBy=id;else if(describedBy.indexOf(id)===-1)describedBy=describedBy+" "+id;input.attr("aria-describedby",describedBy)}input.attr("aria-invalid",true);jQuery(document).trigger("frmAddFieldError",[$fieldCont,key,jsErrors])}}function removeFieldError($fieldCont){var errorMessage=$fieldCont.find(".frm_error"),errorId=errorMessage.attr("id"),input=$fieldCont.find("input, select, textarea"),describedBy=input.attr("aria-describedby");
30
+ $fieldCont.removeClass("frm_blank_field has-error");errorMessage.remove();input.attr("aria-invalid",false);if(typeof describedBy!=="undefined"){describedBy=describedBy.replace(errorId,"");input.attr("aria-describedby",describedBy)}}function removeAllErrors(){jQuery(".form-field").removeClass("frm_blank_field has-error");jQuery(".form-field .frm_error").replaceWith("");jQuery(".frm_error_style").remove()}function scrollToFirstField(object){var field=jQuery(object).find(".frm_blank_field").first();
31
+ if(field.length)frmFrontForm.scrollMsg(field,object,true)}function showSubmitLoading($object){showLoadingIndicator($object);disableSubmitButton($object);disableSaveDraft($object)}function showLoadingIndicator($object){if(!$object.hasClass("frm_loading_form")&&!$object.hasClass("frm_loading_prev")){addLoadingClass($object);$object.trigger("frmStartFormLoading")}}function addLoadingClass($object){var loadingClass=isGoingToPrevPage($object)?"frm_loading_prev":"frm_loading_form";$object.addClass(loadingClass)}
32
+ function isGoingToPrevPage($object){return typeof frmProForm!=="undefined"&&frmProForm.goingToPreviousPage($object)}function removeSubmitLoading($object,enable,processesRunning){var loadingForm;if(processesRunning>0)return;loadingForm=jQuery(".frm_loading_form");loadingForm.removeClass("frm_loading_form");loadingForm.removeClass("frm_loading_prev");loadingForm.trigger("frmEndFormLoading");if(enable==="enable"){enableSubmitButton(loadingForm);enableSaveDraft(loadingForm)}}function showFileLoading(object){var fileval,
33
+ loading=document.getElementById("frm_loading");if(loading!==null){fileval=jQuery(object).find("input[type=file]").val();if(typeof fileval!=="undefined"&&fileval!=="")setTimeout(function(){jQuery(loading).fadeIn("slow")},2E3)}}function clearDefault(){toggleDefault(jQuery(this),"clear")}function replaceDefault(){toggleDefault(jQuery(this),"replace")}function toggleDefault($thisField,e){var thisVal,v=$thisField.data("frmval").replace(/(\n|\r\n)/g,"\r");if(v===""||typeof v==="undefined")return false;
34
+ thisVal=$thisField.val().replace(/(\n|\r\n)/g,"\r");if("replace"===e){if(thisVal==="")$thisField.addClass("frm_default").val(v)}else if(thisVal==v)$thisField.removeClass("frm_default").val("")}function resendEmail(){var $link=jQuery(this),entryId=this.getAttribute("data-eid"),formId=this.getAttribute("data-fid"),label=$link.find(".frm_link_label");if(label.length<1)label=$link;label.append('<span class="frm-wait"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_send_email",
35
+ 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,
36
+ 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=
37
+ 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}}return{init:function(){jQuery(document).off("submit.formidable",".frm-show-form");jQuery(document).on("submit.formidable",
38
+ ".frm-show-form",frmFrontForm.submitForm);jQuery(".frm-show-form input[onblur], .frm-show-form textarea[onblur]").each(function(){if(jQuery(this).val()==="")jQuery(this).blur()});jQuery(document).on("focus",".frm_toggle_default",clearDefault);jQuery(document).on("blur",".frm_toggle_default",replaceDefault);jQuery(".frm_toggle_default").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"]',
39
+ 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("click","a[data-frmconfirm]",confirmClick);jQuery("a[data-frmtoggle]").on("click",toggleDiv);addIndexOfFallbackForIE8();addTrimFallbackForIE8();addFilterFallbackForIE8();addKeysFallbackForIE8()},getFieldId:function(field,fullID){return getFieldId(field,fullID)},
40
+ 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")};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,
41
+ 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,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=
42
+ 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<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=
43
+ frmFrontForm.validateFormSubmit(object);if(Object.keys(errors).length===0){showSubmitLoading(jQuery(object));frmFrontForm.submitFormNow(object,classList)}}},submitFormNow:function(object){var hasFileFields,classList=object.className.trim().split(/\s+/gi);if(classList.indexOf("frm_ajax_submit")>-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,
44
+ 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;jsErrors=validateForm(object);if(typeof frmThemeOverride_jsErrors==="function"){action=jQuery(object).find('input[name="frm_action"]').val();
45
  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,key,jsErrors);else delete jsErrors[key]}scrollToFirstField(object)},checkFormErrors:function(object,action){getFormErrors(object,action)},
46
  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));frmFrontForm.scrollMsg(object,false)},scrollMsg:function(id,object,animate){var newPos,m,b,screenTop,screenBottom,scrollObj="";if(typeof object==="undefined"){scrollObj=
47
  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;scrollObj.focus();newPos=scrollObj.offset().top;if(!newPos||frm_js.offset==="-1")return;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||
js/formidable_admin.js CHANGED
@@ -28,10 +28,10 @@ var FrmFormsConnect = window.FrmFormsConnect || ( function( document, window, $
28
  * @since 4.03
29
  */
30
  init: function() {
31
- $( document.getElementById( 'frm_deauthorize_link' ) ).click( app.deauthorize );
32
- $( '.frm_authorize_link' ).click( app.authorize );
33
  if ( el.reset !== null ) {
34
- $( el.reset ).click( app.reauthorize );
35
  }
36
 
37
  $( el.btn ).on( 'click', function( e ) {
@@ -1001,7 +1001,7 @@ function frmAdminBuildJS() {
1001
  var hasBreak = 0;
1002
  if ( 'summary' === fieldType ) {
1003
  // see if we need to insert a page break before this newly-added summary field. Check for at least 1 page break
1004
- hasBreak = jQuery( '.frmbutton_loadingnow#' + loadingID ).prevAll( 'li[data-type="break"]:first' ).length > 0 ? 1 : 0;
1005
  }
1006
 
1007
  jQuery.ajax({
@@ -1047,42 +1047,48 @@ function frmAdminBuildJS() {
1047
  }
1048
 
1049
  function loadFields( fieldId ) {
1050
- var $thisField = jQuery( document.getElementById( fieldId ) );
1051
- var fields;
1052
- if ( jQuery.isFunction( jQuery.fn.addBack ) ) {
1053
- fields = $thisField.nextAll( '*:lt(14)' ).addBack();
1054
- } else {
1055
- fields = $thisField.nextAll( '*:lt(14)' ).andSelf();
1056
- }
1057
- fields.addClass( 'frm_load_now' );
 
1058
 
1059
- var h = [];
1060
- jQuery.each( fields, function( k, v ) {
1061
- h.push( jQuery( v ).find( '.frm_hidden_fdata' ).html() );
1062
- });
 
 
1063
 
1064
  jQuery.ajax({
1065
  type: 'POST', url: ajaxurl,
1066
  data: {
1067
  action: 'frm_load_field',
1068
- field: h,
1069
  form_id: thisFormId,
1070
  nonce: frmGlobal.nonce
1071
  },
1072
  success: function( html ) {
 
 
1073
  html = html.replace( /^\s+|\s+$/g, '' );
1074
  if ( html.indexOf( '{' ) !== 0 ) {
1075
  jQuery( '.frm_load_now' ).removeClass( '.frm_load_now' ).html( 'Error' );
1076
  return;
1077
  }
1078
- html = jQuery.parseJSON( html );
1079
 
1080
- for ( var key in html ) {
 
 
1081
  jQuery( '#frm_field_id_' + key ).replaceWith( html[key]);
1082
  setupSortable( '#frm_field_id_' + key + '.edit_field_type_divider ul.frm_sorting' );
1083
  }
1084
 
1085
- var $nextSet = $thisField.nextAll( '.frm_field_loading:not(.frm_load_now)' );
1086
  if ( $nextSet.length ) {
1087
  loadFields( $nextSet.attr( 'id' ) );
1088
  } else {
@@ -1898,7 +1904,7 @@ function frmAdminBuildJS() {
1898
  return;
1899
  }
1900
 
1901
- jQuery( '.frm-insert-preset' ).click( insertBulkPreset );
1902
 
1903
  jQuery( builderForm ).on( 'click', 'a.frm-bulk-edit-link', function( event ) {
1904
  event.preventDefault();
@@ -1938,7 +1944,7 @@ function frmAdminBuildJS() {
1938
  return false;
1939
  });
1940
 
1941
- jQuery( '#frm-update-bulk-opts' ).click( function() {
1942
  var fieldId = document.getElementById( 'bulk-field-id' ).value;
1943
  this.classList.add( 'frm_loading_button' );
1944
  frmAdminBuild.updateOpts( fieldId, document.getElementById( 'frm_bulk_options' ).value, $info );
@@ -2082,7 +2088,7 @@ function frmAdminBuildJS() {
2082
  }
2083
 
2084
  function setAlignment( fieldId, alignment ) {
2085
- jQuery( '#field_options_align_' + fieldId ).val( alignment ).change();
2086
  }
2087
 
2088
  function setImageSize() {
@@ -2102,7 +2108,7 @@ function frmAdminBuildJS() {
2102
  function refreshOptionDisplayNow( object ) {
2103
  var $field = object.closest( '.frm-single-settings' ),
2104
  fieldID = $field.data( 'fid' );
2105
- jQuery( '.field_' + fieldID + '_option' ).change();
2106
  }
2107
 
2108
  function refreshOptionDisplay() {
@@ -2133,7 +2139,7 @@ function frmAdminBuildJS() {
2133
  $imagePreview.find( '.frm_image_preview_title' ).text( attachment.filename );
2134
  $imagePreview.siblings( 'input[name*="[label]"]' ).data( 'frmimgurl', attachment.url );
2135
  $imagePreview.find( '.frm_choose_image_box' ).hide();
2136
- $imagePreview.find( 'input.frm_image_id' ).val( attachment.id ).change();
2137
  wp.media.model.settings.post.id = postID;
2138
  });
2139
 
@@ -2152,10 +2158,9 @@ function frmAdminBuildJS() {
2152
  previewWrapper.find( 'img' ).attr( 'src', '' );
2153
  previewWrapper.find( '.frm_image_preview_frame' ).hide();
2154
  previewWrapper.find( '.frm_choose_image_box' ).show();
2155
- previewWrapper.find( 'input.frm_image_id' ).val( 0 ).change();
2156
  }
2157
 
2158
-
2159
  function toggleMultiselect() {
2160
  /*jshint validthis:true */
2161
  var dropdown = jQuery( this ).closest( 'li' ).find( '.frm_form_fields select' );
@@ -2211,22 +2216,24 @@ function frmAdminBuildJS() {
2211
  * deselect it.
2212
  */
2213
  function maybeUncheckRadio() {
 
 
2214
  /*jshint validthis:true */
2215
- var $self = jQuery( this );
2216
  if ( $self.is( ':checked' ) ) {
2217
- var uncheck = function() {
2218
  setTimeout( function() {
2219
  $self.removeAttr( 'checked' );
2220
  }, 0 );
2221
  };
2222
- var unbind = function() {
2223
- $self.unbind( 'mouseup', up );
2224
  };
2225
- var up = function() {
2226
  uncheck();
2227
  unbind();
2228
  };
2229
- $self.bind( 'mouseup', up );
2230
  $self.one( 'mouseout', unbind );
2231
  }
2232
  }
@@ -2336,11 +2343,7 @@ function frmAdminBuildJS() {
2336
  /*jshint validthis:true */
2337
  var id = jQuery( this ).closest( '.frm-single-settings' ).data( 'fid' ),
2338
  formId = thisFormId,
2339
- metaName = 0;
2340
-
2341
- if ( jQuery( '#frm_logic_row_' + id + ' .frm_logic_row' ).length > 0 ) {
2342
- metaName = 1 + parseInt( jQuery( '#frm_logic_row_' + id + ' .frm_logic_row:last' ).attr( 'id' ).replace( 'frm_logic_' + id + '_', '' ), 10 );
2343
- }
2344
  jQuery.ajax({
2345
  type: 'POST',
2346
  url: ajaxurl,
@@ -2349,7 +2352,7 @@ function frmAdminBuildJS() {
2349
  form_id: formId,
2350
  field_id: id,
2351
  nonce: frmGlobal.nonce,
2352
- meta_name: metaName,
2353
  fields: getFieldList()
2354
  },
2355
  success: function( html ) {
@@ -2363,19 +2366,19 @@ function frmAdminBuildJS() {
2363
  return false;
2364
  }
2365
 
 
 
 
 
 
 
 
2366
  function addWatchLookupRow() {
2367
  /*jshint validthis:true */
2368
  var lastRowId,
2369
  id = jQuery( this ).closest( '.frm-single-settings' ).data( 'fid' ),
2370
  formId = thisFormId,
2371
- rowKey = 0,
2372
  lookupBlockRows = document.getElementById( 'frm_watch_lookup_block_' + id ).children;
2373
-
2374
- if ( lookupBlockRows.length > 0 ) {
2375
- lastRowId = lookupBlockRows[lookupBlockRows.length - 1].id;
2376
- rowKey = 1 + parseInt( lastRowId.replace( 'frm_watch_lookup_' + id + '_', '' ), 10 );
2377
- }
2378
-
2379
  jQuery.ajax({
2380
  type: 'POST',
2381
  url: ajaxurl,
@@ -2383,7 +2386,7 @@ function frmAdminBuildJS() {
2383
  action: 'frm_add_watch_lookup_row',
2384
  form_id: formId,
2385
  field_id: id,
2386
- row_key: rowKey,
2387
  nonce: frmGlobal.nonce
2388
  },
2389
  success: function( newRow ) {
@@ -2633,7 +2636,7 @@ function frmAdminBuildJS() {
2633
  function toggleCollapseFakePage() {
2634
  var topLevel = document.getElementById( 'frm-fake-page' ),
2635
  firstField = document.getElementById( 'frm-show-fields' ).firstElementChild,
2636
- toCollapse = jQuery( firstField ).nextUntil( '.frm_field_box[data-ftype=break]' ).andSelf();
2637
 
2638
  if ( firstField.getAttribute( 'data-ftype' ) === 'break' ) {
2639
  // Don't collapse if the first field is a page break.
@@ -3010,11 +3013,11 @@ function frmAdminBuildJS() {
3010
 
3011
  valueSelect.prepend( optionMatch );
3012
  }
3013
- }
3014
 
3015
- optionMatch = valueSelect.querySelector( 'option[value=""]' );
3016
- if ( optionMatch !== null ) {
3017
- valueSelect.prepend( optionMatch );
 
3018
  }
3019
  }
3020
 
@@ -3659,24 +3662,37 @@ function frmAdminBuildJS() {
3659
  $postStuff.insertBefore( $html, $postStuff.firstChild );
3660
  },
3661
  error: function() {
3662
- jQuery( document.getElementById( 'frm_js_build_form' ) ).submit();
3663
  }
3664
  });
3665
  }
3666
 
 
 
 
 
 
 
 
 
 
 
 
 
3667
  function submitNoAjax() {
3668
  /*jshint validthis:true */
3669
- preFormSave( this );
3670
 
3671
- var form = jQuery( builderForm );
 
3672
  jQuery( document.getElementById( 'frm_compact_fields' ) ).val( JSON.stringify( form.serializeArray() ) );
3673
- jQuery( document.getElementById( 'frm_js_build_form' ) ).submit();
3674
  }
3675
 
3676
  function preFormSave( b ) {
3677
  removeWPUnload();
3678
  if ( jQuery( 'form.inplace_form' ).length ) {
3679
- jQuery( '.inplace_save, .postbox' ).click();
3680
  }
3681
 
3682
  $button = jQuery( b );
@@ -3875,11 +3891,11 @@ function frmAdminBuildJS() {
3875
 
3876
  $top = $original.find( '.widget-top' );
3877
  $top.on( 'frm-action-loaded', function() {
3878
- $trigger.click();
3879
  $original.removeClass( 'open' );
3880
  $inside.hide();
3881
  });
3882
- $top.click();
3883
  return true;
3884
  }
3885
 
@@ -3951,12 +3967,8 @@ function frmAdminBuildJS() {
3951
  }
3952
 
3953
  function getNewActionId() {
3954
- var len = 0;
3955
- if ( jQuery( '.frm_form_action_settings:last' ).length ) {
3956
- //Get number of previous action
3957
- len = jQuery( '.frm_form_action_settings:last' ).attr( 'id' ).replace( 'frm_form_action_', '' );
3958
- }
3959
- len = parseInt( len, 10 ) + 1;
3960
  if ( typeof document.getElementById( 'frm_form_action_' + len ) !== 'undefined' ) {
3961
  len = len + 100;
3962
  }
@@ -4077,18 +4089,15 @@ function frmAdminBuildJS() {
4077
  /*jshint validthis:true */
4078
  var id = jQuery( this ).data( 'emailkey' ),
4079
  type = jQuery( this ).closest( '.frm_form_action_settings' ).find( '.frm_action_name' ).val(),
4080
- metaName = 0,
4081
- formId = document.getElementById( 'form_id' ).value;
4082
- if ( jQuery( '#frm_form_action_' + id + ' .frm_logic_row' ).length ) {
4083
- metaName = 1 + parseInt( jQuery( '#frm_form_action_' + id + ' .frm_logic_row:last' ).attr( 'id' ).replace( 'frm_logic_' + id + '_', '' ), 10 );
4084
- }
4085
  jQuery.ajax({
4086
  type: 'POST', url: ajaxurl,
4087
  data: {
4088
  action: 'frm_add_form_logic_row',
4089
  email_id: id,
4090
  form_id: formId,
4091
- meta_name: metaName,
4092
  type: type,
4093
  nonce: frmGlobal.nonce
4094
  },
@@ -4120,21 +4129,15 @@ function frmAdminBuildJS() {
4120
  */
4121
  function addSubmitLogic() {
4122
  /*jshint validthis:true */
4123
- var last,
4124
- formId = thisFormId,
4125
- metaName = 0;
4126
- if ( jQuery( '#frm_submit_logic_row .frm_logic_row' ).length > 0 ) {
4127
- last = jQuery( '#frm_submit_logic_row .frm_logic_row:last' );
4128
-
4129
- metaName = 1 + parseInt( last.attr( 'id' ).replace( 'frm_logic_submit_', '' ), 10 );
4130
- }
4131
  jQuery.ajax({
4132
  type: 'POST',
4133
  url: ajaxurl,
4134
  data: {
4135
  action: 'frm_add_submit_logic_row',
4136
  form_id: formId,
4137
- meta_name: metaName,
4138
  nonce: frmGlobal.nonce
4139
  },
4140
  success: function( html ) {
@@ -4302,20 +4305,23 @@ function frmAdminBuildJS() {
4302
  }
4303
 
4304
  function addPostRow( type, button ) {
4305
- var id = jQuery( 'input[name="id"]' ).val(),
 
4306
  settings = jQuery( button ).closest( '.frm_form_action_settings' ),
4307
  key = settings.data( 'actionkey' ),
4308
  postType = settings.find( '.frm_post_type' ).val(),
4309
- metaName = 0;
 
4310
 
4311
- if ( jQuery( '.frm_post' + type + '_row' ).length ) {
4312
- var name = jQuery( '.frm_post' + type + '_row:last' ).attr( 'id' ).replace( 'frm_post' + type + '_', '' );
4313
- if ( jQuery.isNumeric( name ) ) {
4314
  metaName = 1 + parseInt( name, 10 );
4315
  } else {
4316
  metaName = 1;
4317
  }
4318
  }
 
4319
  jQuery.ajax({
4320
  type: 'POST', url: ajaxurl,
4321
  data: {
@@ -4328,12 +4334,16 @@ function frmAdminBuildJS() {
4328
  nonce: frmGlobal.nonce
4329
  },
4330
  success: function( html ) {
 
4331
  jQuery( document.getElementById( 'frm_post' + type + '_rows' ) ).append( html );
4332
  jQuery( '.frm_add_post' + type + '_row.button' ).hide();
4333
 
4334
  if ( type === 'meta' ) {
4335
  jQuery( '.frm_name_value' ).show();
4336
- jQuery( '.frm_toggle_cf_opts' ).not( ':last' ).hide();
 
 
 
4337
  } else if ( type === 'tax' ) {
4338
  jQuery( '.frm_posttax_labels' ).show();
4339
  }
@@ -4341,6 +4351,10 @@ function frmAdminBuildJS() {
4341
  });
4342
  }
4343
 
 
 
 
 
4344
  function getMetaValue( id, metaName ) {
4345
  var newMeta = metaName;
4346
  if ( jQuery( document.getElementById( id + metaName ) ).length > 0 ) {
@@ -4425,7 +4439,7 @@ function frmAdminBuildJS() {
4425
  function submitSettings() {
4426
  /*jshint validthis:true */
4427
  preFormSave( this );
4428
- jQuery( '.frm_form_settings' ).submit();
4429
  }
4430
 
4431
  /* View Functions */
@@ -4517,16 +4531,14 @@ function frmAdminBuildJS() {
4517
  }
4518
 
4519
  function addOrderRow() {
4520
- var l = 0;
4521
- if ( jQuery( '#frm_order_options .frm_logic_rows div:last' ).length > 0 ) {
4522
- l = jQuery( '#frm_order_options .frm_logic_rows div:last' ).attr( 'id' ).replace( 'frm_order_field_', '' );
4523
- }
4524
  jQuery.ajax({
4525
- type: 'POST', url: ajaxurl,
 
4526
  data: {
4527
  action: 'frm_add_order_row',
4528
  form_id: thisFormId,
4529
- order_key: ( parseInt( l, 10 ) + 1 ),
4530
  nonce: frmGlobal.nonce
4531
  },
4532
  success: function( html ) {
@@ -4536,16 +4548,14 @@ function frmAdminBuildJS() {
4536
  }
4537
 
4538
  function addWhereRow() {
4539
- var l = 0;
4540
- if ( jQuery( '#frm_where_options .frm_logic_rows div:last' ).length ) {
4541
- l = jQuery( '#frm_where_options .frm_logic_rows div:last' ).attr( 'id' ).replace( 'frm_where_field_', '' );
4542
- }
4543
  jQuery.ajax({
4544
- type: 'POST', url: ajaxurl,
 
4545
  data: {
4546
  action: 'frm_add_where_row',
4547
  form_id: thisFormId,
4548
- where_key: ( parseInt( l, 10 ) + 1 ),
4549
  nonce: frmGlobal.nonce
4550
  },
4551
  success: function( html ) {
@@ -4695,7 +4705,7 @@ function frmAdminBuildJS() {
4695
  obj.focus();
4696
  obj.setSelectionRange( s, s );
4697
  }
4698
- contentBox.change(); //trigger change
4699
  }
4700
 
4701
  function maybeFormatInsertedContent( input, textToInsert, selectionStart, selectionEnd ) {
@@ -4851,7 +4861,7 @@ function frmAdminBuildJS() {
4851
  }
4852
 
4853
  function bindClickForDialogClose( $modal ) {
4854
- jQuery( '.ui-widget-overlay, a.dismiss' ).bind( 'click', function() {
4855
  $modal.dialog( 'close' );
4856
  });
4857
  }
@@ -4868,7 +4878,7 @@ function frmAdminBuildJS() {
4868
 
4869
  $modal = initModal( '#frm_new_form_modal', '600px' );
4870
  $modal.attr( 'frm-page', 'create' );
4871
- $modal.find( '#template-search-input' ).val( '' ).change();
4872
  $modal.dialog( 'open' );
4873
 
4874
  dismiss.removeAttribute( 'tabindex' );
@@ -4981,14 +4991,14 @@ function frmAdminBuildJS() {
4981
  if ( d === 'frm_long_input' || d === 'frm_98_width' || typeof d === 'undefined' ) {
4982
  d = '';
4983
  } else {
4984
- id = jQuery.trim( d );
4985
  }
4986
  c = c + ' ' + d;
4987
  c = c.replace( 'widefat', '' ).replace( 'frm_with_left_label', '' );
4988
  }
4989
  }
4990
 
4991
- jQuery( '#frm-insert-fields-box,#frm-conditionals,#frm-adv-info-tab,#frm-dynamic-values' ).attr( 'data-fills', jQuery.trim( c ) );
4992
  var a = [
4993
  'content', 'wpbody-content', 'dyncontent', 'success_url',
4994
  'success_msg', 'edit_msg', 'frm_dyncontent', 'frm_not_email_message',
@@ -5012,7 +5022,7 @@ function frmAdminBuildJS() {
5012
  // Automatically select a tab.
5013
  if ( id === 'dyn_default_value' ) {
5014
  clickedID = 'frm_dynamic_values';
5015
- jQuery( document.getElementById( clickedID + '_tab' ) ).click();
5016
  jQuery( '#' + clickedID.replace( /_/g, '-' ) + ' .frm_show_inactive' ).addClass( 'frm_hidden' );
5017
  jQuery( '#' + clickedID.replace( /_/g, '-' ) + ' .frm_show_active' ).removeClass( 'frm_hidden' );
5018
  }
@@ -5025,7 +5035,7 @@ function frmAdminBuildJS() {
5025
  return;
5026
  }
5027
 
5028
- jQuery( '#frm-adv-info-tab' ).attr( 'data-fills', jQuery.trim( id ) );
5029
  if ( input.classList.contains( 'field_custom_html' ) ) {
5030
  id = 'field_custom_html';
5031
  }
@@ -5049,15 +5059,19 @@ function frmAdminBuildJS() {
5049
 
5050
  //function to append a new theme stylesheet with the new style changes
5051
  function updateUICSS( locStr ) {
 
 
5052
  if ( locStr == -1 ) {
5053
  jQuery( 'link.ui-theme' ).remove();
5054
  return false;
5055
  }
5056
- var cssLink = jQuery( '<link href="' + locStr + '" type="text/css" rel="Stylesheet" class="ui-theme" />' );
5057
- jQuery( 'head' ).append( cssLink );
5058
 
5059
- if ( jQuery( 'link.ui-theme' ).length > 1 ) {
5060
- jQuery( 'link.ui-theme:first' ).remove();
 
 
 
 
5061
  }
5062
  }
5063
 
@@ -5400,7 +5414,7 @@ function frmAdminBuildJS() {
5400
  onDropdownShown: function( event ) {
5401
  var action = jQuery( event.currentTarget.closest( '.frm_form_action_settings, #frm-show-fields' ) );
5402
  if ( action.length ) {
5403
- jQuery( '#wpcontent' ).click( function() {
5404
  if ( jQuery( '.multiselect-container.frm-dropdown-menu' ).is( ':visible' ) ) {
5405
  jQuery( event.currentTarget ).removeClass( 'open' );
5406
  }
@@ -5563,7 +5577,7 @@ function frmAdminBuildJS() {
5563
  .css({ padding: 5 })
5564
  .find( '#upgrade' )
5565
  .attr( 'rel', button.attr( 'rel' ) )
5566
- .click( installAddonWithCreds );
5567
  } else {
5568
  el.append( '<div class="frm-addon-error frm_error_style"><p><strong>' + response.message + '</strong></p></div>' );
5569
  button.removeClass( 'frm_loading_button' );
@@ -5589,7 +5603,7 @@ function frmAdminBuildJS() {
5589
  installFormTrigger.classList.add( 'frm-install-template', 'frm_hidden' );
5590
  document.body.appendChild( installFormTrigger );
5591
 
5592
- jQuery( '.frm-install-template' ).click( function( event ) {
5593
  var $h3Clone = jQuery( this ).closest( 'li, td' ).find( 'h3' ).clone(),
5594
  nameLabel = document.getElementById( 'frm_new_name' ),
5595
  descLabel = document.getElementById( 'frm_new_desc' ),
@@ -5674,7 +5688,7 @@ function frmAdminBuildJS() {
5674
  }
5675
 
5676
  $trigger = $hoverIcons.find( '.' + triggerClass );
5677
- $trigger.click();
5678
  });
5679
 
5680
  jQuery( document ).on( 'click', 'li .frm-hover-icons .frm-delete-form', function( event ) {
@@ -5893,12 +5907,16 @@ function frmAdminBuildJS() {
5893
  $trigger = activeHoverIcons.find( '.frm-unlock-form' );
5894
  }
5895
 
5896
- $trigger.click();
5897
  });
5898
 
5899
  jQuery( document ).on( 'click', '.frm-submit-new-template', function( event ) {
 
5900
  event.preventDefault();
5901
- document.getElementById( 'frm-new-template' ).querySelector( 'button' ).click();
 
 
 
5902
  });
5903
 
5904
  urlParams = new URLSearchParams( window.location.search );
@@ -6410,14 +6428,14 @@ function frmAdminBuildJS() {
6410
  s = {};
6411
 
6412
  // Bootstrap dropdown button
6413
- jQuery( '.wp-admin' ).click( function( e ) {
6414
  var t = jQuery( e.target );
6415
  var $openDrop = jQuery( '.dropdown.open' );
6416
  if ( $openDrop.length && ! t.hasClass( 'dropdown' ) && ! t.closest( '.dropdown' ).length ) {
6417
  $openDrop.removeClass( 'open' );
6418
  }
6419
  });
6420
- jQuery( '#frm_bs_dropdown:not(.open) a' ).click( focusSearchBox );
6421
 
6422
  if ( typeof thisFormId === 'undefined' ) {
6423
  thisFormId = jQuery( document.getElementById( 'form_id' ) ).val();
@@ -6455,7 +6473,7 @@ function frmAdminBuildJS() {
6455
  initNewFormModal();
6456
  initSelectionAutocomplete();
6457
 
6458
- jQuery( '[data-frmprint]' ).click( function() {
6459
  window.print();
6460
  return false;
6461
  });
@@ -6473,7 +6491,7 @@ function frmAdminBuildJS() {
6473
  // used on build, form settings, and view settings
6474
  var $shortCodeDiv = jQuery( document.getElementById( 'frm_shortcodediv' ) );
6475
  if ( $shortCodeDiv.length > 0 ) {
6476
- jQuery( 'a.edit-frm_shortcode' ).click( function() {
6477
  if ( $shortCodeDiv.is( ':hidden' ) ) {
6478
  $shortCodeDiv.slideDown( 'fast' );
6479
  this.style.display = 'none';
@@ -6481,7 +6499,7 @@ function frmAdminBuildJS() {
6481
  return false;
6482
  });
6483
 
6484
- jQuery( '.cancel-frm_shortcode', '#frm_shortcodediv' ).click( function() {
6485
  $shortCodeDiv.slideUp( 'fast' );
6486
  $shortCodeDiv.siblings( 'a.edit-frm_shortcode' ).show();
6487
  return false;
@@ -6490,7 +6508,7 @@ function frmAdminBuildJS() {
6490
 
6491
  // tabs
6492
  jQuery( document ).on( 'click', '#frm-nav-tabs a', clickNewTab );
6493
- jQuery( '.post-type-frm_display .frm-nav-tabs a, .frm-category-tabs a' ).click( function() {
6494
  if ( ! this.classList.contains( 'frm_noallow' ) ) {
6495
  clickTab( this );
6496
  return false;
@@ -6499,10 +6517,10 @@ function frmAdminBuildJS() {
6499
  clickTab( jQuery( '.starttab a' ), 'auto' );
6500
 
6501
  // submit the search form with dropdown
6502
- jQuery( '#frm-fid-search-menu a' ).click( function() {
6503
  var val = this.id.replace( 'fid-', '' );
6504
  jQuery( 'select[name="fid"]' ).val( val );
6505
- jQuery( document.getElementById( 'posts-filter' ) ).submit();
6506
  return false;
6507
  });
6508
 
@@ -6553,20 +6571,20 @@ function frmAdminBuildJS() {
6553
  });
6554
  jQuery( 'ul.field_type_list, .field_type_list li, ul.frm_code_list, .frm_code_list li, .frm_code_list li a, #frm_adv_info #category-tabs li, #frm_adv_info #category-tabs li a' ).disableSelection();
6555
 
6556
- jQuery( '.frm_submit_ajax' ).click( submitBuild );
6557
- jQuery( '.frm_submit_no_ajax' ).click( submitNoAjax );
6558
 
6559
- jQuery( 'a.edit-form-status' ).click( slideDown );
6560
- jQuery( '.cancel-form-status' ).click( slideUp );
6561
- jQuery( '.save-form-status' ).click( function() {
6562
  var newStatus = jQuery( document.getElementById( 'form_change_status' ) ).val();
6563
  jQuery( 'input[name="new_status"]' ).val( newStatus );
6564
  jQuery( document.getElementById( 'form-status-display' ) ).html( newStatus );
6565
- jQuery( '.cancel-form-status' ).click();
6566
  return false;
6567
  });
6568
 
6569
- jQuery( '.frm_form_builder form:first' ).submit( function() {
6570
  jQuery( '.inplace_field' ).blur();
6571
  });
6572
 
@@ -6673,9 +6691,9 @@ function frmAdminBuildJS() {
6673
  $formActions.on( 'click', '.frm_add_posttax_row', addPosttaxRow );
6674
  $formActions.on( 'click', '.frm_toggle_cf_opts', toggleCfOpts );
6675
  $formActions.on( 'click', '.frm_duplicate_form_action', copyFormAction );
6676
- jQuery( 'select[data-toggleclass], input[data-toggleclass]' ).change( toggleFormOpts );
6677
  jQuery( '.frm_actions_list' ).on( 'click', '.frm_active_action', addFormAction );
6678
- jQuery( '#frm-show-groups, #frm-hide-groups' ).click( toggleActionGroups );
6679
  initiateMultiselect();
6680
 
6681
  //set actions icons to inactive
@@ -6689,7 +6707,7 @@ function frmAdminBuildJS() {
6689
  }
6690
  });
6691
 
6692
- jQuery( '.frm_submit_settings_btn' ).click( submitSettings );
6693
 
6694
  formSettings = jQuery( '.frm_form_settings' );
6695
  formSettings.on( 'click', '.frm_add_form_logic', addFormLogicRow );
@@ -6719,7 +6737,7 @@ function frmAdminBuildJS() {
6719
  });
6720
 
6721
  //Warning when user selects "Do not store entries ..."
6722
- jQuery( document.getElementById( 'no_save' ) ).change( function() {
6723
  if ( this.checked ) {
6724
  if ( confirm( frm_admin_js.no_save_warning ) !== true ) {
6725
  // Uncheck box if user hits "Cancel"
@@ -6729,13 +6747,13 @@ function frmAdminBuildJS() {
6729
  });
6730
 
6731
  //Show/hide Messages header
6732
- jQuery( '#editable, #edit_action, #save_draft, #success_action' ).change( function() {
6733
  maybeShowFormMessages();
6734
  });
6735
- jQuery( 'select[name="options[success_action]"], select[name="options[edit_action]"]' ).change( showSuccessOpt );
6736
 
6737
  $loggedIn = document.getElementById( 'logged_in' );
6738
- jQuery( $loggedIn ).change( function() {
6739
  if ( this.checked ) {
6740
  visible( '.hide_logged_in' );
6741
  } else {
@@ -6744,7 +6762,7 @@ function frmAdminBuildJS() {
6744
  });
6745
 
6746
  $cookieExp = jQuery( document.getElementById( 'frm_cookie_expiration' ) );
6747
- jQuery( document.getElementById( 'frm_single_entry_type' ) ).change( function() {
6748
  if ( this.value === 'cookie' ) {
6749
  $cookieExp.fadeIn( 'slow' );
6750
  } else {
@@ -6753,7 +6771,7 @@ function frmAdminBuildJS() {
6753
  });
6754
 
6755
  var $singleEntry = document.getElementById( 'single_entry' );
6756
- jQuery( $singleEntry ).change( function() {
6757
  if ( this.checked ) {
6758
  visible( '.hide_single_entry' );
6759
  } else {
@@ -6770,21 +6788,21 @@ function frmAdminBuildJS() {
6770
  jQuery( '.hide_save_draft' ).hide();
6771
 
6772
  var $saveDraft = jQuery( document.getElementById( 'save_draft' ) );
6773
- $saveDraft.change( function() {
6774
  if ( this.checked ) {
6775
  jQuery( '.hide_save_draft' ).fadeIn( 'slow' );
6776
  } else {
6777
  jQuery( '.hide_save_draft' ).fadeOut( 'slow' );
6778
  }
6779
  });
6780
- $saveDraft.change();
6781
 
6782
  //If Allow editing is checked/unchecked
6783
  $editable = document.getElementById( 'editable' );
6784
- jQuery( $editable ).change( function() {
6785
  if ( this.checked ) {
6786
  jQuery( '.hide_editable' ).fadeIn( 'slow' );
6787
- jQuery( '#edit_action' ).change();
6788
  } else {
6789
  jQuery( '.hide_editable' ).fadeOut( 'slow' );
6790
  jQuery( '.edit_action_message_box' ).fadeOut( 'slow' );//Hide On Update message box
@@ -6795,10 +6813,8 @@ function frmAdminBuildJS() {
6795
  jQuery( document ).on( 'change', '#protect_files', function() {
6796
  if ( this.checked ) {
6797
  jQuery( '.hide_protect_files' ).fadeIn( 'slow' );
6798
- jQuery( '#edit_action' ).change();
6799
  } else {
6800
  jQuery( '.hide_protect_files' ).fadeOut( 'slow' );
6801
- jQuery( '.edit_action_message_box' ).fadeOut( 'slow' );//Hide On Update message box
6802
  }
6803
  });
6804
 
@@ -6852,7 +6868,7 @@ function frmAdminBuildJS() {
6852
  if ( jQuery( this ).closest( '#html_settings' ).length > 0 ) {
6853
  htmlTab.show();
6854
  htmlTab.siblings().hide();
6855
- jQuery( '#frm_html_tab a' ).click();
6856
  toggleAllowedHTML( this, e.type );
6857
  } else {
6858
  showElement( jQuery( '.frm-category-tabs li' ) );
@@ -6891,7 +6907,7 @@ function frmAdminBuildJS() {
6891
  jQuery( document ).on( 'blur', 'input[name^="options[where_val]"]', checkFilterParamNames );
6892
 
6893
  // Show loading indicator.
6894
- jQuery( '#publish' ).mousedown( function() {
6895
  this.classList.add( 'frm_loading_button' );
6896
  });
6897
 
@@ -6899,7 +6915,7 @@ function frmAdminBuildJS() {
6899
  jQuery( '#frm_dyncontent .handlediv' ).before( jQuery( '#frm_dyncontent .nav-menus-php' ) );
6900
 
6901
  // click content tabs
6902
- jQuery( '.nav-tab-wrapper a' ).click( clickContentTab );
6903
 
6904
  // click tabs after panel is replaced with ajax
6905
  jQuery( '#side-sortables' ).on( 'click', '.frm_doing_ajax.categorydiv .category-tabs a', clickTabsAfterAjax );
@@ -6907,9 +6923,9 @@ function frmAdminBuildJS() {
6907
  initToggleShortcodes();
6908
  jQuery( '.frm_code_list:not(.frm-dropdown-menu) a' ).addClass( 'frm_noallow' );
6909
 
6910
- jQuery( 'input[name="show_count"]' ).change( showCount );
6911
 
6912
- jQuery( document.getElementById( 'form_id' ) ).change( displayFormSelected );
6913
 
6914
  $addRemove = jQuery( '.frm_repeat_rows' );
6915
  $addRemove.on( 'click', '.frm_add_order_row', addOrderRow );
@@ -6921,7 +6937,7 @@ function frmAdminBuildJS() {
6921
  },
6922
 
6923
  inboxInit: function() {
6924
- jQuery( '.frm_inbox_dismiss, footer .frm-button-secondary, footer .frm-button-primary' ).click( function( e ) {
6925
  var message = this.parentNode.parentNode,
6926
  key = message.getAttribute( 'data-message' ),
6927
  href = this.getAttribute( 'href' );
@@ -6943,7 +6959,7 @@ function frmAdminBuildJS() {
6943
  });
6944
  });
6945
  });
6946
- jQuery( '#frm-dismiss-inbox' ).click( function( e ) {
6947
  data = {
6948
  action: 'frm_inbox_dismiss',
6949
  key: 'all',
@@ -6971,7 +6987,7 @@ function frmAdminBuildJS() {
6971
  jQuery( 'input.hex' ).wpColorPicker({
6972
  change: function( event ) {
6973
  var hexcolor = jQuery( this ).wpColorPicker( 'color' );
6974
- jQuery( event.target ).val( hexcolor ).change();
6975
  }
6976
  });
6977
  jQuery( '.wp-color-result-text' ).text( function( i, oldText ) {
@@ -6979,7 +6995,7 @@ function frmAdminBuildJS() {
6979
  });
6980
 
6981
  // update styling on change
6982
- jQuery( '#frm_styling_form .styling_settings' ).change( function() {
6983
  var locStr = jQuery( 'input[name^="frm_style_setting[post_content]"], select[name^="frm_style_setting[post_content]"], textarea[name^="frm_style_setting[post_content]"], input[name="style_name"]' ).serializeArray();
6984
  locStr = JSON.stringify( locStr );
6985
  jQuery.ajax({
@@ -6996,7 +7012,7 @@ function frmAdminBuildJS() {
6996
  });
6997
 
6998
  // menu tabs
6999
- jQuery( '#menu-settings-column' ).bind( 'click', function( e ) {
7000
  var panelId, wrapper,
7001
  target = jQuery( e.target );
7002
 
@@ -7020,7 +7036,7 @@ function frmAdminBuildJS() {
7020
  }
7021
  });
7022
 
7023
- jQuery( '.multiselect-container.frm-dropdown-menu li a' ).click( function() {
7024
  var radio = this.children[0].children[0];
7025
  var btnGrp = jQuery( this ).closest( '.btn-group' );
7026
  var btnId = btnGrp.attr( 'id' );
@@ -7045,13 +7061,13 @@ function frmAdminBuildJS() {
7045
  var key;
7046
  errObj = errObj.replace( /^\s+|\s+$/g, '' );
7047
  if ( errObj.indexOf( '{' ) === 0 ) {
7048
- errObj = jQuery.parseJSON( errObj );
7049
  }
7050
  for ( key in errObj ) {
7051
  jQuery( 'input[name$="[' + key + ']"], select[name$="[' + key + ']"]' ).val( errObj[key]);
7052
  }
7053
  jQuery( '#frm_submit_style, #frm_auto_width' ).prop( 'checked', false );
7054
- jQuery( document.getElementById( 'frm_fieldset' ) ).change();
7055
  button.classList.remove( 'frm_loading_button' );
7056
  }
7057
  });
@@ -7059,9 +7075,9 @@ function frmAdminBuildJS() {
7059
 
7060
  jQuery( '.frm_pro_form #datepicker_sample' ).datepicker({ changeMonth: true, changeYear: true });
7061
 
7062
- jQuery( document.getElementById( 'frm_position' ) ).change( setPosClass );
7063
 
7064
- jQuery( 'select[name$="[theme_selector]"]' ).change( function() {
7065
  var themeVal = jQuery( this ).val();
7066
  var css = themeVal;
7067
  if ( themeVal !== -1 ) {
@@ -7077,7 +7093,7 @@ function frmAdminBuildJS() {
7077
  updateUICSS( css );
7078
  document.getElementById( 'frm_theme_css' ).value = themeVal;
7079
  return false;
7080
- }).change();
7081
  },
7082
 
7083
  customCSSInit: function() {
@@ -7106,7 +7122,7 @@ function frmAdminBuildJS() {
7106
  // Solution install page
7107
  jQuery( document ).on( 'click', '#frm-new-template button', installTemplateFieldset );
7108
 
7109
- jQuery( '#frm-dismissable-cta .dismiss' ).click( function( event ) {
7110
  event.preventDefault();
7111
  jQuery.post( ajaxurl, {
7112
  action: 'frm_lite_settings_upgrade'
@@ -7116,15 +7132,15 @@ function frmAdminBuildJS() {
7116
  },
7117
 
7118
  exportInit: function() {
7119
- jQuery( '.frm_form_importer' ).submit( startFormMigration );
7120
- jQuery( document.getElementById( 'frm_export_xml' ) ).submit( validateExport );
7121
- jQuery( '#frm_export_xml input, #frm_export_xml select' ).change( removeExportError );
7122
- jQuery( 'input[name="frm_import_file"]' ).change( checkCSVExtension );
7123
- jQuery( 'select[name="format"]' ).change( checkExportTypes ).change();
7124
- jQuery( 'input[name="frm_export_forms[]"]' ).click( preventMultipleExport );
7125
  initiateMultiselect();
7126
 
7127
- jQuery( '.frm-feature-banner .dismiss' ).click( function( event ) {
7128
  event.preventDefault();
7129
  jQuery.post( ajaxurl, {
7130
  action: 'frm_dismiss_migrator',
@@ -7162,7 +7178,7 @@ function frmAdminBuildJS() {
7162
 
7163
  /* remove conditional logic if the field doesn't exist */
7164
  triggerRemoveLogic: function( fieldID, metaName ) {
7165
- jQuery( '#frm_logic_' + fieldID + '_' + metaName + ' .frm_remove_tag' ).click();
7166
  },
7167
 
7168
  downloadXML: function( controller, ids, isTemplate ) {
@@ -7220,7 +7236,7 @@ function frm_add_logic_row( id, formId ) { // eslint-disable-line camelcase
7220
  action: 'frm_add_logic_row',
7221
  form_id: formId,
7222
  field_id: id,
7223
- meta_name: jQuery( '#frm_logic_row_' + id + ' > div' ).size(),
7224
  nonce: frmGlobal.nonce
7225
  },
7226
  success: function( html ) {
28
  * @since 4.03
29
  */
30
  init: function() {
31
+ $( document.getElementById( 'frm_deauthorize_link' ) ).on( 'click', app.deauthorize );
32
+ $( '.frm_authorize_link' ).on( 'click', app.authorize );
33
  if ( el.reset !== null ) {
34
+ $( el.reset ).on( 'click', app.reauthorize );
35
  }
36
 
37
  $( el.btn ).on( 'click', function( e ) {
1001
  var hasBreak = 0;
1002
  if ( 'summary' === fieldType ) {
1003
  // see if we need to insert a page break before this newly-added summary field. Check for at least 1 page break
1004
+ hasBreak = jQuery( '.frmbutton_loadingnow#' + loadingID ).prevAll( 'li[data-type="break"]' ).length ? 1 : 0;
1005
  }
1006
 
1007
  jQuery.ajax({
1047
  }
1048
 
1049
  function loadFields( fieldId ) {
1050
+ var addHtmlToField, nextElement,
1051
+ thisField = document.getElementById( fieldId ),
1052
+ $thisField = jQuery( thisField ),
1053
+ field = [];
1054
+
1055
+ addHtmlToField = function( element ) {
1056
+ element.classList.add( 'frm_load_now' );
1057
+ field.push( element.querySelector( '.frm_hidden_fdata' ).innerHTML );
1058
+ };
1059
 
1060
+ nextElement = thisField;
1061
+ addHtmlToField( nextElement );
1062
+ while ( nextElement.nextElementSibling && field.length < 15 ) {
1063
+ addHtmlToField( nextElement.nextElementSibling );
1064
+ nextElement = nextElement.nextElementSibling;
1065
+ }
1066
 
1067
  jQuery.ajax({
1068
  type: 'POST', url: ajaxurl,
1069
  data: {
1070
  action: 'frm_load_field',
1071
+ field: field,
1072
  form_id: thisFormId,
1073
  nonce: frmGlobal.nonce
1074
  },
1075
  success: function( html ) {
1076
+ var key, $nextSet;
1077
+
1078
  html = html.replace( /^\s+|\s+$/g, '' );
1079
  if ( html.indexOf( '{' ) !== 0 ) {
1080
  jQuery( '.frm_load_now' ).removeClass( '.frm_load_now' ).html( 'Error' );
1081
  return;
1082
  }
 
1083
 
1084
+ html = JSON.parse( html );
1085
+
1086
+ for ( key in html ) {
1087
  jQuery( '#frm_field_id_' + key ).replaceWith( html[key]);
1088
  setupSortable( '#frm_field_id_' + key + '.edit_field_type_divider ul.frm_sorting' );
1089
  }
1090
 
1091
+ $nextSet = $thisField.nextAll( '.frm_field_loading:not(.frm_load_now)' );
1092
  if ( $nextSet.length ) {
1093
  loadFields( $nextSet.attr( 'id' ) );
1094
  } else {
1904
  return;
1905
  }
1906
 
1907
+ jQuery( '.frm-insert-preset' ).on( 'click', insertBulkPreset );
1908
 
1909
  jQuery( builderForm ).on( 'click', 'a.frm-bulk-edit-link', function( event ) {
1910
  event.preventDefault();
1944
  return false;
1945
  });
1946
 
1947
+ jQuery( '#frm-update-bulk-opts' ).on( 'click', function() {
1948
  var fieldId = document.getElementById( 'bulk-field-id' ).value;
1949
  this.classList.add( 'frm_loading_button' );
1950
  frmAdminBuild.updateOpts( fieldId, document.getElementById( 'frm_bulk_options' ).value, $info );
2088
  }
2089
 
2090
  function setAlignment( fieldId, alignment ) {
2091
+ jQuery( '#field_options_align_' + fieldId ).val( alignment ).trigger( 'change' );
2092
  }
2093
 
2094
  function setImageSize() {
2108
  function refreshOptionDisplayNow( object ) {
2109
  var $field = object.closest( '.frm-single-settings' ),
2110
  fieldID = $field.data( 'fid' );
2111
+ jQuery( '.field_' + fieldID + '_option' ).trigger( 'change' );
2112
  }
2113
 
2114
  function refreshOptionDisplay() {
2139
  $imagePreview.find( '.frm_image_preview_title' ).text( attachment.filename );
2140
  $imagePreview.siblings( 'input[name*="[label]"]' ).data( 'frmimgurl', attachment.url );
2141
  $imagePreview.find( '.frm_choose_image_box' ).hide();
2142
+ $imagePreview.find( 'input.frm_image_id' ).val( attachment.id ).trigger( 'change' );
2143
  wp.media.model.settings.post.id = postID;
2144
  });
2145
 
2158
  previewWrapper.find( 'img' ).attr( 'src', '' );
2159
  previewWrapper.find( '.frm_image_preview_frame' ).hide();
2160
  previewWrapper.find( '.frm_choose_image_box' ).show();
2161
+ previewWrapper.find( 'input.frm_image_id' ).val( 0 ).trigger( 'change' );
2162
  }
2163
 
 
2164
  function toggleMultiselect() {
2165
  /*jshint validthis:true */
2166
  var dropdown = jQuery( this ).closest( 'li' ).find( '.frm_form_fields select' );
2216
  * deselect it.
2217
  */
2218
  function maybeUncheckRadio() {
2219
+ var $self, uncheck, unbind, up;
2220
+
2221
  /*jshint validthis:true */
2222
+ $self = jQuery( this );
2223
  if ( $self.is( ':checked' ) ) {
2224
+ uncheck = function() {
2225
  setTimeout( function() {
2226
  $self.removeAttr( 'checked' );
2227
  }, 0 );
2228
  };
2229
+ unbind = function() {
2230
+ $self.off( 'mouseup', up );
2231
  };
2232
+ up = function() {
2233
  uncheck();
2234
  unbind();
2235
  };
2236
+ $self.on( 'mouseup', up );
2237
  $self.one( 'mouseout', unbind );
2238
  }
2239
  }
2343
  /*jshint validthis:true */
2344
  var id = jQuery( this ).closest( '.frm-single-settings' ).data( 'fid' ),
2345
  formId = thisFormId,
2346
+ logicRows = document.getElementById( 'frm_logic_row_' + id ).querySelectorAll( '.frm_logic_row' );
 
 
 
 
2347
  jQuery.ajax({
2348
  type: 'POST',
2349
  url: ajaxurl,
2352
  form_id: formId,
2353
  field_id: id,
2354
  nonce: frmGlobal.nonce,
2355
+ meta_name: getNewRowId( logicRows, 'frm_logic_' + id + '_' ),
2356
  fields: getFieldList()
2357
  },
2358
  success: function( html ) {
2366
  return false;
2367
  }
2368
 
2369
+ function getNewRowId( rows, replace, defaultValue ) {
2370
+ if ( ! rows.length ) {
2371
+ return 'undefined' !== typeof defaultValue ? defaultValue : 0;
2372
+ }
2373
+ return parseInt( rows[ rows.length - 1 ].id.replace( replace, '' ), 10 ) + 1;
2374
+ }
2375
+
2376
  function addWatchLookupRow() {
2377
  /*jshint validthis:true */
2378
  var lastRowId,
2379
  id = jQuery( this ).closest( '.frm-single-settings' ).data( 'fid' ),
2380
  formId = thisFormId,
 
2381
  lookupBlockRows = document.getElementById( 'frm_watch_lookup_block_' + id ).children;
 
 
 
 
 
 
2382
  jQuery.ajax({
2383
  type: 'POST',
2384
  url: ajaxurl,
2386
  action: 'frm_add_watch_lookup_row',
2387
  form_id: formId,
2388
  field_id: id,
2389
+ row_key: getNewRowId( lookupBlockRows, 'frm_watch_lookup_' + id + '_' ),
2390
  nonce: frmGlobal.nonce
2391
  },
2392
  success: function( newRow ) {
2636
  function toggleCollapseFakePage() {
2637
  var topLevel = document.getElementById( 'frm-fake-page' ),
2638
  firstField = document.getElementById( 'frm-show-fields' ).firstElementChild,
2639
+ toCollapse = jQuery( firstField ).add( jQuery( firstField ).nextUntil( '.frm_field_box[data-ftype=break]' ) );
2640
 
2641
  if ( firstField.getAttribute( 'data-ftype' ) === 'break' ) {
2642
  // Don't collapse if the first field is a page break.
3013
 
3014
  valueSelect.prepend( optionMatch );
3015
  }
 
3016
 
3017
+ optionMatch = valueSelect.querySelector( 'option[value=""]' );
3018
+ if ( optionMatch !== null ) {
3019
+ valueSelect.prepend( optionMatch );
3020
+ }
3021
  }
3022
  }
3023
 
3662
  $postStuff.insertBefore( $html, $postStuff.firstChild );
3663
  },
3664
  error: function() {
3665
+ triggerSubmit( document.getElementById( 'frm_js_build_form' ) );
3666
  }
3667
  });
3668
  }
3669
 
3670
+ function triggerSubmit( form ) {
3671
+ var button = form.ownerDocument.createElement( 'input' );
3672
+ button.style.display = 'none';
3673
+ button.type = 'submit';
3674
+ form.appendChild( button ).click();
3675
+ form.removeChild( button );
3676
+ }
3677
+
3678
+ function triggerChange( element ) {
3679
+ jQuery( element ).trigger( 'change' );
3680
+ }
3681
+
3682
  function submitNoAjax() {
3683
  /*jshint validthis:true */
3684
+ var form;
3685
 
3686
+ preFormSave( this );
3687
+ form = jQuery( builderForm );
3688
  jQuery( document.getElementById( 'frm_compact_fields' ) ).val( JSON.stringify( form.serializeArray() ) );
3689
+ triggerSubmit( document.getElementById( 'frm_js_build_form' ) );
3690
  }
3691
 
3692
  function preFormSave( b ) {
3693
  removeWPUnload();
3694
  if ( jQuery( 'form.inplace_form' ).length ) {
3695
+ jQuery( '.inplace_save, .postbox' ).trigger( 'click' );
3696
  }
3697
 
3698
  $button = jQuery( b );
3891
 
3892
  $top = $original.find( '.widget-top' );
3893
  $top.on( 'frm-action-loaded', function() {
3894
+ $trigger.trigger( 'click' );
3895
  $original.removeClass( 'open' );
3896
  $inside.hide();
3897
  });
3898
+ $top.trigger( 'click' );
3899
  return true;
3900
  }
3901
 
3967
  }
3968
 
3969
  function getNewActionId() {
3970
+ var actionSettings = document.querySelectorAll( '.frm_form_action_settings' ),
3971
+ len = getNewRowId( actionSettings, 'frm_form_action_' );
 
 
 
 
3972
  if ( typeof document.getElementById( 'frm_form_action_' + len ) !== 'undefined' ) {
3973
  len = len + 100;
3974
  }
4089
  /*jshint validthis:true */
4090
  var id = jQuery( this ).data( 'emailkey' ),
4091
  type = jQuery( this ).closest( '.frm_form_action_settings' ).find( '.frm_action_name' ).val(),
4092
+ formId = document.getElementById( 'form_id' ).value,
4093
+ logicRows = document.getElementById( 'frm_form_action_' + id ).querySelectorAll( '.frm_logic_row' );
 
 
 
4094
  jQuery.ajax({
4095
  type: 'POST', url: ajaxurl,
4096
  data: {
4097
  action: 'frm_add_form_logic_row',
4098
  email_id: id,
4099
  form_id: formId,
4100
+ meta_name: getNewRowId( logicRows, 'frm_logic_' + id + '_' ),
4101
  type: type,
4102
  nonce: frmGlobal.nonce
4103
  },
4129
  */
4130
  function addSubmitLogic() {
4131
  /*jshint validthis:true */
4132
+ var formId = thisFormId,
4133
+ logicRows = document.getElementById( 'frm_submit_logic_row' ).querySelectorAll( '.frm_logic_row' );
 
 
 
 
 
 
4134
  jQuery.ajax({
4135
  type: 'POST',
4136
  url: ajaxurl,
4137
  data: {
4138
  action: 'frm_add_submit_logic_row',
4139
  form_id: formId,
4140
+ meta_name: getNewRowId( logicRows, 'frm_logic_submit_' ),
4141
  nonce: frmGlobal.nonce
4142
  },
4143
  success: function( html ) {
4305
  }
4306
 
4307
  function addPostRow( type, button ) {
4308
+ var name,
4309
+ id = jQuery( 'input[name="id"]' ).val(),
4310
  settings = jQuery( button ).closest( '.frm_form_action_settings' ),
4311
  key = settings.data( 'actionkey' ),
4312
  postType = settings.find( '.frm_post_type' ).val(),
4313
+ metaName = 0,
4314
+ postTypeRows = document.querySelectorAll( '.frm_post' + type + '_row' );
4315
 
4316
+ if ( postTypeRows.length ) {
4317
+ name = postTypeRows[ postTypeRows.length - 1 ].id.replace( 'frm_post' + type + '_', '' );
4318
+ if ( isNumeric( name ) ) {
4319
  metaName = 1 + parseInt( name, 10 );
4320
  } else {
4321
  metaName = 1;
4322
  }
4323
  }
4324
+
4325
  jQuery.ajax({
4326
  type: 'POST', url: ajaxurl,
4327
  data: {
4334
  nonce: frmGlobal.nonce
4335
  },
4336
  success: function( html ) {
4337
+ var cfOpts, optIndex;
4338
  jQuery( document.getElementById( 'frm_post' + type + '_rows' ) ).append( html );
4339
  jQuery( '.frm_add_post' + type + '_row.button' ).hide();
4340
 
4341
  if ( type === 'meta' ) {
4342
  jQuery( '.frm_name_value' ).show();
4343
+ cfOpts = document.querySelectorAll( '.frm_toggle_cf_opts' );
4344
+ for ( optIndex = 0; optIndex < cfOpts.length - 1; ++optIndex ) {
4345
+ cfOpts[ optIndex ].style.display = 'none';
4346
+ }
4347
  } else if ( type === 'tax' ) {
4348
  jQuery( '.frm_posttax_labels' ).show();
4349
  }
4351
  });
4352
  }
4353
 
4354
+ function isNumeric( value ) {
4355
+ return ! isNaN( parseFloat( value ) ) && isFinite( value );
4356
+ }
4357
+
4358
  function getMetaValue( id, metaName ) {
4359
  var newMeta = metaName;
4360
  if ( jQuery( document.getElementById( id + metaName ) ).length > 0 ) {
4439
  function submitSettings() {
4440
  /*jshint validthis:true */
4441
  preFormSave( this );
4442
+ triggerSubmit( document.querySelector( '.frm_form_settings' ) );
4443
  }
4444
 
4445
  /* View Functions */
4531
  }
4532
 
4533
  function addOrderRow() {
4534
+ var logicRows = document.getElementById( 'frm_order_options' ).querySelectorAll( '.frm_logic_rows div' );
 
 
 
4535
  jQuery.ajax({
4536
+ type: 'POST',
4537
+ url: ajaxurl,
4538
  data: {
4539
  action: 'frm_add_order_row',
4540
  form_id: thisFormId,
4541
+ order_key: getNewRowId( logicRows, 'frm_order_field_', 1 ),
4542
  nonce: frmGlobal.nonce
4543
  },
4544
  success: function( html ) {
4548
  }
4549
 
4550
  function addWhereRow() {
4551
+ var rowDivs = document.getElementById( 'frm_where_options' ).querySelectorAll( '.frm_logic_rows div' );
 
 
 
4552
  jQuery.ajax({
4553
+ type: 'POST',
4554
+ url: ajaxurl,
4555
  data: {
4556
  action: 'frm_add_where_row',
4557
  form_id: thisFormId,
4558
+ where_key: getNewRowId( rowDivs, 'frm_where_field_', 1 ),
4559
  nonce: frmGlobal.nonce
4560
  },
4561
  success: function( html ) {
4705
  obj.focus();
4706
  obj.setSelectionRange( s, s );
4707
  }
4708
+ triggerChange( contentBox );
4709
  }
4710
 
4711
  function maybeFormatInsertedContent( input, textToInsert, selectionStart, selectionEnd ) {
4861
  }
4862
 
4863
  function bindClickForDialogClose( $modal ) {
4864
+ jQuery( '.ui-widget-overlay, a.dismiss' ).on( 'click', function() {
4865
  $modal.dialog( 'close' );
4866
  });
4867
  }
4878
 
4879
  $modal = initModal( '#frm_new_form_modal', '600px' );
4880
  $modal.attr( 'frm-page', 'create' );
4881
+ $modal.find( '#template-search-input' ).val( '' ).trigger( 'change' );
4882
  $modal.dialog( 'open' );
4883
 
4884
  dismiss.removeAttribute( 'tabindex' );
4991
  if ( d === 'frm_long_input' || d === 'frm_98_width' || typeof d === 'undefined' ) {
4992
  d = '';
4993
  } else {
4994
+ id = d.trim();
4995
  }
4996
  c = c + ' ' + d;
4997
  c = c.replace( 'widefat', '' ).replace( 'frm_with_left_label', '' );
4998
  }
4999
  }
5000
 
5001
+ jQuery( '#frm-insert-fields-box,#frm-conditionals,#frm-adv-info-tab,#frm-dynamic-values' ).attr( 'data-fills', c.trim() );
5002
  var a = [
5003
  'content', 'wpbody-content', 'dyncontent', 'success_url',
5004
  'success_msg', 'edit_msg', 'frm_dyncontent', 'frm_not_email_message',
5022
  // Automatically select a tab.
5023
  if ( id === 'dyn_default_value' ) {
5024
  clickedID = 'frm_dynamic_values';
5025
+ document.getElementById( clickedID + '_tab' ).click();
5026
  jQuery( '#' + clickedID.replace( /_/g, '-' ) + ' .frm_show_inactive' ).addClass( 'frm_hidden' );
5027
  jQuery( '#' + clickedID.replace( /_/g, '-' ) + ' .frm_show_active' ).removeClass( 'frm_hidden' );
5028
  }
5035
  return;
5036
  }
5037
 
5038
+ jQuery( '#frm-adv-info-tab' ).attr( 'data-fills', id.trim() );
5039
  if ( input.classList.contains( 'field_custom_html' ) ) {
5040
  id = 'field_custom_html';
5041
  }
5059
 
5060
  //function to append a new theme stylesheet with the new style changes
5061
  function updateUICSS( locStr ) {
5062
+ var $cssLink, $link;
5063
+
5064
  if ( locStr == -1 ) {
5065
  jQuery( 'link.ui-theme' ).remove();
5066
  return false;
5067
  }
 
 
5068
 
5069
+ $cssLink = jQuery( '<link href="' + locStr + '" type="text/css" rel="Stylesheet" class="ui-theme" />' );
5070
+ jQuery( 'head' ).append( $cssLink );
5071
+
5072
+ $link = jQuery( 'link.ui-theme' );
5073
+ if ( $link.length > 1 ) {
5074
+ $link.first().remove();
5075
  }
5076
  }
5077
 
5414
  onDropdownShown: function( event ) {
5415
  var action = jQuery( event.currentTarget.closest( '.frm_form_action_settings, #frm-show-fields' ) );
5416
  if ( action.length ) {
5417
+ jQuery( '#wpcontent' ).on( 'click', function() {
5418
  if ( jQuery( '.multiselect-container.frm-dropdown-menu' ).is( ':visible' ) ) {
5419
  jQuery( event.currentTarget ).removeClass( 'open' );
5420
  }
5577
  .css({ padding: 5 })
5578
  .find( '#upgrade' )
5579
  .attr( 'rel', button.attr( 'rel' ) )
5580
+ .on( 'click', installAddonWithCreds );
5581
  } else {
5582
  el.append( '<div class="frm-addon-error frm_error_style"><p><strong>' + response.message + '</strong></p></div>' );
5583
  button.removeClass( 'frm_loading_button' );
5603
  installFormTrigger.classList.add( 'frm-install-template', 'frm_hidden' );
5604
  document.body.appendChild( installFormTrigger );
5605
 
5606
+ jQuery( '.frm-install-template' ).on( 'click', function( event ) {
5607
  var $h3Clone = jQuery( this ).closest( 'li, td' ).find( 'h3' ).clone(),
5608
  nameLabel = document.getElementById( 'frm_new_name' ),
5609
  descLabel = document.getElementById( 'frm_new_desc' ),
5688
  }
5689
 
5690
  $trigger = $hoverIcons.find( '.' + triggerClass );
5691
+ $trigger.trigger( 'click' );
5692
  });
5693
 
5694
  jQuery( document ).on( 'click', 'li .frm-hover-icons .frm-delete-form', function( event ) {
5907
  $trigger = activeHoverIcons.find( '.frm-unlock-form' );
5908
  }
5909
 
5910
+ $trigger.trigger( 'click' );
5911
  });
5912
 
5913
  jQuery( document ).on( 'click', '.frm-submit-new-template', function( event ) {
5914
+ var button;
5915
  event.preventDefault();
5916
+ button = document.getElementById( 'frm-new-template' ).querySelector( 'button' );
5917
+ if ( null !== button ) {
5918
+ button.click();
5919
+ }
5920
  });
5921
 
5922
  urlParams = new URLSearchParams( window.location.search );
6428
  s = {};
6429
 
6430
  // Bootstrap dropdown button
6431
+ jQuery( '.wp-admin' ).on( 'click', function( e ) {
6432
  var t = jQuery( e.target );
6433
  var $openDrop = jQuery( '.dropdown.open' );
6434
  if ( $openDrop.length && ! t.hasClass( 'dropdown' ) && ! t.closest( '.dropdown' ).length ) {
6435
  $openDrop.removeClass( 'open' );
6436
  }
6437
  });
6438
+ jQuery( '#frm_bs_dropdown:not(.open) a' ).on( 'click', focusSearchBox );
6439
 
6440
  if ( typeof thisFormId === 'undefined' ) {
6441
  thisFormId = jQuery( document.getElementById( 'form_id' ) ).val();
6473
  initNewFormModal();
6474
  initSelectionAutocomplete();
6475
 
6476
+ jQuery( '[data-frmprint]' ).on( 'click', function() {
6477
  window.print();
6478
  return false;
6479
  });
6491
  // used on build, form settings, and view settings
6492
  var $shortCodeDiv = jQuery( document.getElementById( 'frm_shortcodediv' ) );
6493
  if ( $shortCodeDiv.length > 0 ) {
6494
+ jQuery( 'a.edit-frm_shortcode' ).on( 'click', function() {
6495
  if ( $shortCodeDiv.is( ':hidden' ) ) {
6496
  $shortCodeDiv.slideDown( 'fast' );
6497
  this.style.display = 'none';
6499
  return false;
6500
  });
6501
 
6502
+ jQuery( '.cancel-frm_shortcode', '#frm_shortcodediv' ).on( 'click', function() {
6503
  $shortCodeDiv.slideUp( 'fast' );
6504
  $shortCodeDiv.siblings( 'a.edit-frm_shortcode' ).show();
6505
  return false;
6508
 
6509
  // tabs
6510
  jQuery( document ).on( 'click', '#frm-nav-tabs a', clickNewTab );
6511
+ jQuery( '.post-type-frm_display .frm-nav-tabs a, .frm-category-tabs a' ).on( 'click', function() {
6512
  if ( ! this.classList.contains( 'frm_noallow' ) ) {
6513
  clickTab( this );
6514
  return false;
6517
  clickTab( jQuery( '.starttab a' ), 'auto' );
6518
 
6519
  // submit the search form with dropdown
6520
+ jQuery( '#frm-fid-search-menu a' ).on( 'click', function() {
6521
  var val = this.id.replace( 'fid-', '' );
6522
  jQuery( 'select[name="fid"]' ).val( val );
6523
+ triggerSubmit( document.getElementById( 'posts-filter' ) );
6524
  return false;
6525
  });
6526
 
6571
  });
6572
  jQuery( 'ul.field_type_list, .field_type_list li, ul.frm_code_list, .frm_code_list li, .frm_code_list li a, #frm_adv_info #category-tabs li, #frm_adv_info #category-tabs li a' ).disableSelection();
6573
 
6574
+ jQuery( '.frm_submit_ajax' ).on( 'click', submitBuild );
6575
+ jQuery( '.frm_submit_no_ajax' ).on( 'click', submitNoAjax );
6576
 
6577
+ jQuery( 'a.edit-form-status' ).on( 'click', slideDown );
6578
+ jQuery( '.cancel-form-status' ).on( 'click', slideUp );
6579
+ jQuery( '.save-form-status' ).on( 'click', function() {
6580
  var newStatus = jQuery( document.getElementById( 'form_change_status' ) ).val();
6581
  jQuery( 'input[name="new_status"]' ).val( newStatus );
6582
  jQuery( document.getElementById( 'form-status-display' ) ).html( newStatus );
6583
+ jQuery( '.cancel-form-status' ).trigger( 'click' );
6584
  return false;
6585
  });
6586
 
6587
+ jQuery( '.frm_form_builder form' ).first().on( 'submit', function() {
6588
  jQuery( '.inplace_field' ).blur();
6589
  });
6590
 
6691
  $formActions.on( 'click', '.frm_add_posttax_row', addPosttaxRow );
6692
  $formActions.on( 'click', '.frm_toggle_cf_opts', toggleCfOpts );
6693
  $formActions.on( 'click', '.frm_duplicate_form_action', copyFormAction );
6694
+ jQuery( 'select[data-toggleclass], input[data-toggleclass]' ).on( 'change', toggleFormOpts );
6695
  jQuery( '.frm_actions_list' ).on( 'click', '.frm_active_action', addFormAction );
6696
+ jQuery( '#frm-show-groups, #frm-hide-groups' ).on( 'click', toggleActionGroups );
6697
  initiateMultiselect();
6698
 
6699
  //set actions icons to inactive
6707
  }
6708
  });
6709
 
6710
+ jQuery( '.frm_submit_settings_btn' ).on( 'click', submitSettings );
6711
 
6712
  formSettings = jQuery( '.frm_form_settings' );
6713
  formSettings.on( 'click', '.frm_add_form_logic', addFormLogicRow );
6737
  });
6738
 
6739
  //Warning when user selects "Do not store entries ..."
6740
+ jQuery( document.getElementById( 'no_save' ) ).on( 'change', function() {
6741
  if ( this.checked ) {
6742
  if ( confirm( frm_admin_js.no_save_warning ) !== true ) {
6743
  // Uncheck box if user hits "Cancel"
6747
  });
6748
 
6749
  //Show/hide Messages header
6750
+ jQuery( '#editable, #edit_action, #save_draft, #success_action' ).on( 'change', function() {
6751
  maybeShowFormMessages();
6752
  });
6753
+ jQuery( 'select[name="options[success_action]"], select[name="options[edit_action]"]' ).on( 'change', showSuccessOpt );
6754
 
6755
  $loggedIn = document.getElementById( 'logged_in' );
6756
+ jQuery( $loggedIn ).on( 'change', function() {
6757
  if ( this.checked ) {
6758
  visible( '.hide_logged_in' );
6759
  } else {
6762
  });
6763
 
6764
  $cookieExp = jQuery( document.getElementById( 'frm_cookie_expiration' ) );
6765
+ jQuery( document.getElementById( 'frm_single_entry_type' ) ).on( 'change', function() {
6766
  if ( this.value === 'cookie' ) {
6767
  $cookieExp.fadeIn( 'slow' );
6768
  } else {
6771
  });
6772
 
6773
  var $singleEntry = document.getElementById( 'single_entry' );
6774
+ jQuery( $singleEntry ).on( 'change', function() {
6775
  if ( this.checked ) {
6776
  visible( '.hide_single_entry' );
6777
  } else {
6788
  jQuery( '.hide_save_draft' ).hide();
6789
 
6790
  var $saveDraft = jQuery( document.getElementById( 'save_draft' ) );
6791
+ $saveDraft.on( 'change', function() {
6792
  if ( this.checked ) {
6793
  jQuery( '.hide_save_draft' ).fadeIn( 'slow' );
6794
  } else {
6795
  jQuery( '.hide_save_draft' ).fadeOut( 'slow' );
6796
  }
6797
  });
6798
+ triggerChange( $saveDraft );
6799
 
6800
  //If Allow editing is checked/unchecked
6801
  $editable = document.getElementById( 'editable' );
6802
+ jQuery( $editable ).on( 'change', function() {
6803
  if ( this.checked ) {
6804
  jQuery( '.hide_editable' ).fadeIn( 'slow' );
6805
+ triggerChange( document.getElementById( 'edit_action' ) );
6806
  } else {
6807
  jQuery( '.hide_editable' ).fadeOut( 'slow' );
6808
  jQuery( '.edit_action_message_box' ).fadeOut( 'slow' );//Hide On Update message box
6813
  jQuery( document ).on( 'change', '#protect_files', function() {
6814
  if ( this.checked ) {
6815
  jQuery( '.hide_protect_files' ).fadeIn( 'slow' );
 
6816
  } else {
6817
  jQuery( '.hide_protect_files' ).fadeOut( 'slow' );
 
6818
  }
6819
  });
6820
 
6868
  if ( jQuery( this ).closest( '#html_settings' ).length > 0 ) {
6869
  htmlTab.show();
6870
  htmlTab.siblings().hide();
6871
+ jQuery( '#frm_html_tab a' ).trigger( 'click' );
6872
  toggleAllowedHTML( this, e.type );
6873
  } else {
6874
  showElement( jQuery( '.frm-category-tabs li' ) );
6907
  jQuery( document ).on( 'blur', 'input[name^="options[where_val]"]', checkFilterParamNames );
6908
 
6909
  // Show loading indicator.
6910
+ jQuery( '#publish' ).on( 'mousedown', function() {
6911
  this.classList.add( 'frm_loading_button' );
6912
  });
6913
 
6915
  jQuery( '#frm_dyncontent .handlediv' ).before( jQuery( '#frm_dyncontent .nav-menus-php' ) );
6916
 
6917
  // click content tabs
6918
+ jQuery( '.nav-tab-wrapper a' ).on( 'click', clickContentTab );
6919
 
6920
  // click tabs after panel is replaced with ajax
6921
  jQuery( '#side-sortables' ).on( 'click', '.frm_doing_ajax.categorydiv .category-tabs a', clickTabsAfterAjax );
6923
  initToggleShortcodes();
6924
  jQuery( '.frm_code_list:not(.frm-dropdown-menu) a' ).addClass( 'frm_noallow' );
6925
 
6926
+ jQuery( 'input[name="show_count"]' ).on( 'change', showCount );
6927
 
6928
+ jQuery( document.getElementById( 'form_id' ) ).on( 'change', displayFormSelected );
6929
 
6930
  $addRemove = jQuery( '.frm_repeat_rows' );
6931
  $addRemove.on( 'click', '.frm_add_order_row', addOrderRow );
6937
  },
6938
 
6939
  inboxInit: function() {
6940
+ jQuery( '.frm_inbox_dismiss, footer .frm-button-secondary, footer .frm-button-primary' ).on( 'click', function( e ) {
6941
  var message = this.parentNode.parentNode,
6942
  key = message.getAttribute( 'data-message' ),
6943
  href = this.getAttribute( 'href' );
6959
  });
6960
  });
6961
  });
6962
+ jQuery( '#frm-dismiss-inbox' ).on( 'click', function( e ) {
6963
  data = {
6964
  action: 'frm_inbox_dismiss',
6965
  key: 'all',
6987
  jQuery( 'input.hex' ).wpColorPicker({
6988
  change: function( event ) {
6989
  var hexcolor = jQuery( this ).wpColorPicker( 'color' );
6990
+ jQuery( event.target ).val( hexcolor ).trigger( 'change' );
6991
  }
6992
  });
6993
  jQuery( '.wp-color-result-text' ).text( function( i, oldText ) {
6995
  });
6996
 
6997
  // update styling on change
6998
+ jQuery( '#frm_styling_form .styling_settings' ).on( 'change', function() {
6999
  var locStr = jQuery( 'input[name^="frm_style_setting[post_content]"], select[name^="frm_style_setting[post_content]"], textarea[name^="frm_style_setting[post_content]"], input[name="style_name"]' ).serializeArray();
7000
  locStr = JSON.stringify( locStr );
7001
  jQuery.ajax({
7012
  });
7013
 
7014
  // menu tabs
7015
+ jQuery( '#menu-settings-column' ).on( 'click', function( e ) {
7016
  var panelId, wrapper,
7017
  target = jQuery( e.target );
7018
 
7036
  }
7037
  });
7038
 
7039
+ jQuery( '.multiselect-container.frm-dropdown-menu li a' ).on( 'click', function() {
7040
  var radio = this.children[0].children[0];
7041
  var btnGrp = jQuery( this ).closest( '.btn-group' );
7042
  var btnId = btnGrp.attr( 'id' );
7061
  var key;
7062
  errObj = errObj.replace( /^\s+|\s+$/g, '' );
7063
  if ( errObj.indexOf( '{' ) === 0 ) {
7064
+ errObj = JSON.parse( errObj );
7065
  }
7066
  for ( key in errObj ) {
7067
  jQuery( 'input[name$="[' + key + ']"], select[name$="[' + key + ']"]' ).val( errObj[key]);
7068
  }
7069
  jQuery( '#frm_submit_style, #frm_auto_width' ).prop( 'checked', false );
7070
+ triggerChange( document.getElementById( 'frm_fieldset' ) );
7071
  button.classList.remove( 'frm_loading_button' );
7072
  }
7073
  });
7075
 
7076
  jQuery( '.frm_pro_form #datepicker_sample' ).datepicker({ changeMonth: true, changeYear: true });
7077
 
7078
+ jQuery( document.getElementById( 'frm_position' ) ).on( 'change', setPosClass );
7079
 
7080
+ jQuery( 'select[name$="[theme_selector]"]' ).on( 'change', function() {
7081
  var themeVal = jQuery( this ).val();
7082
  var css = themeVal;
7083
  if ( themeVal !== -1 ) {
7093
  updateUICSS( css );
7094
  document.getElementById( 'frm_theme_css' ).value = themeVal;
7095
  return false;
7096
+ }).trigger( 'change' );
7097
  },
7098
 
7099
  customCSSInit: function() {
7122
  // Solution install page
7123
  jQuery( document ).on( 'click', '#frm-new-template button', installTemplateFieldset );
7124
 
7125
+ jQuery( '#frm-dismissable-cta .dismiss' ).on( 'click', function( event ) {
7126
  event.preventDefault();
7127
  jQuery.post( ajaxurl, {
7128
  action: 'frm_lite_settings_upgrade'
7132
  },
7133
 
7134
  exportInit: function() {
7135
+ jQuery( '.frm_form_importer' ).on( 'submit', startFormMigration );
7136
+ jQuery( document.getElementById( 'frm_export_xml' ) ).on( 'submit', validateExport );
7137
+ jQuery( '#frm_export_xml input, #frm_export_xml select' ).on( 'change', removeExportError );
7138
+ jQuery( 'input[name="frm_import_file"]' ).on( 'change', checkCSVExtension );
7139
+ jQuery( 'select[name="format"]' ).on( 'change', checkExportTypes ).trigger( 'change' );
7140
+ jQuery( 'input[name="frm_export_forms[]"]' ).on( 'click', preventMultipleExport );
7141
  initiateMultiselect();
7142
 
7143
+ jQuery( '.frm-feature-banner .dismiss' ).on( 'click', function( event ) {
7144
  event.preventDefault();
7145
  jQuery.post( ajaxurl, {
7146
  action: 'frm_dismiss_migrator',
7178
 
7179
  /* remove conditional logic if the field doesn't exist */
7180
  triggerRemoveLogic: function( fieldID, metaName ) {
7181
+ jQuery( '#frm_logic_' + fieldID + '_' + metaName + ' .frm_remove_tag' ).trigger( 'click' );
7182
  },
7183
 
7184
  downloadXML: function( controller, ids, isTemplate ) {
7236
  action: 'frm_add_logic_row',
7237
  form_id: formId,
7238
  field_id: id,
7239
+ meta_name: jQuery( '#frm_logic_row_' + id + ' > div' ).length,
7240
  nonce: frmGlobal.nonce
7241
  },
7242
  success: function( html ) {
js/formidable_admin_global.js CHANGED
@@ -8,12 +8,12 @@ jQuery( document ).ready( function() {
8
  var deauthLink,
9
  installLink = document.getElementById( 'frm_install_link' );
10
  if ( installLink !== null ) {
11
- jQuery( installLink ).click( frmInstallPro );
12
  }
13
 
14
  deauthLink = jQuery( '.frm_deauthorize_link' );
15
  if ( deauthLink.length ) {
16
- deauthLink.click( frmDeauthorizeNow );
17
  }
18
 
19
  if ( typeof tb_remove === 'function' ) { // eslint-disable-line camelcase
@@ -138,7 +138,7 @@ function frmAdminPopupJS() {
138
  $settings = document.getElementById( 'sc-opts-' + val );
139
  if ( $settings !== null ) {
140
  $settings.style.display = '';
141
- jQuery( document.getElementById( 'sc-' + val ) ).click();
142
  } else {
143
  $scOpts = jQuery( document.getElementById( 'frm_shortcode_options' ) );
144
  $spinner = jQuery( '.media-frame-title .spinner' );
@@ -154,7 +154,7 @@ function frmAdminPopupJS() {
154
  success: function( html ) {
155
  $spinner.hide();
156
  $scOpts.append( html );
157
- jQuery( document.getElementById( 'sc-' + val ) ).click();
158
  }
159
  });
160
  }
@@ -218,18 +218,18 @@ function frmAdminPopupJS() {
218
  init: function() {
219
  var $scOptsDiv;
220
 
221
- jQuery( '.frm_switch_sc' ).click( switchSc );
222
- jQuery( '.button.frm_insert_form' ).click( function() {
223
  populateOpts( 'formidable' );
224
  });
225
- jQuery( document.getElementById( 'frm_insert_shortcode' ) ).click( insertShortcode );
226
 
227
  $scOptsDiv = jQuery( document.getElementById( 'frm_shortcode_options' ) );
228
  $scOptsDiv.on( 'change', 'select, input', addToShortcode );
229
  $scOptsDiv.on( 'change', '.frm_get_field_selection', getFieldSelection );
230
 
231
- jQuery( '#frm_popup_content .media-modal-close' ).click( tb_remove );
232
- jQuery( '#frm_popup_content .media-frame-title h1' ).click( toggleMenu );
233
  }
234
  };
235
  }
8
  var deauthLink,
9
  installLink = document.getElementById( 'frm_install_link' );
10
  if ( installLink !== null ) {
11
+ jQuery( installLink ).on( 'click', frmInstallPro );
12
  }
13
 
14
  deauthLink = jQuery( '.frm_deauthorize_link' );
15
  if ( deauthLink.length ) {
16
+ deauthLink.on( 'click', frmDeauthorizeNow );
17
  }
18
 
19
  if ( typeof tb_remove === 'function' ) { // eslint-disable-line camelcase
138
  $settings = document.getElementById( 'sc-opts-' + val );
139
  if ( $settings !== null ) {
140
  $settings.style.display = '';
141
+ jQuery( document.getElementById( 'sc-' + val ) ).trigger( 'click' );
142
  } else {
143
  $scOpts = jQuery( document.getElementById( 'frm_shortcode_options' ) );
144
  $spinner = jQuery( '.media-frame-title .spinner' );
154
  success: function( html ) {
155
  $spinner.hide();
156
  $scOpts.append( html );
157
+ jQuery( document.getElementById( 'sc-' + val ) ).trigger( 'click' );
158
  }
159
  });
160
  }
218
  init: function() {
219
  var $scOptsDiv;
220
 
221
+ jQuery( '.frm_switch_sc' ).on( 'click', switchSc );
222
+ jQuery( '.button.frm_insert_form' ).on( 'click', function() {
223
  populateOpts( 'formidable' );
224
  });
225
+ jQuery( document.getElementById( 'frm_insert_shortcode' ) ).on( 'click', insertShortcode );
226
 
227
  $scOptsDiv = jQuery( document.getElementById( 'frm_shortcode_options' ) );
228
  $scOptsDiv.on( 'change', 'select, input', addToShortcode );
229
  $scOptsDiv.on( 'change', '.frm_get_field_selection', getFieldSelection );
230
 
231
+ jQuery( '#frm_popup_content .media-modal-close' ).on( 'click', tb_remove );
232
+ jQuery( '#frm_popup_content .media-frame-title h1' ).on( 'click', toggleMenu );
233
  }
234
  };
235
  }
languages/formidable.pot CHANGED
@@ -1,15 +1,15 @@
1
- # Copyright (C) 2020 Strategy11
2
  # This file is distributed under the same license as the Formidable Forms plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Formidable Forms 4.09.02\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: 2020-12-07T16:32:24+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.1.0\n"
15
  "X-Domain: formidable\n"
@@ -734,7 +734,7 @@ msgid "Installed"
734
  msgstr ""
735
 
736
  #: classes/controllers/FrmAddonsController.php:585
737
- #: classes/helpers/FrmAppHelper.php:2456
738
  msgid "Active"
739
  msgstr ""
740
 
@@ -1032,7 +1032,7 @@ msgstr ""
1032
  #: classes/controllers/FrmSMTPController.php:305
1033
  #: classes/views/shared/upgrade_overlay.php:32
1034
  #: classes/helpers/FrmFormMigratorsHelper.php:131
1035
- #: classes/helpers/FrmAppHelper.php:2455
1036
  msgid "Install"
1037
  msgstr ""
1038
 
@@ -1649,7 +1649,7 @@ msgstr ""
1649
  #: classes/views/frm-forms/new-form-overlay.php:139
1650
  #: classes/views/shared/confirm-overlay.php:19
1651
  #: classes/views/shared/admin-header.php:54
1652
- #: classes/helpers/FrmAppHelper.php:2416
1653
  msgid "Cancel"
1654
  msgstr ""
1655
 
@@ -2321,7 +2321,7 @@ msgstr ""
2321
 
2322
  #: classes/views/shared/confirm-overlay.php:15
2323
  #: classes/views/shared/info-overlay.php:15
2324
- #: classes/helpers/FrmAppHelper.php:2423
2325
  msgid "Are you sure?"
2326
  msgstr ""
2327
 
@@ -2435,7 +2435,7 @@ msgstr ""
2435
 
2436
  #: classes/views/shared/mb_adv_info.php:95
2437
  #: classes/helpers/FrmCSVExportHelper.php:222
2438
- #: classes/helpers/FrmAppHelper.php:2395
2439
  msgid "ID"
2440
  msgstr ""
2441
 
@@ -2445,7 +2445,7 @@ msgstr ""
2445
 
2446
  #: classes/views/shared/mb_adv_info.php:113
2447
  #: classes/views/shared/mb_adv_info.php:127
2448
- #: classes/helpers/FrmAppHelper.php:2457
2449
  msgid "Select a Field"
2450
  msgstr ""
2451
 
@@ -3069,7 +3069,7 @@ msgid "Label Position"
3069
  msgstr ""
3070
 
3071
  #: classes/views/frm-fields/back-end/settings.php:270
3072
- #: classes/helpers/FrmAppHelper.php:2417
3073
  msgid "Default"
3074
  msgstr ""
3075
 
@@ -3501,7 +3501,7 @@ msgstr ""
3501
  msgid "You did not add any fields to your form. %1$sGo back%2$s and add some."
3502
  msgstr ""
3503
 
3504
- #: classes/views/frm-entries/form.php:102
3505
  msgid "If you are human, leave this field blank."
3506
  msgstr ""
3507
 
@@ -3537,6 +3537,7 @@ msgid "Use conditional logic to shorten your forms and increase conversions."
3537
  msgstr ""
3538
 
3539
  #: classes/helpers/FrmTipsHelper.php:60
 
3540
  #: classes/helpers/FrmTipsHelper.php:92
3541
  #: classes/helpers/FrmTipsHelper.php:161
3542
  #: classes/helpers/FrmTipsHelper.php:169
@@ -3554,11 +3555,7 @@ msgid "Add email confirmation fields."
3554
  msgstr ""
3555
 
3556
  #: classes/helpers/FrmTipsHelper.php:75
3557
- msgid "Stop intimidating users with long forms."
3558
- msgstr ""
3559
-
3560
- #: classes/helpers/FrmTipsHelper.php:76
3561
- msgid "Use page breaks."
3562
  msgstr ""
3563
 
3564
  #: classes/helpers/FrmTipsHelper.php:83
@@ -3578,7 +3575,7 @@ msgid "Save time."
3578
  msgstr ""
3579
 
3580
  #: classes/helpers/FrmTipsHelper.php:100
3581
- msgid "Prefill fields with user info."
3582
  msgstr ""
3583
 
3584
  #: classes/helpers/FrmTipsHelper.php:114
@@ -3591,11 +3588,11 @@ msgid "Add front-end editing."
3591
  msgstr ""
3592
 
3593
  #: classes/helpers/FrmTipsHelper.php:122
3594
- msgid "Have a long form that takes time to complete?"
3595
  msgstr ""
3596
 
3597
  #: classes/helpers/FrmTipsHelper.php:123
3598
- msgid "Let logged-in users save a draft and return later."
3599
  msgstr ""
3600
 
3601
  #: classes/helpers/FrmTipsHelper.php:129
@@ -3607,7 +3604,7 @@ msgid "Get ajax form submit."
3607
  msgstr ""
3608
 
3609
  #: classes/helpers/FrmTipsHelper.php:137
3610
- msgid "Need to open and close your form on specific days?"
3611
  msgstr ""
3612
 
3613
  #: classes/helpers/FrmTipsHelper.php:138
@@ -3627,7 +3624,7 @@ msgid "Create blog posts or pages from the front-end."
3627
  msgstr ""
3628
 
3629
  #: classes/helpers/FrmTipsHelper.php:168
3630
- msgid "Make front-end posting easy."
3631
  msgstr ""
3632
 
3633
  #: classes/helpers/FrmTipsHelper.php:176
@@ -3655,15 +3652,15 @@ msgid "Use Paypal with this form."
3655
  msgstr ""
3656
 
3657
  #: classes/helpers/FrmTipsHelper.php:200
3658
- msgid "Boost your site membership."
3659
  msgstr ""
3660
 
3661
  #: classes/helpers/FrmTipsHelper.php:201
3662
- msgid "Automatically create user accounts."
3663
  msgstr ""
3664
 
3665
  #: classes/helpers/FrmTipsHelper.php:208
3666
- msgid "Make front-end profile editing possible."
3667
  msgstr ""
3668
 
3669
  #: classes/helpers/FrmTipsHelper.php:209
@@ -3671,19 +3668,16 @@ msgid "Add user registration."
3671
  msgstr ""
3672
 
3673
  #: classes/helpers/FrmTipsHelper.php:216
3674
- msgid "Want a text when this form is submitted or when a payment is received?"
3675
  msgstr ""
3676
 
3677
  #: classes/helpers/FrmTipsHelper.php:217
3678
- msgid "Use Twilio with this form."
 
3679
  msgstr ""
3680
 
3681
  #: classes/helpers/FrmTipsHelper.php:224
3682
- msgid "Send a text when this form is submitted."
3683
- msgstr ""
3684
-
3685
- #: classes/helpers/FrmTipsHelper.php:225
3686
- msgid "Get Twilio."
3687
  msgstr ""
3688
 
3689
  #: classes/helpers/FrmTipsHelper.php:239
@@ -3834,7 +3828,7 @@ msgid "ALL selected forms and their entries will be permanently deleted. Want to
3834
  msgstr ""
3835
 
3836
  #: classes/helpers/FrmFieldsHelper.php:286
3837
- #: classes/helpers/FrmAppHelper.php:2428
3838
  msgid "The entered values do not match"
3839
  msgstr ""
3840
 
@@ -3845,7 +3839,7 @@ msgstr ""
3845
 
3846
  #: classes/helpers/FrmFieldsHelper.php:456
3847
  #: classes/helpers/FrmFieldsHelper.php:457
3848
- #: classes/helpers/FrmAppHelper.php:2432
3849
  msgid "New Option"
3850
  msgstr ""
3851
 
@@ -3862,1132 +3856,1132 @@ msgstr ""
3862
  msgid "Categories"
3863
  msgstr ""
3864
 
3865
- #: classes/helpers/FrmFieldsHelper.php:1371
3866
  msgid "Afghanistan"
3867
  msgstr ""
3868
 
3869
- #: classes/helpers/FrmFieldsHelper.php:1372
3870
  msgid "Aland Islands"
3871
  msgstr ""
3872
 
3873
- #: classes/helpers/FrmFieldsHelper.php:1373
3874
  msgid "Albania"
3875
  msgstr ""
3876
 
3877
- #: classes/helpers/FrmFieldsHelper.php:1374
3878
  msgid "Algeria"
3879
  msgstr ""
3880
 
3881
- #: classes/helpers/FrmFieldsHelper.php:1375
3882
  msgid "American Samoa"
3883
  msgstr ""
3884
 
3885
- #: classes/helpers/FrmFieldsHelper.php:1376
3886
  msgid "Andorra"
3887
  msgstr ""
3888
 
3889
- #: classes/helpers/FrmFieldsHelper.php:1377
3890
  msgid "Angola"
3891
  msgstr ""
3892
 
3893
- #: classes/helpers/FrmFieldsHelper.php:1378
3894
  msgid "Anguilla"
3895
  msgstr ""
3896
 
3897
- #: classes/helpers/FrmFieldsHelper.php:1379
3898
  msgid "Antarctica"
3899
  msgstr ""
3900
 
3901
- #: classes/helpers/FrmFieldsHelper.php:1380
3902
  msgid "Antigua and Barbuda"
3903
  msgstr ""
3904
 
3905
- #: classes/helpers/FrmFieldsHelper.php:1381
3906
  msgid "Argentina"
3907
  msgstr ""
3908
 
3909
- #: classes/helpers/FrmFieldsHelper.php:1382
3910
  msgid "Armenia"
3911
  msgstr ""
3912
 
3913
- #: classes/helpers/FrmFieldsHelper.php:1383
3914
  msgid "Aruba"
3915
  msgstr ""
3916
 
3917
- #: classes/helpers/FrmFieldsHelper.php:1384
3918
  msgid "Australia"
3919
  msgstr ""
3920
 
3921
- #: classes/helpers/FrmFieldsHelper.php:1385
3922
  msgid "Austria"
3923
  msgstr ""
3924
 
3925
- #: classes/helpers/FrmFieldsHelper.php:1386
3926
  msgid "Azerbaijan"
3927
  msgstr ""
3928
 
3929
- #: classes/helpers/FrmFieldsHelper.php:1387
3930
  msgid "Bahamas"
3931
  msgstr ""
3932
 
3933
- #: classes/helpers/FrmFieldsHelper.php:1388
3934
  msgid "Bahrain"
3935
  msgstr ""
3936
 
3937
- #: classes/helpers/FrmFieldsHelper.php:1389
3938
  msgid "Bangladesh"
3939
  msgstr ""
3940
 
3941
- #: classes/helpers/FrmFieldsHelper.php:1390
3942
  msgid "Barbados"
3943
  msgstr ""
3944
 
3945
- #: classes/helpers/FrmFieldsHelper.php:1391
3946
  msgid "Belarus"
3947
  msgstr ""
3948
 
3949
- #: classes/helpers/FrmFieldsHelper.php:1392
3950
  msgid "Belgium"
3951
  msgstr ""
3952
 
3953
- #: classes/helpers/FrmFieldsHelper.php:1393
3954
  msgid "Belize"
3955
  msgstr ""
3956
 
3957
- #: classes/helpers/FrmFieldsHelper.php:1394
3958
  msgid "Benin"
3959
  msgstr ""
3960
 
3961
- #: classes/helpers/FrmFieldsHelper.php:1395
3962
  msgid "Bermuda"
3963
  msgstr ""
3964
 
3965
- #: classes/helpers/FrmFieldsHelper.php:1396
3966
  msgid "Bhutan"
3967
  msgstr ""
3968
 
3969
- #: classes/helpers/FrmFieldsHelper.php:1397
3970
  msgid "Bolivia"
3971
  msgstr ""
3972
 
3973
- #: classes/helpers/FrmFieldsHelper.php:1398
3974
  msgid "Bonaire, Sint Eustatius and Saba"
3975
  msgstr ""
3976
 
3977
- #: classes/helpers/FrmFieldsHelper.php:1399
3978
  msgid "Bosnia and Herzegovina"
3979
  msgstr ""
3980
 
3981
- #: classes/helpers/FrmFieldsHelper.php:1400
3982
  msgid "Botswana"
3983
  msgstr ""
3984
 
3985
- #: classes/helpers/FrmFieldsHelper.php:1401
3986