The Forms process logs the IP address of the client computer submitting the form. Is there a way to get this value prior to the form being submitted? I'd like to send the data to a stored procedure using a Lookup before the process is submitted.
Question
Question
Replies
Hi Josh,
I found this StackOverflow article, it looks like it might work for your purposes:
https://stackoverflow.com/questions/19953328/how-to-get-ip-address-using-javascript-or-jquery
The following SO article links to various third-party web services that provide this functionality:
https://stackoverflow.com/questions/391979/how-to-get-clients-ip-address-using-javascript-only
Good luck,
Rob
Note that the second questions explicitly states that they can't run any code on the server, which is why all of the answers use 3rd party sites. It would be simple to write a web application that echoes back the client IP address, and host it on the same server as Forms.
Thanks. Yeah, I've seen how to do it outside of Forms. I was hoping there was a shortcut to get it using JS or fields/functions available within Forms that I could reference without going to another site to get the info.
You can add the js provided in the second link above to Forms custom script; it will send request to 3rd party site and get ip address, then you can fill a certain field with the ip address to trigger lookup rules.
My challenge is that not all users who fill out these forms within our agency will have internet access.
If your users all use browsers supporting WebRTC, you could try this answer which is pure client side js.
But if your users use IE, then you have to ask a server for the IP. Consider set up your own ip query server in local network maybe.