| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
die( 'You are not allowed to call this page directly.' ); |
| 4 |
} |
| 5 |
|
| 6 |
FrmAntiSpam::maybe_init( $form->id ); |
| 7 |
?> |
| 8 |
<div class="frm_forms <?php echo esc_attr( FrmFormsHelper::get_form_style_class( $values ) ); ?>" id="frm_form_<?php echo esc_attr( $form->id ); ?>_container" <?php echo wp_strip_all_tags( apply_filters( 'frm_form_div_attributes', '', $form ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>> |
| 9 |
<?php if ( ! isset( $include_form_tag ) || $include_form_tag ) { ?> |
| 10 |
<form enctype="<?php echo esc_attr( apply_filters( 'frm_form_enctype', 'multipart/form-data', $form ) ); ?>" method="post" class="frm-show-form <?php do_action( 'frm_form_classes', $form ); ?>" id="form_<?php echo esc_attr( $form->form_key ); ?>" <?php echo wp_strip_all_tags( apply_filters( 'frm_form_attributes', '', $form ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>> |
| 11 |
<?php } else { ?> |
| 12 |
<div id="form_<?php echo esc_attr( $form->form_key ); ?>" class="frm-show-form <?php do_action( 'frm_form_classes', $form ); ?>" > |
| 13 |
<?php |
| 14 |
} |
| 15 |
|
| 16 |
$message_placement = $message_placement ?? 'before'; |
| 17 |
|
| 18 |
if ( ! in_array( $message_placement, array( 'after', 'submit' ), true ) ) { |
| 19 |
include FrmAppHelper::plugin_path() . '/classes/views/frm-entries/errors.php'; |
| 20 |
} |
| 21 |
|
| 22 |
$form_action = 'create'; |
| 23 |
require FrmAppHelper::plugin_path() . '/classes/views/frm-entries/form.php'; |
| 24 |
|
| 25 |
if ( $message_placement === 'after' ) { |
| 26 |
include FrmAppHelper::plugin_path() . '/classes/views/frm-entries/errors.php'; |
| 27 |
} |
| 28 |
|
| 29 |
if ( ! isset( $include_form_tag ) || $include_form_tag ) { |
| 30 |
?> |
| 31 |
</form> |
| 32 |
<?php } else { ?> |
| 33 |
</div> |
| 34 |
<?php } ?> |
| 35 |
</div> |
| 36 |
|