This commit is contained in:
2026-03-31 15:41:29 +02:00
parent 8003cd0a81
commit f1edd3a721
4 changed files with 126 additions and 11 deletions

View File

@@ -2411,15 +2411,6 @@ class Form extends Form_Base {
?>
<div <?php $this->print_render_attribute_string( 'field-group' . $item_index ); ?>>
<?php
if ( $print_label && $item['field_label'] ) {
?>
<label <?php $this->print_render_attribute_string( 'label' . $item_index ); ?>>
<?php // PHPCS - the variable $item['field_label'] is safe.
echo $item['field_label']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</label>
<?php
}
switch ( $item['field_type'] ) :
case 'html':
echo do_shortcode( $item['field_html'] );
@@ -2469,6 +2460,15 @@ class Form extends Form_Base {
*/
do_action( "elementor_pro/forms/render_field/{$field_type}", $item, $item_index, $this );
endswitch;
if ( $print_label && $item['field_label'] ) {
?>
<label <?php $this->print_render_attribute_string( 'label' . $item_index ); ?>>
<?php // PHPCS - the variable $item['field_label'] is safe.
echo $item['field_label']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</label>
<?php
}
?>
</div>
<?php endforeach; ?>