JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
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.
Is there a way to pre-populate a text field based on a dropdown selection field?Asked by FuneralStudio01 on February 06, 2014 at 12:39 AM
I am looking for a way to create a prepopulate a text field with a value based on a selection from a dropdown list.
Is there a way currently to do this? Apart from creating separate text boxes with prepopulated data and using the condition rule for each value selected in the dropdown list?
ie. Heading is Cafe Name (Dropdown selection is) Jims Cafe then I would then like the Text Field to be prepopulated with the address (5 Smith Street, Smithville) etc.
Unfortunately, there is no built in feature to achieve this.
I have created a small demo form for you. Please take a look at the following form and see if you are trying to achieve something similar: https://shots.jotform.com/ashwin/Prepopulate%20textbox%20with%20dropdown%20value_(40361098635961)/Prepopulate%20textbox%20with%20dropdown%20value.html
Alternatively, you can add multiple address field in your form and hide the others based on the dropdown selection value. Please take a look at the following form: http://form.jotformpro.com/form/40361060487955
Feel free to clone this form for a closer look. This guide should help you in form cloning: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL
If you want to take the custom source code route, do get back to us with the form ID and we will send you the specific custom code.
Thank you for your prompt reply Yes your example:- https://shots.jotform.com/ashwin/Prepopulate%20textbox%20with%20dropdown%20value_(40361098635961)/Prepopulate%20textbox%20with%20dropdown%20value.html
Is just what we would like to do thank you. Is it easy to change the custom source code to add future Bussiness Names and Addresses down the track? If not we will probably use the show/hide rule.
Form Url is: http://form.jotform.co/form/40288132806857 (Where "Funeral Venue (Test)" is the dropdown list where we need to put our Venues and "Funeral Address (Test)" is the text field to be prepopulated with the venue selection address.
I have forwarded this thread to my colleague Ashwin for the complete workaround. I will also try to come up with a possible working codes.
Thank you Welvin,
Appreciate your help.
It should not be too difficult to change the source code to add more business names. But you will have to download your form's source code and embed it again after adding the custom code.
If this is acceptable to you, I will remove the old (test fields) and transfer the form to your account. I will also send you the source code of this form.