| @@ -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"> |
| @@ -16,19 +24,27 @@ | ||
| 16 | 24 | <div class="frm-sub-label frm-field-id"> |
| 17 | 25 | (ID <?php echo esc_html( $field['id'] ); ?>) |
| 18 | 26 | </div> |
| 19 | 27 | |
| 20 | - <?php if ( $field['type'] === 'divider' ) { ?> | |
| 21 | - <a href="#" class="frm-collapse-section frm-hover-icon frm_icon_font frm_arrowdown6_icon" title="<?php esc_attr_e( 'Expand/Collapse Section', 'formidable' ); ?>"></a> | |
| 22 | - <?php } ?> | |
| 28 | + <?php if ( $field['type'] === 'divider' ) : ?> | |
| 29 | + <a href="#" class="frm-collapse-section" title="<?php esc_attr_e( 'Expand/Collapse Section', 'formidable' ); ?>"> | |
| 30 | + <?php | |
| 31 | + FrmAppHelper::icon_by_class( | |
| 32 | + 'frmfont frm_arrowdown6_icon', | |
| 33 | + array( 'aria-label' => esc_attr__( 'Expand/Collapse Section Icon', 'formidable' ) ) | |
| 34 | + ); | |
| 35 | + ?> | |
| 36 | + </a> | |
| 37 | + <?php endif; ?> | |
| 23 | 38 | |
| 24 | 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' ); ?>"> |
| 25 | - <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_thick_move_icon' ); ?> | |
| 40 | + <?php FrmAppHelper::icon_by_class( 'frmfont frm_thick_move_icon' ); ?> | |
| 26 | 41 | </a> |
| 27 | 42 | |
| 28 | 43 | <div class="dropdown"> |
| 29 | - <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"> | |
| 30 | - <?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> | |
| 31 | 47 | </a> |
| 32 | 48 | <ul class="frm-dropdown-menu frm-p-1 <?php echo esc_attr( is_rtl() ? 'dropdown-menu-left' : 'dropdown-menu-right' ); ?>" role="menu"></ul> |
| 33 | 49 | </div> |
| 34 | 50 | |
| @@ -33,17 +49,9 @@ | ||
| 33 | 49 | </div> |
| 34 | 50 | |
| 35 | 51 | </div> |
| 36 | 52 | |
| 37 | - <label class="frm_primary_label" id="field_label_<?php echo esc_attr( $field['id'] ); ?>"> | |
| 38 | - <?php echo FrmAppHelper::kses( force_balance_tags( $field['name'] ), 'all' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> | |
| 39 | - <span class="frm_required <?php echo esc_attr( FrmField::is_required( $field ) ? '' : 'frm_hidden' ); ?>"> | |
| 40 | - <?php echo esc_html( $field['required_indicator'] ); ?> | |
| 41 | - </span> | |
| 42 | - <span class="frm-sub-label frm-collapsed-label"> | |
| 43 | - <?php esc_html_e( '(Collapsed)', 'formidable' ); ?> | |
| 44 | - </span> | |
| 45 | - </label> | |
| 53 | + <?php $field_obj->show_label_on_form_builder(); ?> | |
| 46 | 54 | |
| 47 | 55 | <div class="frm_form_fields frm_opt_container" data-ftype="<?php echo esc_attr( $display['type'] ); ?>"> |
| 48 | 56 | <?php $field_obj->show_on_form_builder(); ?> |
| 49 | 57 | <div class="clear"></div> |
| @@ -49,27 +57,56 @@ | ||
| 49 | 57 | <div class="clear"></div> |
| 50 | 58 | </div> |
| 51 | 59 | <?php if ( $display['description'] || in_array( $field['type'], array( 'address', 'credit_card' ), true ) ) { ?> |
| 52 | 60 | <div class="frm_description" id="field_description_<?php echo esc_attr( $field['id'] ); ?>"> |
| 53 | - <?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' ); ?> | |
| 54 | 62 | </div> |
| 55 | 63 | <?php } ?> |
| 56 | 64 | </div> |
| 57 | -<?php if ( $display['conf_field'] ) { ?> | |
| 58 | -<div id="frm_conf_field_<?php echo esc_attr( $field['id'] ); ?>_container" class="frm_conf_field_container frm_form_fields frm_conf_details<?php echo esc_attr( $field['id'] . ( $field['conf_field'] ? '' : ' frm_hidden' ) ); ?>"> | |
| 59 | - <div id="frm_conf_field_<?php echo esc_attr( $field['id'] ); ?>_inner_container" class="frm_inner_conf_container"> | |
| 60 | - <label class="frm_primary_label"> </label> | |
| 61 | - <div class="frm_form_fields"> | |
| 62 | - <input type="text" id="conf_field_<?php echo esc_attr( $field['field_key'] ); ?>" name="field_options[conf_input_<?php echo esc_attr( $field['id'] ); ?>]" placeholder="<?php echo esc_attr( $field['conf_input'] ); ?>" class="dyn_default_value" /> | |
| 63 | - </div> | |
| 64 | - <div id="conf_field_description_<?php echo esc_attr( $field['id'] ); ?>" class="frm_description"><?php | |
| 65 | - echo FrmAppHelper::kses( force_balance_tags( $field['conf_desc'] ), 'all' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 66 | - ?></div> | |
| 67 | -</div> | |
| 68 | -</div> | |
| 69 | -<div class="clear"></div> | |
| 65 | +<?php | |
| 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. | |
| 78 | + $input_html = sprintf( | |
| 79 | + '<input type="text" id="conf_field_%1$s" name="field_options[conf_input_%2$s]" placeholder="%3$s" class="dyn_default_value" />', | |
| 80 | + esc_attr( $field['field_key'] ), | |
| 81 | + esc_attr( $field['id'] ), | |
| 82 | + esc_attr( $field['conf_input'] ) | |
| 83 | + ); | |
| 84 | + ?> | |
| 85 | + <div id="frm_conf_field_<?php echo esc_attr( $field['id'] ); ?>_container" class="frm_conf_field_container frm_form_fields frm_conf_details<?php echo esc_attr( $field['id'] . ( $field['conf_field'] ? '' : ' frm_hidden' ) ); ?>"> | |
| 86 | + <div id="frm_conf_field_<?php echo esc_attr( $field['id'] ); ?>_inner_container" class="frm_inner_conf_container"> | |
| 87 | + <label class="frm_primary_label"> </label> | |
| 88 | + <div class="frm_form_fields"> | |
| 89 | + <?php | |
| 90 | + /** | |
| 91 | + * Filters the HTML of confirmation input in the backend. | |
| 92 | + * | |
| 93 | + * @since 6.3.1 | |
| 94 | + * | |
| 95 | + * @param string $input_html Input HTML. | |
| 96 | + * @param array $args Contains `field` array. | |
| 97 | + */ | |
| 98 | + echo apply_filters( 'frm_conf_input_backend', $input_html, compact( 'field' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 99 | + ?> | |
| 100 | + </div> | |
| 101 | + <div id="conf_field_description_<?php echo esc_attr( $field['id'] ); ?>" class="frm_description"><?php | |
| 102 | + FrmAppHelper::kses_echo( force_balance_tags( $field['conf_desc'] ), 'all' ); | |
| 103 | + ?></div> | |
| 104 | + </div> | |
| 105 | + </div> | |
| 106 | + <div class="clear"></div> | |
| 70 | 107 | <?php |
| 71 | -} | |
| 108 | +}//end if | |
| 72 | 109 | |
| 73 | 110 | FrmFieldsController::load_single_field_settings( compact( 'field', 'field_obj', 'values', 'display' ) ); |
| 74 | 111 | |
| 75 | 112 | if ( 'divider' === $field['type'] ) { |
| @@ -79,8 +116,9 @@ | ||
| 79 | 116 | <p class="howto"><?php esc_html_e( 'Add Fields Here', 'formidable' ); ?></p> |
| 80 | 117 | </div> |
| 81 | 118 | <ul class="start_divider frm_sorting frm_grid_container"> |
| 82 | 119 | <?php |
| 120 | + FrmAppHelper::icon_by_class( 'frmfont frm-circle frm-divider-icon' ); | |
| 83 | 121 | } elseif ( 'end_divider' === $field['type'] ) { |
| 84 | 122 | ?> |
| 85 | 123 | </ul> |
| 86 | 124 | <?php |