PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.25
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.25
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.25, at classes/views/frm-fields/back-end/settings.php

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