PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
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
← All changes | classes/views/frm-forms/add_field.php +32 -19 6.5.2 → trunk View file →
@@ -2,15 +2,23 @@
2 2 if ( ! defined( 'ABSPATH' ) ) {
3 3 die( 'You are not allowed to call this page directly.' );
4 4 }
5 5 ?>
6 -<li id="frm_field_id_<?php echo esc_attr( $field['id'] ); ?>" class="<?php echo esc_attr( $li_classes ); ?>" data-fid="<?php echo esc_attr( $field['id'] ); ?>" data-formid="<?php echo esc_attr( 'divider' === $field['type'] ? $field['form_select'] : $field['form_id'] ); ?>" data-ftype="<?php echo esc_attr( $display['type'] ); ?>" data-type="<?php echo esc_attr( $field['type'] ); ?>">
7 -<?php if ( $field['type'] === 'divider' ) { ?>
6 +<li id="frm_field_id_<?php echo esc_attr( $field['id'] ); ?>" class="<?php echo esc_attr( $li_classes ); ?>" data-fid="<?php echo esc_attr( $field['id'] ); ?>" data-formid="<?php echo esc_attr( 'divider' === $field['type'] && isset( $field['form_select'] ) ? $field['form_select'] : $field['form_id'] ); ?>" data-ftype="<?php echo esc_attr( $display['type'] ); ?>" data-type="<?php echo esc_attr( $field['type'] ); ?>" <?php FrmAppHelper::array_to_html_params( $extra_field_attributes, true ); ?>>
7 +<?php
8 +if ( $field['type'] === 'divider' ) {
9 + $icon_class = ! empty( $field['form_select'] ) ? 'frm_repeat_icon' : 'frm-form-title-style';
10 + FrmAppHelper::icon_by_class( "frmfont $icon_class frm-divider-icon" );
11 + ?>
8 12 <div class="divider_section_only">
9 13 <?php } ?>
10 14
11 - <?php do_action( 'frm_extra_field_actions', $field['id'] ); ?>
15 +<?php
16 +FrmSubmitHelper::print_last_row_fields_order_input();
12 17
18 +do_action( 'frm_extra_field_actions', $field['id'] );
19 +?>
20 +
13 21 <div id="field_<?php echo esc_attr( $field['id'] ); ?>_inner_container" class="frm_inner_field_container">
14 22 <div class="frm-field-action-icons frm-show-hover">
15 23
16 24 <div class="frm-sub-label frm-field-id">
@@ -28,14 +36,15 @@
28 36 </a>
29 37 <?php endif; ?>
30 38
31 39 <a href="#" class="frm_bstooltip frm-move frm-hover-icon" title="<?php esc_attr_e( 'Move Field', 'formidable' ); ?>" data-container="body" aria-label="<?php esc_attr_e( 'Move Field', 'formidable' ); ?>">
32 - <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_thick_move_icon' ); ?>
40 + <?php FrmAppHelper::icon_by_class( 'frmfont frm_thick_move_icon' ); ?>
33 41 </a>
34 42
35 43 <div class="dropdown">
36 - <a href="#" class="frm_bstooltip frm-hover-icon frm-dropdown-toggle dropdown-toggle" title="<?php esc_attr_e( 'More Options', 'formidable' ); ?>" data-toggle="dropdown" data-container="body" aria-expanded="false">
37 - <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_thick_more_vert_icon' ); ?>
44 + <a href="#" class="frm_bstooltip frm-hover-icon frm-dropdown-toggle dropdown-toggle" title="<?php esc_attr_e( 'More Options', 'formidable' ); ?>" data-toggle="dropdown" data-container="body" data-trigger="hover" aria-expanded="false" data-bs-display="static">
45 + <?php FrmAppHelper::icon_by_class( 'frmfont frm_thick_more_vert_icon' ); ?>
46 + <span class="screen-reader-text"><?php esc_html_e( 'Toggle More Options Dropdown', 'formidable' ); ?></span>
38 47 </a>
39 48 <ul class="frm-dropdown-menu frm-p-1 <?php echo esc_attr( is_rtl() ? 'dropdown-menu-left' : 'dropdown-menu-right' ); ?>" role="menu"></ul>
40 49 </div>
41 50
@@ -40,17 +49,9 @@
40 49 </div>
41 50
42 51 </div>
43 52
44 - <label class="frm_primary_label" id="field_label_<?php echo esc_attr( $field['id'] ); ?>">
45 - <?php echo FrmAppHelper::kses( force_balance_tags( $field['name'] ), 'all' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
46 - <span class="frm_required <?php echo esc_attr( FrmField::is_required( $field ) ? '' : 'frm_hidden' ); ?>">
47 - <?php echo esc_html( $field['required_indicator'] ); ?>
48 - </span>
49 - <span class="frm-sub-label frm-collapsed-label">
50 - <?php esc_html_e( '(Collapsed)', 'formidable' ); ?>
51 - </span>
52 - </label>
53 + <?php $field_obj->show_label_on_form_builder(); ?>
53 54
54 55 <div class="frm_form_fields frm_opt_container" data-ftype="<?php echo esc_attr( $display['type'] ); ?>">
55 56 <?php $field_obj->show_on_form_builder(); ?>
56 57 <div class="clear"></div>
@@ -56,14 +57,25 @@
56 57 <div class="clear"></div>
57 58 </div>
58 59 <?php if ( $display['description'] || in_array( $field['type'], array( 'address', 'credit_card' ), true ) ) { ?>
59 60 <div class="frm_description" id="field_description_<?php echo esc_attr( $field['id'] ); ?>">
60 - <?php echo FrmAppHelper::kses( force_balance_tags( $field['description'] ), 'all' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
61 + <?php FrmAppHelper::kses_echo( force_balance_tags( $field['description'] ), 'all' ); ?>
61 62 </div>
62 63 <?php } ?>
63 64 </div>
64 65 <?php
65 -if ( $display['conf_field'] ) {
66 +/**
67 + * Fires after a field's box in the form builder, before the field settings.
68 + *
69 + * @since 6.32
70 + *
71 + * @param array{field:array, display:array} $args Contains the `field` and `display` arrays.
72 + */
73 +do_action( 'frm_builder_preview_after_field', compact( 'field', 'display' ) );
74 +
75 +if ( $display['conf_field'] && ! is_callable( 'FrmProFieldsController::add_confirmation_field_preview' ) ) {
76 + // Backward compatibility for Pro versions that render the confirmation field
77 + // preview from here instead of via the frm_builder_preview_after_field hook.
66 78 $input_html = sprintf(
67 79 '<input type="text" id="conf_field_%1$s" name="field_options[conf_input_%2$s]" placeholder="%3$s" class="dyn_default_value" />',
68 80 esc_attr( $field['field_key'] ),
69 81 esc_attr( $field['id'] ),
@@ -86,15 +98,15 @@
86 98 echo apply_filters( 'frm_conf_input_backend', $input_html, compact( 'field' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
87 99 ?>
88 100 </div>
89 101 <div id="conf_field_description_<?php echo esc_attr( $field['id'] ); ?>" class="frm_description"><?php
90 - echo FrmAppHelper::kses( force_balance_tags( $field['conf_desc'] ), 'all' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
102 + FrmAppHelper::kses_echo( force_balance_tags( $field['conf_desc'] ), 'all' );
91 103 ?></div>
92 104 </div>
93 105 </div>
94 106 <div class="clear"></div>
95 107 <?php
96 -}
108 +}//end if
97 109
98 110 FrmFieldsController::load_single_field_settings( compact( 'field', 'field_obj', 'values', 'display' ) );
99 111
100 112 if ( 'divider' === $field['type'] ) {
@@ -104,8 +116,9 @@
104 116 <p class="howto"><?php esc_html_e( 'Add Fields Here', 'formidable' ); ?></p>
105 117 </div>
106 118 <ul class="start_divider frm_sorting frm_grid_container">
107 119 <?php
120 + FrmAppHelper::icon_by_class( 'frmfont frm-circle frm-divider-icon' );
108 121 } elseif ( 'end_divider' === $field['type'] ) {
109 122 ?>
110 123 </ul>
111 124 <?php