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