What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Using Get Visitors Location with conditions to set a value of some field

    Asked by Jan on March 16, 2015 at 02:17 PM

    Hi,

    I am already using the widget "Get Visitor Location" and conditions.

    I am trying to setup sth like "If user location starts with "US" then set value of another field to 20".

    The field "Get Visitor Location" shows the correct location. But it is considered to be empty when using conditions.

    I already did a test like "If Location is empty then set value to 1". And the result showed 1.

    Do you guys have an idea?

    country based get visitor location conditions
  • Profile Image

    Answered by Ben on March 16, 2015 at 04:09 PM

    You could do that Jan using GeoLocation widget, with the return set as Address only.

    You can see a quick sample here: http://form.jotformpro.com/form/50745731488968

    It should give you a lot of info though so it might be good to make few tests for the regions that you would like to create the rule for and it should properly.

    If you capture the data over Form Calculation (as a text), you might get some value even if the visitor does not approve to share the location in which case it should based it on the IP (which for countries and states should still work properly.

  • Profile Image

    Answered by Ben on March 16, 2015 at 04:11 PM

    I just wanted to add that if you are looking to base some calculation for the payments based on the location, you could do that from within the payment processing tool directly, so please let us know if that is the case and we would be happy to assist with that.