Formidable Forms – Form Builder for WordPress - Version 2.03.02

Version Description

  • New: Add an option on the Global settings page to fade in forms with conditional logic. This fixes issues on sites with javascript errors causing the form to never show.
  • Tweak: don't show the section headings in email by default
  • Tweak: Force Ajax submit when editing entry inline
  • Enhancement: Add time range validation when submitting the form based on settings for each time field
  • Fix: prevent duplicate submissions
  • Fix: javascript error in Safari in form builder
  • Fix: Prevent null values from leaving a white space on the entries listing page
  • Fix: Form shortcode parameters were also affecting the forms in a widget
  • Fix: Prevent action trigger options from getting cut off at the bottom of the page
  • Fix: Entries on listing page were showing a php warning for entries submitted by logged out users
  • Fix: Prevent form submission while Lookups are loading options
  • Fix: Prevent two common calculation errors
  • Fix: Hide the child entries in repeating fields on the page that lists all entries
  • Fix: After selecting a form in the view settings, it wasn't possible to show the field keys in the sidebar
  • Fix: Lookup Checkboxes weren't saving in embedded form
  • Fix: Lookup fields weren't getting enabled if change triggered repeatedly
  • Fix: Time fields with missing settings were showing php warnings on the page
  • Fix: Make rootline look nice in Edge
  • Fix: Autosave values with the non-ajax autosave on page turn
  • Fix: Prevent multipage forms from submitting on the first page when redirecting after submit
  • Fix: "Array" was showing in the default emails for checkbox fields inside a repeating section
  • Fix: Prevent autocomplete dropdown from showing twice when editing in place
Download this release

Release Info

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

Code changes from version 2.03.01 to 2.03.02

classes/controllers/FrmEntriesController.php CHANGED
@@ -120,10 +120,10 @@ class FrmEntriesController {
120
  if ( $form_col->form_id != $form_id ) {
121
  $col_id .= '-_-form' . $form_col->form_id;
122
  }
123
-
124
  $has_separate_value = ! FrmField::is_option_empty( $form_col, 'separate_value' );
125
- $is_not_post_status = FrmField::is_option_empty( $form_col, 'post_field' );
126
- if ( $has_separate_value && $is_not_post_status ) {
127
  $columns[ $form_id . '_frmsep_' . $col_id ] = FrmAppHelper::truncate( $form_col->name, 35 );
128
  }
129
  $columns[ $form_id . '_' . $col_id ] = FrmAppHelper::truncate( $form_col->name, 35 );
120
  if ( $form_col->form_id != $form_id ) {
121
  $col_id .= '-_-form' . $form_col->form_id;
122
  }
123
+
124
  $has_separate_value = ! FrmField::is_option_empty( $form_col, 'separate_value' );
125
+ $is_post_status = FrmField::is_option_true( $form_col, 'post_field' ) && $form_col->field_options['post_field'] == 'post_status';
126
+ if ( $has_separate_value && ! $is_post_status ) {
127
  $columns[ $form_id . '_frmsep_' . $col_id ] = FrmAppHelper::truncate( $form_col->name, 35 );
128
  }
129
  $columns[ $form_id . '_' . $col_id ] = FrmAppHelper::truncate( $form_col->name, 35 );
classes/helpers/FrmAppHelper.php CHANGED
@@ -4,13 +4,13 @@ if ( ! defined('ABSPATH') ) {
4
  }
5
 
6
  class FrmAppHelper {
7
- public static $db_version = 41; //version of the database we are moving to
8
  public static $pro_db_version = 37; //deprecated
9
 
10
  /**
11
  * @since 2.0
12
  */
13
- public static $plug_version = '2.03.01';
14
 
15
  /**
16
  * @since 1.07.02
4
  }
5
 
6
  class FrmAppHelper {
7
+ public static $db_version = 42; //version of the database we are moving to
8
  public static $pro_db_version = 37; //deprecated
9
 
10
  /**
11
  * @since 2.0
12
  */
13
+ public static $plug_version = '2.03.02';
14
 
15
  /**
16
  * @since 1.07.02
classes/helpers/FrmEntriesListHelper.php CHANGED
@@ -17,6 +17,10 @@ class FrmEntriesListHelper extends FrmListHelper {
17
 
18
  if ( $form_id ) {
19
  $s_query['it.form_id'] = $form_id;
 
 
 
 
20
  }
21
 
22
  $s = isset( $_REQUEST['s'] ) ? stripslashes($_REQUEST['s']) : '';
@@ -38,7 +42,7 @@ class FrmEntriesListHelper extends FrmListHelper {
38
  $page = $this->get_pagenum();
39
  $start = (int) isset( $_REQUEST['start'] ) ? absint( $_REQUEST['start'] ) : ( ( $page - 1 ) * $per_page );
40
 
41
- $this->items = FrmEntry::getAll( $s_query, $order, ' LIMIT ' . $start . ',' . $per_page, true, false );
42
  $total_items = FrmEntry::getRecordCount($s_query);
43
 
44
  $this->set_pagination_args( array(
@@ -139,6 +143,7 @@ class FrmEntriesListHelper extends FrmListHelper {
139
  $form_id = $this->params['form'] ? $this->params['form'] : 0;
140
  $col_name = preg_replace( '/^(' . $form_id . '_)/', '', $column_name );
141
  $this->column_name = $col_name;
 
142
 
143
  switch ( $col_name ) {
144
  case 'cb':
@@ -169,7 +174,7 @@ class FrmEntriesListHelper extends FrmListHelper {
169
  break;
170
  case 'user_id':
171
  $user = get_userdata($item->user_id);
172
- $val = $user->user_login;
173
  break;
174
  default:
175
  $val = apply_filters( 'frm_entries_' . $col_name . '_column', false, compact( 'item' ) );
@@ -179,7 +184,7 @@ class FrmEntriesListHelper extends FrmListHelper {
179
  break;
180
  }
181
 
182
- if ( isset( $val ) ) {
183
  $r .= "<td $attributes>";
184
  if ( $column_name == $action_col ) {
185
  $edit_link = '?page=formidable-entries&frm_action=edit&id=' . $item->id;
17
 
18
  if ( $form_id ) {
19
  $s_query['it.form_id'] = $form_id;
20
+ $join_form_in_query = false;
21
+ } else {
22
+ $s_query['fr.parent_form_id'] = 0;
23
+ $join_form_in_query = true;
24
  }
25
 
26
  $s = isset( $_REQUEST['s'] ) ? stripslashes($_REQUEST['s']) : '';
42
  $page = $this->get_pagenum();
43
  $start = (int) isset( $_REQUEST['start'] ) ? absint( $_REQUEST['start'] ) : ( ( $page - 1 ) * $per_page );
44
 
45
+ $this->items = FrmEntry::getAll( $s_query, $order, ' LIMIT ' . $start . ',' . $per_page, true, $join_form_in_query );
46
  $total_items = FrmEntry::getRecordCount($s_query);
47
 
48
  $this->set_pagination_args( array(
143
  $form_id = $this->params['form'] ? $this->params['form'] : 0;
144
  $col_name = preg_replace( '/^(' . $form_id . '_)/', '', $column_name );
145
  $this->column_name = $col_name;
146
+ $val = '';
147
 
148
  switch ( $col_name ) {
149
  case 'cb':
174
  break;
175
  case 'user_id':
176
  $user = get_userdata($item->user_id);
177
+ $val = $user ? $user->user_login : '';
178
  break;
179
  default:
180
  $val = apply_filters( 'frm_entries_' . $col_name . '_column', false, compact( 'item' ) );
184
  break;
185
  }
186
 
187
+ if ( $col_name != 'cb' ) {
188
  $r .= "<td $attributes>";
189
  if ( $column_name == $action_col ) {
190
  $edit_link = '?page=formidable-entries&frm_action=edit&id=' . $item->id;
classes/models/FrmAntiSpam.php ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ die( 'You are not allowed to call this page directly.' );
5
+ }
6
+
7
+ class FrmAntiSpam {
8
+
9
+ private static function is_spam( $comment ) {
10
+ $url = $comment; // TODO: get values from form
11
+ $email = $comment;
12
+ $author = $comment;
13
+ $body = $comment;
14
+
15
+ $options = array(
16
+ 'time_check' => 1, 'bbcode_check' => 1,
17
+ 'advanced_check' => 1, 'regexp_check' => 1,
18
+ 'dnsbl_check' => 1,
19
+ );
20
+
21
+ $response = array( 'spam' => false );
22
+
23
+ /* Check if logged in */
24
+ if ( is_user_logged_in() ) {
25
+ return $response;
26
+ }
27
+
28
+ /* Honeypot */
29
+ if ( ! empty( $_POST['ab_spam__hidden_field'] ) ) {
30
+ $response['reason'] = 'css';
31
+ return $response;
32
+ }
33
+
34
+ $ip = FrmAppHelper::get_ip_address();
35
+ if ( empty( $ip ) ) {
36
+ $response['reason'] = 'empty';
37
+ return $response;
38
+ }
39
+
40
+ /* Action time */
41
+ if ( $options['time_check'] && self::_is_shortest_time() ) {
42
+ $response['reason'] = 'time';
43
+ return $response;
44
+ }
45
+
46
+ /* BBCode Spam */
47
+ if ( $options['bbcode_check'] && self::_is_bbcode_spam( $body ) ) {
48
+ $response['reason'] = 'bbcode';
49
+ return $response;
50
+ }
51
+
52
+ if ( $options['advanced_check'] && self::_is_fake_ip( $ip ) ) {
53
+ $response['reason'] = 'server';
54
+ return $response;
55
+ }
56
+
57
+ /* Regexp for Spam */
58
+ if ( $options['regexp_check'] ) {
59
+ $is_spam = self::_is_regexp_spam( array(
60
+ 'ip' => $ip,
61
+ 'host' => parse_url( $url, PHP_URL_HOST ),
62
+ 'body' => $body,
63
+ 'email' => $email,
64
+ 'author' => $author,
65
+ ) );
66
+ if ( $is_spam ) {
67
+ $response['reason'] = 'regexp';
68
+ return $response;
69
+ }
70
+ }
71
+
72
+ /* DNSBL Spam */
73
+ if ( $options['dnsbl_check'] && self::_is_dnsbl_spam( $ip ) ) {
74
+ $response['reason'] = 'dnsbl';
75
+ return $response;
76
+ }
77
+ }
78
+
79
+ /**
80
+ * Check for form submission time
81
+ *
82
+ * @return boolean TRUE if the action time is less than 5 seconds
83
+ */
84
+
85
+ private static function _is_shortest_time() {
86
+ $too_short = false;
87
+ $start_time = FrmAppHelper::get_post_param( 'ab_init_time', 0, 'absint' );
88
+
89
+ if ( $start_time ) {
90
+ // Compare time values
91
+ $min_seconds = apply_filters( 'frm_spam_time_limit', 5 );
92
+ $total_time = time() - $start_time;
93
+ if ( $total_time < $min_seconds ) {
94
+ $too_short = true;
95
+ }
96
+ }
97
+
98
+ return $too_short;
99
+ }
100
+
101
+ private static function _is_bbcode_spam( $body ) {
102
+ return (bool) preg_match( '/\[url[=\]].*\[\/url\]/is', $body );
103
+ }
104
+
105
+ private static function _is_fake_ip( $client_ip, $client_host = false ) {
106
+ /* Remote Host */
107
+ $host_by_ip = gethostbyaddr( $client_ip );
108
+
109
+ /* IPv6 */
110
+ if ( self::_is_ipv6( $client_ip ) ) {
111
+ return $client_ip != $host_by_ip;
112
+ }
113
+
114
+ /* IPv4 */
115
+ if ( empty( $client_host ) ) {
116
+ $ip_by_host = gethostbyname( $host_by_ip );
117
+
118
+ if ( $ip_by_host === $host_by_ip ) {
119
+ return false;
120
+ }
121
+ } else {
122
+ /* IPv4 / API */
123
+ if ( $host_by_ip === $client_ip ) {
124
+ return true;
125
+ }
126
+
127
+ $ip_by_host = gethostbyname( $client_host );
128
+ }
129
+
130
+ if ( strpos( $client_ip, self::_cut_ip( $ip_by_host ) ) === false ) {
131
+ return true;
132
+ }
133
+
134
+ return false;
135
+ }
136
+
137
+ /**
138
+ * Check for an IPv6 address
139
+ *
140
+ * @param string $ip IP to validate
141
+ * @return boolean TRUE if IPv6
142
+ */
143
+
144
+ private static function _is_ipv6( $ip ) {
145
+ if ( function_exists('filter_var') ) {
146
+ return filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ) !== false;
147
+ } else {
148
+ return ! self::_is_ipv4( $ip );
149
+ }
150
+ }
151
+
152
+ /**
153
+ * Check for an IPv4 address
154
+ *
155
+ * @param string $ip IP to validate
156
+ * @return integer TRUE if IPv4
157
+ */
158
+ private static function _is_ipv4( $ip ) {
159
+ if ( function_exists('filter_var') ) {
160
+ return filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) !== false;
161
+ } else {
162
+ return preg_match( '/^\d{1,3}(\.\d{1,3}){3,3}$/', $ip );
163
+ }
164
+ }
165
+
166
+ private static function _cut_ip( $ip, $cut_end = true ) {
167
+ $separator = ( self::_is_ipv4( $ip ) ? '.' : ':' );
168
+ $part = ( $cut_end ? strrchr( $ip, $separator ) : strstr( $ip, $separator ) );
169
+
170
+ return str_replace( $part, '', $ip );
171
+ }
172
+
173
+ private static function _is_regexp_spam( $comment ) {
174
+ /* Felder */
175
+ $fields = array(
176
+ 'ip',
177
+ 'host',
178
+ 'body',
179
+ 'email',
180
+ 'author',
181
+ );
182
+
183
+ /* Regexp */
184
+ $patterns = array(
185
+ 0 => array(
186
+ 'host' => '^(www\.)?\d+\w+\.com$',
187
+ 'body' => '^\w+\s\d+$',
188
+ 'email' => '@gmail.com$',
189
+ ),
190
+ 1 => array(
191
+ 'body' => '\<\!.+?mfunc.+?\>',
192
+ ),
193
+ );
194
+
195
+ /* Spammy author */
196
+ $quoted_author = preg_quote( $comment['author'], '/' );
197
+ if ( $quoted_author ) {
198
+ $patterns[] = array(
199
+ 'body' => sprintf( '<a.+?>%s<\/a>$', $quoted_author ),
200
+ );
201
+ $patterns[] = array(
202
+ 'body' => sprintf( '%s https?:.+?$', $quoted_author ),
203
+ );
204
+ $patterns[] = array(
205
+ 'email' => '@gmail.com$',
206
+ 'author' => '^[a-z0-9-\.]+\.[a-z]{2,6}$',
207
+ 'host' => sprintf( '^%s$', $quoted_author ),
208
+ );
209
+ }
210
+
211
+ /* Hook */
212
+ $patterns = apply_filters( 'antispam_bee_patterns', $patterns );
213
+
214
+ if ( ! $patterns ) {
215
+ return false;
216
+ }
217
+
218
+ foreach ( $patterns as $pattern ) {
219
+ $hits = array();
220
+
221
+ foreach ( $pattern as $field => $regexp ) {
222
+ $is_empty = ( empty( $field ) || ! in_array( $field, $fields ) || empty( $regexp ) );
223
+ if ( $is_empty ) {
224
+ continue;
225
+ }
226
+
227
+ /* Ignore non utf-8 chars */
228
+ $comment[ $field ] = ( function_exists('iconv') ? iconv( 'utf-8', 'utf-8//TRANSLIT', $comment[ $field ] ) : $comment[ $field ] );
229
+
230
+ if ( empty( $comment[ $field ] ) ) {
231
+ continue;
232
+ }
233
+
234
+ /* Perform regex */
235
+ if ( preg_match( '/' . $regexp . '/isu', $comment[ $field ] ) ) {
236
+ $hits[ $field ] = true;
237
+ }
238
+ }
239
+
240
+ if ( count( $hits ) === count( $pattern ) ) {
241
+ return true;
242
+ }
243
+ }
244
+
245
+ return false;
246
+ }
247
+
248
+ private static function _is_dnsbl_spam( $ip ) {
249
+
250
+ $response = wp_safe_remote_request(
251
+ esc_url_raw(
252
+ sprintf( 'http://www.stopforumspam.com/api?ip=%s&f=json', $ip ),
253
+ 'http'
254
+ )
255
+ );
256
+
257
+ if ( is_wp_error( $response ) ) {
258
+ return false;
259
+ }
260
+
261
+ /* Get JSON */
262
+ $json = wp_remote_retrieve_body( $response );
263
+
264
+ $result = json_decode( $json );
265
+
266
+ if ( empty( $result->success ) ) {
267
+ return false;
268
+ }
269
+
270
+ $status = (bool) $result->ip->appears;
271
+ return $status;
272
+ }
273
+ }
classes/models/FrmEntryFormat.php CHANGED
@@ -11,7 +11,7 @@ class FrmEntryFormat {
11
  'bg_color' => '', 'alt_bg_color' => '',
12
  'clickable' => false,
13
  'exclude_fields' => '', 'include_fields' => '',
14
- 'include_extras' => 'section', 'inline_style' => 1,
15
  ), $atts );
16
 
17
  $atts['exclude_fields'] = self::comma_list_to_array( $atts['exclude_fields'] );
@@ -150,18 +150,7 @@ class FrmEntryFormat {
150
  return;
151
  }
152
 
153
- self::textarea_display_value( $f->type, $atts['plain_text'], $val );
154
- $val = apply_filters( 'frm_display_' . $f->type . '_value_custom', $val, array( 'field' => $f, 'atts' => $atts ) );
155
-
156
- if ( is_array( $val ) ) {
157
- if ( $atts['format'] == 'text' ) {
158
- $val = implode( ', ', $val );
159
- } else if ( $f->type == 'checkbox' ) {
160
- $val = array_values( $val );
161
- }
162
- }
163
-
164
- self::maybe_strip_html( $atts['plain_text'], $val );
165
 
166
  if ( $atts['format'] != 'text' ) {
167
  $values[ $f->field_key ] = $val;
@@ -216,6 +205,19 @@ class FrmEntryFormat {
216
  }
217
  }
218
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
  /**
220
  * Replace returns with HTML line breaks for display
221
  * @since 2.0.9
@@ -226,6 +228,19 @@ class FrmEntryFormat {
226
  }
227
  }
228
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  /**
230
  * Strip HTML if from email value if plain text is selected
231
  *
11
  'bg_color' => '', 'alt_bg_color' => '',
12
  'clickable' => false,
13
  'exclude_fields' => '', 'include_fields' => '',
14
+ 'include_extras' => '', 'inline_style' => 1,
15
  ), $atts );
16
 
17
  $atts['exclude_fields'] = self::comma_list_to_array( $atts['exclude_fields'] );
150
  return;
151
  }
152
 
153
+ self::prepare_field_output( $atts, $val );
 
 
 
 
 
 
 
 
 
 
 
154
 
155
  if ( $atts['format'] != 'text' ) {
156
  $values[ $f->field_key ] = $val;
205
  }
206
  }
207
 
208
+ /**
209
+ * @since 2.03.02
210
+ */
211
+ public static function prepare_field_output( $atts, &$val ) {
212
+ self::textarea_display_value( $atts['field']->type, $atts['plain_text'], $val );
213
+ $val = apply_filters( 'frm_display_' . $atts['field']->type . '_value_custom', $val, array(
214
+ 'field' => $atts['field'], 'atts' => $atts,
215
+ ) );
216
+
217
+ self::flatten_array_value( $atts, $val );
218
+ self::maybe_strip_html( $atts['plain_text'], $val );
219
+ }
220
+
221
  /**
222
  * Replace returns with HTML line breaks for display
223
  * @since 2.0.9
228
  }
229
  }
230
 
231
+ /**
232
+ * @since 2.03.02
233
+ */
234
+ private static function flatten_array_value( $atts, &$val ) {
235
+ if ( is_array( $val ) ) {
236
+ if ( $atts['format'] == 'text' ) {
237
+ $val = implode( ', ', $val );
238
+ } else if ( $atts['field']->type == 'checkbox' ) {
239
+ $val = array_values( $val );
240
+ }
241
+ }
242
+ }
243
+
244
  /**
245
  * Strip HTML if from email value if plain text is selected
246
  *
classes/models/FrmSettings.php CHANGED
@@ -8,6 +8,7 @@ class FrmSettings {
8
  public $use_html;
9
  public $jquery_css;
10
  public $accordion_js;
 
11
 
12
  public $success_msg;
13
  public $blank_msg;
@@ -82,6 +83,7 @@ class FrmSettings {
82
  'use_html' => true,
83
  'jquery_css' => false,
84
  'accordion_js' => false,
 
85
 
86
  're_multi' => 0,
87
 
@@ -201,9 +203,9 @@ class FrmSettings {
201
  $this->preview_page_id = (int) $params['frm-preview-page-id'];
202
 
203
  $this->use_html = isset($params['frm_use_html']) ? $params['frm_use_html'] : 0;
204
- //$this->custom_style = isset($params['frm_custom_style']) ? $params['frm_custom_style'] : 0;
205
  $this->jquery_css = isset( $params['frm_jquery_css'] ) ? absint( $params['frm_jquery_css'] ) : 0;
206
  $this->accordion_js = isset( $params['frm_accordion_js'] ) ? absint( $params['frm_accordion_js'] ) : 0;
 
207
  }
208
 
209
  private function update_roles( $params ) {
8
  public $use_html;
9
  public $jquery_css;
10
  public $accordion_js;
11
+ public $fade_form;
12
 
13
  public $success_msg;
14
  public $blank_msg;
83
  'use_html' => true,
84
  'jquery_css' => false,
85
  'accordion_js' => false,
86
+ 'fade_form' => false,
87
 
88
  're_multi' => 0,
89
 
203
  $this->preview_page_id = (int) $params['frm-preview-page-id'];
204
 
205
  $this->use_html = isset($params['frm_use_html']) ? $params['frm_use_html'] : 0;
 
206
  $this->jquery_css = isset( $params['frm_jquery_css'] ) ? absint( $params['frm_jquery_css'] ) : 0;
207
  $this->accordion_js = isset( $params['frm_accordion_js'] ) ? absint( $params['frm_accordion_js'] ) : 0;
208
+ $this->fade_form = isset( $params['frm_fade_form'] ) ? absint( $params['frm_fade_form'] ) : 0;
209
  }
210
 
211
  private function update_roles( $params ) {
classes/widgets/FrmShowForm.php CHANGED
@@ -15,8 +15,6 @@ class FrmShowForm extends WP_Widget {
15
  }
16
  $title = apply_filters('widget_title', $title);
17
 
18
- $instance['description'] = isset($instance['description']) ? $instance['description'] : false;
19
-
20
  echo $args['before_widget'];
21
 
22
  echo '<div class="frm_form_widget">';
@@ -24,7 +22,13 @@ class FrmShowForm extends WP_Widget {
24
  echo $args['before_title'] . stripslashes($title) . $args['after_title'];
25
  }
26
 
27
- echo FrmFormsController::show_form($instance['form'], '', false, $instance['description']);
 
 
 
 
 
 
28
 
29
  echo '</div>';
30
  echo $args['after_widget'];
15
  }
16
  $title = apply_filters('widget_title', $title);
17
 
 
 
18
  echo $args['before_widget'];
19
 
20
  echo '<div class="frm_form_widget">';
22
  echo $args['before_title'] . stripslashes($title) . $args['after_title'];
23
  }
24
 
25
+ $form_atts = array(
26
+ 'id' => $instance['form'],
27
+ 'title' => false,
28
+ 'description' => isset( $instance['description'] ) ? $instance['description'] : false,
29
+ );
30
+
31
+ echo FrmFormsController::get_form_shortcode( $form_atts );
32
 
33
  echo '</div>';
34
  echo $args['after_widget'];
css/frm_admin.css CHANGED
@@ -1203,7 +1203,7 @@ select.frm_cancelnew, input.frm_enternew{width:175px;}
1203
  padding: 0;
1204
  }
1205
  .frm_email_settings .widget:last-of-type{
1206
- margin-bottom:60px;
1207
  }
1208
 
1209
  .frm_actions_list a{
@@ -1216,6 +1216,16 @@ select.frm_cancelnew, input.frm_enternew{width:175px;}
1216
  .frm_actions_list a:active, .frm_actions_list a:focus{
1217
  outline: none;
1218
  }
 
 
 
 
 
 
 
 
 
 
1219
  .frm_form_action_settings .widget-inside{
1220
  min-height:25px;
1221
  }
1203
  padding: 0;
1204
  }
1205
  .frm_email_settings .widget:last-of-type{
1206
+ margin-bottom:20px;
1207
  }
1208
 
1209
  .frm_actions_list a{
1216
  .frm_actions_list a:active, .frm_actions_list a:focus{
1217
  outline: none;
1218
  }
1219
+
1220
+ .frm_form_action_settings,
1221
+ .frm_form_action_settings .btn-group.frm-btn-group.open{
1222
+ position: static;
1223
+ }
1224
+
1225
+ .frm_form_action_settings .widget-top{
1226
+ position: relative;
1227
+ }
1228
+
1229
  .frm_form_action_settings .widget-inside{
1230
  min-height:25px;
1231
  }
formidable.php CHANGED
@@ -2,9 +2,9 @@
2
  /*
3
  Plugin Name: Formidable Forms
4
  Description: Quickly and easily create drag-and-drop forms
5
- Version: 2.03.01
6
  Plugin URI: https://formidableforms.com/
7
- Author URI: http://strategy11.com
8
  Author: Strategy11
9
  Text Domain: formidable
10
  */
2
  /*
3
  Plugin Name: Formidable Forms
4
  Description: Quickly and easily create drag-and-drop forms
5
+ Version: 2.03.02
6
  Plugin URI: https://formidableforms.com/
7
+ Author URI: https://formidableforms.com/
8
  Author: Strategy11
9
  Text Domain: formidable
10
  */
js/formidable.js CHANGED
@@ -3,6 +3,7 @@ function frmFrontFormJS(){
3
  var currentlyAddingRow = false;
4
  var action = '';
5
  var jsErrors = [];
 
6
 
7
  function setNextPage(e){
8
  /*jshint validthis:true */
@@ -64,7 +65,6 @@ function frmFrontFormJS(){
64
  var dateFields = __frmDatepicker;
65
  var id = this.id;
66
  var idParts = id.split('-');
67
- var lastPart = idParts.pop();
68
  var altID = 'input[id^="'+ idParts.join('-') +'"]';
69
 
70
  jQuery.datepicker.setDefaults(jQuery.datepicker.regional['']);
@@ -1648,7 +1648,7 @@ function frmFrontFormJS(){
1648
  var parentVals = [];
1649
  var parentIds = childFieldArgs.parents;
1650
 
1651
- var parentFieldArgs, currentParentId;
1652
  var parentValue = false;
1653
  for ( var i = 0, l = parentIds.length; i < l; i++ ) {
1654
  parentFieldArgs = getLookupArgsForSingleField( parentIds[i] );
@@ -1690,6 +1690,7 @@ function frmFrontFormJS(){
1690
  * @param {Array} childFieldArgs.parentVals
1691
  * @param {string} childFieldArgs.fieldId
1692
  * @param {string} childFieldArgs.fieldKey
 
1693
  * @param {object} childDiv
1694
  */
1695
  function maybeReplaceSelectLookupFieldOptions( childFieldArgs, childDiv ) {
@@ -1711,8 +1712,8 @@ function frmFrontFormJS(){
1711
  triggerChange(jQuery(childSelect), childFieldArgs.fieldKey);
1712
  }
1713
  } else {
1714
- childFieldArgs.isReadOnly = childSelect.disabled;
1715
  disableLookup( childSelect );
 
1716
 
1717
  // If all parents have values, check for updated options
1718
  jQuery.ajax({
@@ -1727,6 +1728,7 @@ function frmFrontFormJS(){
1727
  },
1728
  success:function(newOptions){
1729
  replaceSelectLookupFieldOptions( childFieldArgs, childSelect, newOptions );
 
1730
  }
1731
  });
1732
  }
@@ -1751,6 +1753,75 @@ function frmFrontFormJS(){
1751
  maybeUpdateChosenOptions( childSelect );
1752
  }
1753
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1754
  /**
1755
  * Enable a Select Lookup field and remove loading image
1756
  *
@@ -1848,6 +1919,7 @@ function frmFrontFormJS(){
1848
  * @param {string} childFieldArgs.fieldId
1849
  * @param {string} childFieldArgs.repeatRow
1850
  * @param {string} childFieldArgs.fieldKey
 
1851
  * @param {object} childDiv
1852
  */
1853
  function replaceCbRadioLookupOptions( childFieldArgs, childDiv ) {
@@ -1864,6 +1936,7 @@ function frmFrontFormJS(){
1864
  }
1865
 
1866
  var defaultValue = jQuery( inputs[0] ).data( 'frmval' );
 
1867
 
1868
  jQuery.ajax({
1869
  type:'POST',
@@ -1873,7 +1946,7 @@ function frmFrontFormJS(){
1873
  parent_fields:childFieldArgs.parents,
1874
  parent_vals:childFieldArgs.parentVals,
1875
  field_id:childFieldArgs.fieldId,
1876
- container_field_id:getContainerFieldID( childFieldArgs ),
1877
  row_index:childFieldArgs.repeatRow,
1878
  current_value:currentValue,
1879
  default_value:defaultValue,
@@ -1892,33 +1965,12 @@ function frmFrontFormJS(){
1892
  }
1893
 
1894
  triggerChange( jQuery( inputs[0] ), childFieldArgs.fieldKey );
 
 
1895
  }
1896
  });
1897
  }
1898
 
1899
- /**
1900
- * Get the ID of the container field, if there is one
1901
- *
1902
- * @since 2.03.01
1903
- *
1904
- * @param {Object} childFieldArgs
1905
- * @param {string} childFieldArgs.inSection
1906
- * @param {string} childFieldArgs.inEmbedForm
1907
- *
1908
- * @returns {string}
1909
- */
1910
- function getContainerFieldID( childFieldArgs ) {
1911
- var sectionFieldID = '';
1912
-
1913
- if ( childFieldArgs.inSection !== '0' ) {
1914
- sectionFieldID = childFieldArgs.inSection;
1915
- } else if ( childFieldArgs.inEmbedForm !== '0' ) {
1916
- sectionFieldID = childFieldArgs.inEmbedForm;
1917
- }
1918
-
1919
- return sectionFieldID;
1920
- }
1921
-
1922
  /**
1923
  * Select the defatul value in a radio/checkbox field if no value is selected
1924
  *
@@ -1946,7 +1998,7 @@ function frmFrontFormJS(){
1946
  }
1947
 
1948
  var inputName = inputs[0].name;
1949
- setCheckboxOrRadioDefaultValue( inputName, defaultValue )
1950
  }
1951
 
1952
  /**
@@ -2019,6 +2071,9 @@ function frmFrontFormJS(){
2019
  insertValueInFieldWatchingLookup( childFieldArgs, childInput, newValue );
2020
  } else {
2021
  // If all parents have values, check for a new value
 
 
 
2022
  jQuery.ajax({
2023
  type:'POST',
2024
  url:frm_js.ajax_url,
@@ -2033,6 +2088,8 @@ function frmFrontFormJS(){
2033
  if ( childInput.value != newValue ) {
2034
  insertValueInFieldWatchingLookup( childFieldArgs.fieldKey, childInput, newValue );
2035
  }
 
 
2036
  }
2037
  });
2038
  }
@@ -2486,7 +2543,7 @@ function frmFrontFormJS(){
2486
  totalField = getSiblingField( fieldInfo );
2487
  }
2488
 
2489
- if ( totalField.length < 1 ) {
2490
  return;
2491
  }
2492
 
@@ -2510,6 +2567,8 @@ function frmFrontFormJS(){
2510
  }
2511
  }
2512
 
 
 
2513
  total = parseFloat(eval(thisFullCalc));
2514
 
2515
  if ( typeof total === 'undefined' || isNaN(total) ) {
@@ -2564,6 +2623,22 @@ function frmFrontFormJS(){
2564
  return thisFullCalc;
2565
  }
2566
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2567
  function getCallForField( field, all_calcs ) {
2568
  if ( field.thisField.type == 'checkbox' || field.thisField.type == 'radio' || field.thisField.type == 'scale' ) {
2569
  field.thisFieldCall = field.thisFieldCall +':checked,'+ field.thisFieldCall+'[type=hidden]';
@@ -3364,15 +3439,14 @@ function frmFrontFormJS(){
3364
  object.addClass('frm_loading_form');
3365
  }
3366
 
3367
- // Disable submit button
3368
- object.find('input[type="submit"], input[type="button"], button[type="submit"]').attr('disabled','disabled');
3369
  }
3370
 
3371
  function removeSubmitLoading( object, enable ) {
3372
  object.removeClass('frm_loading_form');
3373
 
3374
  if ( enable == 'enable' ) {
3375
- object.find('input[type="submit"], input[type="button"], button[type="submit"]').removeAttr('disabled');
3376
  }
3377
  }
3378
 
@@ -3763,7 +3837,7 @@ function frmFrontFormJS(){
3763
 
3764
  // Make sure fields just loaded are properly bound
3765
  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"]', maybeCheckDependent);
3766
- checkFieldsOnPage();
3767
  }
3768
  });
3769
  return false;
@@ -3818,12 +3892,12 @@ function frmFrontFormJS(){
3818
  * General Helpers
3819
  *********************************************/
3820
 
3821
- function checkFieldsOnPage(){
3822
  checkPreviouslyHiddenFields();
3823
  loadDateFields();
3824
  loadCustomInputMasks();
3825
  loadStars();
3826
- loadChosen();
3827
  checkDynamicFields();
3828
  checkLookupFields();
3829
  triggerCalc();
@@ -3836,13 +3910,18 @@ function frmFrontFormJS(){
3836
  }
3837
  }
3838
 
3839
- function loadChosen() {
3840
  if ( jQuery().chosen ) {
3841
  var opts = {allow_single_deselect:true,no_results_text:frm_js.no_results};
3842
  if ( typeof __frmChosen !== 'undefined' ) {
3843
  opts = '{' + __frmChosen + '}';
3844
  }
3845
- jQuery('.frm_chzn').chosen(opts);
 
 
 
 
 
3846
  }
3847
  }
3848
 
@@ -4035,7 +4114,6 @@ function frmFrontFormJS(){
4035
 
4036
  return{
4037
  init: function(){
4038
- jQuery(document).on('click', '.frm_button_submit', function(){ jQuery(this).closest('form').submit(); });
4039
  jQuery(document).off('submit.formidable','.frm-show-form');
4040
  jQuery(document).on('submit.formidable','.frm-show-form', frmFrontForm.submitForm);
4041
 
@@ -4341,8 +4419,6 @@ jQuery(document).ready(function($){
4341
  frmFrontForm.init();
4342
  });
4343
 
4344
- document.documentElement.className += ' js';
4345
-
4346
  function frmRecaptcha() {
4347
  var captchas = jQuery('.frm-g-recaptcha');
4348
  for ( var c = 0, cl = captchas.length; c < cl; c++ ) {
3
  var currentlyAddingRow = false;
4
  var action = '';
5
  var jsErrors = [];
6
+ var lookupsLoading = 0;// TODO: switch to processesRunning and make it work with file upload fields
7
 
8
  function setNextPage(e){
9
  /*jshint validthis:true */
65
  var dateFields = __frmDatepicker;
66
  var id = this.id;
67
  var idParts = id.split('-');
 
68
  var altID = 'input[id^="'+ idParts.join('-') +'"]';
69
 
70
  jQuery.datepicker.setDefaults(jQuery.datepicker.regional['']);
1648
  var parentVals = [];
1649
  var parentIds = childFieldArgs.parents;
1650
 
1651
+ var parentFieldArgs;
1652
  var parentValue = false;
1653
  for ( var i = 0, l = parentIds.length; i < l; i++ ) {
1654
  parentFieldArgs = getLookupArgsForSingleField( parentIds[i] );
1690
  * @param {Array} childFieldArgs.parentVals
1691
  * @param {string} childFieldArgs.fieldId
1692
  * @param {string} childFieldArgs.fieldKey
1693
+ * @param {string} childFieldArgs.formId
1694
  * @param {object} childDiv
1695
  */
1696
  function maybeReplaceSelectLookupFieldOptions( childFieldArgs, childDiv ) {
1712
  triggerChange(jQuery(childSelect), childFieldArgs.fieldKey);
1713
  }
1714
  } else {
 
1715
  disableLookup( childSelect );
1716
+ disableFormPreLookup( childFieldArgs.formId );
1717
 
1718
  // If all parents have values, check for updated options
1719
  jQuery.ajax({
1728
  },
1729
  success:function(newOptions){
1730
  replaceSelectLookupFieldOptions( childFieldArgs, childSelect, newOptions );
1731
+ enableFormAfterLookup( childFieldArgs.formId );
1732
  }
1733
  });
1734
  }
1753
  maybeUpdateChosenOptions( childSelect );
1754
  }
1755
 
1756
+ /**
1757
+ * Disable a form prior to a Lookup field's Ajax request
1758
+ *
1759
+ * @since 2.03.02
1760
+ * @param {String} formId
1761
+ */
1762
+ function disableFormPreLookup( formId ) {
1763
+ lookupsLoading++;
1764
+
1765
+ if ( lookupsLoading <= 1 ) {
1766
+
1767
+ var form = getFormById( formId );
1768
+ if ( form !== null ) {
1769
+ showSubmitLoading( jQuery( form ) );
1770
+ }
1771
+ }
1772
+ }
1773
+
1774
+ /**
1775
+ * Enable a form if all Lookup field requests are completed
1776
+ *
1777
+ * @since 2.03.02
1778
+ * @param {String} formId
1779
+ */
1780
+ function enableFormAfterLookup( formId ) {
1781
+ lookupsLoading--;
1782
+
1783
+ if ( lookupsLoading <= 0 ) {
1784
+
1785
+ var form = getFormById( formId );
1786
+ if ( form !== null ) {
1787
+ removeSubmitLoading(jQuery(form), 'enable');
1788
+ }
1789
+ }
1790
+ }
1791
+
1792
+ /**
1793
+ * Get a form element by the ID number
1794
+ *
1795
+ * @since 2.03.02
1796
+ * @param {string} formId
1797
+ * @returns {Element}
1798
+ */
1799
+ function getFormById( formId ) {
1800
+ return document.querySelector( '#frm_form_' + formId + '_container form');
1801
+ }
1802
+
1803
+ /**
1804
+ * Disable the submit button for a given jQuery form object
1805
+ *
1806
+ * @since 2.03.02
1807
+ *
1808
+ * @param {object} $form
1809
+ */
1810
+ function disableSubmitButton( $form ) {
1811
+ $form.find('input[type="submit"], input[type="button"], button[type="submit"]').attr('disabled','disabled');
1812
+ }
1813
+
1814
+ /**
1815
+ * Enable the submit button for a given jQuery form object
1816
+ *
1817
+ * @since 2.03.02
1818
+ *
1819
+ * @param {object} $form
1820
+ */
1821
+ function enableSubmitButton( $form ) {
1822
+ $form.find( 'input[type="submit"], input[type="button"], button[type="submit"]' ).removeAttr( 'disabled' );
1823
+ }
1824
+
1825
  /**
1826
  * Enable a Select Lookup field and remove loading image
1827
  *
1919
  * @param {string} childFieldArgs.fieldId
1920
  * @param {string} childFieldArgs.repeatRow
1921
  * @param {string} childFieldArgs.fieldKey
1922
+ * @param {string} childFieldArgs.formId
1923
  * @param {object} childDiv
1924
  */
1925
  function replaceCbRadioLookupOptions( childFieldArgs, childDiv ) {
1936
  }
1937
 
1938
  var defaultValue = jQuery( inputs[0] ).data( 'frmval' );
1939
+ disableFormPreLookup( childFieldArgs.formId );
1940
 
1941
  jQuery.ajax({
1942
  type:'POST',
1946
  parent_fields:childFieldArgs.parents,
1947
  parent_vals:childFieldArgs.parentVals,
1948
  field_id:childFieldArgs.fieldId,
1949
+ container_field_id:getContainerFieldId( childFieldArgs ),
1950
  row_index:childFieldArgs.repeatRow,
1951
  current_value:currentValue,
1952
  default_value:defaultValue,
1965
  }
1966
 
1967
  triggerChange( jQuery( inputs[0] ), childFieldArgs.fieldKey );
1968
+
1969
+ enableFormAfterLookup( childFieldArgs.formId );
1970
  }
1971
  });
1972
  }
1973
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1974
  /**
1975
  * Select the defatul value in a radio/checkbox field if no value is selected
1976
  *
1998
  }
1999
 
2000
  var inputName = inputs[0].name;
2001
+ setCheckboxOrRadioDefaultValue( inputName, defaultValue );
2002
  }
2003
 
2004
  /**
2071
  insertValueInFieldWatchingLookup( childFieldArgs, childInput, newValue );
2072
  } else {
2073
  // If all parents have values, check for a new value
2074
+
2075
+ disableFormPreLookup( childFieldArgs.formId );
2076
+
2077
  jQuery.ajax({
2078
  type:'POST',
2079
  url:frm_js.ajax_url,
2088
  if ( childInput.value != newValue ) {
2089
  insertValueInFieldWatchingLookup( childFieldArgs.fieldKey, childInput, newValue );
2090
  }
2091
+
2092
+ enableFormAfterLookup( childFieldArgs.formId );
2093
  }
2094
  });
2095
  }
2543
  totalField = getSiblingField( fieldInfo );
2544
  }
2545
 
2546
+ if ( totalField === null || totalField.length < 1 ) {
2547
  return;
2548
  }
2549
 
2567
  }
2568
  }
2569
 
2570
+ thisFullCalc = trimNumericCalculation( thisFullCalc );
2571
+
2572
  total = parseFloat(eval(thisFullCalc));
2573
 
2574
  if ( typeof total === 'undefined' || isNaN(total) ) {
2623
  return thisFullCalc;
2624
  }
2625
 
2626
+ /**
2627
+ * Trim non-numeric characters from the end of a numeric calculation
2628
+ *
2629
+ * @since 2.03.02
2630
+ * @param {String} numericCalc
2631
+ * @returns {String}
2632
+ */
2633
+ function trimNumericCalculation( numericCalc ) {
2634
+ var lastChar = numericCalc.charAt( numericCalc.length - 1 );
2635
+ if ( lastChar === '+' || lastChar === '-' ) {
2636
+ numericCalc = numericCalc.substr( 0, numericCalc.length - 1 );
2637
+ }
2638
+
2639
+ return numericCalc;
2640
+ }
2641
+
2642
  function getCallForField( field, all_calcs ) {
2643
  if ( field.thisField.type == 'checkbox' || field.thisField.type == 'radio' || field.thisField.type == 'scale' ) {
2644
  field.thisFieldCall = field.thisFieldCall +':checked,'+ field.thisFieldCall+'[type=hidden]';
3439
  object.addClass('frm_loading_form');
3440
  }
3441
 
3442
+ disableSubmitButton( object );
 
3443
  }
3444
 
3445
  function removeSubmitLoading( object, enable ) {
3446
  object.removeClass('frm_loading_form');
3447
 
3448
  if ( enable == 'enable' ) {
3449
+ enableSubmitButton( object );
3450
  }
3451
  }
3452
 
3837
 
3838
  // Make sure fields just loaded are properly bound
3839
  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"]', maybeCheckDependent);
3840
+ checkFieldsOnPage( prefix + entry_id );
3841
  }
3842
  });
3843
  return false;
3892
  * General Helpers
3893
  *********************************************/
3894
 
3895
+ function checkFieldsOnPage( chosenContainer ){
3896
  checkPreviouslyHiddenFields();
3897
  loadDateFields();
3898
  loadCustomInputMasks();
3899
  loadStars();
3900
+ loadChosen( chosenContainer );
3901
  checkDynamicFields();
3902
  checkLookupFields();
3903
  triggerCalc();
3910
  }
3911
  }
3912
 
3913
+ function loadChosen( chosenContainer ) {
3914
  if ( jQuery().chosen ) {
3915
  var opts = {allow_single_deselect:true,no_results_text:frm_js.no_results};
3916
  if ( typeof __frmChosen !== 'undefined' ) {
3917
  opts = '{' + __frmChosen + '}';
3918
  }
3919
+
3920
+ if ( typeof chosenContainer !== 'undefined' ) {
3921
+ jQuery( "#" + chosenContainer ).find( '.frm_chzn' ).chosen( opts );
3922
+ } else {
3923
+ jQuery( '.frm_chzn' ).chosen( opts );
3924
+ }
3925
  }
3926
  }
3927
 
4114
 
4115
  return{
4116
  init: function(){
 
4117
  jQuery(document).off('submit.formidable','.frm-show-form');
4118
  jQuery(document).on('submit.formidable','.frm-show-form', frmFrontForm.submitForm);
4119
 
4419
  frmFrontForm.init();
4420
  });
4421
 
 
 
4422
  function frmRecaptcha() {
4423
  var captchas = jQuery('.frm-g-recaptcha');
4424
  for ( var c = 0, cl = captchas.length; c < cl; c++ ) {
js/formidable.min.js CHANGED
@@ -1,99 +1,99 @@
1
  function frmFrontFormJS(){function l(a){var b=jQuery(this),c=b.attr("type");"submit"!==c&&a.preventDefault();a=b.parents("form:first");var d="",e="",f=this.name;"frm_prev_page"===f||-1!==this.className.indexOf("frm_prev_page")?d=jQuery(a).find(".frm_next_page").attr("id").replace("frm_next_p_",""):"frm_save_draft"===f||-1!==this.className.indexOf("frm_save_draft")?e=1:-1!==this.className.indexOf("frm_page_skip")?(b=b.data("page"),f=jQuery(a).find('input[name="form_id"]').val(),f=jQuery(a).find('input[name="frm_page_order_'+
2
- f+'"]'),jQuery(a).append('<input name="frm_last_page" type="hidden" value="'+f.val()+'" />'),""===b?f.remove():f.val(b)):-1!==this.className.indexOf("frm_page_back")&&(d=b.data("page"));jQuery(".frm_next_page").val(d);jQuery(".frm_saving_draft").val(e);"submit"!==c&&a.trigger("submit")}function m(){jQuery(this).parent().children(".frm_toggle_container").slideToggle("fast");jQuery(this).toggleClass("active").children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s").toggleClass("ui-icon-triangle-1-s ui-icon-triangle-1-e")}
3
- function q(){if(-1===this.className.indexOf("frm_custom_date")&&"undefined"!==typeof __frmDatepicker){var a=__frmDatepicker,b=this.id,c=b.split("-");c.pop();c='input[id^="'+c.join("-")+'"]';jQuery.datepicker.setDefaults(jQuery.datepicker.regional[""]);for(var d=0,e=0;e<a.length;e++)if(a[e].triggerID=="#"+b||a[e].triggerID==c)d=e;""!==a[d].options.defaultDate&&(a[d].options.defaultDate=new Date(a[d].options.defaultDate));jQuery(this).datepicker(jQuery.extend(jQuery.datepicker.regional[a[d].locale],
4
- a[d].options))}}function r(a){if("undefined"!==typeof __frmDropzone)for(var b=__frmDropzone,c=0;c<b.length;c++)x(c,a)}function x(a,b){var c=__frmDropzone,d="#"+c[a].htmlID+"_dropzone",e=c[a].fieldName;"undefined"!==typeof b&&-1!==d.indexOf("-0_dropzone")&&(d=d.replace("-0_dropzone","-"+b+"_dropzone"),e=e.replace("[0]","["+b+"]"),delete c[a].mockFiles);d=jQuery(d);if(!(1>d.length||d.hasClass("dz-clickable"))){var f=c[a].maxFiles;if("undefined"!==typeof c[a].mockFiles){var h=c[a].mockFiles.length;0<
5
- f&&(f-=h)}var g=d.closest("form"),h="#"+g.attr("id");"#undefined"==h&&(h="form."+g.attr("class").replace(" ","."));d.dropzone({url:frm_js.ajax_url,addRemoveLinks:!0,paramName:d.attr("id").replace("_dropzone",""),maxFilesize:c[a].maxFilesize,maxFiles:f,uploadMultiple:c[a].uploadMultiple,hiddenInputContainer:h,dictDefaultMessage:c[a].defaultMessage,dictFallbackMessage:c[a].fallbackMessage,dictFallbackText:c[a].fallbackText,dictFileTooBig:c[a].fileTooBig,dictInvalidFileType:c[a].invalidFileType,dictResponseError:c[a].responseError,
6
- dictCancelUpload:c[a].cancel,dictCancelUploadConfirmation:c[a].cancelConfirm,dictRemoveFile:c[a].remove,dictMaxFilesExceeded:c[a].maxFilesExceeded,fallback:function(){jQuery(this.element).closest("form").removeClass("frm_ajax_submit")},init:function(){this.on("sending",function(b,d,e){e.append("action","frm_submit_dropzone");e.append("field_id",c[a].fieldID);e.append("form_id",c[a].formID)});this.on("success",function(b,d){for(var f=jQuery.parseJSON(d),g=0;g<f.length;g++)!0!==c[a].uploadMultiple&&
7
- jQuery('input[name="'+e+'"]').val(f[g])});this.on("successmultiple",function(b,d){for(var f=jQuery.parseJSON(d),g=0;g<b.length;g++)jQuery(b[g].previewElement).append(y(c[a],f[g],e))});this.on("complete",function(b){if("undefined"!==typeof b.mediaID){c[a].uploadMultiple&&jQuery(b.previewElement).append(y(c[a],b.mediaID,e));for(var d=b.previewElement.querySelectorAll("[data-dz-name]"),f=0,g=d.length;f<g;f++)d[f].innerHTML='<a href="'+b.url+'">'+b.name+"</a>"}});this.on("addedfile",function(){fa(g)});
8
- this.on("queuecomplete",function(){M(g,"enable")});this.on("removedfile",function(b){!1!==b.accepted&&!0!==c[a].uploadMultiple&&jQuery('input[name="'+e+'"]').val("");!1!==b.accepted&&"undefined"!==typeof b.mediaID&&(jQuery(b.previewElement).remove(),this.options.maxFiles=c[a].maxFiles-this.files.length)});if("undefined"!==typeof c[a].mockFiles)for(var b=0;b<c[a].mockFiles.length;b++){var d={name:c[a].mockFiles[b].name,size:c[a].mockFiles[b].size,url:c[a].mockFiles[b].file_url,mediaID:c[a].mockFiles[b].id};
9
- this.emit("addedfile",d);this.emit("thumbnail",d,c[a].mockFiles[b].url);this.emit("complete",d);this.files.push(d)}}})}}function y(a,b,c){return'<input name="'+c+'[]" type="hidden" value="'+b+'" data-frmfile="'+a.fieldID+'" />'}function A(){var a=jQuery(this).data("frm-remove");Sa(jQuery(this).parent(".dz-preview"));a=jQuery('input[name="'+a+'"]');a.length&&a.val("")}function v(){var a=this.type,b=!1,c=!1;if("select-one"===a)c=!0,"frm_other_trigger"===this.options[this.selectedIndex].className&&(b=
10
- !0);else if("select-multiple"===a)for(var c=!0,d=this.options,b=!1,e=0;e<d.length;e++)if("frm_other_trigger"===d[e].className&&d[e].selected){b=!0;break}c?(a=jQuery(this).parent().children(".frm_other_input"),a.length&&(b?a[0].className=a[0].className.replace("frm_pos_none",""):(1>a[0].className.indexOf("frm_pos_none")&&(a[0].className+=" frm_pos_none"),a[0].value=""))):"radio"===a?jQuery(this).is(":checked")&&(jQuery(this).closest(".frm_radio").children(".frm_other_input").removeClass("frm_pos_none"),
11
- jQuery(this).closest(".frm_radio").siblings().children(".frm_other_input").addClass("frm_pos_none").val("")):"checkbox"===a&&(this.checked?jQuery(this).closest(".frm_checkbox").children(".frm_other_input").removeClass("frm_pos_none"):jQuery(this).closest(".frm_checkbox").children(".frm_other_input").addClass("frm_pos_none").val(""))}function z(a){var b=p(this,!1);if(b&&"undefined"!==typeof b&&(!a.frmTriggered||a.frmTriggered!=b)&&(ga(b,jQuery(this)),a="undefined"!==typeof a.originalEvent||-1<a.currentTarget.className.indexOf("frm_chzn")?
12
- "value changed":"other",ha(b,jQuery(this),a),N(b,jQuery(this)),jQuery(this).closest("form").hasClass("frm_js_validate"))){b=[];a=jQuery(this).closest(".frm_form_field");a.hasClass("frm_required_field")&&!jQuery(this).hasClass("frm_optional")&&(b=ia(this,b));if(1>b.length)if("email"==this.type)var c=jQuery(this).closest("form").find("input[type=email]"),b=ja(this,b,c);else"number"==this.type?b=ka(this,b):null!==this.pattern&&(b=la(this,b));a.removeClass("frm_blank_field");a.find(".frm_error").remove();
13
- if(0<Object.keys(b).length)for(var d in b)O(a,d,b)}}function p(a,b){var c="",c=a instanceof jQuery?a.attr("name"):a.name;if(""===c)return c=a instanceof jQuery?a.data("name"):a.getAttribute("data-name"),""!==c&&c?c:0;c=c.replace("item_meta[","").replace("[]","").split("]");if(1>c.length)return 0;var c=c.filter(function(a){return""!==a}),d=c[0],e=!1;if(1===c.length)return d;if("[form"===c[1]||"[row_ids"===c[1])return 0;jQuery('input[name="item_meta['+d+'][form]"]').length&&(d=c[2].replace("[",""),
14
- e=!0);"other"===d&&(d=e?c[3].replace("[",""):c[1].replace("[",""));!0===b&&(d=d===c[0]?d+"-"+c[1].replace("[",""):d+"-"+c[0]+"-"+c[1].replace("[",""));return d}function ga(a,b){if(!("undefined"===typeof __FRMRULES||"undefined"===typeof __FRMRULES[a]||1>__FRMRULES[a].dependents.length||null===b||"undefined"===typeof b))for(var c=__FRMRULES[a],d=G(b[0].name),e=0,f=c.dependents.length;e<f;e++)H(c.dependents[e],d)}function H(a,b){var c=P(a);if(!(!1===c||1>c.conditions.length)){var d;d=[];if(c.isRepeating)if(""!==
15
- b.repeatingSection){var e="frm_field_"+c.fieldId+"-",e=e+(b.repeatingSection+"-"+b.repeatRow+"_container");d.push(e)}else if(d=Q(c),null!==document.getElementById("frm_field_"+d+"_container")){d=[];for(var e=document.querySelectorAll(".frm_field_"+c.fieldId+"_container"),f=0,h=e.length;f<h;f++)d.push(e[f].id)}else{d=[];for(var f=Q(c),e="frm_field_"+c.fieldId+"-"+f+"-",f=document.querySelectorAll('[name="item_meta['+f+'][row_ids][]"]'),h=0,g=f.length;h<g;h++)""!==f[h].value&&d.push(e+f[h].value+"_container");
16
- 1>d.length&&d.push(e+"0_container")}else d.push("frm_field_"+c.fieldId+"_container");e=d.length;for(f=0;f<e;f++)c.containerId=d[f],ma(c,d[f]),na(c)}}function Q(a){var b="";"0"!==a.inEmbedForm?b=a.inEmbedForm:"0"!==a.inSection&&(b=a.inSection);return b}function ma(a,b){if(a.isRepeating){var c=b.replace("_container","").split("-");a.repeatRow=c[2]}else a.repeatRow=""}function na(a){for(var b=[],c=a.conditions.length,d=0;d<c;d++)b.push(Ta(a.conditions[d],a));c=C="any"==a.anyAll?-1<b.indexOf(!0)?a.showHide:
17
- oa(a.showHide):-1<b.indexOf(!1)?oa(a.showHide):a.showHide;b=null!==document.getElementById(a.containerId);"show"==c?"data"==a.fieldType&&a.hasOwnProperty("dataLogic")?(a={fieldId:a.fieldId,fieldKey:a.fieldKey,formId:a.formId,containerId:a.containerId,repeatRow:a.repeatRow,dataLogic:{actualValue:a.dataLogic.actualValue,fieldId:a.dataLogic.fieldId},children:"",inputType:a.inputType},"data"==a.inputType?Ua(a,b):b&&Va(a)):!1!==B(a.containerId,a.formId)&&(D(a.containerId,a.formId),b?(b=pa(a.containerId),
18
- qa(b,"divider"==a.fieldType||"form"==a.fieldType,a.formId),jQuery("#"+a.containerId).show()):(b=ra(a),qa(b,"divider"==a.fieldType||"form"==a.fieldType,a.formId))):R(a,b)}function P(a){return"undefined"===typeof __FRMRULES||"undefined"===typeof __FRMRULES[a]?!1:__FRMRULES[a]}function Ta(a,b){var c=P(a.fieldId),d=sa(c,b);"data"==b.fieldType&&"data"==c.fieldType?(c=""===a.value?""===d||1==d.length&&""===d[0]?!1:!0:S(a.operator,a.value,d),b.dataLogic=a,b.dataLogic.actualValue=d,d=c):d=S(a.operator,a.value,
19
- d);return d}function sa(a,b){var c;if("radio"==a.inputType||"checkbox"==a.inputType)c=ta(a,b),c=document.querySelectorAll('input[name^="'+c+'"]'),c="checkbox"==a.inputType?I(c):T(c);else if(!0===a.isMultiSelect){c=ta(a,b);var d=document.querySelectorAll('[name^="'+c+'"]');1==d.length&&"hidden"!=d[0].type?(c=jQuery('[name^="'+c+'"]').val(),null===c&&(c="")):c=I(d)}else if(c="field_"+a.fieldKey,a.isRepeating&&(c+="-"+b.repeatRow),d=document.getElementById(c),null===d){d="";if("time"==a.fieldType){var e=
20
- document.getElementById(c+"_H");null!==e&&(d=document.getElementById(c+"_m"),d=e.value+":"+d.value,c=document.getElementById(c+"_A"),":"==d?d="":null!==c&&(d+=" "+c.value))}c=d}else c=d.value;"undefined"===typeof c?c="":"string"===typeof c&&(c=c.trim());return c}function ta(a,b){return a.isRepeating?"item_meta["+("0"!==b.inEmbedForm?b.inEmbedForm:b.inSection)+"]["+b.repeatRow+"]["+a.fieldId+"]":"item_meta["+a.fieldId+"]"}function I(a){for(var b=[],c=0,d=a.length;c<d;c++)("hidden"==a[c].type||a[c].checked)&&
21
- b.push(a[c].value);0===b.length&&(b=!1);return b}function S(a,b,c){b=Wa(b);c=Xa(b,c);return"string"===typeof b&&"-1"!=b.indexOf("&quot;")&&S(a,b.replace("&quot;",'"'),c)?!0:{"==":function(a,b){return a==b},"!=":function(a,b){return a!=b},"<":function(a,b){return a>b},">":function(a,b){return a<b},LIKE:function(a,b){if(!b)return!1;a=U(a);b=ua(a,b);return-1!=b.indexOf(a)},"not LIKE":function(a,b){if(!b)return!0;a=U(a);b=ua(a,b);return-1==b.indexOf(a)}}[a](b,c)}function Wa(a){-1!==String(a).search(/^\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*$/)?
22
- a=parseFloat(a):"string"===typeof a&&(a=a.trim());return a}function Xa(a,b){"undefined"===typeof b&&(b="");jQuery.isArray(b)&&-1<jQuery.inArray(String(a),b)&&(b=a);"number"===typeof a&&"string"===typeof b&&(b=parseFloat(b));"string"===typeof b&&(b=b.trim());return b}function ua(a,b){b=U(b);var c;if(jQuery.isArray(b))for(var d=0,e=b.length;d<e;d++)if(c=b[d].toLowerCase(),-1<c.indexOf(a)){b=a;break}return b}function U(a){"string"===typeof a?a=a.toLowerCase():"number"===typeof a&&(a=a.toString());return a}
23
- function oa(a){return"show"==a?"hide":"show"}function pa(a){return document.getElementById(a).querySelectorAll('select[name^="item_meta"], textarea[name^="item_meta"], input[name^="item_meta"]')}function ra(a){if("divider"==a.fieldType){var b=[];"divider"==a.fieldType&&(b=document.querySelectorAll('[data-sectionid="'+a.fieldId+'"]'));a=b}else"form"==a.fieldType?a=document.querySelectorAll('[id^="field_'+a.fieldKey+'-"]'):(a=a.isRepeating?"item_meta["+Q(a)+"]["+a.repeatRow+"]["+a.fieldId+"]":"item_meta["+
24
- a.fieldId+"]",a=document.querySelectorAll('[name^="'+a+'"]'));return a}function qa(a,b,c){if(a.length)for(var d,e=["checkbox","radio"],f=0;f<a.length;f++)if(!(0<f&&"undefined"!==typeof d&&d.name==a[f].name&&-1<e.indexOf(d.type)||b&&V(a[f],c))){d=a[f];var h=jQuery(d),g=h.data("frmval");if("undefined"!==typeof g){if("checkbox"==d.type||"radio"==d.type)va(d.name,g);else if(-1<d.name.indexOf("[]")){var k=document.getElementsByName(d.name);if(jQuery.isArray(g))for(var n=0,l=g.length;n<l;n++)n in k&&(k[n].value=
25
- g[n]);else null!==k[0]&&(k[0].value=g)}else g.constructor===Object&&(k=d.getAttribute("name").split("[").slice(-1)[0],null!==k&&(k=k.replace("]",""),g=g[k],"undefined"==typeof g&&(g=""))),d.value=g;"SELECT"==d.tagName&&J(d);t(h)}d=a[f];h=p(d,!1);h=W(h);!1!==h&&"lookup"!=h.fieldType&&(h.parentVals=X(h),wa(h,d));d=a[f];if(h="undefined"!==typeof __FRMCALC){h=d.type;g=!1;if("text"==h||"hidden"==h||"number"==h)g=!0;h=g}if(h){h=__FRMCALC;g=d.name;k=d.id.replace("field_","");if(3<=g.split("][").length)for(g=
26
- k.split("-"),k="",n=0;n<g.length-1;n++)k=""===k?g[n]:k+"-"+g[n];g=k;k=null;3<=d.name.split("][").length&&(k="hidden"!=d.type?jQuery(d).closest(".frm_form_field"):jQuery(d));d=k;void 0!==h.calc[g]&&Y(h,g,[],d)}d=a[f]}}function V(a,b){var c=p(a,!0);return B("frm_field_"+c+"_container",b)}function R(a,b){if(!B(a.containerId,a.formId)){if(b){jQuery("#"+a.containerId).hide();var c=pa(a.containerId)}else c=ra(a);Z(c);xa(a.containerId,a.formId)}}function Z(a){if(!(1>a.length)){for(var b,c=!0,d=0,e=a.length;d<
27
- e;d++)0<d&&b.name!=a[d].name&&!0===c&&t(jQuery(b)),c=!0,"radio"==a[d].type||"checkbox"==a[d].type?a[d].checked=!1:"SELECT"==a[d].tagName?(0===a[d].selectedIndex?c=!1:a[d].selectedIndex=0,b=a[d].id.replace(/[^\w]/g,"_"),null!==document.getElementById(b+"_chosen")&&jQuery(a[d]).trigger("chosen:updated")):a[d].value="",b=a[d];!0===c&&t(jQuery(b))}}function B(a,b){var c=!1;-1<E(b).indexOf(a)&&(c=!0);return c}function xa(a,b){var c=E(b);if(!(-1<c.indexOf(a))){c.push(a);var c=JSON.stringify(c),d=document.getElementById("frm_hide_fields_"+
28
- b);null!==d&&(d.value=c)}}function E(a){var b=[];a=document.getElementById("frm_hide_fields_"+a);return null===a?b:b=(b=a.value)?JSON.parse(b):[]}function va(a,b){for(var c=document.getElementsByName(a),d=0,e=c.length;d<e;d++)if("hidden"==c[d].type)jQuery.isArray(b)&&null!==b[d]?c[d].value=b[d]:c[d].value=b;else if(c[d].value==b||jQuery.isArray(b)&&-1<b.indexOf(c[d].value))if(c[d].checked=!0,"radio"==c[d].type)break}function D(a,b){var c=E(b),d=c.indexOf(a);-1<d&&(c.splice(d,1),c=JSON.stringify(c),
29
- document.getElementById("frm_hide_fields_"+b).value=c)}function ha(a,b,c){if(!("undefined"===typeof __FRMLOOKUP||"undefined"===typeof __FRMLOOKUP[a]||1>__FRMLOOKUP[a].dependents.length||null===b||"undefined"===typeof b)){a=__FRMLOOKUP[a];b=G(b[0].name);for(var d=0,e=a.dependents.length;d<e;d++)aa(a.dependents[d],b,c)}}function aa(a,b,c){a=W(a);if(!(!1===a||1>a.parents.length))if("lookup"==a.fieldType){if(""!==b.repeatRow){c=[];var d="frm_field_"+a.fieldId+"-",d=d+(b.repeatingSection+"-"+b.repeatRow+
30
- "_container");b=document.getElementById(d);null!==b&&c.push(b);b=c}else b=[],a.isRepeating?b=document.querySelectorAll(".frm_field_"+a.fieldId+"_container"):(c=document.getElementById("frm_field_"+a.fieldId+"_container"),null!==c&&b.push(c));c=0;for(d=b.length;c<d;c++){ma(a,b[c].id);var e=a,f=b[c];e.parentVals=X(e);if("select"==e.inputType)Ya(e,f);else if("radio"==e.inputType||"checkbox"==e.inputType)if(!1===e.parentVals){var h=f.getElementsByTagName("input");ya(e,f);Z(h)}else Za(e,f)}}else if("value changed"===
31
- c)for(c="field_"+a.fieldKey,c=a.isRepeating?""!==b.repeatingSection?'[id="'+c+"-"+b.repeatRow+'"]':'[id^="'+c+'-"]':'[id="'+c+'"]',b=document.querySelectorAll(c),c=0,d=b.length;c<d;c++)e=a,f=G(b[c].name),e.repeatRow=""!==f.repeatRow?f.repeatRow:"",e=a,f=b[c],e.parentVals=X(e),wa(e,f)}function W(a){return"undefined"===typeof __FRMLOOKUP||"undefined"===typeof __FRMLOOKUP[a]?!1:__FRMLOOKUP[a]}function X(a){for(var b=[],c=a.parents,d,e=0,f=c.length;e<f;e++){d=W(c[e]);d=sa(d,a);if(""===d||!1===d){b=!1;
32
- break}b[e]=d}return b}function T(a){for(var b=!1,c=a.length,d=0;d<c;d++)if("hidden"==a[d].type||a[d].checked){b=a[d].value;break}return b}function Ya(a,b){var c=b.getElementsByTagName("SELECT")[0];if(null!==c){var d=c.value;!1===a.parentVals?(c.options.length=1,""!==d&&(c.value="",J(c),t(jQuery(c),a.fieldKey))):(a.isReadOnly=c.disabled,$a(c),jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_replace_lookup_field_options",parent_fields:a.parents,parent_vals:a.parentVals,field_id:a.fieldId,
33
- nonce:frm_js.nonce},success:function(b){var d=c.value;b=JSON.parse(b);for(var e=c.options.length;0<e;e--)c.remove(e);for(var g=b.length,e=0;e<g;e++)c.options[e+1]=new Option(b[e],b[e],!1,!1);c.value=d;""===c.value&&(b=c.getAttribute("data-frmval"),null!==b&&(c.value=b));!1===a.isReadOnly&&(c.disabled=!1);c.className=c.className.replace(" frm_loading_lookup","");J(c);c.value!=d&&t(jQuery(c),a.fieldKey)}}))}}function J(a){-1<a.className.indexOf("frm_chzn")&&jQuery().chosen&&jQuery(a).trigger("chosen:updated")}
34
- function $a(a){a.className+=" frm_loading_lookup";a.disabled=!0;J(a)}function Za(a,b){var c=b.getElementsByClassName("frm_opt_container")[0],d=c.getElementsByTagName("input");ab(b,c);var e="",e="radio"==a.inputType?T(d):I(d),f=jQuery(d[0]).data("frmval");jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_replace_cb_radio_lookup_options",parent_fields:a.parents,parent_vals:a.parentVals,field_id:a.fieldId,container_field_id:bb(a),row_index:a.repeatRow,current_value:e,default_value:f,nonce:frm_js.nonce},
35
- success:function(e){c.innerHTML=e;e=b.getElementsByClassName("frm-loading-img")[0];null!==e&&void 0!==e&&e.parentNode.removeChild(e);c.style.display="block";1==d.length&&""===d[0].value?ya(a,b):(!1!==B(b.id,a.formId)&&(e=P(a.fieldId),!1===e||1>e.conditions.length?(D(b.id,a.formId),jQuery("#"+b.id).show()):(e.containerId=b.id,e.repeatRow=a.repeatRow,na(e))),void 0!==f&&(!1!==("radio"==a.inputType?T(d):I(d))||1>d.length||va(d[0].name,f)));t(jQuery(d[0]),a.fieldKey)}})}function bb(a){var b="";"0"!==
36
- a.inSection?b=a.inSection:"0"!==a.inEmbedForm&&(b=a.inEmbedForm);return b}function ya(a,b){B(b.id,a.formId)||(jQuery("#"+b.id).hide(),xa(b.id,a.formId))}function wa(a,b){if(!V(b,a.formId))if(!1===a.parentVals){var c=b.getAttribute("data-frmval");null===c&&(c="");za(a,b,c)}else jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_get_lookup_text_value",parent_fields:a.parents,parent_vals:a.parentVals,field_id:a.fieldId,nonce:frm_js.nonce},success:function(c){b.value!=c&&za(a.fieldKey,b,c)}})}
37
- function za(a,b,c){b.value=c;t(jQuery(b),a)}function Ua(a,b){if(b){var c=jQuery("#"+a.containerId);Aa(c)}jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_fields_ajax_get_data",entry_id:a.dataLogic.actualValue,current_field:a.fieldId,hide_id:a.containerId,on_current_page:b,nonce:frm_js.nonce},success:function(d){if(b){var e=c.find(".frm_opt_container");e.html(d);var f=e.children("input"),h=f.val();Ba(e);""===d||""===h?R(a,!0):Ca(a,c,f,!0)}else e="field_"+a.fieldKey,""!==a.repeatRow&&
38
- (e+="-"+a.repeatRow),e=document.getElementById(e),e.value=d,B(a.containerId,a.formId)&&D(a.containerId,a.formId),t(jQuery(e))}})}function Va(a,b){var c=jQuery("#"+a.containerId),d=c.find('select[name^="item_meta"], input[name^="item_meta"]'),e=Da(d),d=d.data("frmval"),f=c.closest("form").find('input[name="id"]').val();Aa(c);jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_fields_ajax_data_options",trigger_field_id:a.dataLogic.fieldId,entry_id:a.dataLogic.actualValue,field_id:a.fieldId,
39
- default_value:d,container_id:a.containerId,editing_entry:f,prev_val:e,nonce:frm_js.nonce},success:function(b){var d=c.find(".frm_opt_container");d.html(b);var f=d.find('select, input[type="checkbox"], input[type="radio"]');Ba(d);""===b||1>f.length?R(a,!0):(b=Da(f),Ca(a,c,f,e!==b))}})}function Aa(a){var b=a.html();-1<b.indexOf("frm-loading-img")||(a.html(b+'<span class="frm-loading-img"></span>'),a.find(".frm_opt_container").hide())}function ab(a,b){if(!(-1<a.innerHTML.indexOf("frm-loading-img"))){b.style.display=
40
- "none";var c=document.createElement("span");c.setAttribute("class","frm-loading-img");a.insertBefore(c,b.nextSibling)}}function Ba(a){a.parent().children(".frm-loading-img").remove();a.show()}function Da(a){var b=[],c="";a.each(function(){c=this.value;"radio"===this.type||"checkbox"===this.type?!0===this.checked&&b.push(c):""!==c&&b.push(c)});0===b.length&&(b="");return b}function Ca(a,b,c,d){B(a.containerId,a.formId)&&(D(a.containerId,a.formId),b.show());c.hasClass("frm_chzn")&&ba();!0===d&&t(c)}
41
- function N(a,b){if("undefined"!==typeof __FRMCALC){var c=__FRMCALC,d=c.fields[a];if("undefined"!==typeof d)for(var d=d.total,e=[],f=0,h=d.length;f<h;f++){var g;g=c.calc[d[f]];var k=b.attr("name"),n=!1,l=g.field_id,m=E(g.form_id);1>m.length||("0"===g.inSection&&"0"===g.inEmbedForm?n=K(l,m):(k=G(k),K(l,m)?n=!0:Ea(l,k,m)?n=!0:"0"!==g.inSection&&"0"!==g.inEmbedForm?n=Ea(g.inSection,k,m):"0"!==g.inSection?n=K(g.inSection,m):"0"!==g.inEmbedForm&&(n=K(g.inEmbedForm,m))));g=n;!1===g&&Y(c,d[f],e,b)}}}function K(a,
42
- b){return-1<b.indexOf("frm_field_"+a+"_container")}function Ea(a,b,c){var d=!1;b.repeatingSection&&(a="frm_field_"+a+"-"+b.repeatingSection,a+="-"+b.repeatRow+"_container",d=-1<c.indexOf(a));return d}function Y(a,b,c,d){var e=a.calc[b],f=e.calc,h=jQuery(document.getElementById("field_"+b)),g={triggerField:d,inSection:!1,thisFieldCall:'input[id^="field_'+b+'-"]'};1>h.length&&"undefined"!==typeof d&&(g.inSection=!0,g.thisFieldId=cb(a.fieldsWithCalc,b),h=Fa(g));if(!(1>h.length)){f=db(e,f,a,c,g);if("text"!=
43
- e.calc_type){a=e.calc_dec;-1<f.indexOf(").toFixed(")&&(c=f.split(").toFixed("),Ga(c[1])&&(a=c[1],f=f.replace(").toFixed("+a,"")));f=parseFloat(eval(f));if("undefined"===typeof f||isNaN(f))f=0;Ga(a)&&(f=f.toFixed(a))}h.val()!=f&&(h.val(f),t(h,b))}}function db(a,b,c,d,e){for(var f=0,h=a.fields.length;f<h;f++){var g={triggerField:e.triggerField,thisFieldId:a.fields[f],inSection:e.inSection,valKey:e.inSection+""+a.fields[f],thisField:c.fields[a.fields[f]],thisFieldCall:"input"+c.fieldKeys[a.fields[f]]},
44
- k=c;"checkbox"==g.thisField.type||"radio"==g.thisField.type||"scale"==g.thisField.type?g.thisFieldCall=g.thisFieldCall+":checked,"+g.thisFieldCall+"[type=hidden]":"select"==g.thisField.type||"time"==g.thisField.type?g.thisFieldCall="select"+k.fieldKeys[g.thisFieldId]+" option:selected,"+g.thisFieldCall+"[type=hidden]":"textarea"==g.thisField.type&&(g.thisFieldCall=g.thisFieldCall+",textarea"+k.fieldKeys[g.thisFieldId]);if("text"==a.calc_type)g.valKey="text"+g.valKey,d=eb(g,d),"undefined"===typeof d[g.valKey]&&
45
- (d[g.valKey]="");else{g.valKey="num"+g.valKey;d=fb(g,c,d);if("undefined"===typeof d[g.valKey]||isNaN(d[g.valKey]))d[g.valKey]=0;"date"==g.thisField.type&&0===d[g.valKey]&&(b="")}k="["+g.thisFieldId+"]";k=k.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1");b=b.replace(new RegExp(k,"g"),d[g.valKey])}return b}function fb(a,b,c){if("undefined"!==typeof c[a.valKey]&&0!==c[a.valKey])return c;c[a.valKey]=0;var d=Ha(a);if(!1===d)return c;d.each(function(){var d=Ia(a.thisField,this);if("date"==a.thisField.type){var f;
46
- f=b.date;var h=0;if(d)if("undefined"===typeof jQuery.datepicker){h="-";-1<f.indexOf("/")&&(h="/");f=f.split(h);var d=d.split(h),g,k;g=h=k="";for(var n=0;n<f.length;n++)if("y"==f[n])g=((new Date).getFullYear()+15).toString().substr(2,2),g=d[n]>g?"19"+d[n]:"20"+d[n];else if("yy"==f[n])g=d[n];else if("m"==f[n]||"mm"==f[n])h=d[n],2>h.length&&(h="0"+h);else if("d"==f[n]||"dd"==f[n])k=d[n],2>k.length&&(k="0"+k);h=Date.parse(g+"-"+h+"-"+k)}else h=jQuery.datepicker.parseDate(f,d);f=h;null!==f&&(c[a.valKey]=
47
- Math.ceil(f/864E5))}else{f=d;""!==f&&0!==f&&(f=f.trim(),f=parseFloat(f.replace(/,/g,"").match(/-?[\d\.]+$/)));if("undefined"===typeof f||isNaN(f)||""===f)f=0;c[a.valKey]+=f}});return c}function eb(a,b){if("undefined"!==typeof b[a.valKey]&&""!==b[a.valKey])return b;b[a.valKey]="";var c=Ha(a);if(!1===c)return b;var d=0,e="";c.each(function(){var c=Ia(a.thisField,this),c=c.trim();0<d&&("time"==a.thisField.type?1==d?e=":":2==d&&(e=" "):e=", ");""!==c&&(b[a.valKey]+=e+c,d++)});return b}function Ha(a){var b;
48
- if(!1===a.inSection)b=jQuery(a.thisFieldCall);else if(b=Fa(a),null===b||"undefined"===typeof b)b=jQuery(a.thisFieldCall);if(null===b||"undefined"===typeof b||1>b.length)b=!1;return b}function Fa(a){if("undefined"===typeof a.triggerField)return null;var b=a.triggerField.closest(".frm_repeat_sec, .frm_repeat_inline, .frm_repeat_grid");return b.length?(a=a.thisFieldCall.replace("[id=","[id^="),b.find(a)):null}function Ia(a,b){var c;c=!1;if("hidden"==b.type)""!==ca(b)&&(c=!0);else if("select"==a.type){var d=
49
- b.className;d&&-1<d.indexOf("frm_other_trigger")&&(c=!0)}else("checkbox"==a.type||"radio"==a.type)&&-1<b.id.indexOf("-other_")&&0>b.id.indexOf("-otext")&&(c=!0);c?(c=0,"select"==a.type?"hidden"==b.type?(d=!1,2<b.name.split("[").length&&(d=!0),d||(c=ca(b))):c=jQuery(b).closest(".frm_other_container").find(".frm_other_input").val():"checkbox"!=a.type&&"radio"!=a.type||"hidden"==b.type||(c=ca(b))):c="checkbox"!==b.type&&"radio"!==b.type||!b.checked?jQuery(b).val():b.value;"undefined"===typeof c&&(c=
50
- "");return c}function ca(a){var b="";a=document.getElementById(a.id+"-otext");null!==a&&""!==a.value&&(b=a.value);return b}function Ja(a){var b=!1;a=jQuery(a).find(".frm_saving_draft");a.length&&(b=a.val());return b}function Ka(a){var b=!1,c=jQuery(a).find(".frm_next_page");if(c.length&&c.val()){var d=jQuery(a).find('input[name="form_id"]').val();a=jQuery(a).find('input[name="frm_page_order_'+d+'"]');a=a.length?a.val():0;if(!a||c.val()<a)b=!0}return b}function ia(a,b){var c=a.getAttribute("data-frmfile");
51
- if("hidden"==a.type&&null===c)return b;var d="",e="";if("checkbox"==a.type||"radio"==a.type)c=jQuery('input[name="'+a.name+'"]').closest(".frm_required_field").find("input:checked"),jQuery(c).each(function(){d=this.value});else if("file"==a.type||c)"undefined"===typeof c&&(c=p(a,!0),c=c.replace("file","")),"undefined"===typeof b[c]&&(d=gb(c)),e=c;else{c=a.className;if(-1!==c.indexOf("frm_pos_none"))return b;d=jQuery(a).val();if(null===d)d="";else if("string"!==typeof d)for(var e=d,d="",f=0;f<e.length;f++)""!==
52
- e[f]&&(d=e[f]);e=-1===c.indexOf("frm_other_input")?p(a,!0):p(a,!1);-1!==c.indexOf("frm_time_select")&&(e=e.replace("-H","").replace("-m",""))}""===d&&(""===e&&(e=p(a,!0)),e in b||(b[e]=F(a,"data-reqmsg")));return b}function gb(a){var b="";jQuery('input[name="file'+a+'"], input[name="file'+a+'[]"], input[name^="item_meta['+a+']"]').each(function(){""===b&&(b=this.value)});return b}function ja(a,b,c){var d=a.value,e=p(a,!0);if(e in b)return b;var f=0===e.indexOf("conf_");if(""!==d||f){var h=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i,
53
- g=F(a,"data-invmsg");""!==d&&!1===h.test(d)?(b[e]=g,f&&(b[e.replace("conf_","")]="")):f&&(a=a.name.replace("conf_",""),c.filter('[name="'+a+'"]').val()!==d&&(b[e]="",b[e.replace("conf_","")]=""))}return b}function ka(a,b){var c=a.value;""!==c&&!1!==isNaN(c/1)&&(c=p(a,!0),c in b||(b[c]=F(a,"data-invmsg")));return b}function la(a,b){var c=a.value,d=F(a,"pattern");if(""!==d&&""!==c){var e=p(a,!0);e in b||(d=new RegExp("^"+d+"$","i"),!1===d.test(c)&&(b[e]=F(a,"data-invmsg")))}return b}function F(a,b){var c=
54
- a.getAttribute(b);null===c&&(c="");return c}function hb(a,b){"undefined"==typeof b&&jQuery(a).find('input[name="frm_action"]').val();var c=jQuery(a).find(".frm_form_field");c.addClass("frm_doing_ajax");jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:jQuery(a).serialize()+"&action=frm_entries_"+b+"&nonce="+frm_js.nonce,success:function(b){var d={content:"",errors:{},pass:!1};null===b&&(b=d);b=b.replace(/^\s+|\s+$/g,"");b=0===b.indexOf("{")?jQuery.parseJSON(b):d;if("undefined"!=typeof b.redirect)window.location=
55
- b.redirect;else if(""!==b.content){M(jQuery(a));-1!=frm_js.offset&&frmFrontForm.scrollMsg(jQuery(a),!1);var f=jQuery(a).find('input[name="form_id"]').val();b.content=b.content.replace(/ frm_pro_form /g," frm_pro_form frm_no_hide ");jQuery(a).closest(".frm_forms").replaceWith(b.content);d=b;if(history.pushState&&"undefined"!=typeof d.page){var h,g=d.page;h=encodeURI("frm_page");for(var g=encodeURI(g),k=document.location.search.substr(1).split("&"),n=k.length,l;n--;)if(l=k[n].split("="),l[0]==h){l[1]=
56
- g;k[n]=l.join("=");break}0>n&&(k[k.length]=[h,g].join("="));h=k.join("&");window.history.pushState({html:d.html},"","?"+h)}"function"==typeof frmThemeOverride_frmAfterSubmit&&(f=jQuery('input[name="frm_page_order_'+f+'"]').val(),d=jQuery(b.content).find('input[name="form_id"]').val(),frmThemeOverride_frmAfterSubmit(d,f,b.content,a));f=jQuery(a).find('input[name="id"]');f.length&&jQuery(document.getElementById("frm_edit_"+f.val())).find("a").addClass("frm_ajax_edited").click();jQuery(b.content).find(".frm_message").length&&
57
- da("pageLoad");ea()}else if(Object.keys(b.errors).length){M(jQuery(a),"enable");d=!0;La();h=!1;for(f in b.errors)g=jQuery(a).find("#frm_field_"+f+"_container"),g.length&&(g.is(":visible")||(k=g.closest(".frm_toggle_container"),k.length&&(k=k.prev(),k.hasClass("frm_trigger")||(k=k.prev(".frm_trigger")),k.click())),g.is(":visible")&&(O(g,f,b.errors),d=!1,g=jQuery(a).find("#frm_field_"+f+"_container .frm-g-recaptcha, #frm_field_"+f+"_container .g-recaptcha"),g.length&&(h=!0,g=g.data("rid"),jQuery().grecaptcha&&
58
- (g?grecaptcha.reset(g):grecaptcha.reset()))));c.removeClass("frm_doing_ajax");Ma(a);!0!==h&&Na(a,!1);d?a.submit():jQuery(a).prepend(b.error_message)}else ib(a),Na(a,!0),a.submit()},error:function(){jQuery(a).find('input[type="submit"], input[type="button"]').removeAttr("disabled");a.submit()}})}function O(a,b,c){a.length&&a.is(":visible")&&(a.addClass("frm_blank_field"),"function"==typeof frmThemeOverride_frmPlaceError?frmThemeOverride_frmPlaceError(b,c):a.append('<div class="frm_error">'+c[b]+"</div>"))}
59
- function La(){jQuery(".form-field").removeClass("frm_blank_field");jQuery(".form-field .frm_error").replaceWith("");jQuery(".frm_error_style").remove()}function Ma(a){var b=jQuery(a).find(".frm_blank_field:first");b.length&&frmFrontForm.scrollMsg(b,a,!0)}function fa(a){a.hasClass("frm_loading_form")||a.addClass("frm_loading_form");a.find('input[type="submit"], input[type="button"], button[type="submit"]').attr("disabled","disabled")}function M(a,b){a.removeClass("frm_loading_form");"enable"==b&&a.find('input[type="submit"], input[type="button"], button[type="submit"]').removeAttr("disabled")}
60
- function ib(a){var b=document.getElementById("frm_loading");null!==b&&(a=jQuery(a).find("input[type=file]").val(),"undefined"!=typeof a&&""!==a&&setTimeout(function(){jQuery(b).fadeIn("slow")},2E3))}function Na(a,b){var c=jQuery(a).find(".frm-g-recaptcha, .g-recaptcha");c.length&&(!b||1>jQuery(a).find(".frm_next_page").length||1>jQuery(a).find(".frm_next_page").val())&&c.closest(".frm_form_field").replaceWith('<input type="hidden" name="recaptcha_checked" value="'+frm_js.nonce+'">')}function jb(){Oa(jQuery(this),
61
- "clear")}function kb(){Oa(jQuery(this),"replace")}function Oa(a,b){var c=a.data("frmval").replace(/(\n|\r\n)/g,"\r");if(""===c||"undefined"==typeof c)return!1;var d=a.val().replace(/(\n|\r\n)/g,"\r");"replace"==b?""===d&&a.addClass("frm_default").val(c):d==c&&a.removeClass("frm_default").val("")}function lb(){var a=jQuery(this),b=a.data("eid"),c=a.data("fid");a.append('<span class="spinner" style="display:inline"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_send_email",
62
- entry_id:b,form_id:c,nonce:frm_js.nonce},success:function(b){a.replaceWith(b)}});return!1}function mb(a,b){google.load("visualization","1.0",{packages:[b],callback:function(){var b=new google.visualization.DataTable,d=!1;-1!==jQuery.inArray("id",a.options.fields)&&(d=!0,b.addColumn("number",frm_js.id));for(var e=a.fields.length,f,h=0,g=e;h<g;h++){var k=a.fields[h];f=Pa(k);b.addColumn(f,k.name)}h=!1;a.options.edit_link&&(h=!0,b.addColumn("string",a.options.edit_link));g=!1;a.options.delete_link&&(g=
63
- !0,b.addColumn("string",a.options.delete_link));if(null!==a.entries){var l=a.entries.length;b.addRows(l);for(var m=0,q=0;q<l;q++){var k=0,p=a.entries[q];d&&(b.setCell(m,k,p.id),k++);for(var r=0,t=e;r<t;r++){var u=a.fields[r];f=Pa(u);u=p.metas[u.id];"number"!=f||null!==u&&""!==u?"boolean"==f&&(u=null===u||"false"==u||!1===u?!1:!0):u=0;b.setCell(m,k,u);k++}h&&("undefined"!==typeof p.editLink?b.setCell(m,k,'<a href="'+p.editLink+'">'+a.options.edit_link+"</a>"):b.setCell(m,k,""),k++);g&&("undefined"!==
64
- typeof p.deleteLink?b.setCell(m,k,'<a href="'+p.deleteLink+'" class="frm_delete_link" data-frmconfirm="'+a.options.confirm+'">'+a.options.delete_link+"</a>"):b.setCell(m,k,""));m++}}else for(b.addRows(1),h=k=0,g=e;h<g;h++)0<k?b.setCell(0,k,""):b.setCell(0,k,a.options.no_entries),k++;(new google.visualization.Table(document.getElementById("frm_google_table_"+a.options.form_id))).draw(b,a.graphOpts)}})}function nb(a){google.load("visualization","1.0",{packages:[a["package"]],callback:function(){var b;
65
- new google.visualization.DataTable;b=google.visualization.arrayToDataTable(a.data);var c=document.getElementById("chart_"+a.graph_id);if(null!==c){var d=a.type.charAt(0).toUpperCase()+a.type.slice(1);"Histogram"!==d&&"Table"!==d&&(d+="Chart");(new google.visualization[d](c)).draw(b,a.options)}}})}function Pa(a){var b="string";if("number"==a.type)b="number";else if("checkbox"==a.type||"select"==a.type){var c=a.options.length;"select"==a.type&&""===a.options[0]&&(c="post_status"==a.field_options.post_field?
66
- 3:c-1);1==c&&(b="boolean")}return b}function ob(){var a=jQuery(this).data("key"),b=jQuery(this).data("parent"),c="frm_section_"+b+"-"+a,d=jQuery(document.getElementById(c)),e=d.find("input, select, textarea"),f=jQuery(this).closest("form").find('input[name="form_id"]').val();d.fadeOut("slow",function(){d.remove();e.each(function(){var c=p(this,!1);"file"!=this.type&&N(c,jQuery(this));D("frm_field_"+c+"-"+b+"-"+a+"_container",f)});"function"==typeof frmThemeOverride_frmRemoveRow&&frmThemeOverride_frmRemoveRow(c,
67
- d)});return!1}function pb(){if(!0===L)return!1;L=!0;var a=jQuery(this).data("parent"),b=0;if(0<jQuery(".frm_repeat_"+a).length)var c=jQuery(".frm_repeat_"+a+":last").attr("id").replace("frm_section_"+a+"-",""),b=-1<c.indexOf("i")?1:1+parseInt(c);jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"json",data:{action:"frm_add_form_row",field_id:a,i:b,nonce:frm_js.nonce},success:function(c){var d=c.html,f=jQuery(d).hide().fadeIn("slow");jQuery(".frm_repeat_"+a+":last").after(f);var h=["other"],g,
68
- k,l={repeatingSection:a.toString(),repeatRow:b.toString()};jQuery(d).find("input, select, textarea").each(function(){if("file"!=this.type){if(""===this.name)return!0;g=this.name.replace("item_meta[","").split("]")[2].replace("[","");-1==jQuery.inArray(g,h)&&!1!==this.id&&""!==this.id&&(k=jQuery("#"+this.id),h.push(g),H(g,l),aa(g,l,"value changed"),ga(g,k),ha(g,k,"value changed"),N(g,k))}});r(l.repeatRow);Qa();ba();"function"==typeof frmThemeOverride_frmAddRow&&frmThemeOverride_frmAddRow(a,c);L=!1},
69
- error:function(){L=!1}});return!1}function qb(){var a=jQuery(this),b=a.data("entryid"),c=a.data("prefix"),d=a.data("pageid"),e=a.data("formid"),f=a.data("cancel"),h=a.data("fields"),g=a.data("excludefields"),k=jQuery(document.getElementById(c+b)),l=k.html();k.html('<span class="frm-loading-img" id="'+c+b+'"></span><div class="frm_orig_content" style="display:none">'+l+"</div>");jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"html",data:{action:"frm_entries_edit_entry_ajax",post_id:d,entry_id:b,
70
- id:e,nonce:frm_js.nonce,fields:h,exclude_fields:g},success:function(b){k.children(".frm-loading-img").replaceWith(b);a.removeClass("frm_inplace_edit").addClass("frm_cancel_edit");a.html(f);da("editInPlace");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"]',z);ea()}});return!1}function rb(){var a=jQuery(this),b=a.data("entryid"),c=a.data("prefix"),d=a.data("edit");a.hasClass("frm_ajax_edited")||
71
- (b=jQuery(document.getElementById(c+b)),b.children(".frm_forms").replaceWith(""),b.children(".frm_orig_content").fadeIn("slow").removeClass("frm_orig_content"));a.removeClass("frm_cancel_edit").addClass("frm_inplace_edit");a.html(d);return!1}function sb(){var a=jQuery(this),b=a.data("deleteconfirm");if(confirm(b)){var c=a.data("entryid"),d=a.data("prefix");a.replaceWith('<span class="frm-loading-img" id="frm_delete_'+c+'"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_destroy",
72
- entry:c,nonce:frm_js.nonce},success:function(a){if("success"==a.replace(/^\s+|\s+$/g,"")){var b=jQuery(document.getElementById(d+c));b.fadeOut("slow",function(){b.remove()});jQuery(document.getElementById("frm_delete_"+c)).fadeOut("slow")}else jQuery(document.getElementById("frm_delete_"+c)).replaceWith(a)}})}return!1}function ea(){"undefined"!==typeof __frmHideFields&&frmFrontForm.hidePreviouslyHiddenFields();jQuery(document).on("focusin",".frm_date",q);if("undefined"!==typeof __frmMasks)for(var a=
73
- __frmMasks,b=0;b<a.length;b++)jQuery(a[b].trigger).attr("data-frmmask",a[b].mask);Qa();ba();"undefined"!==typeof __frmDepDynamicFields&&frmFrontForm.checkDependentDynamicFields(__frmDepDynamicFields);"undefined"!==typeof __frmDepLookupFields&&frmFrontForm.checkDependentLookupFields(__frmDepLookupFields);if("undefined"!==typeof __FRMCALC){(a=__FRMCALC.triggers)&&jQuery(a.join()).trigger({type:"change",selfTriggered:!0});var a=__FRMCALC.calc,b=[],c;for(c in a)if(1>a[c].fields.length){var d=document.getElementById("field_"+
74
- c);null===d||V(d,a[c].form_id)||Y(__FRMCALC,c,b)}}r()}function ba(){if(jQuery().chosen){var a={allow_single_deselect:!0,no_results_text:frm_js.no_results};"undefined"!==typeof __frmChosen&&(a="{"+__frmChosen+"}");jQuery(".frm_chzn").chosen(a)}}function Qa(){if(jQuery().rating){var a=jQuery(".star");a.length&&a.rating()}}function da(a){"undefined"!==typeof __frmHideOrShowFields?frmFrontForm.hideOrShowFields(__frmHideOrShowFields,a):Ra()}function Ra(){jQuery(".frm_pro_form").fadeIn("slow")}function t(a,
75
- b){"undefined"===typeof b&&(b="dependent");1<a.length&&(a=a.eq(0));a.trigger({type:"change",selfTriggered:!0,frmTriggered:b})}function G(a){var b={repeatingSection:"",repeatRow:""};"undefined"!==typeof a&&3<=a.split("][").length&&(a=a.split("]["),b.repeatingSection=a[0].replace("item_meta[",""),b.repeatRow=a[1]);return b}function Sa(a){a.fadeOut("slow",function(){a.remove()})}function tb(){var a=jQuery(this).data("frmconfirm");return confirm(a)}function ub(){var a=jQuery(this).data("frmtoggle");jQuery(a).is(":visible")?
76
- jQuery(a).slideUp("fast"):jQuery(a).slideDown("fast");return!1}function cb(a,b){for(var c in a)if(a.hasOwnProperty(c)&&a[c]===b)return c;return null}function Ga(a){return!jQuery.isArray(a)&&0<=a-parseFloat(a)+1}function vb(){Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c=this.length>>>0,d=Number(b)||0,d=0>d?Math.ceil(d):Math.floor(d);for(0>d&&(d+=c);d<c;d++)if(d in this&&this[d]===a)return d;return-1})}function wb(){"function"!==typeof String.prototype.trim&&(String.prototype.trim=
77
- function(){return this.replace(/^\s+|\s+$/g,"")})}function xb(){Array.prototype.filter||(Array.prototype.filter=function(a,b){if(void 0===this||null===this)throw new TypeError;var c=Object(this),d=c.length>>>0;if("function"!==typeof a)throw new TypeError;for(var e=[],f=0;f<d;f++)if(f in c){var h=c[f];a.call(b,h,f,c)&&e.push(h)}return e})}function yb(){Object.keys||(Object.keys=function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b})}var L=!1,C="",w=[];return{init:function(){jQuery(document).on("click",
78
- ".frm_button_submit",function(){jQuery(this).closest("form").submit()});jQuery(document).off("submit.formidable",".frm-show-form");jQuery(document).on("submit.formidable",".frm-show-form",frmFrontForm.submitForm);jQuery(document).on("click",".frm_trigger",m);var a=jQuery(".frm_blank_field");a.length&&a.closest(".frm_toggle_container").prev(".frm_trigger").click();jQuery.isFunction(jQuery.fn.placeholder)?jQuery(".frm-show-form input, .frm-show-form textarea").placeholder():jQuery(".frm-show-form input[onblur], .frm-show-form textarea[onblur]").each(function(){""===
79
- jQuery(this).val()&&jQuery(this).blur()});jQuery(document).on("focus",".frm_toggle_default",jb);jQuery(document).on("blur",".frm_toggle_default",kb);jQuery(".frm_toggle_default").blur();jQuery(document.getElementById("frm_resend_email")).click(lb);jQuery(document).on("click",".frm_remove_link",A);jQuery(document).on("focusin","input[data-frmmask]",function(){jQuery(this).mask(jQuery(this).data("frmmask").toString())});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"]',
80
- z);jQuery(document).on("click",'.frm-show-form input[type="submit"], .frm-show-form input[name="frm_prev_page"], .frm_page_back, .frm_page_skip, .frm-show-form .frm_save_draft, .frm_prev_page, .frm_button_submit',l);jQuery(document).on("change",'.frm_other_container input[type="checkbox"], .frm_other_container input[type="radio"], .frm_other_container select',v);jQuery(document).on("click",".frm_remove_form_row",ob);jQuery(document).on("click",".frm_add_form_row",pb);jQuery(document).on("click","a[data-frmconfirm]",
81
- tb);jQuery("a[data-frmtoggle]").click(ub);jQuery(".frm_edit_link_container").on("click","a.frm_inplace_edit",qb);jQuery(".frm_edit_link_container").on("click","a.frm_cancel_edit",rb);jQuery(document).on("click",".frm_ajax_delete",sb);jQuery(".frm_month_heading, .frm_year_heading").click(function(){var a=jQuery(this).children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s");a.hasClass("ui-icon-triangle-1-e")?(a.addClass("ui-icon-triangle-1-s").removeClass("ui-icon-triangle-1-e"),jQuery(this).next(".frm_toggle_container").fadeIn("slow")):
82
- (a.addClass("ui-icon-triangle-1-e").removeClass("ui-icon-triangle-1-s"),jQuery(this).next(".frm_toggle_container").hide())});da("pageLoad");ea();vb();wb();xb();yb()},submitForm:function(a){frmFrontForm.submitFormManual(a,this)},submitFormManual:function(a,b){var c=b.className.trim().split(/\s+/gi);if((!c||-1<c.indexOf("frm_pro_form"))&&!jQuery("body").hasClass("wp-admin")){a.preventDefault();var d=frmFrontForm.validateFormSubmit(b);0===Object.keys(d).length&&(fa(jQuery(b)),-1<c.indexOf("frm_ajax_submit")?
83
- 1>jQuery(b).find('input[type="file"]').filter(function(){return!!this.value}).length?(C=jQuery(b).find('input[name="frm_action"]').val(),frmFrontForm.checkFormErrors(b,C)):b.submit():b.submit())}},validateFormSubmit:function(a){"undefined"!=typeof tinyMCE&&jQuery(a).find(".wp-editor-wrap").length&&tinyMCE.triggerSave();w=[];var b=jQuery(a).hasClass("frm_js_validate");b&&(Ja(a)||Ka(a))&&(b=!1);b&&(frmFrontForm.getAjaxFormErrors(a),Object.keys(w).length&&frmFrontForm.addAjaxFormErrors(a));return w},
84
- getAjaxFormErrors:function(a){var b=[],c=jQuery(a).find(".frm_required_field:visible input, .frm_required_field:visible select, .frm_required_field:visible textarea").filter(":not(.frm_optional)");if(c.length)for(var d=0,e=c.length;d<e;d++)b=ia(c[d],b);c=jQuery(a).find("input[type=email]").filter(":visible");d=jQuery(a).find("input,select,textarea");if(d.length)for(var e=0,f=d.length;e<f;e++){var h=d[e];""!==h.value&&"hidden"!=h.type&&("number"==h.type?b=ka(h,b):"email"==h.type?b=ja(h,b,c):null!==
85
- h.pattern&&(b=la(h,b)))}c=jQuery(a).find(".frm-g-recaptcha");c.length&&(d=c.data("rid"),0===grecaptcha.getResponse(d).length&&(c=c.closest(".frm_form_field").attr("id").replace("frm_field_","").replace("_container",""),b[c]=""));w=b;if("function"==typeof frmThemeOverride_jsErrors&&(C=jQuery(a).find('input[name="frm_action"]').val(),a=frmThemeOverride_jsErrors(C,a),Object.keys(a).length))for(var g in a)w[g]=a[g];return w},addAjaxFormErrors:function(a){La();for(var b in w){var c=jQuery(a).find("#frm_field_"+
86
- b+"_container");c.length?O(c,b,w):delete w[b]}Ma(a)},checkFormErrors:function(a,b){hb(a,b)},scrollToID:function(a){a=jQuery(document.getElementById(a));frmFrontForm.scrollMsg(a,!1)},scrollMsg:function(a,b,c){if("undefined"==typeof b){if(a=jQuery(document.getElementById("frm_form_"+a+"_container")),1>a.length)return}else a="string"==typeof a?jQuery(b).find("#frm_field_"+a+"_container"):a;if(a=a.offset().top){a-=frm_js.offset;b=jQuery("html").css("margin-top");var d=jQuery("body").css("margin-top");
87
- if(b||d)a=a-parseInt(b)-parseInt(d);if(a&&window.innerHeight&&(b=document.documentElement.scrollTop||document.body.scrollTop,a>b+window.innerHeight||a<b))return"undefined"===typeof c?jQuery(window).scrollTop(a):jQuery("html,body").animate({scrollTop:a},500),!1}},savingDraft:function(a){return Ja(a)},goingToPreviousPage:function(a){return Ka(a)},hideOrShowFields:function(a,b){if("pageLoad"===b){var c=document.querySelectorAll('[id^="frm_hide_fields_"]');Z(c)}for(var c={repeatingSection:"",repeatRow:""},
88
- d=0,e=a.length;d<e;d++)H(a[d],c),d==e-1&&Ra()},hidePreviouslyHiddenFields:function(){var a;a=[];for(var b=document.querySelectorAll('*[id^="frm_hide_fields_"]'),c=b.length,d,e=0;e<c;e++)d=b[e].id.replace("frm_hide_fields_",""),a=a.concat(E(d));b=0;for(c=a.length;b<c;b++)d=document.getElementById(a[b]),null!==d&&(d.style.display="none")},checkDependentDynamicFields:function(a){for(var b={repeatingSection:"",repeatRow:""},c=0,d=a.length;c<d;c++)H(a[c],b)},checkDependentLookupFields:function(a){for(var b,
89
- c={repeatingSection:"",repeatRow:""},d=0,e=a.length;d<e;d++)b=a[d],aa(b,c,"value changed")},loadGoogle:function(){if("undefined"!==typeof google&&google&&google.load)for(var a=__FRMTABLES,b=Object.keys(a),c=0;c<b.length;c++)if("graphs"===b[c])for(var d=a[b[c]],e=0,f=d.length;e<f;e++)nb(d[e]);else for(d=a[b[c]],e=b[c],f=0;f<d.length;f++)mb(d[f],e);else setTimeout(frmFrontForm.loadGoogle,30)},removeUsedTimes:function(a,b){console.warn("DEPRECATED: function frmFrontForm.removeUsedTimes v2.03")},escapeHtml:function(a){return a.replace(/&/g,
90
- "&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},invisible:function(a){jQuery(a).css("visibility","hidden")},visible:function(a){jQuery(a).css("visibility","visible")}}}var frmFrontForm=frmFrontFormJS();jQuery(document).ready(function(l){frmFrontForm.init()});document.documentElement.className+=" js";
91
  function frmRecaptcha(){for(var l=jQuery(".frm-g-recaptcha"),m=0,q=l.length;m<q;m++){var r=grecaptcha.render(l[m].id,{sitekey:l[m].getAttribute("data-sitekey"),size:l[m].getAttribute("data-size"),theme:l[m].getAttribute("data-theme")});l[m].setAttribute("data-rid",r)}}
92
  function frmUpdateField(l,m,q,r,x){jQuery(document.getElementById("frm_update_field_"+l+"_"+m)).html('<span class="frm-loading-img"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_update_field_ajax",entry_id:l,field_id:m,value:q,nonce:frm_js.nonce},success:function(){""===r.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById("frm_update_field_"+l+"_"+m+"_"+x)).fadeOut("slow"):jQuery(document.getElementById("frm_update_field_"+l+"_"+m+"_"+x)).replaceWith(r)}})}
93
  function frmEditEntry(l,m,q,r,x,y){console.warn("DEPRECATED: function frmEditEntry in v2.0.13 use frmFrontForm.editEntry");var A=jQuery(document.getElementById("frm_edit_"+l)),v=A.html(),z=jQuery(document.getElementById(m+l)),p=z.html();z.html('<span class="frm-loading-img" id="'+m+l+'"></span><div class="frm_orig_content" style="display:none">'+p+"</div>");jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"html",data:{action:"frm_entries_edit_entry_ajax",post_id:q,entry_id:l,id:r,nonce:frm_js.nonce},
94
- success:function(p){z.children(".frm-loading-img").replaceWith(p);A.replaceWith('<span id="frm_edit_'+l+'"><a onclick="frmCancelEdit('+l+",'"+m+"','"+frmFrontForm.escapeHtml(v)+"',"+q+","+r+",'"+y+'\')" class="'+y+'">'+x+"</a></span>")}})}
95
  function frmCancelEdit(l,m,q,r,x,y){console.warn("DEPRECATED: function frmCancelEdit in v2.0.13 use frmFrontForm.cancelEdit");var A=jQuery(document.getElementById("frm_edit_"+l)),v=A.find("a"),z=v.html();v.hasClass("frm_ajax_edited")||(v=jQuery(document.getElementById(m+l)),v.children(".frm_forms").replaceWith(""),v.children(".frm_orig_content").fadeIn("slow").removeClass("frm_orig_content"));A.replaceWith('<a id="frm_edit_'+l+'" class="frm_edit_link '+y+'" href="javascript:frmEditEntry('+l+",'"+
96
- m+"',"+r+","+x+",'"+frmFrontForm.escapeHtml(z)+"','"+y+"')\">"+q+"</a>")}
97
  function frmDeleteEntry(l,m){console.warn("DEPRECATED: function frmDeleteEntry in v2.0.13 use frmFrontForm.deleteEntry");jQuery(document.getElementById("frm_delete_"+l)).replaceWith('<span class="frm-loading-img" id="frm_delete_'+l+'"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_destroy",entry:l,nonce:frm_js.nonce},success:function(q){"success"==q.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById(m+l)).fadeOut("slow"):jQuery(document.getElementById("frm_delete_"+
98
- l)).replaceWith(q)}})}function frmOnSubmit(l){console.warn("DEPRECATED: function frmOnSubmit in v2.0 use frmFrontForm.submitForm");frmFrontForm.submitForm(l,this)}
99
  function frm_resend_email(l,m){console.warn("DEPRECATED: function frm_resend_email in v2.0");$link=jQuery(document.getElementById("frm_resend_email"));$link.append('<span class="spinner" style="display:inline"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_send_email",entry_id:l,form_id:m,nonce:frm_js.nonce},success:function(l){$link.replaceWith(l)}})};
1
  function frmFrontFormJS(){function l(a){var b=jQuery(this),c=b.attr("type");"submit"!==c&&a.preventDefault();a=b.parents("form:first");var d="",e="",f=this.name;"frm_prev_page"===f||-1!==this.className.indexOf("frm_prev_page")?d=jQuery(a).find(".frm_next_page").attr("id").replace("frm_next_p_",""):"frm_save_draft"===f||-1!==this.className.indexOf("frm_save_draft")?e=1:-1!==this.className.indexOf("frm_page_skip")?(b=b.data("page"),f=jQuery(a).find('input[name="form_id"]').val(),f=jQuery(a).find('input[name="frm_page_order_'+
2
+ f+'"]'),jQuery(a).append('<input name="frm_last_page" type="hidden" value="'+f.val()+'" />'),""===b?f.remove():f.val(b)):-1!==this.className.indexOf("frm_page_back")&&(d=b.data("page"));jQuery(".frm_next_page").val(d);jQuery(".frm_saving_draft").val(e);"submit"!==c&&a.trigger("submit")}function m(){jQuery(this).parent().children(".frm_toggle_container").slideToggle("fast");jQuery(this).toggleClass("active").children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s").toggleClass("ui-icon-triangle-1-s ui-icon-triangle-1-e")}
3
+ function q(){if(-1===this.className.indexOf("frm_custom_date")&&"undefined"!==typeof __frmDatepicker){var a=__frmDatepicker,b=this.id,c='input[id^="'+b.split("-").join("-")+'"]';jQuery.datepicker.setDefaults(jQuery.datepicker.regional[""]);for(var d=0,e=0;e<a.length;e++)if(a[e].triggerID=="#"+b||a[e].triggerID==c)d=e;""!==a[d].options.defaultDate&&(a[d].options.defaultDate=new Date(a[d].options.defaultDate));jQuery(this).datepicker(jQuery.extend(jQuery.datepicker.regional[a[d].locale],a[d].options))}}
4
+ function r(a){if("undefined"!==typeof __frmDropzone)for(var b=__frmDropzone,c=0;c<b.length;c++)x(c,a)}function x(a,b){var c=__frmDropzone,d="#"+c[a].htmlID+"_dropzone",e=c[a].fieldName;"undefined"!==typeof b&&-1!==d.indexOf("-0_dropzone")&&(d=d.replace("-0_dropzone","-"+b+"_dropzone"),e=e.replace("[0]","["+b+"]"),delete c[a].mockFiles);d=jQuery(d);if(!(1>d.length||d.hasClass("dz-clickable"))){var f=c[a].maxFiles;if("undefined"!==typeof c[a].mockFiles){var h=c[a].mockFiles.length;0<f&&(f-=h)}var g=
5
+ d.closest("form"),h="#"+g.attr("id");"#undefined"==h&&(h="form."+g.attr("class").replace(" ","."));d.dropzone({url:frm_js.ajax_url,addRemoveLinks:!0,paramName:d.attr("id").replace("_dropzone",""),maxFilesize:c[a].maxFilesize,maxFiles:f,uploadMultiple:c[a].uploadMultiple,hiddenInputContainer:h,dictDefaultMessage:c[a].defaultMessage,dictFallbackMessage:c[a].fallbackMessage,dictFallbackText:c[a].fallbackText,dictFileTooBig:c[a].fileTooBig,dictInvalidFileType:c[a].invalidFileType,dictResponseError:c[a].responseError,
6
+ dictCancelUpload:c[a].cancel,dictCancelUploadConfirmation:c[a].cancelConfirm,dictRemoveFile:c[a].remove,dictMaxFilesExceeded:c[a].maxFilesExceeded,fallback:function(){jQuery(this.element).closest("form").removeClass("frm_ajax_submit")},init:function(){this.on("sending",function(b,d,e){e.append("action","frm_submit_dropzone");e.append("field_id",c[a].fieldID);e.append("form_id",c[a].formID)});this.on("success",function(b,d){for(var f=jQuery.parseJSON(d),g=0;g<f.length;g++)!0!==c[a].uploadMultiple&&
7
+ jQuery('input[name="'+e+'"]').val(f[g])});this.on("successmultiple",function(b,d){for(var f=jQuery.parseJSON(d),g=0;g<b.length;g++)jQuery(b[g].previewElement).append(y(c[a],f[g],e))});this.on("complete",function(b){if("undefined"!==typeof b.mediaID){c[a].uploadMultiple&&jQuery(b.previewElement).append(y(c[a],b.mediaID,e));for(var d=b.previewElement.querySelectorAll("[data-dz-name]"),f=0,g=d.length;f<g;f++)d[f].innerHTML='<a href="'+b.url+'">'+b.name+"</a>"}});this.on("addedfile",function(){P(g)});
8
+ this.on("queuecomplete",function(){G(g,"enable")});this.on("removedfile",function(b){!1!==b.accepted&&!0!==c[a].uploadMultiple&&jQuery('input[name="'+e+'"]').val("");!1!==b.accepted&&"undefined"!==typeof b.mediaID&&(jQuery(b.previewElement).remove(),this.options.maxFiles=c[a].maxFiles-this.files.length)});if("undefined"!==typeof c[a].mockFiles)for(var b=0;b<c[a].mockFiles.length;b++){var d={name:c[a].mockFiles[b].name,size:c[a].mockFiles[b].size,url:c[a].mockFiles[b].file_url,mediaID:c[a].mockFiles[b].id};
9
+ this.emit("addedfile",d);this.emit("thumbnail",d,c[a].mockFiles[b].url);this.emit("complete",d);this.files.push(d)}}})}}function y(a,b,c){return'<input name="'+c+'[]" type="hidden" value="'+b+'" data-frmfile="'+a.fieldID+'" />'}function A(){var a=jQuery(this).data("frm-remove");Wa(jQuery(this).parent(".dz-preview"));a=jQuery('input[name="'+a+'"]');a.length&&a.val("")}function v(){var a=this.type,b=!1,c=!1;if("select-one"===a)c=!0,"frm_other_trigger"===this.options[this.selectedIndex].className&&(b=
10
+ !0);else if("select-multiple"===a)for(var c=!0,d=this.options,b=!1,e=0;e<d.length;e++)if("frm_other_trigger"===d[e].className&&d[e].selected){b=!0;break}c?(a=jQuery(this).parent().children(".frm_other_input"),a.length&&(b?a[0].className=a[0].className.replace("frm_pos_none",""):(1>a[0].className.indexOf("frm_pos_none")&&(a[0].className+=" frm_pos_none"),a[0].value=""))):"radio"===a?jQuery(this).is(":checked")&&(jQuery(this).closest(".frm_radio").children(".frm_other_input").removeClass("frm_pos_none"),
11
+ jQuery(this).closest(".frm_radio").siblings().children(".frm_other_input").addClass("frm_pos_none").val("")):"checkbox"===a&&(this.checked?jQuery(this).closest(".frm_checkbox").children(".frm_other_input").removeClass("frm_pos_none"):jQuery(this).closest(".frm_checkbox").children(".frm_other_input").addClass("frm_pos_none").val(""))}function z(a){var b=p(this,!1);if(b&&"undefined"!==typeof b&&(!a.frmTriggered||a.frmTriggered!=b)&&(ja(b,jQuery(this)),a="undefined"!==typeof a.originalEvent||-1<a.currentTarget.className.indexOf("frm_chzn")?
12
+ "value changed":"other",ka(b,jQuery(this),a),Q(b,jQuery(this)),jQuery(this).closest("form").hasClass("frm_js_validate"))){b=[];a=jQuery(this).closest(".frm_form_field");a.hasClass("frm_required_field")&&!jQuery(this).hasClass("frm_optional")&&(b=la(this,b));if(1>b.length)if("email"==this.type)var c=jQuery(this).closest("form").find("input[type=email]"),b=ma(this,b,c);else"number"==this.type?b=na(this,b):null!==this.pattern&&(b=oa(this,b));a.removeClass("frm_blank_field");a.find(".frm_error").remove();
13
+ if(0<Object.keys(b).length)for(var d in b)R(a,d,b)}}function p(a,b){var c="",c=a instanceof jQuery?a.attr("name"):a.name;if(""===c)return c=a instanceof jQuery?a.data("name"):a.getAttribute("data-name"),""!==c&&c?c:0;c=c.replace("item_meta[","").replace("[]","").split("]");if(1>c.length)return 0;var c=c.filter(function(a){return""!==a}),d=c[0],e=!1;if(1===c.length)return d;if("[form"===c[1]||"[row_ids"===c[1])return 0;jQuery('input[name="item_meta['+d+'][form]"]').length&&(d=c[2].replace("[",""),
14
+ e=!0);"other"===d&&(d=e?c[3].replace("[",""):c[1].replace("[",""));!0===b&&(d=d===c[0]?d+"-"+c[1].replace("[",""):d+"-"+c[0]+"-"+c[1].replace("[",""));return d}function ja(a,b){if(!("undefined"===typeof __FRMRULES||"undefined"===typeof __FRMRULES[a]||1>__FRMRULES[a].dependents.length||null===b||"undefined"===typeof b))for(var c=__FRMRULES[a],d=H(b[0].name),e=0,f=c.dependents.length;e<f;e++)I(c.dependents[e],d)}function I(a,b){var c=S(a);if(!(!1===c||1>c.conditions.length)){var d;d=[];if(c.isRepeating)if(""!==
15
+ b.repeatingSection){var e="frm_field_"+c.fieldId+"-",e=e+(b.repeatingSection+"-"+b.repeatRow+"_container");d.push(e)}else if(d=J(c),null!==document.getElementById("frm_field_"+d+"_container")){d=[];for(var e=document.querySelectorAll(".frm_field_"+c.fieldId+"_container"),f=0,h=e.length;f<h;f++)d.push(e[f].id)}else{d=[];for(var f=J(c),e="frm_field_"+c.fieldId+"-"+f+"-",f=document.querySelectorAll('[name="item_meta['+f+'][row_ids][]"]'),h=0,g=f.length;h<g;h++)""!==f[h].value&&d.push(e+f[h].value+"_container");
16
+ 1>d.length&&d.push(e+"0_container")}else d.push("frm_field_"+c.fieldId+"_container");e=d.length;for(f=0;f<e;f++)c.containerId=d[f],pa(c,d[f]),qa(c)}}function J(a){var b="";"0"!==a.inEmbedForm?b=a.inEmbedForm:"0"!==a.inSection&&(b=a.inSection);return b}function pa(a,b){if(a.isRepeating){var c=b.replace("_container","").split("-");a.repeatRow=c[2]}else a.repeatRow=""}function qa(a){for(var b=[],c=a.conditions.length,d=0;d<c;d++)b.push(Xa(a.conditions[d],a));c=C="any"==a.anyAll?-1<b.indexOf(!0)?a.showHide:
17
+ ra(a.showHide):-1<b.indexOf(!1)?ra(a.showHide):a.showHide;b=null!==document.getElementById(a.containerId);"show"==c?"data"==a.fieldType&&a.hasOwnProperty("dataLogic")?(a={fieldId:a.fieldId,fieldKey:a.fieldKey,formId:a.formId,containerId:a.containerId,repeatRow:a.repeatRow,dataLogic:{actualValue:a.dataLogic.actualValue,fieldId:a.dataLogic.fieldId},children:"",inputType:a.inputType},"data"==a.inputType?Ya(a,b):b&&Za(a)):!1!==B(a.containerId,a.formId)&&(D(a.containerId,a.formId),b?(b=sa(a.containerId),
18
+ ta(b,"divider"==a.fieldType||"form"==a.fieldType,a.formId),jQuery("#"+a.containerId).show()):(b=ua(a),ta(b,"divider"==a.fieldType||"form"==a.fieldType,a.formId))):T(a,b)}function S(a){return"undefined"===typeof __FRMRULES||"undefined"===typeof __FRMRULES[a]?!1:__FRMRULES[a]}function Xa(a,b){var c=S(a.fieldId),d=va(c,b);"data"==b.fieldType&&"data"==c.fieldType?(c=""===a.value?""===d||1==d.length&&""===d[0]?!1:!0:U(a.operator,a.value,d),b.dataLogic=a,b.dataLogic.actualValue=d,d=c):d=U(a.operator,a.value,
19
+ d);return d}function va(a,b){var c;if("radio"==a.inputType||"checkbox"==a.inputType)c=wa(a,b),c=document.querySelectorAll('input[name^="'+c+'"]'),c="checkbox"==a.inputType?K(c):V(c);else if(!0===a.isMultiSelect){c=wa(a,b);var d=document.querySelectorAll('[name^="'+c+'"]');1==d.length&&"hidden"!=d[0].type?(c=jQuery('[name^="'+c+'"]').val(),null===c&&(c="")):c=K(d)}else if(c="field_"+a.fieldKey,a.isRepeating&&(c+="-"+b.repeatRow),d=document.getElementById(c),null===d){d="";if("time"==a.fieldType){var e=
20
+ document.getElementById(c+"_H");null!==e&&(d=document.getElementById(c+"_m"),d=e.value+":"+d.value,c=document.getElementById(c+"_A"),":"==d?d="":null!==c&&(d+=" "+c.value))}c=d}else c=d.value;"undefined"===typeof c?c="":"string"===typeof c&&(c=c.trim());return c}function wa(a,b){return a.isRepeating?"item_meta["+("0"!==b.inEmbedForm?b.inEmbedForm:b.inSection)+"]["+b.repeatRow+"]["+a.fieldId+"]":"item_meta["+a.fieldId+"]"}function K(a){for(var b=[],c=0,d=a.length;c<d;c++)("hidden"==a[c].type||a[c].checked)&&
21
+ b.push(a[c].value);0===b.length&&(b=!1);return b}function U(a,b,c){b=$a(b);c=ab(b,c);return"string"===typeof b&&"-1"!=b.indexOf("&quot;")&&U(a,b.replace("&quot;",'"'),c)?!0:{"==":function(a,b){return a==b},"!=":function(a,b){return a!=b},"<":function(a,b){return a>b},">":function(a,b){return a<b},LIKE:function(a,b){if(!b)return!1;a=W(a);b=xa(a,b);return-1!=b.indexOf(a)},"not LIKE":function(a,b){if(!b)return!0;a=W(a);b=xa(a,b);return-1==b.indexOf(a)}}[a](b,c)}function $a(a){-1!==String(a).search(/^\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*$/)?
22
+ a=parseFloat(a):"string"===typeof a&&(a=a.trim());return a}function ab(a,b){"undefined"===typeof b&&(b="");jQuery.isArray(b)&&-1<jQuery.inArray(String(a),b)&&(b=a);"number"===typeof a&&"string"===typeof b&&(b=parseFloat(b));"string"===typeof b&&(b=b.trim());return b}function xa(a,b){b=W(b);var c;if(jQuery.isArray(b))for(var d=0,e=b.length;d<e;d++)if(c=b[d].toLowerCase(),-1<c.indexOf(a)){b=a;break}return b}function W(a){"string"===typeof a?a=a.toLowerCase():"number"===typeof a&&(a=a.toString());return a}
23
+ function ra(a){return"show"==a?"hide":"show"}function sa(a){return document.getElementById(a).querySelectorAll('select[name^="item_meta"], textarea[name^="item_meta"], input[name^="item_meta"]')}function ua(a){if("divider"==a.fieldType){var b=[];"divider"==a.fieldType&&(b=document.querySelectorAll('[data-sectionid="'+a.fieldId+'"]'));a=b}else"form"==a.fieldType?a=document.querySelectorAll('[id^="field_'+a.fieldKey+'-"]'):(a=a.isRepeating?"item_meta["+J(a)+"]["+a.repeatRow+"]["+a.fieldId+"]":"item_meta["+
24
+ a.fieldId+"]",a=document.querySelectorAll('[name^="'+a+'"]'));return a}function ta(a,b,c){if(a.length)for(var d,e=["checkbox","radio"],f=0;f<a.length;f++)if(!(0<f&&"undefined"!==typeof d&&d.name==a[f].name&&-1<e.indexOf(d.type)||b&&X(a[f],c))){d=a[f];var h=jQuery(d),g=h.data("frmval");if("undefined"!==typeof g){if("checkbox"==d.type||"radio"==d.type)ya(d.name,g);else if(-1<d.name.indexOf("[]")){var k=document.getElementsByName(d.name);if(jQuery.isArray(g))for(var n=0,l=g.length;n<l;n++)n in k&&(k[n].value=
25
+ g[n]);else null!==k[0]&&(k[0].value=g)}else g.constructor===Object&&(k=d.getAttribute("name").split("[").slice(-1)[0],null!==k&&(k=k.replace("]",""),g=g[k],"undefined"==typeof g&&(g=""))),d.value=g;"SELECT"==d.tagName&&L(d);t(h)}d=a[f];h=p(d,!1);h=Y(h);!1!==h&&"lookup"!=h.fieldType&&(h.parentVals=Z(h),za(h,d));d=a[f];if(h="undefined"!==typeof __FRMCALC){h=d.type;g=!1;if("text"==h||"hidden"==h||"number"==h)g=!0;h=g}if(h){h=__FRMCALC;g=d.name;k=d.id.replace("field_","");if(3<=g.split("][").length)for(g=
26
+ k.split("-"),k="",n=0;n<g.length-1;n++)k=""===k?g[n]:k+"-"+g[n];g=k;k=null;3<=d.name.split("][").length&&(k="hidden"!=d.type?jQuery(d).closest(".frm_form_field"):jQuery(d));d=k;void 0!==h.calc[g]&&aa(h,g,[],d)}d=a[f]}}function X(a,b){var c=p(a,!0);return B("frm_field_"+c+"_container",b)}function T(a,b){if(!B(a.containerId,a.formId)){if(b){jQuery("#"+a.containerId).hide();var c=sa(a.containerId)}else c=ua(a);ba(c);Aa(a.containerId,a.formId)}}function ba(a){if(!(1>a.length)){for(var b,c=!0,d=0,e=a.length;d<
27
+ e;d++)0<d&&b.name!=a[d].name&&!0===c&&t(jQuery(b)),c=!0,"radio"==a[d].type||"checkbox"==a[d].type?a[d].checked=!1:"SELECT"==a[d].tagName?(0===a[d].selectedIndex?c=!1:a[d].selectedIndex=0,b=a[d].id.replace(/[^\w]/g,"_"),null!==document.getElementById(b+"_chosen")&&jQuery(a[d]).trigger("chosen:updated")):a[d].value="",b=a[d];!0===c&&t(jQuery(b))}}function B(a,b){var c=!1;-1<E(b).indexOf(a)&&(c=!0);return c}function Aa(a,b){var c=E(b);if(!(-1<c.indexOf(a))){c.push(a);var c=JSON.stringify(c),d=document.getElementById("frm_hide_fields_"+
28
+ b);null!==d&&(d.value=c)}}function E(a){var b=[];a=document.getElementById("frm_hide_fields_"+a);return null===a?b:b=(b=a.value)?JSON.parse(b):[]}function ya(a,b){for(var c=document.getElementsByName(a),d=0,e=c.length;d<e;d++)if("hidden"==c[d].type)jQuery.isArray(b)&&null!==b[d]?c[d].value=b[d]:c[d].value=b;else if(c[d].value==b||jQuery.isArray(b)&&-1<b.indexOf(c[d].value))if(c[d].checked=!0,"radio"==c[d].type)break}function D(a,b){var c=E(b),d=c.indexOf(a);-1<d&&(c.splice(d,1),c=JSON.stringify(c),
29
+ document.getElementById("frm_hide_fields_"+b).value=c)}function ka(a,b,c){if(!("undefined"===typeof __FRMLOOKUP||"undefined"===typeof __FRMLOOKUP[a]||1>__FRMLOOKUP[a].dependents.length||null===b||"undefined"===typeof b)){a=__FRMLOOKUP[a];b=H(b[0].name);for(var d=0,e=a.dependents.length;d<e;d++)ca(a.dependents[d],b,c)}}function ca(a,b,c){a=Y(a);if(!(!1===a||1>a.parents.length))if("lookup"==a.fieldType){if(""!==b.repeatRow){c=[];var d="frm_field_"+a.fieldId+"-",d=d+(b.repeatingSection+"-"+b.repeatRow+
30
+ "_container");b=document.getElementById(d);null!==b&&c.push(b);b=c}else b=[],a.isRepeating?b=document.querySelectorAll(".frm_field_"+a.fieldId+"_container"):(c=document.getElementById("frm_field_"+a.fieldId+"_container"),null!==c&&b.push(c));c=0;for(d=b.length;c<d;c++){pa(a,b[c].id);var e=a,f=b[c];e.parentVals=Z(e);if("select"==e.inputType)bb(e,f);else if("radio"==e.inputType||"checkbox"==e.inputType)if(!1===e.parentVals){var h=f.getElementsByTagName("input");Ba(e,f);ba(h)}else cb(e,f)}}else if("value changed"===
31
+ c)for(c="field_"+a.fieldKey,c=a.isRepeating?""!==b.repeatingSection?'[id="'+c+"-"+b.repeatRow+'"]':'[id^="'+c+'-"]':'[id="'+c+'"]',b=document.querySelectorAll(c),c=0,d=b.length;c<d;c++)e=a,f=H(b[c].name),e.repeatRow=""!==f.repeatRow?f.repeatRow:"",e=a,f=b[c],e.parentVals=Z(e),za(e,f)}function Y(a){return"undefined"===typeof __FRMLOOKUP||"undefined"===typeof __FRMLOOKUP[a]?!1:__FRMLOOKUP[a]}function Z(a){for(var b=[],c=a.parents,d,e=0,f=c.length;e<f;e++){d=Y(c[e]);d=va(d,a);if(""===d||!1===d){b=!1;
32
+ break}b[e]=d}return b}function V(a){for(var b=!1,c=a.length,d=0;d<c;d++)if("hidden"==a[d].type||a[d].checked){b=a[d].value;break}return b}function bb(a,b){var c=b.getElementsByTagName("SELECT")[0];if(null!==c){var d=c.value;!1===a.parentVals?(c.options.length=1,""!==d&&(c.value="",L(c),t(jQuery(c),a.fieldKey))):(a.isReadOnly=c.disabled,db(c),da(a.formId),jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_replace_lookup_field_options",parent_fields:a.parents,parent_vals:a.parentVals,field_id:a.fieldId,
33
+ nonce:frm_js.nonce},success:function(b){var d=c.value;b=JSON.parse(b);for(var e=c.options.length;0<e;e--)c.remove(e);for(var g=b.length,e=0;e<g;e++)c.options[e+1]=new Option(b[e],b[e],!1,!1);c.value=d;""===c.value&&(b=c.getAttribute("data-frmval"),null!==b&&(c.value=b));!1===a.isReadOnly&&(c.disabled=!1);c.className=c.className.replace(" frm_loading_lookup","");L(c);c.value!=d&&t(jQuery(c),a.fieldKey);ea(a.formId)}}))}}function L(a){-1<a.className.indexOf("frm_chzn")&&jQuery().chosen&&jQuery(a).trigger("chosen:updated")}
34
+ function db(a){a.className+=" frm_loading_lookup";a.disabled=!0;L(a)}function da(a){M++;1>=M&&(a=Ca(a),null!==a&&P(jQuery(a)))}function ea(a){M--;0>=M&&(a=Ca(a),null!==a&&G(jQuery(a),"enable"))}function Ca(a){return document.querySelector("#frm_form_"+a+"_container form")}function cb(a,b){var c=b.getElementsByClassName("frm_opt_container")[0],d=c.getElementsByTagName("input");eb(b,c);var e="",e="radio"==a.inputType?V(d):K(d),f=jQuery(d[0]).data("frmval");da(a.formId);jQuery.ajax({type:"POST",url:frm_js.ajax_url,
35
+ data:{action:"frm_replace_cb_radio_lookup_options",parent_fields:a.parents,parent_vals:a.parentVals,field_id:a.fieldId,container_field_id:J(a),row_index:a.repeatRow,current_value:e,default_value:f,nonce:frm_js.nonce},success:function(e){c.innerHTML=e;e=b.getElementsByClassName("frm-loading-img")[0];null!==e&&void 0!==e&&e.parentNode.removeChild(e);c.style.display="block";1==d.length&&""===d[0].value?Ba(a,b):(!1!==B(b.id,a.formId)&&(e=S(a.fieldId),!1===e||1>e.conditions.length?(D(b.id,a.formId),jQuery("#"+
36
+ b.id).show()):(e.containerId=b.id,e.repeatRow=a.repeatRow,qa(e))),void 0!==f&&(!1!==("radio"==a.inputType?V(d):K(d))||1>d.length||ya(d[0].name,f)));t(jQuery(d[0]),a.fieldKey);ea(a.formId)}})}function Ba(a,b){B(b.id,a.formId)||(jQuery("#"+b.id).hide(),Aa(b.id,a.formId))}function za(a,b){if(!X(b,a.formId))if(!1===a.parentVals){var c=b.getAttribute("data-frmval");null===c&&(c="");Da(a,b,c)}else da(a.formId),jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_get_lookup_text_value",parent_fields:a.parents,
37
+ parent_vals:a.parentVals,field_id:a.fieldId,nonce:frm_js.nonce},success:function(c){b.value!=c&&Da(a.fieldKey,b,c);ea(a.formId)}})}function Da(a,b,c){b.value=c;t(jQuery(b),a)}function Ya(a,b){if(b){var c=jQuery("#"+a.containerId);Ea(c)}jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_fields_ajax_get_data",entry_id:a.dataLogic.actualValue,current_field:a.fieldId,hide_id:a.containerId,on_current_page:b,nonce:frm_js.nonce},success:function(d){if(b){var e=c.find(".frm_opt_container");e.html(d);
38
+ var f=e.children("input"),h=f.val();Fa(e);""===d||""===h?T(a,!0):Ga(a,c,f,!0)}else e="field_"+a.fieldKey,""!==a.repeatRow&&(e+="-"+a.repeatRow),e=document.getElementById(e),e.value=d,B(a.containerId,a.formId)&&D(a.containerId,a.formId),t(jQuery(e))}})}function Za(a,b){var c=jQuery("#"+a.containerId),d=c.find('select[name^="item_meta"], input[name^="item_meta"]'),e=Ha(d),d=d.data("frmval"),f=c.closest("form").find('input[name="id"]').val();Ea(c);jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_fields_ajax_data_options",
39
+ trigger_field_id:a.dataLogic.fieldId,entry_id:a.dataLogic.actualValue,field_id:a.fieldId,default_value:d,container_id:a.containerId,editing_entry:f,prev_val:e,nonce:frm_js.nonce},success:function(b){var d=c.find(".frm_opt_container");d.html(b);var f=d.find('select, input[type="checkbox"], input[type="radio"]');Fa(d);""===b||1>f.length?T(a,!0):(b=Ha(f),Ga(a,c,f,e!==b))}})}function Ea(a){var b=a.html();-1<b.indexOf("frm-loading-img")||(a.html(b+'<span class="frm-loading-img"></span>'),a.find(".frm_opt_container").hide())}
40
+ function eb(a,b){if(!(-1<a.innerHTML.indexOf("frm-loading-img"))){b.style.display="none";var c=document.createElement("span");c.setAttribute("class","frm-loading-img");a.insertBefore(c,b.nextSibling)}}function Fa(a){a.parent().children(".frm-loading-img").remove();a.show()}function Ha(a){var b=[],c="";a.each(function(){c=this.value;"radio"===this.type||"checkbox"===this.type?!0===this.checked&&b.push(c):""!==c&&b.push(c)});0===b.length&&(b="");return b}function Ga(a,b,c,d){B(a.containerId,a.formId)&&
41
+ (D(a.containerId,a.formId),b.show());c.hasClass("frm_chzn")&&fa();!0===d&&t(c)}function Q(a,b){if("undefined"!==typeof __FRMCALC){var c=__FRMCALC,d=c.fields[a];if("undefined"!==typeof d)for(var d=d.total,e=[],f=0,h=d.length;f<h;f++){var g;g=c.calc[d[f]];var k=b.attr("name"),n=!1,l=g.field_id,m=E(g.form_id);1>m.length||("0"===g.inSection&&"0"===g.inEmbedForm?n=N(l,m):(k=H(k),N(l,m)?n=!0:Ia(l,k,m)?n=!0:"0"!==g.inSection&&"0"!==g.inEmbedForm?n=Ia(g.inSection,k,m):"0"!==g.inSection?n=N(g.inSection,m):
42
+ "0"!==g.inEmbedForm&&(n=N(g.inEmbedForm,m))));g=n;!1===g&&aa(c,d[f],e,b)}}}function N(a,b){return-1<b.indexOf("frm_field_"+a+"_container")}function Ia(a,b,c){var d=!1;b.repeatingSection&&(a="frm_field_"+a+"-"+b.repeatingSection,a+="-"+b.repeatRow+"_container",d=-1<c.indexOf(a));return d}function aa(a,b,c,d){var e=a.calc[b],f=e.calc,h=jQuery(document.getElementById("field_"+b)),g={triggerField:d,inSection:!1,thisFieldCall:'input[id^="field_'+b+'-"]'};1>h.length&&"undefined"!==typeof d&&(g.inSection=
43
+ !0,g.thisFieldId=fb(a.fieldsWithCalc,b),h=Ja(g));if(!(null===h||1>h.length)){f=gb(e,f,a,c,g);if("text"!=e.calc_type){a=e.calc_dec;-1<f.indexOf(").toFixed(")&&(c=f.split(").toFixed("),Ka(c[1])&&(a=c[1],f=f.replace(").toFixed("+a,"")));f=hb(f);f=parseFloat(eval(f));if("undefined"===typeof f||isNaN(f))f=0;Ka(a)&&(f=f.toFixed(a))}h.val()!=f&&(h.val(f),t(h,b))}}function gb(a,b,c,d,e){for(var f=0,h=a.fields.length;f<h;f++){var g={triggerField:e.triggerField,thisFieldId:a.fields[f],inSection:e.inSection,
44
+ valKey:e.inSection+""+a.fields[f],thisField:c.fields[a.fields[f]],thisFieldCall:"input"+c.fieldKeys[a.fields[f]]},k=c;"checkbox"==g.thisField.type||"radio"==g.thisField.type||"scale"==g.thisField.type?g.thisFieldCall=g.thisFieldCall+":checked,"+g.thisFieldCall+"[type=hidden]":"select"==g.thisField.type||"time"==g.thisField.type?g.thisFieldCall="select"+k.fieldKeys[g.thisFieldId]+" option:selected,"+g.thisFieldCall+"[type=hidden]":"textarea"==g.thisField.type&&(g.thisFieldCall=g.thisFieldCall+",textarea"+
45
+ k.fieldKeys[g.thisFieldId]);if("text"==a.calc_type)g.valKey="text"+g.valKey,d=ib(g,d),"undefined"===typeof d[g.valKey]&&(d[g.valKey]="");else{g.valKey="num"+g.valKey;d=jb(g,c,d);if("undefined"===typeof d[g.valKey]||isNaN(d[g.valKey]))d[g.valKey]=0;"date"==g.thisField.type&&0===d[g.valKey]&&(b="")}k="["+g.thisFieldId+"]";k=k.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1");b=b.replace(new RegExp(k,"g"),d[g.valKey])}return b}function hb(a){isNaN(a.charAt(a.length-1))&&(a=a.substr(0,a.length-1));return a}
46
+ function jb(a,b,c){if("undefined"!==typeof c[a.valKey]&&0!==c[a.valKey])return c;c[a.valKey]=0;var d=La(a);if(!1===d)return c;d.each(function(){var d=Ma(a.thisField,this);if("date"==a.thisField.type){var f;f=b.date;var h=0;if(d)if("undefined"===typeof jQuery.datepicker){h="-";-1<f.indexOf("/")&&(h="/");f=f.split(h);var d=d.split(h),g,k;g=h=k="";for(var n=0;n<f.length;n++)if("y"==f[n])g=((new Date).getFullYear()+15).toString().substr(2,2),g=d[n]>g?"19"+d[n]:"20"+d[n];else if("yy"==f[n])g=d[n];else if("m"==
47
+ f[n]||"mm"==f[n])h=d[n],2>h.length&&(h="0"+h);else if("d"==f[n]||"dd"==f[n])k=d[n],2>k.length&&(k="0"+k);h=Date.parse(g+"-"+h+"-"+k)}else h=jQuery.datepicker.parseDate(f,d);f=h;null!==f&&(c[a.valKey]=Math.ceil(f/864E5))}else{f=d;""!==f&&0!==f&&(f=f.trim(),f=parseFloat(f.replace(/,/g,"").match(/-?[\d\.]+$/)));if("undefined"===typeof f||isNaN(f)||""===f)f=0;c[a.valKey]+=f}});return c}function ib(a,b){if("undefined"!==typeof b[a.valKey]&&""!==b[a.valKey])return b;b[a.valKey]="";var c=La(a);if(!1===c)return b;
48
+ var d=0,e="";c.each(function(){var c=Ma(a.thisField,this),c=c.trim();0<d&&("time"==a.thisField.type?1==d?e=":":2==d&&(e=" "):e=", ");""!==c&&(b[a.valKey]+=e+c,d++)});return b}function La(a){var b;if(!1===a.inSection)b=jQuery(a.thisFieldCall);else if(b=Ja(a),null===b||"undefined"===typeof b)b=jQuery(a.thisFieldCall);if(null===b||"undefined"===typeof b||1>b.length)b=!1;return b}function Ja(a){if("undefined"===typeof a.triggerField)return null;var b=a.triggerField.closest(".frm_repeat_sec, .frm_repeat_inline, .frm_repeat_grid");
49
+ return b.length?(a=a.thisFieldCall.replace("[id=","[id^="),b.find(a)):null}function Ma(a,b){var c;c=!1;if("hidden"==b.type)""!==ga(b)&&(c=!0);else if("select"==a.type){var d=b.className;d&&-1<d.indexOf("frm_other_trigger")&&(c=!0)}else("checkbox"==a.type||"radio"==a.type)&&-1<b.id.indexOf("-other_")&&0>b.id.indexOf("-otext")&&(c=!0);c?(c=0,"select"==a.type?"hidden"==b.type?(d=!1,2<b.name.split("[").length&&(d=!0),d||(c=ga(b))):c=jQuery(b).closest(".frm_other_container").find(".frm_other_input").val():
50
+ "checkbox"!=a.type&&"radio"!=a.type||"hidden"==b.type||(c=ga(b))):c="checkbox"!==b.type&&"radio"!==b.type||!b.checked?jQuery(b).val():b.value;"undefined"===typeof c&&(c="");return c}function ga(a){var b="";a=document.getElementById(a.id+"-otext");null!==a&&""!==a.value&&(b=a.value);return b}function Na(a){var b=!1;a=jQuery(a).find(".frm_saving_draft");a.length&&(b=a.val());return b}function Oa(a){var b=!1,c=jQuery(a).find(".frm_next_page");if(c.length&&c.val()){var d=jQuery(a).find('input[name="form_id"]').val();
51
+ a=jQuery(a).find('input[name="frm_page_order_'+d+'"]');a=a.length?a.val():0;if(!a||c.val()<a)b=!0}return b}function la(a,b){var c=a.getAttribute("data-frmfile");if("hidden"==a.type&&null===c)return b;var d="",e="";if("checkbox"==a.type||"radio"==a.type)c=jQuery('input[name="'+a.name+'"]').closest(".frm_required_field").find("input:checked"),jQuery(c).each(function(){d=this.value});else if("file"==a.type||c)"undefined"===typeof c&&(c=p(a,!0),c=c.replace("file","")),"undefined"===typeof b[c]&&(d=kb(c)),
52
+ e=c;else{c=a.className;if(-1!==c.indexOf("frm_pos_none"))return b;d=jQuery(a).val();if(null===d)d="";else if("string"!==typeof d)for(var e=d,d="",f=0;f<e.length;f++)""!==e[f]&&(d=e[f]);e=-1===c.indexOf("frm_other_input")?p(a,!0):p(a,!1);-1!==c.indexOf("frm_time_select")&&(e=e.replace("-H","").replace("-m",""))}""===d&&(""===e&&(e=p(a,!0)),e in b||(b[e]=F(a,"data-reqmsg")));return b}function kb(a){var b="";jQuery('input[name="file'+a+'"], input[name="file'+a+'[]"], input[name^="item_meta['+a+']"]').each(function(){""===
53
+ b&&(b=this.value)});return b}function ma(a,b,c){var d=a.value,e=p(a,!0);if(e in b)return b;var f=0===e.indexOf("conf_");if(""!==d||f){var h=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i,g=F(a,"data-invmsg");""!==d&&!1===h.test(d)?(b[e]=g,f&&(b[e.replace("conf_","")]="")):f&&(a=a.name.replace("conf_",""),c.filter('[name="'+a+'"]').val()!==d&&(b[e]="",b[e.replace("conf_","")]=""))}return b}function na(a,
54
+ b){var c=a.value;""!==c&&!1!==isNaN(c/1)&&(c=p(a,!0),c in b||(b[c]=F(a,"data-invmsg")));return b}function oa(a,b){var c=a.value,d=F(a,"pattern");if(""!==d&&""!==c){var e=p(a,!0);e in b||(d=new RegExp("^"+d+"$","i"),!1===d.test(c)&&(b[e]=F(a,"data-invmsg")))}return b}function F(a,b){var c=a.getAttribute(b);null===c&&(c="");return c}function lb(a,b){"undefined"==typeof b&&jQuery(a).find('input[name="frm_action"]').val();var c=jQuery(a).find(".frm_form_field");c.addClass("frm_doing_ajax");jQuery.ajax({type:"POST",
55
+ url:frm_js.ajax_url,data:jQuery(a).serialize()+"&action=frm_entries_"+b+"&nonce="+frm_js.nonce,success:function(b){var d={content:"",errors:{},pass:!1};null===b&&(b=d);b=b.replace(/^\s+|\s+$/g,"");b=0===b.indexOf("{")?jQuery.parseJSON(b):d;if("undefined"!=typeof b.redirect)window.location=b.redirect;else if(""!==b.content){G(jQuery(a));-1!=frm_js.offset&&frmFrontForm.scrollMsg(jQuery(a),!1);var f=jQuery(a).find('input[name="form_id"]').val();b.content=b.content.replace(/ frm_pro_form /g," frm_pro_form frm_no_hide ");
56
+ jQuery(a).closest(".frm_forms").replaceWith(b.content);d=b;if(history.pushState&&"undefined"!=typeof d.page){var h,g=d.page;h=encodeURI("frm_page");for(var g=encodeURI(g),k=document.location.search.substr(1).split("&"),n=k.length,l;n--;)if(l=k[n].split("="),l[0]==h){l[1]=g;k[n]=l.join("=");break}0>n&&(k[k.length]=[h,g].join("="));h=k.join("&");window.history.pushState({html:d.html},"","?"+h)}"function"==typeof frmThemeOverride_frmAfterSubmit&&(f=jQuery('input[name="frm_page_order_'+f+'"]').val(),
57
+ d=jQuery(b.content).find('input[name="form_id"]').val(),frmThemeOverride_frmAfterSubmit(d,f,b.content,a));f=jQuery(a).find('input[name="id"]');f.length&&jQuery(document.getElementById("frm_edit_"+f.val())).find("a").addClass("frm_ajax_edited").click();jQuery(b.content).find(".frm_message").length&&ha("pageLoad");ia()}else if(Object.keys(b.errors).length){G(jQuery(a),"enable");d=!0;Pa();h=!1;for(f in b.errors)g=jQuery(a).find("#frm_field_"+f+"_container"),g.length&&(g.is(":visible")||(k=g.closest(".frm_toggle_container"),
58
+ k.length&&(k=k.prev(),k.hasClass("frm_trigger")||(k=k.prev(".frm_trigger")),k.click())),g.is(":visible")&&(R(g,f,b.errors),d=!1,g=jQuery(a).find("#frm_field_"+f+"_container .frm-g-recaptcha, #frm_field_"+f+"_container .g-recaptcha"),g.length&&(h=!0,g=g.data("rid"),jQuery().grecaptcha&&(g?grecaptcha.reset(g):grecaptcha.reset()))));c.removeClass("frm_doing_ajax");Qa(a);!0!==h&&Ra(a,!1);d?a.submit():jQuery(a).prepend(b.error_message)}else mb(a),Ra(a,!0),a.submit()},error:function(){jQuery(a).find('input[type="submit"], input[type="button"]').removeAttr("disabled");
59
+ a.submit()}})}function R(a,b,c){a.length&&a.is(":visible")&&(a.addClass("frm_blank_field"),"function"==typeof frmThemeOverride_frmPlaceError?frmThemeOverride_frmPlaceError(b,c):a.append('<div class="frm_error">'+c[b]+"</div>"))}function Pa(){jQuery(".form-field").removeClass("frm_blank_field");jQuery(".form-field .frm_error").replaceWith("");jQuery(".frm_error_style").remove()}function Qa(a){var b=jQuery(a).find(".frm_blank_field:first");b.length&&frmFrontForm.scrollMsg(b,a,!0)}function P(a){a.hasClass("frm_loading_form")||
60
+ a.addClass("frm_loading_form");a.find('input[type="submit"], input[type="button"], button[type="submit"]').attr("disabled","disabled")}function G(a,b){a.removeClass("frm_loading_form");"enable"==b&&a.find('input[type="submit"], input[type="button"], button[type="submit"]').removeAttr("disabled")}function mb(a){var b=document.getElementById("frm_loading");null!==b&&(a=jQuery(a).find("input[type=file]").val(),"undefined"!=typeof a&&""!==a&&setTimeout(function(){jQuery(b).fadeIn("slow")},2E3))}function Ra(a,
61
+ b){var c=jQuery(a).find(".frm-g-recaptcha, .g-recaptcha");c.length&&(!b||1>jQuery(a).find(".frm_next_page").length||1>jQuery(a).find(".frm_next_page").val())&&c.closest(".frm_form_field").replaceWith('<input type="hidden" name="recaptcha_checked" value="'+frm_js.nonce+'">')}function nb(){Sa(jQuery(this),"clear")}function ob(){Sa(jQuery(this),"replace")}function Sa(a,b){var c=a.data("frmval").replace(/(\n|\r\n)/g,"\r");if(""===c||"undefined"==typeof c)return!1;var d=a.val().replace(/(\n|\r\n)/g,"\r");
62
+ "replace"==b?""===d&&a.addClass("frm_default").val(c):d==c&&a.removeClass("frm_default").val("")}function pb(){var a=jQuery(this),b=a.data("eid"),c=a.data("fid");a.append('<span class="spinner" style="display:inline"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_send_email",entry_id:b,form_id:c,nonce:frm_js.nonce},success:function(b){a.replaceWith(b)}});return!1}function qb(a,b){google.load("visualization","1.0",{packages:[b],callback:function(){var b=new google.visualization.DataTable,
63
+ d=!1;-1!==jQuery.inArray("id",a.options.fields)&&(d=!0,b.addColumn("number",frm_js.id));for(var e=a.fields.length,f,h=0,g=e;h<g;h++){var k=a.fields[h];f=Ta(k);b.addColumn(f,k.name)}h=!1;a.options.edit_link&&(h=!0,b.addColumn("string",a.options.edit_link));g=!1;a.options.delete_link&&(g=!0,b.addColumn("string",a.options.delete_link));if(null!==a.entries){var l=a.entries.length;b.addRows(l);for(var m=0,q=0;q<l;q++){var k=0,p=a.entries[q];d&&(b.setCell(m,k,p.id),k++);for(var r=0,t=e;r<t;r++){var u=a.fields[r];
64
+ f=Ta(u);u=p.metas[u.id];"number"!=f||null!==u&&""!==u?"boolean"==f&&(u=null===u||"false"==u||!1===u?!1:!0):u=0;b.setCell(m,k,u);k++}h&&("undefined"!==typeof p.editLink?b.setCell(m,k,'<a href="'+p.editLink+'">'+a.options.edit_link+"</a>"):b.setCell(m,k,""),k++);g&&("undefined"!==typeof p.deleteLink?b.setCell(m,k,'<a href="'+p.deleteLink+'" class="frm_delete_link" data-frmconfirm="'+a.options.confirm+'">'+a.options.delete_link+"</a>"):b.setCell(m,k,""));m++}}else for(b.addRows(1),h=k=0,g=e;h<g;h++)0<
65
+ k?b.setCell(0,k,""):b.setCell(0,k,a.options.no_entries),k++;(new google.visualization.Table(document.getElementById("frm_google_table_"+a.options.form_id))).draw(b,a.graphOpts)}})}function rb(a){google.load("visualization","1.0",{packages:[a["package"]],callback:function(){var b;new google.visualization.DataTable;b=google.visualization.arrayToDataTable(a.data);var c=document.getElementById("chart_"+a.graph_id);if(null!==c){var d=a.type.charAt(0).toUpperCase()+a.type.slice(1);"Histogram"!==d&&"Table"!==
66
+ d&&(d+="Chart");(new google.visualization[d](c)).draw(b,a.options)}}})}function Ta(a){var b="string";if("number"==a.type)b="number";else if("checkbox"==a.type||"select"==a.type){var c=a.options.length;"select"==a.type&&""===a.options[0]&&(c="post_status"==a.field_options.post_field?3:c-1);1==c&&(b="boolean")}return b}function sb(){var a=jQuery(this).data("key"),b=jQuery(this).data("parent"),c="frm_section_"+b+"-"+a,d=jQuery(document.getElementById(c)),e=d.find("input, select, textarea"),f=jQuery(this).closest("form").find('input[name="form_id"]').val();
67
+ d.fadeOut("slow",function(){d.remove();e.each(function(){var c=p(this,!1);"file"!=this.type&&Q(c,jQuery(this));D("frm_field_"+c+"-"+b+"-"+a+"_container",f)});"function"==typeof frmThemeOverride_frmRemoveRow&&frmThemeOverride_frmRemoveRow(c,d)});return!1}function tb(){if(!0===O)return!1;O=!0;var a=jQuery(this).data("parent"),b=0;if(0<jQuery(".frm_repeat_"+a).length)var c=jQuery(".frm_repeat_"+a+":last").attr("id").replace("frm_section_"+a+"-",""),b=-1<c.indexOf("i")?1:1+parseInt(c);jQuery.ajax({type:"POST",
68
+ url:frm_js.ajax_url,dataType:"json",data:{action:"frm_add_form_row",field_id:a,i:b,nonce:frm_js.nonce},success:function(c){var d=c.html,f=jQuery(d).hide().fadeIn("slow");jQuery(".frm_repeat_"+a+":last").after(f);var h=["other"],g,k,l={repeatingSection:a.toString(),repeatRow:b.toString()};jQuery(d).find("input, select, textarea").each(function(){if("file"!=this.type){if(""===this.name)return!0;g=this.name.replace("item_meta[","").split("]")[2].replace("[","");-1==jQuery.inArray(g,h)&&!1!==this.id&&
69
+ ""!==this.id&&(k=jQuery("#"+this.id),h.push(g),I(g,l),ca(g,l,"value changed"),ja(g,k),ka(g,k,"value changed"),Q(g,k))}});r(l.repeatRow);Ua();fa();"function"==typeof frmThemeOverride_frmAddRow&&frmThemeOverride_frmAddRow(a,c);O=!1},error:function(){O=!1}});return!1}function ub(){var a=jQuery(this),b=a.data("entryid"),c=a.data("prefix"),d=a.data("pageid"),e=a.data("formid"),f=a.data("cancel"),h=a.data("fields"),g=a.data("excludefields"),k=jQuery(document.getElementById(c+b)),l=k.html();k.html('<span class="frm-loading-img" id="'+
70
+ c+b+'"></span><div class="frm_orig_content" style="display:none">'+l+"</div>");jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"html",data:{action:"frm_entries_edit_entry_ajax",post_id:d,entry_id:b,id:e,nonce:frm_js.nonce,fields:h,exclude_fields:g},success:function(b){k.children(".frm-loading-img").replaceWith(b);a.removeClass("frm_inplace_edit").addClass("frm_cancel_edit");a.html(f);ha("editInPlace");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"]',
71
+ z);ia()}});return!1}function vb(){var a=jQuery(this),b=a.data("entryid"),c=a.data("prefix"),d=a.data("edit");a.hasClass("frm_ajax_edited")||(b=jQuery(document.getElementById(c+b)),b.children(".frm_forms").replaceWith(""),b.children(".frm_orig_content").fadeIn("slow").removeClass("frm_orig_content"));a.removeClass("frm_cancel_edit").addClass("frm_inplace_edit");a.html(d);return!1}function wb(){var a=jQuery(this),b=a.data("deleteconfirm");if(confirm(b)){var c=a.data("entryid"),d=a.data("prefix");a.replaceWith('<span class="frm-loading-img" id="frm_delete_'+
72
+ c+'"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_destroy",entry:c,nonce:frm_js.nonce},success:function(a){if("success"==a.replace(/^\s+|\s+$/g,"")){var b=jQuery(document.getElementById(d+c));b.fadeOut("slow",function(){b.remove()});jQuery(document.getElementById("frm_delete_"+c)).fadeOut("slow")}else jQuery(document.getElementById("frm_delete_"+c)).replaceWith(a)}})}return!1}function ia(){"undefined"!==typeof __frmHideFields&&frmFrontForm.hidePreviouslyHiddenFields();
73
+ jQuery(document).on("focusin",".frm_date",q);if("undefined"!==typeof __frmMasks)for(var a=__frmMasks,b=0;b<a.length;b++)jQuery(a[b].trigger).attr("data-frmmask",a[b].mask);Ua();fa();"undefined"!==typeof __frmDepDynamicFields&&frmFrontForm.checkDependentDynamicFields(__frmDepDynamicFields);"undefined"!==typeof __frmDepLookupFields&&frmFrontForm.checkDependentLookupFields(__frmDepLookupFields);if("undefined"!==typeof __FRMCALC){(a=__FRMCALC.triggers)&&jQuery(a.join()).trigger({type:"change",selfTriggered:!0});
74
+ var a=__FRMCALC.calc,b=[],c;for(c in a)if(1>a[c].fields.length){var d=document.getElementById("field_"+c);null===d||X(d,a[c].form_id)||aa(__FRMCALC,c,b)}}r()}function fa(){if(jQuery().chosen){var a={allow_single_deselect:!0,no_results_text:frm_js.no_results};"undefined"!==typeof __frmChosen&&(a="{"+__frmChosen+"}");jQuery(".frm_chzn").chosen(a)}}function Ua(){if(jQuery().rating){var a=jQuery(".star");a.length&&a.rating()}}function ha(a){"undefined"!==typeof __frmHideOrShowFields?frmFrontForm.hideOrShowFields(__frmHideOrShowFields,
75
+ a):Va()}function Va(){jQuery(".frm_pro_form").fadeIn("slow")}function t(a,b){"undefined"===typeof b&&(b="dependent");1<a.length&&(a=a.eq(0));a.trigger({type:"change",selfTriggered:!0,frmTriggered:b})}function H(a){var b={repeatingSection:"",repeatRow:""};"undefined"!==typeof a&&3<=a.split("][").length&&(a=a.split("]["),b.repeatingSection=a[0].replace("item_meta[",""),b.repeatRow=a[1]);return b}function Wa(a){a.fadeOut("slow",function(){a.remove()})}function xb(){var a=jQuery(this).data("frmconfirm");
76
+ return confirm(a)}function yb(){var a=jQuery(this).data("frmtoggle");jQuery(a).is(":visible")?jQuery(a).slideUp("fast"):jQuery(a).slideDown("fast");return!1}function fb(a,b){for(var c in a)if(a.hasOwnProperty(c)&&a[c]===b)return c;return null}function Ka(a){return!jQuery.isArray(a)&&0<=a-parseFloat(a)+1}function zb(){Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c=this.length>>>0,d=Number(b)||0,d=0>d?Math.ceil(d):Math.floor(d);for(0>d&&(d+=c);d<c;d++)if(d in this&&this[d]===
77
+ a)return d;return-1})}function Ab(){"function"!==typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")})}function Bb(){Array.prototype.filter||(Array.prototype.filter=function(a,b){if(void 0===this||null===this)throw new TypeError;var c=Object(this),d=c.length>>>0;if("function"!==typeof a)throw new TypeError;for(var e=[],f=0;f<d;f++)if(f in c){var h=c[f];a.call(b,h,f,c)&&e.push(h)}return e})}function Cb(){Object.keys||(Object.keys=function(a){var b=[],
78
+ c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b})}var O=!1,C="",w=[],M=0;return{init:function(){jQuery(document).off("submit.formidable",".frm-show-form");jQuery(document).on("submit.formidable",".frm-show-form",frmFrontForm.submitForm);jQuery(document).on("click",".frm_trigger",m);var a=jQuery(".frm_blank_field");a.length&&a.closest(".frm_toggle_container").prev(".frm_trigger").click();jQuery.isFunction(jQuery.fn.placeholder)?jQuery(".frm-show-form input, .frm-show-form textarea").placeholder():
79
+ jQuery(".frm-show-form input[onblur], .frm-show-form textarea[onblur]").each(function(){""===jQuery(this).val()&&jQuery(this).blur()});jQuery(document).on("focus",".frm_toggle_default",nb);jQuery(document).on("blur",".frm_toggle_default",ob);jQuery(".frm_toggle_default").blur();jQuery(document.getElementById("frm_resend_email")).click(pb);jQuery(document).on("click",".frm_remove_link",A);jQuery(document).on("focusin","input[data-frmmask]",function(){jQuery(this).mask(jQuery(this).data("frmmask").toString())});
80
+ 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"]',z);jQuery(document).on("click",'.frm-show-form input[type="submit"], .frm-show-form input[name="frm_prev_page"], .frm_page_back, .frm_page_skip, .frm-show-form .frm_save_draft, .frm_prev_page, .frm_button_submit',l);jQuery(document).on("change",'.frm_other_container input[type="checkbox"], .frm_other_container input[type="radio"], .frm_other_container select',
81
+ v);jQuery(document).on("click",".frm_remove_form_row",sb);jQuery(document).on("click",".frm_add_form_row",tb);jQuery(document).on("click","a[data-frmconfirm]",xb);jQuery("a[data-frmtoggle]").click(yb);jQuery(".frm_edit_link_container").on("click","a.frm_inplace_edit",ub);jQuery(".frm_edit_link_container").on("click","a.frm_cancel_edit",vb);jQuery(document).on("click",".frm_ajax_delete",wb);jQuery(".frm_month_heading, .frm_year_heading").click(function(){var a=jQuery(this).children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s");
82
+ a.hasClass("ui-icon-triangle-1-e")?(a.addClass("ui-icon-triangle-1-s").removeClass("ui-icon-triangle-1-e"),jQuery(this).next(".frm_toggle_container").fadeIn("slow")):(a.addClass("ui-icon-triangle-1-e").removeClass("ui-icon-triangle-1-s"),jQuery(this).next(".frm_toggle_container").hide())});ha("pageLoad");ia();zb();Ab();Bb();Cb()},submitForm:function(a){frmFrontForm.submitFormManual(a,this)},submitFormManual:function(a,b){var c=b.className.trim().split(/\s+/gi);if((!c||-1<c.indexOf("frm_pro_form"))&&
83
+ !jQuery("body").hasClass("wp-admin")){a.preventDefault();var d=frmFrontForm.validateFormSubmit(b);0===Object.keys(d).length&&(P(jQuery(b)),-1<c.indexOf("frm_ajax_submit")?1>jQuery(b).find('input[type="file"]').filter(function(){return!!this.value}).length?(C=jQuery(b).find('input[name="frm_action"]').val(),frmFrontForm.checkFormErrors(b,C)):b.submit():b.submit())}},validateFormSubmit:function(a){"undefined"!=typeof tinyMCE&&jQuery(a).find(".wp-editor-wrap").length&&tinyMCE.triggerSave();w=[];var b=
84
+ jQuery(a).hasClass("frm_js_validate");b&&(Na(a)||Oa(a))&&(b=!1);b&&(frmFrontForm.getAjaxFormErrors(a),Object.keys(w).length&&frmFrontForm.addAjaxFormErrors(a));return w},getAjaxFormErrors:function(a){var b=[],c=jQuery(a).find(".frm_required_field:visible input, .frm_required_field:visible select, .frm_required_field:visible textarea").filter(":not(.frm_optional)");if(c.length)for(var d=0,e=c.length;d<e;d++)b=la(c[d],b);c=jQuery(a).find("input[type=email]").filter(":visible");d=jQuery(a).find("input,select,textarea");
85
+ if(d.length)for(var e=0,f=d.length;e<f;e++){var h=d[e];""!==h.value&&"hidden"!=h.type&&("number"==h.type?b=na(h,b):"email"==h.type?b=ma(h,b,c):null!==h.pattern&&(b=oa(h,b)))}c=jQuery(a).find(".frm-g-recaptcha");c.length&&(d=c.data("rid"),0===grecaptcha.getResponse(d).length&&(c=c.closest(".frm_form_field").attr("id").replace("frm_field_","").replace("_container",""),b[c]=""));w=b;if("function"==typeof frmThemeOverride_jsErrors&&(C=jQuery(a).find('input[name="frm_action"]').val(),a=frmThemeOverride_jsErrors(C,
86
+ a),Object.keys(a).length))for(var g in a)w[g]=a[g];return w},addAjaxFormErrors:function(a){Pa();for(var b in w){var c=jQuery(a).find("#frm_field_"+b+"_container");c.length?R(c,b,w):delete w[b]}Qa(a)},checkFormErrors:function(a,b){lb(a,b)},scrollToID:function(a){a=jQuery(document.getElementById(a));frmFrontForm.scrollMsg(a,!1)},scrollMsg:function(a,b,c){if("undefined"==typeof b){if(a=jQuery(document.getElementById("frm_form_"+a+"_container")),1>a.length)return}else a="string"==typeof a?jQuery(b).find("#frm_field_"+
87
+ a+"_container"):a;if(a=a.offset().top){a-=frm_js.offset;b=jQuery("html").css("margin-top");var d=jQuery("body").css("margin-top");if(b||d)a=a-parseInt(b)-parseInt(d);if(a&&window.innerHeight&&(b=document.documentElement.scrollTop||document.body.scrollTop,a>b+window.innerHeight||a<b))return"undefined"===typeof c?jQuery(window).scrollTop(a):jQuery("html,body").animate({scrollTop:a},500),!1}},savingDraft:function(a){return Na(a)},goingToPreviousPage:function(a){return Oa(a)},hideOrShowFields:function(a,
88
+ b){if("pageLoad"===b){var c=document.querySelectorAll('[id^="frm_hide_fields_"]');ba(c)}for(var c={repeatingSection:"",repeatRow:""},d=0,e=a.length;d<e;d++)I(a[d],c),d==e-1&&Va()},hidePreviouslyHiddenFields:function(){var a;a=[];for(var b=document.querySelectorAll('*[id^="frm_hide_fields_"]'),c=b.length,d,e=0;e<c;e++)d=b[e].id.replace("frm_hide_fields_",""),a=a.concat(E(d));b=0;for(c=a.length;b<c;b++)d=document.getElementById(a[b]),null!==d&&(d.style.display="none")},checkDependentDynamicFields:function(a){for(var b=
89
+ {repeatingSection:"",repeatRow:""},c=0,d=a.length;c<d;c++)I(a[c],b)},checkDependentLookupFields:function(a){for(var b,c={repeatingSection:"",repeatRow:""},d=0,e=a.length;d<e;d++)b=a[d],ca(b,c,"value changed")},loadGoogle:function(){if("undefined"!==typeof google&&google&&google.load)for(var a=__FRMTABLES,b=Object.keys(a),c=0;c<b.length;c++)if("graphs"===b[c])for(var d=a[b[c]],e=0,f=d.length;e<f;e++)rb(d[e]);else for(d=a[b[c]],e=b[c],f=0;f<d.length;f++)qb(d[f],e);else setTimeout(frmFrontForm.loadGoogle,
90
+ 30)},removeUsedTimes:function(a,b){console.warn("DEPRECATED: function frmFrontForm.removeUsedTimes v2.03")},escapeHtml:function(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},invisible:function(a){jQuery(a).css("visibility","hidden")},visible:function(a){jQuery(a).css("visibility","visible")}}}var frmFrontForm=frmFrontFormJS();jQuery(document).ready(function(l){frmFrontForm.init()});
91
  function frmRecaptcha(){for(var l=jQuery(".frm-g-recaptcha"),m=0,q=l.length;m<q;m++){var r=grecaptcha.render(l[m].id,{sitekey:l[m].getAttribute("data-sitekey"),size:l[m].getAttribute("data-size"),theme:l[m].getAttribute("data-theme")});l[m].setAttribute("data-rid",r)}}
92
  function frmUpdateField(l,m,q,r,x){jQuery(document.getElementById("frm_update_field_"+l+"_"+m)).html('<span class="frm-loading-img"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_update_field_ajax",entry_id:l,field_id:m,value:q,nonce:frm_js.nonce},success:function(){""===r.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById("frm_update_field_"+l+"_"+m+"_"+x)).fadeOut("slow"):jQuery(document.getElementById("frm_update_field_"+l+"_"+m+"_"+x)).replaceWith(r)}})}
93
  function frmEditEntry(l,m,q,r,x,y){console.warn("DEPRECATED: function frmEditEntry in v2.0.13 use frmFrontForm.editEntry");var A=jQuery(document.getElementById("frm_edit_"+l)),v=A.html(),z=jQuery(document.getElementById(m+l)),p=z.html();z.html('<span class="frm-loading-img" id="'+m+l+'"></span><div class="frm_orig_content" style="display:none">'+p+"</div>");jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"html",data:{action:"frm_entries_edit_entry_ajax",post_id:q,entry_id:l,id:r,nonce:frm_js.nonce},
94
+ success:function(p){z.children(".frm-loading-img").replaceWith(p);A.replaceWith('<span id="frm_edit_'+l+'"><a onclick="frmCancelEdit('+l+",'"+m+"','"+frmFrontForm.escapeHtml(v)+"',"+q+","+r+",'"+y+'\')" class="'+y+'">'+x+"</a></span>")}})}
95
  function frmCancelEdit(l,m,q,r,x,y){console.warn("DEPRECATED: function frmCancelEdit in v2.0.13 use frmFrontForm.cancelEdit");var A=jQuery(document.getElementById("frm_edit_"+l)),v=A.find("a"),z=v.html();v.hasClass("frm_ajax_edited")||(v=jQuery(document.getElementById(m+l)),v.children(".frm_forms").replaceWith(""),v.children(".frm_orig_content").fadeIn("slow").removeClass("frm_orig_content"));A.replaceWith('<a id="frm_edit_'+l+'" class="frm_edit_link '+y+'" href="javascript:frmEditEntry('+l+",'"+
96
+ m+"',"+r+","+x+",'"+frmFrontForm.escapeHtml(z)+"','"+y+"')\">"+q+"</a>")}
97
  function frmDeleteEntry(l,m){console.warn("DEPRECATED: function frmDeleteEntry in v2.0.13 use frmFrontForm.deleteEntry");jQuery(document.getElementById("frm_delete_"+l)).replaceWith('<span class="frm-loading-img" id="frm_delete_'+l+'"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_destroy",entry:l,nonce:frm_js.nonce},success:function(q){"success"==q.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById(m+l)).fadeOut("slow"):jQuery(document.getElementById("frm_delete_"+
98
+ l)).replaceWith(q)}})}function frmOnSubmit(l){console.warn("DEPRECATED: function frmOnSubmit in v2.0 use frmFrontForm.submitForm");frmFrontForm.submitForm(l,this)}
99
  function frm_resend_email(l,m){console.warn("DEPRECATED: function frm_resend_email in v2.0");$link=jQuery(document.getElementById("frm_resend_email"));$link.append('<span class="spinner" style="display:inline"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_send_email",entry_id:l,form_id:m,nonce:frm_js.nonce},success:function(l){$link.replaceWith(l)}})};
js/formidable_admin.js CHANGED
@@ -1089,7 +1089,7 @@ function frmAdminBuildJS(){
1089
  function fillDropdownOpts(field, sourceID, includeBlank){
1090
  if ( field !== null ) {
1091
  removeDropdownOpts(field);
1092
- var opts = jQuery('input[name^="field_options[options_'+sourceID+'"][name$="[value]"');
1093
  var l = opts.length;
1094
  jQuery.each(opts, function() {
1095
  var labelName = this.name.replace('[value]', '[label]');
@@ -2241,9 +2241,19 @@ function frmAdminBuildJS(){
2241
 
2242
  function initiateMultiselect(){
2243
  jQuery('.frm_multiselect').multiselect({
2244
- templates: {ul:'<ul class="multiselect-container frm-dropdown-menu"></ul>'},
2245
  buttonContainer: '<div class="btn-group frm-btn-group" />',
2246
- nonSelectedText:frm_admin_js['default']// TODO: should be noneSelectedText
 
 
 
 
 
 
 
 
 
 
2247
  });
2248
  }
2249
 
@@ -2622,9 +2632,9 @@ function frmAdminBuildJS(){
2622
  jQuery('#postbox-container-1').on('mousedown', '#frm_adv_info a, .frm_field_list a', function(e){
2623
  e.preventDefault();
2624
  });
2625
-
2626
- jQuery('.subsubsub a.frmids').click(function(e){toggleKeyID('frmids',e);});
2627
- jQuery('.subsubsub a.frmkeys').click(function(e){toggleKeyID('frmkeys',e);});
2628
 
2629
  if(typeof(tinymce)=='object'){
2630
  DOM=tinymce.DOM;
@@ -2646,7 +2656,7 @@ function frmAdminBuildJS(){
2646
  }
2647
 
2648
  },
2649
-
2650
  viewInit: function(){
2651
  // add form nav
2652
  var $navCont = document.getElementById('frm_nav_container');
1089
  function fillDropdownOpts(field, sourceID, includeBlank){
1090
  if ( field !== null ) {
1091
  removeDropdownOpts(field);
1092
+ var opts = jQuery('input[name^="field_options[options_'+sourceID+'"][name$="[value]"]');
1093
  var l = opts.length;
1094
  jQuery.each(opts, function() {
1095
  var labelName = this.name.replace('[value]', '[label]');
2241
 
2242
  function initiateMultiselect(){
2243
  jQuery('.frm_multiselect').multiselect({
2244
+ templates: {ul:'<ul class="multiselect-container frm-dropdown-menu"></ul>'},
2245
  buttonContainer: '<div class="btn-group frm-btn-group" />',
2246
+ nonSelectedText:frm_admin_js['default'],// TODO: should be noneSelectedText
2247
+ onDropdownShown: function( event ) {
2248
+ var action = jQuery( event.currentTarget.closest( '.frm_form_action_settings' ) );
2249
+ if ( action.length ) {
2250
+ jQuery( '#wpcontent' ).click(function () {
2251
+ if ( jQuery( '.multiselect-container.frm-dropdown-menu' ).is( ':visible' ) ) {
2252
+ jQuery( event.currentTarget ).removeClass('open');
2253
+ }
2254
+ });
2255
+ }
2256
+ },
2257
  });
2258
  }
2259
 
2632
  jQuery('#postbox-container-1').on('mousedown', '#frm_adv_info a, .frm_field_list a', function(e){
2633
  e.preventDefault();
2634
  });
2635
+
2636
+ jQuery('#frm_adv_info').on('click', '.subsubsub a.frmids', function(e){toggleKeyID('frmids',e);});
2637
+ jQuery('#frm_adv_info').on('click', '.subsubsub a.frmkeys', function(e){toggleKeyID('frmkeys',e);});
2638
 
2639
  if(typeof(tinymce)=='object'){
2640
  DOM=tinymce.DOM;
2656
  }
2657
 
2658
  },
2659
+
2660
  viewInit: function(){
2661
  // add form nav
2662
  var $navCont = document.getElementById('frm_nav_container');
languages/formidable-az_AZ.mo CHANGED
Binary file
languages/formidable-az_AZ.po CHANGED
</
@@ -1,9 +1,9 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: Formidable v2.03.01\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: 2016-09-01 03:07+0000\n"
6
- "PO-Revision-Date: Wed Jan 25 2017 12:45:19 GMT-0800 (PST)\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
9
  "Language: Azerbaijani (Azerbaijan)\n"
@@ -79,7 +79,7 @@ msgstr ""
79
  #: ../classes/controllers/FrmEntriesController.php:72 ..
80
  #: classes/controllers/FrmFormsController.php:716 ../classes/views/frm-
81
  #: entries/form.php:45 ../classes/views/frm-entries/sidebar-shared.php:29 ..
82
- #: pro/classes/helpers/FrmProFieldsHelper.php:2552 ..
83
  #: pro/classes/views/xml/map_csv_fields.php:57 ..
84
  #: pro/classes/views/xml/map_csv_fields.php:57
85
  msgid "Entry Key"
@@ -87,7 +87,7 @@ msgstr ""
87
 
88
  #: ../classes/controllers/FrmEntriesController.php:77 ..
89
  #: classes/controllers/FrmFormsController.php:460 ../classes/views/frm-
90
- #: forms/_publish_box.php:47 ../classes/widgets/FrmShowForm.php:46 ..
91
  #: pro/classes/controllers/FrmProDisplaysController.php:137
92
  msgid "Form"
93
  msgstr ""
@@ -104,7 +104,7 @@ msgstr ""
104
  #: ../classes/controllers/FrmEntriesController.php:82 ..
105
  #: pro/classes/helpers/FrmProEntriesListHelper.php:59 ..
106
  #: pro/classes/helpers/FrmProEntriesListHelper.php:70 ..
107
- #: pro/classes/helpers/FrmProFieldsHelper.php:2555 ..
108
  #: pro/classes/views/displays/_calendar_options.php:4 ..
109
  #: pro/classes/views/displays/_calendar_options.php:16 ..
110
  #: pro/classes/views/displays/order_row.php:4 ..
@@ -113,7 +113,7 @@ msgid "Entry creation date"
113
  msgstr ""
114
 
115
  #: ../classes/controllers/FrmEntriesController.php:83 ..
116
- #: pro/classes/helpers/FrmProFieldsHelper.php:2556 ..
117
  #: pro/classes/views/displays/_calendar_options.php:5 ..
118
  #: pro/classes/views/displays/_calendar_options.php:17 ..
119
  #: pro/classes/views/displays/order_row.php:5
@@ -144,7 +144,7 @@ msgid "Entries were Successfully Destroyed"
144
  msgstr ""
145
 
146
  #: ../classes/controllers/FrmEntriesController.php:423 ..
147
- #: pro/classes/controllers/FrmProEntriesController.php:391
148
  msgid "No entries were specified"
149
  msgstr ""
150
 
@@ -280,9 +280,9 @@ msgstr ""
280
 
281
  #: ../classes/controllers/FrmFormsController.php:715 ../classes/views/frm-
282
  #: entries/sidebar-shared.php:23 ../pro/classes/controllers/FrmProFormsController.
283
- #: php:560 ../pro/classes/helpers/FrmProEntriesListHelper.php:60 ..
284
  #: pro/classes/helpers/FrmProEntriesListHelper.php:71 ..
285
- #: pro/classes/helpers/FrmProFieldsHelper.php:2551 ..
286
  #: pro/classes/views/displays/order_row.php:3 ..
287
  #: pro/classes/views/displays/where_row.php:6 ..
288
  #: pro/classes/views/xml/map_csv_fields.php:56 ..
@@ -291,7 +291,7 @@ msgid "Entry ID"
291
  msgstr ""
292
 
293
  #: ../classes/controllers/FrmFormsController.php:718 ..
294
- #: pro/classes/helpers/FrmProFieldsHelper.php:2554
295
  msgid "User IP"
296
  msgstr ""
297
 
@@ -304,7 +304,7 @@ msgid "Entry updated"
304
  msgstr ""
305
 
306
  #: ../classes/controllers/FrmFormsController.php:723 ..
307
- #: pro/classes/helpers/FrmProFieldsHelper.php:2612
308
  msgid "Site Name"
309
  msgstr ""
310
 
@@ -357,7 +357,7 @@ msgstr ""
357
  #: php:24 ../classes/views/shared/form-nav.php:20 ../classes/views/styles/manage.
358
  #: php:31 ../classes/views/xml/import_form.php:85 ..
359
  #: pro/classes/controllers/FrmProDisplaysController.php:101 ..
360
- #: pro/classes/controllers/FrmProFormsController.php:440 ..
361
  #: pro/classes/views/xml/csv_opts.php:13
362
  msgid "(no title)"
363
  msgstr ""
@@ -476,7 +476,7 @@ msgid "Add/Edit Views"
476
  msgstr ""
477
 
478
  #: ../classes/helpers/FrmAppHelper.php:1079 ../classes/helpers/FrmFieldsHelper.
479
- #: php:175 ../pro/classes/controllers/FrmProFieldsController.php:1505
480
  #, php-format
481
  msgid "%s is invalid"
482
  msgstr ""
@@ -914,22 +914,22 @@ msgstr ""
914
  msgid "IP"
915
  msgstr ""
916
 
917
- #: ../classes/helpers/FrmEntriesListHelper.php:53 ..
918
- #: pro/classes/controllers/FrmProEntriesController.php:1675 ..
919
  #: pro/classes/helpers/FrmProDisplaysHelper.php:59
920
  msgid "No Entries Found"
921
  msgstr ""
922
 
923
- #: ../classes/helpers/FrmEntriesListHelper.php:76 ..
924
  #: pro/classes/controllers/FrmProDisplaysController.php:63
925
  msgid "View all forms"
926
  msgstr ""
927
 
928
- #: ../classes/helpers/FrmEntriesListHelper.php:77
929
  msgid "Filter"
930
  msgstr ""
931
 
932
- #: ../classes/helpers/FrmEntriesListHelper.php:208
933
  msgid "Are you sure you want to delete that?"
934
  msgstr ""
935
 
@@ -1560,20 +1560,20 @@ msgstr ""
1560
  msgid "You do not have permission to install plugin updates"
1561
  msgstr ""
1562
 
1563
- #: ../classes/models/FrmEntryFormat.php:262 ../classes/models/FrmNotification.php:
1564
  #: 91 ../classes/views/frm-entries/sidebar-shared.php:56 ..
1565
- #: pro/classes/controllers/FrmProFormsController.php:78 ..
1566
  #: pro/classes/views/frmpro-forms/add_form_options.php:30 ..
1567
  #: pro/classes/views/xml/map_csv_fields.php:54
1568
  msgid "IP Address"
1569
  msgstr ""
1570
 
1571
- #: ../classes/models/FrmEntryFormat.php:264 ../classes/models/FrmNotification.php:
1572
  #: 92
1573
  msgid "User-Agent (Browser/OS)"
1574
  msgstr ""
1575
 
1576
- #: ../classes/models/FrmEntryFormat.php:267 ../classes/models/FrmNotification.php:
1577
  #: 93 ../classes/views/frm-entries/sidebar-shared.php:69
1578
  msgid "Referrer"
1579
  msgstr ""
@@ -1582,7 +1582,7 @@ msgstr ""
1582
  msgid "There was a problem with your submission. Please try again."
1583
  msgstr ""
1584
 
1585
- #: ../classes/models/FrmEntryValidate.php:16 ../classes/models/FrmSettings.php:95
1586
  msgid "You do not have permission to do that"
1587
  msgstr ""
1588
 
@@ -1621,20 +1621,20 @@ msgstr ""
1621
 
1622
  #: ../classes/models/FrmField.php:14 ..
1623
  #: pro/classes/controllers/FrmProLookupFieldsController.php:14 ..
1624
- #: pro/classes/helpers/FrmProFieldsHelper.php:3636
1625
  msgid "Checkboxes"
1626
  msgstr ""
1627
 
1628
  #: ../classes/models/FrmField.php:15 ../classes/views/styles/_sample_form.php:58 .
1629
  #: ./pro/classes/controllers/FrmProLookupFieldsController.php:13 ..
1630
- #: pro/classes/helpers/FrmProFieldsHelper.php:3635 ..
1631
  #: pro/classes/views/styles/_sample_form.php:14
1632
  msgid "Radio Buttons"
1633
  msgstr ""
1634
 
1635
  #: ../classes/models/FrmField.php:16 ..
1636
  #: pro/classes/controllers/FrmProLookupFieldsController.php:12 ..
1637
- #: pro/classes/helpers/FrmProFieldsHelper.php:3634
1638
  msgid "Dropdown"
1639
  msgstr ""
1640
 
@@ -1647,7 +1647,7 @@ msgid "End Section"
1647
  msgstr ""
1648
 
1649
  #: ../classes/models/FrmField.php:31 ../pro/classes/helpers/FrmProFieldsHelper.
1650
- #: php:3622
1651
  msgid "Section"
1652
  msgstr ""
1653
 
@@ -1672,7 +1672,7 @@ msgid "Scale"
1672
  msgstr ""
1673
 
1674
  #: ../classes/models/FrmField.php:41 ../pro/classes/helpers/FrmProFieldsHelper.
1675
- #: php:3632
1676
  msgid "Dynamic Field"
1677
  msgstr ""
1678
 
@@ -1699,7 +1699,7 @@ msgstr ""
1699
 
1700
  #: ../classes/models/FrmFormAction.php:686 ../classes/views/frm-
1701
  #: forms/_publish_box.php:9 ../pro/classes/controllers/FrmProFormsController.php:
1702
- #: 220
1703
  msgid "Save Draft"
1704
  msgstr ""
1705
 
@@ -1815,31 +1815,31 @@ msgid ""
1815
  "<br/>Team Formidable - %1$sformidableforms.com%2$s"
1816
  msgstr ""
1817
 
1818
- #: ../classes/models/FrmSettings.php:88
1819
  msgid "Your responses were successfully submitted. Thank you!"
1820
  msgstr ""
1821
 
1822
- #: ../classes/models/FrmSettings.php:89
1823
  msgid "This field cannot be blank."
1824
  msgstr ""
1825
 
1826
- #: ../classes/models/FrmSettings.php:90
1827
  msgid "This value must be unique."
1828
  msgstr ""
1829
 
1830
- #: ../classes/models/FrmSettings.php:91
1831
  msgid "There was a problem with your submission. Errors are marked below."
1832
  msgstr ""
1833
 
1834
- #: ../classes/models/FrmSettings.php:92
1835
  msgid "We're sorry. It looks like you've already submitted that."
1836
  msgstr ""
1837
 
1838
- #: ../classes/models/FrmSettings.php:94
1839
  msgid "You do not have permission to view this form."
1840
  msgstr ""
1841
 
1842
- #: ../classes/models/FrmSettings.php:161
1843
  msgid "The reCAPTCHA was not entered correctly"
1844
  msgstr ""
1845
 
@@ -1950,7 +1950,7 @@ msgid "Entry Details"
1950
  msgstr ""
1951
 
1952
  #: ../classes/views/frm-entries/sidebar-shared.php:8 ..
1953
- #: pro/classes/controllers/FrmProEntriesController.php:1638
1954
  msgid "Post"
1955
  msgstr ""
1956
 
@@ -1973,10 +1973,10 @@ msgid "Entry Actions"
1973
  msgstr ""
1974
 
1975
  #: ../classes/views/frm-entries/sidebar-show.php:22 ..
1976
- #: pro/classes/controllers/FrmProEntriesController.php:1676 ..
1977
- #: pro/classes/controllers/FrmProEntriesController.php:2057 ..
1978
- #: pro/classes/controllers/FrmProEntriesController.php:2131 ..
1979
- #: pro/classes/controllers/FrmProEntriesController.php:2525
1980
  msgid "Are you sure you want to delete that entry?"
1981
  msgstr ""
1982
 
@@ -2873,7 +2873,7 @@ msgid "Fields from your form"
2873
  msgstr ""
2874
 
2875
  #: ../classes/views/shared/mb_adv_info.php:68 ..
2876
- #: pro/classes/helpers/FrmProFieldsHelper.php:2600
2877
  msgid "Helpers"
2878
  msgstr ""
2879
 
@@ -3268,7 +3268,7 @@ msgstr ""
3268
  msgid "Formidable Form"
3269
  msgstr ""
3270
 
3271
- #: ../classes/widgets/FrmShowForm.php:56
3272
  msgid "Show Description"
3273
  msgstr ""
3274
 
@@ -3441,113 +3441,113 @@ msgstr ""
3441
  msgid "or"
3442
  msgstr ""
3443
 
3444
- #: ../pro/classes/controllers/FrmProEntriesController.php:302
3445
  msgid "Draft was Successfully Created"
3446
  msgstr ""
3447
 
3448
- #: ../pro/classes/controllers/FrmProEntriesController.php:304
3449
  msgid "Entry was Successfully Created"
3450
  msgstr ""
3451
 
3452
- #: ../pro/classes/controllers/FrmProEntriesController.php:339
3453
  msgid "Draft was Successfully Updated"
3454
  msgstr ""
3455
 
3456
- #: ../pro/classes/controllers/FrmProEntriesController.php:341
3457
  msgid "Entry was Successfully Updated"
3458
  msgstr ""
3459
 
3460
- #: ../pro/classes/controllers/FrmProEntriesController.php:344
3461
  msgid "Back to Entries"
3462
  msgstr ""
3463
 
3464
- #: ../pro/classes/controllers/FrmProEntriesController.php:362
3465
  msgid "Entry was Successfully Duplicated"
3466
  msgstr ""
3467
 
3468
- #: ../pro/classes/controllers/FrmProEntriesController.php:364
3469
  msgid "There was a problem duplicating that entry"
3470
  msgstr ""
3471
 
3472
- #: ../pro/classes/controllers/FrmProEntriesController.php:418
3473
  msgid "No form was found"
3474
  msgstr ""
3475
 
3476
- #: ../pro/classes/controllers/FrmProEntriesController.php:1156
3477
  msgid "Please wait while you are redirected."
3478
  msgstr ""
3479
 
3480
- #: ../pro/classes/controllers/FrmProEntriesController.php:1159
3481
  #, php-format
3482
  msgid "%1$sClick here%2$s if you are not automatically redirected."
3483
  msgstr ""
3484
 
3485
- #: ../pro/classes/controllers/FrmProEntriesController.php:1263
3486
  msgid "Create Entry in Form"
3487
  msgstr ""
3488
 
3489
- #: ../pro/classes/controllers/FrmProEntriesController.php:1306
3490
  msgid "Copied from Post"
3491
  msgstr ""
3492
 
3493
- #: ../pro/classes/controllers/FrmProEntriesController.php:1356 ..
3494
- #: pro/classes/controllers/FrmProEntriesController.php:1379
3495
  msgid "You are trying to access an entry that does not exist."
3496
  msgstr ""
3497
 
3498
- #: ../pro/classes/controllers/FrmProEntriesController.php:1691
3499
  msgid ""
3500
  "There are no matching fields. Please check your formresults shortcode to "
3501
  "make sure you are using the correct form and field IDs."
3502
  msgstr ""
3503
 
3504
- #: ../pro/classes/controllers/FrmProEntriesController.php:2563 ..
3505
- #: pro/classes/controllers/FrmProEntriesController.php:2934
3506
  msgid "Your entry was successfully deleted"
3507
  msgstr ""
3508
 
3509
- #: ../pro/classes/controllers/FrmProEntriesController.php:2603
3510
  msgid "You are missing options in your shortcode. field_id is required."
3511
  msgstr ""
3512
 
3513
- #: ../pro/classes/controllers/FrmProEntriesController.php:2950
3514
  msgid "There was an error deleting that entry"
3515
  msgstr ""
3516
 
3517
- #: ../pro/classes/controllers/FrmProEntriesController.php:3012
3518
  #, php-format
3519
  msgid "Resent to %s"
3520
  msgstr ""
3521
 
3522
- #: ../pro/classes/controllers/FrmProEntriesController.php:3017
3523
  msgid "Resent to No one! You do not have permission"
3524
  msgstr ""
3525
 
3526
- #: ../pro/classes/controllers/FrmProFieldsController.php:537
3527
  msgid "Option Label"
3528
  msgstr ""
3529
 
3530
- #: ../pro/classes/controllers/FrmProFieldsController.php:538 ..
3531
- #: pro/classes/controllers/FrmProFormsController.php:276
3532
  msgid "Saved Value"
3533
  msgstr ""
3534
 
3535
- #: ../pro/classes/controllers/FrmProFieldsController.php:723 ..
3536
  #: pro/classes/views/frmpro-fields/options-form-before.php:31
3537
  msgid "Select a taxonomy on the Form Actions tab of the Form Settings page"
3538
  msgstr ""
3539
 
3540
- #: ../pro/classes/controllers/FrmProFieldsController.php:739 ..
3541
  #: pro/classes/views/frmpro-fields/field-values.php:10
3542
  msgid "Anything"
3543
  msgstr ""
3544
 
3545
- #: ../pro/classes/controllers/FrmProFieldsController.php:1164 ..
3546
- #: pro/classes/controllers/FrmProFieldsController.php:1170
3547
  msgid "Show form uploads"
3548
  msgstr ""
3549
 
3550
- #: ../pro/classes/controllers/FrmProFieldsController.php:1169
3551
  msgid "Hide form uploads"
3552
  msgstr ""
3553
 
@@ -3595,533 +3595,533 @@ msgstr ""
3595
  msgid "this action if"
3596
  msgstr ""
3597
 
3598
- #: ../pro/classes/controllers/FrmProFormsController.php:64
3599
  msgid "Current Date"
3600
  msgstr ""
3601
 
3602
- #: ../pro/classes/controllers/FrmProFormsController.php:65
3603
  msgid "Current Time"
3604
  msgstr ""
3605
 
3606
- #: ../pro/classes/controllers/FrmProFormsController.php:67
3607
  msgid "Login"
3608
  msgstr ""
3609
 
3610
- #: ../pro/classes/controllers/FrmProFormsController.php:68 ..
3611
- #: pro/classes/controllers/FrmProFormsController.php:290
3612
  msgid "Display Name"
3613
  msgstr ""
3614
 
3615
- #: ../pro/classes/controllers/FrmProFormsController.php:69 ..
3616
- #: pro/classes/controllers/FrmProFormsController.php:288
3617
  msgid "First Name"
3618
  msgstr ""
3619
 
3620
- #: ../pro/classes/controllers/FrmProFormsController.php:70 ..
3621
- #: pro/classes/controllers/FrmProFormsController.php:289
3622
  msgid "Last Name"
3623
  msgstr ""
3624
 
3625
- #: ../pro/classes/controllers/FrmProFormsController.php:71 ..
3626
- #: pro/classes/controllers/FrmProFormsController.php:287 ..
3627
  #: pro/classes/models/FrmProField.php:36 ../pro/classes/models/FrmProForm.php:276
3628
  msgid "User ID"
3629
  msgstr ""
3630
 
3631
- #: ../pro/classes/controllers/FrmProFormsController.php:72
3632
  msgid "User Meta"
3633
  msgstr ""
3634
 
3635
- #: ../pro/classes/controllers/FrmProFormsController.php:73
3636
  msgid "User Role"
3637
  msgstr ""
3638
 
3639
- #: ../pro/classes/controllers/FrmProFormsController.php:75 ..
3640
  #: pro/classes/views/frmpro-form-actions/post_options.php:49
3641
  msgid "Post Title"
3642
  msgstr ""
3643
 
3644
- #: ../pro/classes/controllers/FrmProFormsController.php:76
3645
  msgid "Author Email"
3646
  msgstr ""
3647
 
3648
- #: ../pro/classes/controllers/FrmProFormsController.php:77
3649
  msgid "Post Meta"
3650
  msgstr ""
3651
 
3652
- #: ../pro/classes/controllers/FrmProFormsController.php:79
3653
  msgid "Increment"
3654
  msgstr ""
3655
 
3656
- #: ../pro/classes/controllers/FrmProFormsController.php:80
3657
  msgid "GET/POST"
3658
  msgstr ""
3659
 
3660
- #: ../pro/classes/controllers/FrmProFormsController.php:80
3661
  msgid "A variable from the URL or value posted from previous page."
3662
  msgstr ""
3663
 
3664
- #: ../pro/classes/controllers/FrmProFormsController.php:80
3665
  msgid ""
3666
  "Replace 'whatever' with the parameter name. In url.com?product=form, the "
3667
  "variable is 'product'. You would use [get param=product] in your field."
3668
  msgstr ""
3669
 
3670
- #: ../pro/classes/controllers/FrmProFormsController.php:81
3671
  msgid "SERVER"
3672
  msgstr ""
3673
 
3674
- #: ../pro/classes/controllers/FrmProFormsController.php:81
3675
  msgid "A variable from the PHP SERVER array."
3676
  msgstr ""
3677
 
3678
- #: ../pro/classes/controllers/FrmProFormsController.php:81
3679
  msgid ""
3680
  "Replace 'whatever' with the parameter name. To get the url of the current "
3681
  "page, use [server param=\"REQUEST_URI\"] in your field."
3682
  msgstr ""
3683
 
3684
- #: ../pro/classes/controllers/FrmProFormsController.php:252
3685
  msgid "Equals"
3686
  msgstr ""
3687
 
3688
- #: ../pro/classes/controllers/FrmProFormsController.php:253
3689
  msgid "Does Not Equal"
3690
  msgstr ""
3691
 
3692
- #: ../pro/classes/controllers/FrmProFormsController.php:254
3693
  msgid "Is Blank"
3694
  msgstr ""
3695
 
3696
- #: ../pro/classes/controllers/FrmProFormsController.php:255
3697
  msgid "Is Not Blank"
3698
  msgstr ""
3699
 
3700
- #: ../pro/classes/controllers/FrmProFormsController.php:256
3701
  msgid "Is Like"
3702
  msgstr ""
3703
 
3704
- #: ../pro/classes/controllers/FrmProFormsController.php:257
3705
  msgid "Is Not Like"
3706
  msgstr ""
3707
 
3708
- #: ../pro/classes/controllers/FrmProFormsController.php:258
3709
  msgid "Greater Than"
3710
  msgstr ""
3711
 
3712
- #: ../pro/classes/controllers/FrmProFormsController.php:259
3713
  msgid "Less Than"
3714
  msgstr ""
3715
 
3716
- #: ../pro/classes/controllers/FrmProFormsController.php:268
3717
  msgid "Clickable Links"
3718
  msgstr ""
3719
 
3720
- #: ../pro/classes/controllers/FrmProFormsController.php:269
3721
  msgid "Remove Links"
3722
  msgstr ""
3723
 
3724
- #: ../pro/classes/controllers/FrmProFormsController.php:269
3725
  msgid "Removes the automatic links to category pages"
3726
  msgstr ""
3727
 
3728
- #: ../pro/classes/controllers/FrmProFormsController.php:270
3729
  msgid "Sanitize"
3730
  msgstr ""
3731
 
3732
- #: ../pro/classes/controllers/FrmProFormsController.php:270
3733
  msgid ""
3734
  "Replaces spaces with dashes and lowercases all. Use if adding an HTML class "
3735
  "or ID"
3736
  msgstr ""
3737
 
3738
- #: ../pro/classes/controllers/FrmProFormsController.php:271
3739
  msgid "Sanitize URL"
3740
  msgstr ""
3741
 
3742
- #: ../pro/classes/controllers/FrmProFormsController.php:271
3743
  msgid "Replaces all HTML entities with a URL safe string."
3744
  msgstr ""
3745
 
3746
- #: ../pro/classes/controllers/FrmProFormsController.php:272
3747
  msgid "Truncate"
3748
  msgstr ""
3749
 
3750
- #: ../pro/classes/controllers/FrmProFormsController.php:272
3751
  msgid ""
3752
  "Truncate text with a link to view more. If using Both (dynamic), the link "
3753
  "goes to the detail page. Otherwise, it will show in-place."
3754
  msgstr ""
3755
 
3756
- #: ../pro/classes/controllers/FrmProFormsController.php:273
3757
  msgid "More Text"
3758
  msgstr ""
3759
 
3760
- #: ../pro/classes/controllers/FrmProFormsController.php:274
3761
  msgid "Time Ago"
3762
  msgstr ""
3763
 
3764
- #: ../pro/classes/controllers/FrmProFormsController.php:274
3765
  msgid "How long ago a date was in minutes, hours, days, months, or years."
3766
  msgstr ""
3767
 
3768
- #: ../pro/classes/controllers/FrmProFormsController.php:275
3769
  msgid "# Format"
3770
  msgstr ""
3771
 
3772
- #: ../pro/classes/controllers/FrmProFormsController.php:276
3773
  msgid "Show the saved value for fields with separate values."
3774
  msgstr ""
3775
 
3776
- #: ../pro/classes/controllers/FrmProFormsController.php:277
3777
  msgid "Remove HTML"
3778
  msgstr ""
3779
 
3780
- #: ../pro/classes/controllers/FrmProFormsController.php:277
3781
  msgid "Remove all HTML added into your form before display"
3782
  msgstr ""
3783
 
3784
- #: ../pro/classes/controllers/FrmProFormsController.php:278
3785
  msgid "Keep JS"
3786
  msgstr ""
3787
 
3788
- #: ../pro/classes/controllers/FrmProFormsController.php:278
3789
  msgid ""
3790
  "Javascript from your form entries are automatically removed. Add this option "
3791
  "only if you trust those submitting entries."
3792
  msgstr ""
3793
 
3794
- #: ../pro/classes/controllers/FrmProFormsController.php:291
3795
  msgid "User Login"
3796
  msgstr ""
3797
 
3798
- #: ../pro/classes/controllers/FrmProFormsController.php:293
3799
  msgid "Avatar"
3800
  msgstr ""
3801
 
3802
- #: ../pro/classes/controllers/FrmProFormsController.php:294
3803
  msgid "Author Link"
3804
  msgstr ""
3805
 
3806
- #: ../pro/classes/controllers/FrmProFormsController.php:353
3807
  msgid "Insert a View"
3808
  msgstr ""
3809
 
3810
- #: ../pro/classes/controllers/FrmProFormsController.php:354
3811
  msgid "Graph"
3812
  msgstr ""
3813
 
3814
- #: ../pro/classes/controllers/FrmProFormsController.php:354
3815
  msgid "Insert a Graph"