PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.32.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.32.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 / default-value-setting.php

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

42 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Default value setting in the field settings.
4 *
5 * @package Formidable
6 *
7 * @var array $field Field data including 'id', 'default_value', 'dyn_default_value'.
8 * @var FrmFieldType $field_obj Field type handler.
9 * @var array $display Display options; may include 'default_value'.
10 */
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 die( 'You are not allowed to call this page directly.' );
14 }
15 ?>
16 <p
17 class="frm-has-modal frm-default-value-wrapper default-value-section-<?php echo esc_attr( $field['id'] ); ?>"
18 <?php $field_obj->echo_field_default_setting_attributes( $field ); ?>
19 id="default-value-for-<?php echo esc_attr( $field['id'] ); ?>"
20 >
21 <label class="frm-force-flex frm-gap-xs frm-items-center" for="frm_default_value_<?php echo esc_attr( $field['id'] ); ?>">
22 <span><?php esc_html_e( 'Default Value', 'formidable' ); ?></span>
23 <?php FrmAppHelper::tooltip_icon( __( 'Pre-fill your field with this value. Users can modify it unless the field is read-only.', 'formidable' ), array( 'class' => 'frm-flex' ) ); ?>
24 </label>
25
26 <span class="frm-flex-col frm-with-right-icon">
27 <?php
28 if ( ! empty( $display['default_value'] ) ) {
29 $default_name = 'field_options[dyn_default_value_' . $field['id'] . ']';
30 $default_value = $field['dyn_default_value'] ?? '';
31 } else {
32 $default_name = 'default_value_' . $field['id'];
33 $default_value = $field['default_value'];
34 }
35
36 $field_obj->default_value_to_string( $default_value );
37 $field_obj->show_default_value_field( $field, $default_name, $default_value );
38 $field_obj->display_smart_values_modal_trigger_icon( $field );
39 ?>
40 </span>
41 </p>
42