Replies: 0
Hello!
Wanted to hide the VAT field if the company field is empty (due to business logics)
Tried:
let input = document.getElementById("billing_company")
input.oninput = function() {
if (input.value.length === 0) {
console.log('empty!')
document.getElementById('vat_number_field').style.display = 'none';
}
document.getElementById('vat_number_field').style.display = 'block';
};
but it does not working. Any ideas?
PS found this topic:
https://wordpress.org/support/topic/only-show-vat-field-when-company-name-is-filled-in/
but still not working for me.
- This topic was modified 9 minutes ago by gbllab.