I want to remove the Country Code Dropdown part of the Phone field in the New Form Builder. I found a note in HubSpot saying, "Some users on the “New” HubSpot form editor have reported that the toggle to turn off the country code may be missing or behave differently compared to the “Legacy” editor. The toggle is indeed missing for me. Our audience is required to be inside the United States so we don’t want to give this option. It is also crowding out the rest of the form so you can’t see the full phone number typed in.
Does anyone know a workaround for removing the Country Code Dropdown portion of the Phone field?
I’m able to replicate the same issue. I was hoping to find something in the forms API docs about updating it that way, but I wasn’t successful.
I have a workaround (not perfect) that could work. You can make this a single text field and use a regex validation rule to format without the country code. Something like this: ^\(\d{3}\) \d{3}-\d{4}$
I don’t think this is a good long-term fix, but if you adamant about fixing short term until the bug on the form builder is fixed, it would work.
Someone may have a better workaround or found a way to update via API, which would be a better solution if possible.
Thank you @Josh for your help here so far! This is what the Community is all about!
As you’ve noted, an ideal solution would be if this could be updated via API. With that in mind, I’d like to tag in some of our other experts on the matter to see if they have any tips and tricks on this!
@CLiechty - There are potentially a range of exotic solutions here, including new properties as suggested here.
But I’m curious if you have explored adjustments to the “rules” on the phone number property defined. Options that appear for me include the following dialog, which enable elimination of the dropdown in your specific use case.
In trying to troubleshoot, I did adjust those rules to see if it would change the behavior on the form, but it did not. Even if I removed the phone number formatting from the property, the country dropdown still appears in the form builder.
I ran into the same issue. With the new form builder, I wasn’t able to hide the country dropdown for the phone number field, so I had to switch back to the legacy forms to achieve the same functionality.