fix: correct checkbox_anzahl field name so Elektriker/Dübelarbeiten appear in email

The _anzahl suffix was placed outside the closing bracket in PHP array
notation (e.g. [e-herd]_anzahl), causing PHP to ignore it and overwrite
the checkbox value. Moved the suffix inside the bracket ([e-herd_anzahl])
so both checkbox and quantity values are stored as separate POST keys.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-13 01:01:02 +09:00
parent 11cd74cac3
commit cb74569c97

View File

@@ -564,7 +564,7 @@ class Umzugsliste_Form_Renderer {
<input type="checkbox" name="<?php echo esc_attr( $field_name ); ?>" value="ja">
<?php echo esc_html( $field['name'] ); ?>
</label>
<input type="text" name="<?php echo esc_attr( $field_name . '_anzahl' ); ?>" class="qty-small" placeholder="<?php echo esc_attr__( 'Qty.', 'siegel-umzugsliste' ); ?>">
<input type="text" name="<?php echo esc_attr( substr( $field_name, 0, -1 ) . '_anzahl]' ); ?>" class="qty-small" placeholder="<?php echo esc_attr__( 'Qty.', 'siegel-umzugsliste' ); ?>">
</div>
<?php
break;