I am New to Adaptive forms, I want to implement cascading drop-down functionality (3 levels ex: country, sate, city)
Lets say the first dropdown is county and second is the states for the selected country.
so how can i get the states based on the selected Country i.e based on the first dropdown how to fetch 2nd dropdown data.
similar 3rd drop-down based on second one
I have implemented it in xdp and it works, I have used xdp reference and developed adaptive form but the functionality doesn't work. adaptive is not reading the xml values(non binded after initialize).
Please guide the steps which I can implement cascading drop-down functionality in adaptive form.
There are a few ways to approach this, but I will share one that I have used before:
Second, I would populate the First dropdown list using the first-level country object names. e.g. on initialise, get the list of names from the localstorage object, sort your list (if required) then assign this.items=[your array of country names].
When the First list is selected, in the Country list event change handler, I look up the dictionary for the Country item that was selected and populate the objects in the second list. Same goes for the third list. Setting up your objects from the JSON string you parsed is key to this so these lookups are fast. Its not a big dataset so it should be fairly quick.
Thanks for the response, my use case is to achieve 3 drop downs fields that dynamically populates list of countries, states,cities based on the selection of country the second drop down should populate list of states in the that particular country and on select of particular state the third drop down should populate the list of cities in that particular state, kindly let me know the ways of achieving this