I am using the Raw HTML form embed code since I need to have more than 1 form on a page and noticed the flag dropdown on my default phone number field breaks. https://nickw142.sg-host.com/contact-us
Also, there seems to be an excess amount of padding for all of the error messages when someone misses a field. How do you clean these forms up to make them nice?
Hello @NickDanger55 ,
The phone input with country flags is powered by JavaScript (typically using the intl-tel-input library), and it relies on HubSpot’s default CSS and JS. When using the raw HTML embed, these aren’t included by default, which is why the flag dropdown breaks.
You’ll need to manually include the necessary JS and CSS to restore the functionality. You can use the open-source intl-tel-input library: GitHub - jackocnr/intl-tel-input: For entering, formatting, and validating international telephone numbers. Available in vanilla JavaScript, or as React, Vue, Angular, and Svelte components. · GitHub
To clean up the form error styling, you can use the following CSS override:
.hs-error-msgs { padding: 4px 0 !important;
margin: 0 !important;
color: #d9534f;
font-size: 13px;
}
This YouTube tutorial is also a great resource if you want to further style your HubSpot forms with custom CSS and JS: https://www.youtube.com/watch?v=4YU57TVVhRk&t=1s
Hope this will work.
Thank you so much! Or do you by chance know how to just hide the country flag drop down thing? Seems unnecessary
Hi @NickDanger55 ,
Yes, you can definitely hide the country flag dropdown and just use a plain phone input field without the international selector. You can do this with a simple CSS override.
Here’s one option:
.hs-input[type=“tel”] + .iti {
display: none !important;
}
Or, if the .iti container is wrapped differently in your layout, try this version:
.iti {
display: none !important;
}
Note: This won’t affect the functionality of the phone field—it will just visually hide the country code dropdown and flag, so it looks cleaner if you’re only targeting a specific country (like US/CA).
If you’re still seeing issues or the flag persists, feel free to share the form embed snippet or page link again, and I can take a closer look.
Also, if you’re interested in fully customizing the form’s appearance, this YouTube tutorial is a great resource- https://www.youtube.com/watch?v=4YU57TVVhRk&t=1s
Hope that does the trick!
Thank you so much for your help but neither the hide CSS for the phone flag field or the padding CSS you sent worked: https://nickw142.sg-host.com/contact-us
Could it be my temporary dev domain/site be the reason these overrides are not working?
@ArisudanTiwari
If we do this manully with the help of JS
- add cdn on the top intlTelInput.min.js, intlTelInput.min.css
- then, add below js
document.querySelectorAll(‘input[type=“tel”]’).forEach(function(input) {
window.intlTelInput(input, {
initialCountry: ‘auto’,
geoIpLookup: callback => {
fetch(‘https://ipapi.co/json’)
.then(res => res.json())
.then(data => callback(data.country_code))
.catch(() => callback(‘US’));
},
utilsScript: ‘https://cdn.jsdelivr.net/npm/intl-tel-input@17/build/js/utils.js’
});
});
- Then we follow all the step that you have mention
This will also work.
Ankita Gupta
HubSpot Advisor

Would it be easier to just hide that flag dropdown thing?
Thank you so much for your help but neither the hide CSS for the phone flag field or the padding CSS you sent worked: https://nickw142.sg-host.com/contact-us
Could it be my temporary dev domain/site be the reason these overrides are not working?