PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.26.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.26.1
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / classes / views / frm-fields / back-end / settings.php

settings.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 6.26.1, at classes/views/frm-fields/back-end/settings.php

545 lines 23.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die( 'You are not allowed to call this page directly.' );
4 }
5 ?>
6 <div class="frm-single-settings frm_hidden frm-fields frm-type-<?php echo esc_attr( $field['type'] ); ?>" id="frm-single-settings-<?php echo esc_attr( $field['id'] ); ?>" data-fid="<?php echo esc_attr( $field['id'] ); ?>">
7 <input type="hidden" name="frm_fields_submitted[]" value="<?php echo esc_attr( $field['id'] ); ?>" />
8 <input type="hidden" name="field_options[field_order_<?php echo esc_attr( $field['id'] ); ?>]" value="<?php echo esc_attr( $field['field_order'] ); ?>" />
9
10 <h3 aria-expanded="true">
11 <?php
12 printf(
13 /* translators: %s: Field type */
14 esc_html__( '%s Field', 'formidable' ),
15 esc_html( $type_name )
16 );
17 ?>
18 <span class="frm-sub-label frm-text-sm frm-text-grey-400">(ID <?php echo esc_html( $field['id'] ); ?>)</span>
19 </h3>
20
21 <div class="frm_grid_container frm-collapse-me" role="group">
22 <?php
23 if ( $field['type'] === 'captcha' && ! FrmFieldCaptcha::should_show_captcha() ) {
24 ?>
25 <div class="frm_warning_style frm-with-icon">
26 <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_alert_icon', array( 'style' => 'width:24px' ) ); ?>
27 <span>
28 <?php
29 /* translators: %1$s: Link HTML, %2$s: End link */
30 printf( esc_html__( 'Captchas will not be used until the Site and Secret Keys are %1$sset up%2$s.', 'formidable' ), '<a href="?page=formidable-settings&t=captcha_settings" target="_blank">', '</a>' );
31 ?>
32 </span>
33 </div>
34 <?php
35 }
36
37 if ( $field['type'] === 'credit_card' && ! FrmAppHelper::pro_is_installed() ) {
38 if ( ! FrmStrpLiteConnectHelper::at_least_one_mode_is_setup() && ! FrmSquareLiteConnectHelper::at_least_one_mode_is_setup() ) {
39 FrmStrpLiteAppHelper::not_connected_warning();
40 } elseif ( ! FrmTransLiteActionsController::get_actions_for_form( $field['form_id'] ) ) {
41 ?>
42 <div class="frm_warning_style frm-with-icon">
43 <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_alert_icon', array( 'style' => 'width:24px' ) ); ?>
44 <span>
45 <?php
46 /* translators: %1$s: Link HTML, %2$s: End link */
47 printf( esc_html__( 'Credit Cards will not work without %1$sadding a Collect Payment action%2$s.', 'formidable' ), '<a href="?page=formidable&frm_action=settings&id=' . absint( $field['form_id'] ) . '&t=email_settings" target="_blank">', '</a>' );
48 ?>
49 </span>
50 </div>
51 <?php
52 }
53 }
54 ?>
55
56 <?php
57 if ( $field['type'] === FrmFieldGdprHelper::FIELD_TYPE && FrmFieldGdprHelper::hide_gdpr_field() ) {
58 ?>
59 <div class="frm_note_style">
60 <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_alert_icon', array( 'style' => 'width:24px' ) ); ?>
61 <span>
62 <?php
63 /* translators: %1$s: Link HTML, %2$s: End link */
64 printf( esc_html__( 'GDPR field is disabled. Please enable it in the Formidable %1$sSettings%2$s.', 'formidable' ), '<a href="?page=formidable-settings" target="_blank">', '</a>' );
65 ?>
66 </span>
67 </div>
68 <?php
69 }
70 ?>
71
72 <?php
73 /**
74 * Fires before the field label in the field settings.
75 *
76 * @since 6.23
77 *
78 * @param array $field The field settings.
79 * @param array $display The display settings for the field.
80 * @param array $values The values associated with the field.
81 */
82 do_action( 'frm_field_options_before_label', $field, $display, $values );
83 ?>
84 <?php if ( $display['label'] ) { ?>
85 <p class="frm-mt-xs">
86 <label for="frm_name_<?php echo esc_attr( $field['id'] ); ?>">
87 <?php echo esc_html( apply_filters( 'frm_builder_field_label', __( 'Field Label', 'formidable' ), $field ) ); ?>
88 </label>
89 <input type="text" name="field_options[name_<?php echo esc_attr( $field['id'] ); ?>]" value="<?php echo esc_attr( $field['name'] ); ?>" id="frm_name_<?php echo esc_attr( $field['id'] ); ?>" data-changeme="field_label_<?php echo esc_attr( $field['id'] ); ?>" />
90 </p>
91 <?php } else { ?>
92 <input type="hidden" name="field_options[name_<?php echo esc_attr( $field['id'] ); ?>]" value="<?php echo esc_attr( $field['name'] ); ?>" id="frm_name_<?php echo esc_attr( $field['id'] ); ?>" />
93 <?php } ?>
94
95 <div class="frm-hide-empty frm-inline-flex frm-gap-sm frm-flex-wrap frm-items-center frm-my-xs">
96 <?php if ( $display['required'] ) { ?>
97 <div class="frm_form_field">
98 <label for="frm_req_field_<?php echo esc_attr( $field['id'] ); ?>" class="frm-mb-0">
99 <input type="checkbox" id="frm_req_field_<?php echo esc_attr( $field['id'] ); ?>" class="frm_req_field" name="field_options[required_<?php echo esc_attr( $field['id'] ); ?>]" value="1" <?php echo $display['readonly_required'] ? 'readonly onclick="return false;"' : ''; ?> <?php checked( ! empty( $field['required'] ) || ! empty( $display['readonly_required'] ) ); ?> />
100 <?php esc_html_e( 'Required', 'formidable' ); ?>
101 </label>
102 </div>
103 <?php
104 }
105
106 if ( $display['unique'] ) {
107 ?>
108 <div class="frm_form_field">
109 <label for="frm_uniq_field_<?php echo esc_attr( $field['id'] ); ?>" class="frm_help frm-mb-0" title="<?php esc_attr_e( 'Unique: Do not allow the same response multiple times. For example, if one user enters \'Joe\', then no one else will be allowed to enter the same name.', 'formidable' ); ?>" data-trigger="hover">
110 <input type="checkbox" name="field_options[unique_<?php echo esc_attr( $field['id'] ); ?>]" id="frm_uniq_field_<?php echo esc_attr( $field['id'] ); ?>" value="1" <?php checked( $field['unique'], 1 ); ?> class="frm_mark_unique" />
111 <?php esc_html_e( 'Unique', 'formidable' ); ?>
112 </label>
113 </div>
114 <?php
115 }
116
117 if ( $display['read_only'] ) {
118 ?>
119 <div class="frm_form_field">
120 <label for="frm_read_only_field_<?php echo esc_attr( $field['id'] ); ?>" class="frm_help frm-mb-0" title="<?php esc_attr_e( 'Read Only: Show this field but do not allow the field value to be edited from the front-end.', 'formidable' ); ?>" data-trigger="hover">
121 <input type="checkbox" id="frm_read_only_field_<?php echo esc_attr( $field['id'] ); ?>" name="field_options[read_only_<?php echo esc_attr( $field['id'] ); ?>]" value="1" <?php checked( $field['read_only'], 1 ); ?>/>
122 <?php esc_html_e( 'Read Only', 'formidable' ); ?>
123 </label>
124 </div>
125 <?php
126 }
127 do_action( 'frm_field_options_form_top', $field, $display, $values );
128 ?>
129 </div>
130
131 <?php
132 if ( $display['range'] ) {
133 include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/number-range.php';
134 }
135
136 $field_obj->show_primary_options( compact( 'field', 'display', 'values' ) );
137
138 if ( $display['format'] ) {
139 include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/format-dropdown.php';
140 FrmFieldsController::show_format_option( $field, true );
141 }
142 ?>
143
144 <?php if ( $display['css'] ) { ?>
145 <p class="frm-has-modal">
146 <label class="frm-h-stack-xs" for="frm_classes_<?php echo esc_attr( $field['id'] ); ?>">
147 <span><?php esc_html_e( 'CSS Layout Classes', 'formidable' ); ?></span>
148 <?php FrmAppHelper::tooltip_icon( __( 'Add a CSS class to the field container. Use our predefined classes to align multiple fields in single row.', 'formidable' ), array( 'class' => 'frm-flex' ) ); ?>
149 </label>
150 <span class="frm-with-right-icon frm-block">
151 <?php
152 $css_layout_classes_attrs = array(
153 'type' => 'text',
154 'name' => 'field_options[classes_' . $field['id'] . ']',
155 'value' => $field['classes'],
156 'class' => 'frm_classes frm-token-input-field',
157 'id' => 'frm_classes_' . $field['id'],
158 'data-changeme' => 'frm_field_id_' . $field['id'],
159 'data-changeatt' => 'class',
160 'data-sep' => ' ',
161 'data-shortcode' => '0',
162 );
163 ?>
164 <input <?php FrmAppHelper::array_to_html_params( $css_layout_classes_attrs, true ); ?> />
165 <?php
166 FrmAppHelper::icon_by_class(
167 'frm_icon_font frm_more_horiz_solid_icon frm-show-inline-modal frm-input-icon',
168 array(
169 'data-open' => 'frm-layout-classes-box',
170 'title' => esc_attr__( 'Toggle Options', 'formidable' ),
171 'tabindex' => '0',
172 )
173 );
174 ?>
175 </span>
176 </p>
177 <?php
178 }//end if
179 ?>
180 </div>
181
182 <?php
183
184 $field_obj->show_field_choices( compact( 'field', 'display', 'values' ) );
185
186 if ( $display['clear_on_focus'] ) {
187 do_action( 'frm_extra_field_display_options', $field );
188 }
189
190 /**
191 * Fires after printing the primary options section of field.
192 *
193 * @since 5.0.04 Added `$display` and `$values`.
194 *
195 * @param array $field Field data.
196 * @param array{field_obj:FrmFieldType, display:array, values:array} $data
197 */
198 do_action( 'frm_before_field_options', $field, compact( 'field_obj', 'display', 'values' ) );
199
200 ?>
201 <h3 class="frm-collapsed" aria-expanded="false" tabindex="0" role="button" aria-label="<?php esc_attr_e( 'Collapsible Advanced Settings', 'formidable' ); ?>" aria-controls="collapsible-section">
202 <?php esc_html_e( 'Advanced', 'formidable' ); ?>
203 <?php FrmAppHelper::icon_by_class( 'frmfont frm_arrowdown8_icon', array( 'aria-hidden' => 'true' ) ); ?>
204 </h3>
205
206 <div class="frm_grid_container frm-collapse-me" role="group">
207 <?php if ( $display['default'] ) { ?>
208 <div class="frm-has-modal frm-flex-col">
209 <?php $field_obj->show_default_value_setting( $field, $field_obj, $default_value_types, $display ); ?>
210
211 <div class="frm-hide-empty frm-flex-col frm-gap-sm frm-mb-sm frm-toggle-group">
212 <?php
213 foreach ( $default_value_types as $type => $default_value_type ) {
214 if ( 'default_value' === $type ) {
215 continue;
216 }
217
218 // Backwards compatibility "@since 6.24".
219 if ( FrmAppHelper::pro_is_connected() && ! is_callable( array( 'FrmProHtmlHelper', 'echo_radio_group' ) ) ) {
220 switch ( $type ) {
221 case 'calc':
222 $default_value_type['data'] = array(
223 'show' => '#calc-for-{id}',
224 'disable' => '#default-value-for-{id}',
225 );
226 break;
227 case 'get_values_field':
228 $default_value_type['class'] = '';
229 $default_value_type['data'] = array(
230 'show' => '.frm-lookup-box-{id}',
231 'disable' => '#default-value-for-{id}',
232 );
233 break;
234 }
235 }
236
237 $toggle_args = array(
238 'echo' => true,
239 'show_labels' => true,
240 'on_label' => $default_value_type['title'],
241 'checked' => isset( $default_value_type['current'] ),
242 'input_html' => array(
243 'data-group-name' => 'default-value',
244 'class' => $default_value_type['class'],
245 ),
246 );
247
248 foreach ( $default_value_type['data'] as $data_key => $data_value ) {
249 $toggle_args['input_html'][ 'data-' . $data_key ] = $data_value . ( substr( $data_value, -1 ) === '-' ? $field['id'] : '' );
250 }
251
252 ?>
253 <div class="frm-flex frm-gap-xs frm-items-center">
254 <?php
255 FrmHtmlHelper::toggle(
256 'frm-default-type-' . $type . '-' . $field['id'],
257 'default_type_' . $type . '[' . $field['id'] . ']',
258 $toggle_args
259 );
260
261 if ( ! empty( $default_value_type['tooltip'] ) ) {
262 FrmAppHelper::tooltip_icon( $default_value_type['tooltip'], array( 'class' => 'frm-flex' ) );
263 }
264 ?>
265 </div>
266 <?php
267 }//end foreach
268 ?>
269 </div>
270
271 <?php
272 /**
273 * Fires after printing the default value setting.
274 *
275 * @param array $field
276 * @param array $display
277 * @param array $default_value_types
278 */
279 do_action( 'frm_default_value_setting', compact( 'field', 'display', 'default_value_types' ) );
280 ?>
281 </div>
282 <?php
283 }//end if
284
285 $field_obj->show_after_default( compact( 'field', 'display' ) );
286
287 if ( $display['clear_on_focus'] ) {
288 ?>
289 <p class="frm-flex-col">
290 <label for="frm_placeholder_<?php echo esc_attr( $field['id'] ); ?>">
291 <?php esc_html_e( 'Placeholder Text', 'formidable' ); ?>
292 </label>
293 <?php
294 if ( $display['type'] === 'textarea' || $display['type'] === 'rte' ) {
295 ?>
296 <textarea name="field_options[placeholder_<?php echo esc_attr( $field['id'] ); ?>]" id="frm_placeholder_<?php echo esc_attr( $field['id'] ); ?>" rows="2" data-changeme="field_<?php echo esc_attr( $field['field_key'] ); ?>" data-changeatt="placeholder"><?php
297 echo FrmAppHelper::esc_textarea( $field['placeholder'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
298 ?></textarea>
299 <?php
300 } else {
301 ?>
302 <input type="text" name="field_options[placeholder_<?php echo esc_attr( $field['id'] ); ?>]" value="<?php echo esc_attr( $field['placeholder'] ); ?>" id="frm_placeholder_<?php echo esc_attr( $field['id'] ); ?>" data-changeme="field_<?php echo esc_attr( $field['field_key'] ); ?>" data-changeatt="placeholder" />
303 <?php
304 }
305 ?>
306 </p>
307 <?php
308 }//end if
309
310 if ( $display['description'] ) {
311 include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/field-description.php';
312 }
313
314 /**
315 * Fires after displaying the field description in a form settings.
316 *
317 * @since 6.19
318 *
319 * @param array $args {
320 * Array containing the field data.
321 *
322 * @type array $field The field settings.
323 * @type array $display The display settings for the field.
324 * @type array $values The values associated with the field.
325 * }
326 */
327 do_action( 'frm_field_options_after_description', compact( 'field', 'display', 'values' ) );
328
329 // Field Size
330 if ( $display['size'] && ! in_array( $field['type'], array( 'select', 'data', 'time' ), true ) ) {
331 $display_max = $display['max'];
332 include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/pixels-wide.php';
333 }
334 ?>
335
336 <?php if ( $display['show_image'] ) { ?>
337 <p class="frm_form_field">
338 <label class="frm-force-flex frm-gap-xs" for="frm_show_image_<?php echo esc_attr( $field['id'] ); ?>">
339 <input class="frm-m-0" type="checkbox" id="frm_show_image_<?php echo esc_attr( $field['id'] ); ?>" name="field_options[show_image_<?php echo esc_attr( $field['id'] ); ?>]" value="1" <?php checked( $field['show_image'], 1 ); ?> />
340 <span class="-frm-mt-2xs"><?php esc_html_e( 'If this URL points to an image, show to image on the entries listing page.', 'formidable' ); ?></span>
341 </label>
342 </p>
343 <?php } ?>
344
345 <?php if ( $display['captcha_size'] ) { ?>
346 <p class="frm6 frm_first frm_form_field">
347 <label for="field_options_captcha_size_<?php echo esc_attr( $field['id'] ); ?>" class="frm_help" title="<?php esc_attr_e( 'Set the size of the captcha field. The compact option is best if your form is in a small area.', 'formidable' ); ?>">
348 <?php esc_html_e( 'Captcha Size', 'formidable' ); ?>
349 </label>
350 <select name="field_options[captcha_size_<?php echo esc_attr( $field['id'] ); ?>]" id="field_options_captcha_size_<?php echo esc_attr( $field['id'] ); ?>">
351 <option value="normal" <?php selected( $field['captcha_size'], 'normal' ); ?>>
352 <?php esc_html_e( 'Normal', 'formidable' ); ?>
353 </option>
354 <option value="compact" <?php selected( $field['captcha_size'], 'compact' ); ?>>
355 <?php esc_html_e( 'Compact', 'formidable' ); ?>
356 </option>
357 </select>
358 </p>
359 <?php } ?>
360 <?php if ( $display['captcha_theme'] ) { ?>
361 <p class="frm6 frm_form_field">
362 <label for="captcha_theme_<?php echo esc_attr( $field['field_key'] ); ?>">
363 <?php esc_html_e( 'Captcha Theme', 'formidable' ); ?>
364 </label>
365 <select name="field_options[captcha_theme_<?php echo esc_attr( $field['id'] ); ?>]" id="captcha_theme_<?php echo esc_attr( $field['field_key'] ); ?>">
366 <option value="light" <?php selected( $field['captcha_theme'], 'light' ); ?>>
367 <?php esc_html_e( 'Light', 'formidable' ); ?>
368 </option>
369 <option value="dark" <?php selected( $field['captcha_theme'], 'dark' ); ?>>
370 <?php esc_html_e( 'Dark', 'formidable' ); ?>
371 </option>
372 <?php if ( $display['captcha_theme_auto_option'] ) { ?>
373 <option value="auto" <?php selected( $field['captcha_theme'], 'auto' ); ?>>
374 <?php esc_html_e( 'Auto', 'formidable' ); ?>
375 </option>
376 <?php } ?>
377 </select>
378 </p>
379 <?php } ?>
380
381 <?php do_action( 'frm_field_options', compact( 'field', 'display', 'values' ) ); ?>
382
383 <?php if ( $display['required'] ) { ?>
384 <p class="frm6 frm_form_field frm_required_details<?php echo esc_attr( $field['id'] . ( $field['required'] ? '' : ' frm_hidden' ) ); ?>">
385 <label for="field_options_required_indicator_<?php echo esc_attr( $field['id'] ); ?>">
386 <?php esc_html_e( 'Required Field Indicator', 'formidable' ); ?>
387 </label>
388 <input type="text" id="field_options_required_indicator_<?php echo esc_attr( $field['id'] ); ?>" name="field_options[required_indicator_<?php echo esc_attr( $field['id'] ); ?>]" value="<?php echo esc_attr( $field['required_indicator'] ); ?>" />
389 </p>
390 <?php } ?>
391
392 <?php if ( $display['label_position'] ) { ?>
393 <p class="frm6 frm_form_field">
394 <label for="field_options_label_<?php echo esc_attr( $field['id'] ); ?>"><?php esc_html_e( 'Label Position', 'formidable' ); ?></label>
395 <select id="field_options_label_<?php echo esc_attr( $field['id'] ); ?>" name="field_options[label_<?php echo esc_attr( $field['id'] ); ?>]">
396 <option value="" <?php selected( $field['label'], '' ); ?>>
397 <?php esc_html_e( 'Default', 'formidable' ); ?>
398 </option>
399 <?php
400 foreach ( FrmStylesHelper::get_single_label_positions( $field ) as $pos => $pos_label ) {
401 if ( ! $display['clear_on_focus'] && 'inside' === $pos ) {
402 // Don't allow inside labels for fields without placeholders.
403 continue;
404 }
405 FrmHtmlHelper::echo_dropdown_option(
406 $pos_label,
407 $pos === $field['label'],
408 array(
409 'value' => $pos,
410 )
411 );
412 }
413
414 if ( $field['type'] === 'divider' ) {
415 FrmHtmlHelper::echo_dropdown_option(
416 __( 'Center', 'formidable' ),
417 'center' === $field['label'],
418 array(
419 'value' => 'center',
420 )
421 );
422 }
423 ?>
424 </select>
425 </p>
426 <?php
427 }//end if
428 ?>
429
430 <p class="frm6 frm_form_field">
431 <label for="field_options_field_key_<?php echo esc_attr( $field['id'] ); ?>" class="frm_help" title="<?php esc_attr_e( 'The field key can be used as an alternative to the field ID in many cases.', 'formidable' ); ?>">
432 <?php esc_html_e( 'Field Key', 'formidable' ); ?>
433 </label>
434 <input type="text" name="field_options[field_key_<?php echo esc_attr( $field['id'] ); ?>]" value="<?php echo esc_attr( $field['field_key'] ); ?>" id="field_options_field_key_<?php echo esc_attr( $field['id'] ); ?>"/>
435 </p>
436
437 <?php if ( count( $field_types ) > 1 ) { ?>
438 <p class="frm6 frm_form_field">
439 <label for="field_options_type_<?php echo esc_attr( $field['id'] ); ?>">
440 <?php esc_html_e( 'Field Type', 'formidable' ); ?>
441 </label>
442 <select name="field_options[type_<?php echo esc_attr( $field['id'] ); ?>]" id="field_options_type_<?php echo esc_attr( $field['id'] ); ?>">
443 <?php
444 foreach ( $field_types as $fkey => $ftype ) {
445 // We need to avoid the word "select" in POST requests.
446 // When "dropdown" is sent as a type value, we'll map it back to "select" with PHP.
447 $type_option_value = 'select' === $fkey ? 'dropdown' : $fkey;
448 $type_option_params = array( 'value' => $type_option_value );
449
450 if ( array_key_exists( $fkey, $disabled_fields ) ) {
451 $type_option_params['disabled'] = 'disabled';
452 }
453
454 FrmHtmlHelper::echo_dropdown_option(
455 is_array( $ftype ) ? $ftype['name'] : $ftyp,
456 $fkey === $field['type'],
457 $type_option_params
458 );
459 unset( $fkey, $ftype, $type_option_value, $type_option_params );
460 }
461 ?>
462 </select>
463 </p>
464 <?php } else { ?>
465 <input type="hidden" id="field_options_type_<?php echo esc_attr( $field['id'] ); ?>" value="<?php echo esc_attr( $field['type'] ); ?>" />
466 <?php
467 }//end if
468 ?>
469
470 <table class="form-table frm-mt-0">
471 <?php
472 $field_obj->show_options( $field, $display, $values );
473 do_action( 'frm_field_options_form', $field, $display, $values );
474 ?>
475 </table>
476 </div>
477
478 <?php if ( $display['required'] || $display['invalid'] || $display['unique'] || $display['conf_field'] ) { ?>
479 <?php
480 $hidden_invalid = FrmField::is_field_type( $field, 'text' ) && ! FrmField::is_option_true( $field, 'format' ) && FrmField::is_option_empty( $field, 'max' );
481 $has_validation = ( ( $display['invalid'] && ! $hidden_invalid ) || $field['required'] || FrmField::is_option_true( $field, 'unique' ) || FrmField::is_option_true( $field, 'conf_field' ) );
482 ?>
483 <div class="frm_validation_msg <?php echo esc_attr( $has_validation ? '' : 'frm_hidden' ); ?>">
484 <h3 class="frm-collapsed" aria-expanded="false" tabindex="0" role="button" aria-label="<?php esc_attr_e( 'Collapsible Validation Messages Settings', 'formidable' ); ?>" aria-controls="collapsible-section">
485 <?php
486 esc_html_e( 'Validation Messages', 'formidable' );
487 FrmAppHelper::icon_by_class( 'frmfont frm_arrowdown8_icon', array( 'aria-hidden' => 'true' ) );
488 ?>
489 </h3>
490
491 <div class="frm_validation_box frm-collapse-me" role="group">
492 <?php if ( $display['required'] ) { ?>
493 <p class="frm_required_details<?php echo esc_attr( $field['id'] . ( $field['required'] ? '' : ' frm_hidden' ) ); ?>">
494 <label for="field_options_blank_<?php echo esc_attr( $field['id'] ); ?>">
495 <?php esc_html_e( 'Required', 'formidable' ); ?>
496 </label>
497 <input type="text" name="field_options[blank_<?php echo esc_attr( $field['id'] ); ?>]" value="<?php echo esc_attr( $field['blank'] ); ?>" id="field_options_blank_<?php echo esc_attr( $field['id'] ); ?>" />
498 </p>
499 <?php } ?>
500
501 <?php if ( $display['invalid'] ) { ?>
502 <p class="frm_invalid_msg<?php echo esc_attr( $field['id'] . ( $hidden_invalid ? ' frm_hidden' : '' ) ); ?>">
503 <label for="field_options_invalid_<?php echo esc_attr( $field['id'] ); ?>">
504 <?php esc_html_e( 'Invalid Format', 'formidable' ); ?>
505 </label>
506 <input type="text" name="field_options[invalid_<?php echo esc_attr( $field['id'] ); ?>]" value="<?php echo esc_attr( $field['invalid'] ); ?>" id="field_options_invalid_<?php echo esc_attr( $field['id'] ); ?>" />
507 </p>
508 <?php
509 }
510
511 if ( $display['unique'] ) {
512 ?>
513 <p class="frm_unique_details<?php echo esc_attr( $field['id'] . ( $field['unique'] ? '' : ' frm_hidden' ) ); ?>">
514 <label for="field_options_unique_msg_<?php echo esc_attr( $field['id'] ); ?>">
515 <?php esc_html_e( 'Unique', 'formidable' ); ?>
516 </label>
517 <input type="text" name="field_options[unique_msg_<?php echo esc_attr( $field['id'] ); ?>]" value="<?php echo esc_attr( $field['unique_msg'] ); ?>" id="field_options_unique_msg_<?php echo esc_attr( $field['id'] ); ?>" />
518 </p>
519 <?php
520 }
521
522 if ( $display['conf_field'] ) {
523 ?>
524 <p class="frm_conf_details<?php echo esc_attr( $field['id'] . ( $field['conf_field'] ? '' : ' frm_hidden' ) ); ?>">
525 <label for="field_options_conf_msg_<?php echo esc_attr( $field['id'] ); ?>">
526 <?php esc_html_e( 'Confirmation', 'formidable' ); ?>
527 </label>
528 <input type="text" name="field_options[conf_msg_<?php echo esc_attr( $field['id'] ); ?>]" value="<?php echo esc_attr( $field['conf_msg'] ); ?>" id="field_options_conf_msg_<?php echo esc_attr( $field['id'] ); ?>" />
529 </p>
530 <?php
531 }
532 ?>
533 </div>
534 </div>
535 <?php
536 }//end if
537 ?>
538
539 <?php do_action( 'frm_after_field_options', compact( 'field', 'display', 'values' ) ); ?>
540
541 <?php if ( $display['conf_field'] ) { ?>
542 <input type="hidden" name="field_options[conf_desc_<?php echo esc_attr( $field['id'] ); ?>]" value="<?php echo esc_attr( $field['conf_desc'] ); ?>" />
543 <?php } ?>
544 </div>
545