Inquiry about auto-filling country code in forms

  • Profile Image
    Ricardo_webmaster
    Asked on April 15, 2026 at 2:33 PM

    Hello Jotform team,

    I hope you’re doing well.

    I would like to ask if it’s possible to implement the following functionality within a form:

    Currently, I have a question where the traveler selects the country they live in. Later in the same form, there is a field to enter their phone number.

    My question is whether there is a way for the country code field to be automatically filled based on the country selected earlier (for example, if Argentina is selected, it fills in +54; if Mexico is selected, +52; etc.).

    Is this something that can be achieved natively within Jotform, or would it require an integration, conditional logic, or custom script?

    Thank you very much in advance for your help.

    I look forward to your response.

    Best regards,

    Ricardo

  • Profile Image
    Podo: Support Specialist
    Replied on April 15, 2026 at 2:33 PM

    Hi Ricardo,

    Thanks for reaching out to Jotform Support. I'm an AI assistant here to assist you.

    Based on the information available in our knowledge base, currently it isn't possible to change a dropdown value based on a condition.

    For phone number formatting, Jotform does support Input Mask on Short Text and Phone elements, and you can also use conditional input mask with multiple fields or formats. However, the knowledge base does not confirm a native way to automatically fill a phone country code from a previously selected country.

    What is confirmed:

    • Dropdown values cannot currently be changed based on a condition.
    • Input Mask can be enabled on Short Text or Phone fields.
    • Conditional input mask can be set up for different formats.

    If you want, you can use the country selection to guide the phone format with conditions, but the knowledge base does not confirm automatic country-code population natively.

    Let us know if you have any other questions.

  • Profile Image
    Ricardo_webmaster
    Replied on April 18, 2026 at 11:25 AM

    I would like this conversation to be handled by a real agent, is that possible?



  • Profile Image
    Mikhail JotForm Support
    Replied on April 18, 2026 at 12:00 PM

    Hi Ricardo,

    We have a Country Code widget that lets you choose a country and auto filling the next field with the country code. Let me show you how to add to to your form:

    1. In Form Builder, click on Add Element on the left side of the page.
    2. Then, in the Form Elements menu, under the Widgets tab, enter Country Code in the search bar, and drag and drop the widget to your form. Inquiry about auto filling country code in forms Image 1 Screenshot 30

    This is what it looks like when added:

    Inquiry about auto filling country code in forms Image 2 Screenshot 41

    Give it a try and let us know if you have any other questions.

  • Profile Image
    Ricardo_webmaster
    Replied on April 18, 2026 at 4:40 PM

    Thanks for the reply. I've been looking for a widget several times and I can't find it. Could you tell me the exact name in Spanish?Inquiry about auto filling country code in forms Image 1 Screenshot 20

  • Profile Image
    Raymond JotForm Support
    Replied on April 18, 2026 at 6:33 PM

    Hi Ricardo,

    The name in Spanish is Código de país. Check out the screenshot below for your reference:

    Inquiry about auto filling country code in forms Image 1 Screenshot 20Give it a try and let us know if you need any help.

Your Reply