| @@ -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'] ), |