Something like this requires a custom template and some javascript to dynamically change the options available. I have a tutorial that explains a simple way to do this that might work for you:
Dropdown Selectors: limit selections based on another selector
Sorry but I don’t understand how the code should work in the end? Do you have an example? if in the field insert ” Alabama:: AL, Alaska:: AK, American Samoa:: AS, Arizona:: AZ,
Arkansas:: AR, California:: CA ” even without the introduction of any scripts displays as in the picture in the documentation
The article linked above contains an example. In the example, the “state” field displays normally, but the “city” field has it’s available options modified when a “state” is selected. This is done by only showing the city optgroup for the matching state.
It works by having optgroups in the child field that match values in the parent field.
I hope that helps…
Hmm. That is, I can not thus affect the second field based on the data entered in the first field?
If you don’t know what I mean, for example. :
I have a field “City” (which is not filled by the user) and based on the data entered, for example “Washington” in the field with the Country (which fills the user) is automatically assigned to the United States
and so with all countries and cities of the globe
-
This reply was modified 7 years, 3 months ago by
vipplayer.
Oh, I see. Of course, this is possible, you will need to have your cities and states organized with optgroups so your javascript can know which value to use to update the other fields.
You’ll need to write the code for that from scratch, I don’t have an example of how you’d do this, but using jQuery it’s pretty simple.
do I just create my own plugin-add-on to yours?
-
This reply was modified 7 years, 3 months ago by
vipplayer.
This is something that you would put into a custom list template, not a plugin.