Dynamic array based on Input from Parent field
-
Hello Sir,
There’s a Logic I need to implement in my Project, but I don’t know if I will be able to implement it with AR Member Registration Form!
THE LOGIC
There are 36 States, and each State has multiple Local Governments.
Each Local Government has multiple Wards.
And each Ward has multiple Polling Units.
For clarity, I will use 3 States as example:
1.) STATE: Lagos || LOCAL GOVERNMENTS: 20 || WARDS: 8 wards || POLLING UNITS: 16
2.) STATE: Kaduna || LOCAL GOVERNMENTS: 15 || WARDS: 12 wards || POLLING UNITS: 24
3.) STATE: Ondo || LOCAL GOVERNMENTS: 16 || WARDS: 10 wards || POLLING UNITS: 18
THE LOGIC
State, Local Government, Ward and Polling Unit are all Dropdown Fields.
If the user selects a State, the Local Government, Ward and Polling Unit fields should only allow selection of content limited to the chosen State.
So that, if I select Lagos as my State, I should have option to select only one Local Government from the list of Local Governments that are only in Lagos, and should only be able to select one from the list of Wards that are only in the Local Government that I have chosen, which is in Lagos.
When I have chosen that Ward that is within a Local Government, that is in Lagos State, I should be able to select only Polling Units within that Ward.
But if I select Kaduna as my State, I should have option to select only one Local Government from the list of Local Governments that are only in Kaduna, and should only be able to select one Ward from the list of Wards that are only in the Local Government that I have chosen, which is in Kaduna.
When I have chosen that Ward that is within a Local Government, that is in Kaduna State, I should be able to select only one Polling Unit within that Ward.
In essence, the value that can be selected in Local Government, Ward and Polling Unit fields are dynamically populated according to the State chosen.
As an example from this website ( https://pre.cac.gov.ng ), you will see that when I select Lagos as State here — https://prnt.sc/YFVdxltorzE5
Or Kaduna as State here — https://prnt.sc/Z2ymzonOq8uQ
You will see that the LGA or Local Government Area information changes.
THE PROBLEM
I don’t know if I will be able to implement this Logic with AR Member Registration Form!
Needing to hear from you soon.
Regards.
- You must be logged in to reply to this topic.