Lead Capture Tools

DJames79
Participant

Which forms tool to use?

Hi,

 

I setup a form for our "Book a Demo" and now placed it into a landing page but it seems I can't add any logic to it to change the international dialing code offered based on IP address location. I've just read that this can be done via adding a form to a landing page directly. Am I missing something as to why I can't do this from the forms menu under Marketing but can do this under a form module added to a page. Are they different, is there a preffered way of doing this?

0 Upvotes
6 Replies 6
Aakar
Key Advisor

Which forms tool to use?

Hi @DJames79 

I’m not sure I fully understand your question. But were you referring to smart content? You can use dynamic/smart content on the form.

Thanks.

Aakar Anil
Marketing Technologist
aakar.me | @aakarpost | in/aakarpost
0 Upvotes
DJames79
Participant

Which forms tool to use?

Can anyone point me to the right place to get the logic needed for a rule to change the country code in the phone number field depending on the IP address or region your coming from, can't seem to find an knowledge base article on this. Thank you.

0 Upvotes
TSburv
Participant

Which forms tool to use?

They are a bit different in terms of flexibility. If you’re adding a form through the Marketing -> Forms menu, it works as a standalone element and has fewer customization options compared to the Forms module inside a landing page. The ability to change the international dialing code based on IP typically comes from HubSpot's Smart Content or Custom JavaScript, which is easier to implement when using a form module inside a page.

 

To achieve this, you can use Smart Rules (available on certain HubSpot plans) to dynamically change the form fields based on the visitor’s location.

 

Apply a JavaScript solution to auto-detect the country and pre-fill the dialing code dynamically. Embed a third-party form (like Typeform or Jotform) that supports IP-based phone number formatting.

If you're looking for a HubSpot-native way, embedding the form via the landing page module gives more control over logic and customization than using standalone forms from the Marketing -> Forms section.

 

Hope this helps!

DJames79
Participant

Which forms tool to use?

Thank you. Now trying to work out the logic needed to automatically select the right country based on location the user is coming from. any suggestions on where I can find this please?

0 Upvotes
TSburv
Participant

Which forms tool to use?

You're welcome!

 

You can use JavaScript along with an IP geolocation service. A good option is ipinfo.io or ip-api.com, both of which offer free tiers that should be sufficient for basic functionality.

 

If you're looking for a no-code solution, I’d recommend checking out Jotform, which has a free version and includes built-in geolocation features.

 

For a custom approach, you can implement a script like this:
1. Fetch the user’s IP-based location using a service like https://ipinfo.io/json  or https://ip-api.com/json .
2. Extract the country code from the response.
3. Use JavaScript to set the correct dialing code in your form's phone number field.

 

Smart Content might also help, but it requires a Pro plan or higher.

0 Upvotes
DJames79
Participant

Which forms tool to use?

Thank you, much appreciated!

Had a frustrating day trying to build our first landing page with a form that captures data and then loads a video. Doesn't appear to work, the knowledge base article says you start with a video then select a form so the opposite way around from building the page that I've done, finally made a new version added a video and now there is no form option!! One for tomorrow. Thanks again.

0 Upvotes