- GAPTAOnlineAsked on March 01, 2014 at 11:26 AM
I have a registration form that requires selection from a dropdown field for the name of a local unit. There are three other fields that have information needed based on the dropdown selection (local unit number, council and district. I currently have these ina spreadsheet with the values for each, how can I populate the remaining three fields based off of the selection of one?
- JotForm SupportWelvinAnswered on March 01, 2014 at 02:28 PM
Basically, what are you trying to do is to keep the remaining three fields "empty" then just populate it after a selection from the first field? The remaining three fields has an options so I assumed this is what you are trying to do.
An example that would explain how I understand your requirements here: https://shots.jotform.com/welvin/pages/change_dropdown_options-base-onthe-first-dropdown-selection.html.
Let me know your thoughts.
- GAPTAOnlineAnswered on March 01, 2014 at 05:57 PM
That is exactly what I want to do.
- CesarAnswered on March 02, 2014 at 12:24 AM
Here is the code used
Kindly review. Do let us know if you need further assistance. Thank you.
- GAPTAOnlineAnswered on March 02, 2014 at 08:14 AM
Unfortunately, I am not a devleoper. How do I identify the other fiels that are in the sequence to populate in the code. I realize that I would have to do this for each option and that will be fine, There would not be an array of selections for the remaining areas simply one.
- NRCsupportAnswered on March 02, 2014 at 10:10 AM
Pardon me (I'm not official round here)
As an example assume that there are four entries in the first dropdown box (box1). Then create four further dropdown boxes (boxA,boxB,boxC,boxD), one for each of the entries in box1. Put the following conditions on the form using the wizard:-
if field box1 is equal to value1 then show field boxA
if field box1 is equal to value2 then show field boxB
if field box1 is equal to value3 then show field boxC
if field box1 is equal to value4 then show field boxD
The wording may not be exactly correct, but I'm sure you get the idea. The wizard isresponsiblr for the actual wording.
- CesarAnswered on March 02, 2014 at 11:39 AM
As suggested by NRCsupport, this is also possible by way of making the necesary amount of drop down menus and setting up the right Conditional rules, like so:
This is how I've added the rules to my example form:
And These are the rules I have applied:
Kindly clone my example form if you need to further review it, Thank you.
- GAPTAOnlineAnswered on March 02, 2014 at 11:54 AM
The field is hidden but the value is not displayed in the field. I am okay to try the java piece to have the fields populate the intended value as the values would be similar to: Local unit selected equals value of Forest Park ES, the other values would be lu = 1698, council = clayton, district = 7. How can I get the additional fields int he script?
- CesarAnswered on March 02, 2014 at 01:04 PM
I believe Welvin may be able to provide a solution to your current questio. In any case, my opinion would be, If each value will render the next value on the next dropdown menu. Then you may need to create a script for each field being updated.
So you would need to set the proper onchange value on the initial dropdown.
Then have the proper script with your required arrays to make the changes on the second dropdown.
This will all depend on how many dropdown menus you are using and which will make changes to whom.
Do let us know if you need further assistance. If needed do provide the values in question. Thank you.
- GAPTAOnlineAnswered on March 03, 2014 at 10:47 AM
I will need additional assistance in trying to duplicate Welvin's solution. The fields that are populated after the selection of one dropdown (the local Unit field) will populate the input for the remaining three fields.
- JotForm SupportEltonCrisAnswered on March 03, 2014 at 11:30 AM
For clarification, can you confirm if this is want you want to achieve?
If Local Unit Number = 1698
Council = Clayton
District = 7
So basically, when a number is entered on the Local Unit field, you want these two fields to have default values according to the entered LU number? Just wanted to clear my confusion. My colleague Welvin will definitely provide you a sample script as soon he can.
- GAPTAOnlineAnswered on March 03, 2014 at 11:37 AM
The selection is based on the selection of the name instead of the local unit number.
If PTA name is = Morrow ES PTA
Local Unit Number = 1698
Council = Clayton
District = 7
So when the name is selected three default values are entered.
- EliezerNAnswered on March 03, 2014 at 12:58 PM
Thanks for the clarification. My colleague will get back to you once he has the neede script to accomplish what you need.
- GAPTAOnlineAnswered on March 05, 2014 at 05:22 AM
Is there any status on development of script?
- JotForm SupportWelvinAnswered on March 05, 2014 at 06:29 AM
My apologies! I actually tried this on the day you've posted this thread, but I couldn't figure out how to combine all the last three fields. Also, it's a huge list of options. We'll see if what we can do to make the adjustments but again, we cannot give you the exact timeframe for the output.
Thanks for your patience and understanding.
- GAPTAOnlineAnswered on March 05, 2014 at 06:35 AM
Should I seek another option? Normally, I would have a lookup query to use against a database or excel spreadsheet, however, I don't think this is supported for use in jotform.
- JotForm SupportjonathanAnswered on March 05, 2014 at 08:06 AM
It is possible to use lookup query via database and pre-populate the form.
It will require outside the form coding using PHP.
But to further this different topic, I suggest you create a separate thread for it. Use this link to do this http://www.jotform.com/contact/
- GAPTAOnlineAnswered on March 05, 2014 at 08:45 AM
I have created a separate thread.