Display IP address in Webflow form

Hi - I have been trying to follow a couple of previous threads on how to display IP address in a webflow form (from 2018). I think I have followed the instructions properly, but I can’t get it to work! :frowning:

Was hoping someone might be able to offer some help.

Screenshot 2022-12-27 at 22.28.18

Screenshot 2022-12-27 at 22.28.37

Links to the main prev thread I went through: How to track IP Address of people who fill out a form

Hey Seb, it’s a pretty simple process and it looks like you’re on the right track. Most likely you have an ID wrong.

Share your readonly link and your published site link if you need help debugging your script.

Note you have a space after the word javascript in your script type, though I wouldn’t expect that to break things. Check your browser console for errors.

What was the solution to this? I also can’t get this to work!

Most likely the id field was incorrect. You need to set an id where you want the value to be stored, and then reference that in your code.

There are services that provide IP address tracking and information. You can use an API to fetch the user’s IP address and display it in your Webflow form. Some popular services include ipinfo.io or ipstack.com. You would typically sign up for an account, get an API key, and then make a request from your Webflow site.

I would like to seek advise if there is a ready integration with IP2Location.io API? I would like to use their VPN detection feature.

Hey Michael, when you’re integrating with services like this in Webflow you typically do it with client-side code, query the API and then do whatever you want with that data.

Here’s the API, you’d need the Security plan to get vpn data.

1 Like