PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Show country/city from which the form was submitted.

  1. Hello,

    I would like to see where my form-submitting-customers come from. Is there a way of getting that information directly to the notification mail that i receive when the form is submitted? May be with a hidden auto-populated field?

    THanks in advance!

    Posted 13 years ago on Monday August 29, 2011 | Permalink
  2. The IP address of the computer where the form was submitted from is captured. I think you would have to take that information and use a library like GeoIP to convert the IP address to a location. You would have to install the GeoIP library (or use an external service) then use the gform_pre_submission_filter http://www.gravityhelp.com/documentation/page/Gform_pre_submission_filter since you want to put this information into the admin notification.

    Does not sound too complicated, but will require a couple pieces and a bit of code to make it happen. The information is already being captured by Gravity Forms. It's up to you to process it and put it into a format you like.

    Posted 13 years ago on Monday August 29, 2011 | Permalink
  3. Thank you for a quick reply Chris,
    It sounds exactly what I'm looking for. Unfortunately I lack the code writing skills to pull thought with your solution but I pasted the following in the message body of notification mail and it works fine:
    <a href="http://www.geoiptool.com/en/?IP={Hidden IP:6}" rel="nofollow">Check out where I live</a>

    Hope some geo options will be available in the upcoming updates of gforms :)
    Cheers

    Posted 13 years ago on Monday August 29, 2011 | Permalink
  4. That was going to be my second suggestion :-) I do that for a couple sites of mine. Glad you were able to work around the problem, and thanks for the suggestion.

    Posted 13 years ago on Monday August 29, 2011 | Permalink

This topic has been resolved and has been closed to new replies.