Iām trying to make a form that looks like this:
where if inside of the input type ="text" is something like a number auto-check the CHECKBOX, is jquery? or simple PHP.
Ahh, the more important thing, I'm using woocommerce, so i make the function like that.
add_action('woocommerce_after_order_notes', 'my_custom_checkout_field');
function my_custom_checkout_field( $checkout ) {
woocommerce_form_field( 'losung', array(
'type' => 'text',
'class' => array('my-field-class'),
'label' => __('titel'),
'placeholder' => __('Enter a number'),
), $checkout->get_value( 'my_field_name' ));
echo '<div class="spiele-container">';
echo '<input class="input-checkbox pull-left" id="" type="checkbox" name="ter">';
echo '<div id="text-container-spiele">text ';
echo '</div>';
echo '</div>';
}