| @@ -5,9 +5,9 @@ | ||
| 5 | 5 | ?> |
| 6 | 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 | 7 | <?php |
| 8 | 8 | if ( $field['type'] === 'divider' ) { |
| 9 | - $icon_class = empty( $field['form_select'] ) ? 'frm-form-title-style' : 'frm_repeat_icon'; | |
| 9 | + $icon_class = ! empty( $field['form_select'] ) ? 'frm_repeat_icon' : 'frm-form-title-style'; | |
| 10 | 10 | FrmAppHelper::icon_by_class( "frmfont $icon_class frm-divider-icon" ); |
| 11 | 11 | ?> |
| 12 | 12 | <div class="divider_section_only"> |
| 13 | 13 | <?php } ?> |
| @@ -62,9 +62,20 @@ | ||
| 62 | 62 | </div> |
| 63 | 63 | <?php } ?> |
| 64 | 64 | </div> |
| 65 | 65 | <?php |
| 66 | -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. | |
| 67 | 78 | $input_html = sprintf( |
| 68 | 79 | '<input type="text" id="conf_field_%1$s" name="field_options[conf_input_%2$s]" placeholder="%3$s" class="dyn_default_value" />', |
| 69 | 80 | esc_attr( $field['field_key'] ), |
| 70 | 81 | esc_attr( $field['id'] ), |