How to limit form within a specific country only?

  • firstlinepromotional
    Asked on April 2, 2025 at 4:17 PM

    Hello, I would like to create a form where you can only purchase if you live in Canada. We are going to put it on out social media outlets and since some of our followers are outside of Canada, is it possible to limit that specific form to Canadian residents only? Please let me know. Thanks.

  • Raymond JotForm Support
    Replied on April 3, 2025 at 12:42 AM

    Hi Peter,

    Thanks for reaching out to Jotform Support. We can use the Get Visitor Location widget to automatically fetch the location of the user based on their IP address. Then, we can create a condition that hides the submit button if the country is not in Canada. Let me walk you through it:

    1. In Form Builder, click on the Add Element button on the left, and under the Widgets tab, select the Get Visitor Location widget.
    2. Next, in its Settings on the right, Enable the Country option and click on the Update button.
      How to limit form within a specific country only? Image 1 Screenshot 40

    Now, we'll create a Show/Hide field condition that hides the submit button if the widget does not contain Canada. Let's do it:

    1. In Form Builder, click on the Settings tab on the orange navigational bar at the top, and click Conditions on the left side panel.
    2. Next, select Show/Hide Field condition.
      How to limit form within a specific country only? Image 2 Screenshot 51
    3. Create a similar condition below, click Save and that's it.
      How to limit form within a specific country only? Image 3 Screenshot 62

    This can also be combined with other elements such as showing an error in a paragraph element, and hiding other elements in your form when the condition is triggered.

    Give it a try and let us know if you need any help.

Your Answer