document.querySelector('.custom-phone-form').addEventListener('submit', function(e) {
console.log('Form submitted'); // Add this to confirm the form is submitting
const phoneField = document.querySelector('#b26ecb6'); // phone field ID
const phoneValue = phoneField.value.trim();
console.log('Phone number:', phoneValue); // Log the value of the phone number field
const phoneRegex = /^\d{7,}$/; // regex for at least 7 digits
if (!phoneRegex.test(phoneValue)) {
e.preventDefault(); // prevent form submission
alert('Please enter a valid phone number with at least 7 digits.');
console.log('Validation failed'); // Log when validation fails
}
});