¿Cómo añadir valores ocultos en un dropdown?

  • alexandromoroz5
    Fecha de consulta 8 de agosto de 2025, 12:56

    Hola soporte de Jotform, estoy trabajando en una automatización para una empresa y estoy utilizando el workflow, dentro del mismo hay un formulario que un administrador de la empresa llena, en este formulario hay un dropdown para elegir el país, me gustaría saber si es posible de alguna manera hacer que el dropdown te muestre los paises con el nombre completo mientras que su valor real sea la abreviación, un ejemplo, que yo en el dropdown pueda seleccionar "Argentina" y el valor que se guarda sea "ar". Entiendo que esto se puede hacer con condicionales del formulario pero esto implicaría hacer manualmente más de 200 condicionales, 1 por país.

  • Jan Jotform Support
    Fecha de respuesta 8 de agosto de 2025, 13:30

    Hi alexandromoroz5,

    Our Spanish Support agents are busy helping other Jotform users right now, so I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in Spanish, let us know and we can have them do that. But, it might take a while until they're available again.

    Now, coming back to your question, can you check my simple demo form and see if this is what you’re trying to achieve? For example, if I type Ar in the field, it will show a list of countries starting with Ar, and Argentina will likely appear at the top so the user can click or select it.

    ¿Cómo añadir valores ocultos en un dropdown? Image 1 Screenshot 20

    It's really easy to add that to your form. Let me show you how:

    1. Click on the Widgets tab in the Form Elements panel on the left side of the Form Builder.
    2. In the search box, type autocomplete.
    3. From the search results, click on Autocomplete widget to add it to your form.

    Once added, you can configure the widget to display a list of countries or any other items you want to suggest to your users. Let me show you how:

    1. Click on the Autocomplete widget in your form to select it.
    2. Click on the Gear icon to open the widget settings.
    3. In the Items box under the General tab, type or paste your country list separated by a vertical bar | (for example: Brazil | Japan | Egypt | Canada).

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


  • alexandromoroz5
    Fecha de respuesta 8 de agosto de 2025, 14:05

    Hi Jan, thanks for your reply, im looking for another thing, i want a dropdown where you select only one option, for example Argentina, and the actual value of that option is the code of the country, in this example, the code of Argentina is "ar", another example, if i choose "spanish" the value should be "es", i really don't know if this is possible but its what i need actually, the way to do this is with conditionals but that means i need to do manually more than 100 conditionals, one for each country code.

  • Dayron Jotform Support
    Fecha de respuesta 8 de agosto de 2025, 15:08

    Hi Alex,

    It's not possible to add hidden values or change the value of the selected option in the dropdown field, but you can add Calculation Values and copy these to a short text field that then you can use it as you wish. Let me show you how:

    1. In Form Builder, select the dropdown field in your form.
    2. Click the gear icon to open its Properties.
    3. Go to the Options tab in the properties section, and toggle on the Calculation Values option.
    4. Enter the values you want to assign to each option in the table that appears next to the dropdown options.

    ¿Cómo añadir valores ocultos en un dropdown? Image 1 Screenshot 50 Then, we can copy this value to a short text field and hide the field so it doesn't show in your form, like this:

    1. In Form Builder, click on Add Element on the left side of the page.
    2. Under the Basic tab, select the Short Text element, and click or drag it to add the field to the form.
    3. Then click the gear icon to open its Properties.
    4. Under the Advance tab, scroll down and toggle on the Hide field option.

    ¿Cómo añadir valores ocultos en un dropdown? Image 2 Screenshot 61 Then, we can add a condition to copy the value of the dropdown to the short text field, like this:

    1. In Form Builder, in the orange navigation bar at the top of the page, click on the Settings.
    2. In the menu on the left side of the page, click on Conditions, and then select Update/Calculate Field. (If you already have a condition set, first click on Add Condition, then select Update/Calculate Field.)
      ¿Cómo añadir valores ocultos en un dropdown? Image 3 Screenshot 72
    3. Set the condition like you see below, and click on Save.
      ¿Cómo añadir valores ocultos en un dropdown? Image 4 Screenshot 83

    I've used my example form for this, and just entered the calculation value for Argentina, but you'll need to enter the values for each country.

    Give a try and let us know how it goes.

  • alexandromoroz5
    Fecha de respuesta 8 de agosto de 2025, 16:36

    Perfect, this worked very well for me, thanks for the quick response, have a good day!

Your Reply