Force check out form of the name only letters

0

I did the following function in wordpress in the file functions.php :

function trick_change_checkout_field_input_type() {
    echo "<script>document.getElementById('billing_phone').type = 'number';</script>";
}

add_action( 'woocommerce_after_checkout_form', 'trick_change_checkout_field_input_type');

And it worked perfect to force the phone to numbers only, now I need to do the same but for only letters in the name and surname of the checkout form.

How to do it?

    
asked by Walworth Industrial de Vlvulas 23.02.2018 в 00:12
source

0 answers