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.
How can I auto populate a field and get a price based on a country field?Asked by txforesttrail on August 08, 2016 at 01:49 PM
I want to do something very similar. Have users select their County and based on this answer Populate a Text field and a Price field.
Can you provide me with a sample form so that I can attempt to do this?
Thanks so much!
That is possible by adding an update a field logic:
Here's my test form: https://form.jotform.com/62202539001946. Select "United States" from the address field. The other fields will be auto populated.
Here are the conditional logics:
Please let us know if you need assistance adding the condition.
I don't see that anything autopopulated with the selection of United states.
I will have users select from 300 possible counties in Texas.
Based on their selection, I would like one of 10 answers to populate the text field with a corresponding number (in a separate field).
I'm not sure how to use the update field, because there are almost 300 possible selections with only 10 outcomes.
Is there a way to input a list?
if Texas County EQUALS
INSERT TROPICAL INTO TRAIL REGION
Unfortunately, you cannot use a list of strings in your conditions. You will have to create a condition that will calculate the pricing and populate the text field for each state.
Let us know if you need more information.
I think I might not be asking the correct questions.
On this thread:https://www.jotform.com/answers/308315
The tech stated that there was a manual entry method:
Answered by Welvin on December 31, 2013 at 06:00 PM
Sure. I can see what you mean. The pricing sets will work if you will type it, example, first to three letters then choose it from the list. Don't choose it directly. Will try to check this and make sure everything would work per your requirements.
The country list is possible. Since we use the source codes, we can simply add the list manually. I'll get back to you, i'll do my best.Is there a manual entry method?Or, maybe I am trying to use the wrong method to achieve my desired result.Maybe if I better state my end goal - you might have a better solution...So,I have a list of nearly 300 counties in Texas, each one of those counties belongs to one of 10 regions.When a user selects their COUNTY, I want a field to show the corresponding REGION.Can you think of a better way to do this?Maybe if I made each County into a product or....Is there some sort of table format I could use to connect the COUNTY with the REGION?I know there is an easy way to make this happen, I'm not smart enough to come up with something too difficult... I must just not be asking the right questions.
Thank you in advance for your assistance.
It is required to set the conditions based on the counties to be selected for each region as shown below: Here I have used only 3 options to set in the rule list. If you having more counties, it requires all of them to be entered manually in the rules list.
Here is the demo form with the above condition.
As you start typing in the county field, the list of matching counties will be displayed. Once the selection is made, the Trail region and Price fields will be populated as set in the conditions.
Please feel free to clone the form to your account.
If you are referring to something different, please let us know. We will be happy to assist.
I will be offering an alternative solution on your counties & region issue (since no specs or requirements are given on the Price field yet).
This is the demo form I did (fig. 1) based on your counties & region challenge. Instead of using a regular dropdown field (which will require around 300 individual condition-rules for each county), I opted to use the AutoComplete widget which will help us create only 10 conditions based on the Trail Regions by implementing comma separated values for the county list per region.
I don't have a complete list or reference of all the counties you have but the source I got from google gave me this small list to be used in the sample demo (fig. 2).
*** If you need to plug-in all of your counties with their corresponding trail regions, we just have to update the conditions.
When you start typing in the County field, the JotForm widget will automatically search based on the characters you've entered. And when you select a specific county, the Trail Regions field will automatically populate with the correct region based on the matrix in fig. 2 (this field is set to Read-Only so users cannot edit and enter an incorrect value).
Note: If there are counties with the same name but belonging to different regions, only 1 region will be used by the widget. To fix this, you can suffix the county with the region name: e.g. "San Antonio - Hill Country" vs. "San Antonio - Independence".
As for the Price field, you can share the formula or condition for that and we'll try to help.
Does the demo form meet your requirements?
- Randy, fellow JotForm user
The Dynamic Dropdowns widget can also achieve the same end-result but it would be tedious and cumbersome to set it up compared to the AutoComplete widget.
You may be my tech savvy savior!
I'll try this right now - thank you so much!
You are THE best! Your solution is working beautifully. Using the autocomplete is far less clunky and much less tedious.
I really cannot thank you enough for your time and thoughtfulness. We are a nonprofit and do not have many resources. You have saved me from hours of endless work and frustration.
Thanks for the kind words, Marty.
Happy to help a fellow JotForm user :)
Great! Thanks for the help, Randy. In fact, we are on the same page using Auto Complete widget. However, I agree that the way the conditions are used by you are better to minimize the rules in each condition.
Marty, Please get back to us if you need any further assistance. We will be happy to help.