- MyPartySuppliesAsked on October 20, 2016 at 01:55 PM
Let's say I have a list of cities:
and I would like to assign a 'region' to each of them and then populate a hidden field with a unique value based on the users selection.
So I have 2 regions
Now whenever a user selects London, Birmingham or Liverpool I would like to populate a hidden "region" field with either "UK" or a numerical value (1)
While if the user selects Berlin or Frankfurt I would like to populate the hidden "region" field with either "Germay" or a numerical value (2).
Essentially this consists of two tables with N entries where values in table 1 (Cities) match a corresponding value in table 2 (Regions)
How can I achieve this with Jotform?
Thanks in advance
- JotForm SupportKiranAnswered on October 20, 2016 at 04:33 PM
You may populate the hidden field with a value based on the selection of another field using a set of conditions.
Please see the conditions set on the demo form with the list of cities in a dropdown and the region is a text box field.
You may hide the Region field on the form by selecting the Hide Field option from the field properties.
Please see the demo form below and feel free to clone it to your account.
Hope this information helps!
- MyPartySuppliesAnswered on October 21, 2016 at 06:44 AMThanks Kiran
That works - but it could be very tedious if I have dozens (or hundreds) of
cities and regions. Is there any way I can populate this in a more
database-table like structure and then do a lookup from one to the other
based on the value?
*Region_ID | Name*
1 | London
1 | Birmingham
and a Regions table like
*Region_ID | Region_Name*
1 | UK
2 | Germany
3 | France
4 | other
and then do a lookup (where London for example would return a Region_ID of
1 which is mapped in the Regions table to "UK") - rather than a VERY long
Please let me know - thanks in advance.
- JotForm SupportNik_CAnswered on October 21, 2016 at 07:28 AM
Unfortunately, I don't see a way to that on a form itself. There is Matrix field for example, that you can use for a table, but, you can not use conditions to copy a value to it's fields, since you can not specify which data will go to certain field.
I'm thinking that best way for you to manage that is to integrate your form with Spreadsheets and manage your data there:
You will be able to search, review and to all necessary checkings right there.
Could something like that work for you?
Please let us know.