← Back to team overview

dhis2-users team mailing list archive

Re: Drop Down List

 

Hi Rabia,

unfortunately there is no built-in feature for that at the moment. You will
need some javascript coding in a custom form to achieve it at the moment.

You can use the organisationUnit API to fetch the children in the hierarchy:

https://play.dhis2.org/demo/api/organisationUnits/O6uvpzGd5pu?fields=id,name,children[id,name]

regards,

Lars


On Mon, Jul 17, 2017 at 8:24 AM, <rabbia@xxxxxxxxxxxxx> wrote:

> Hi,
>  I need to know about how can we make dependent drop down lists in custom
> data set form? For Example if i select province from one drop down, it
> shows all the districts present in that specific province in another drop
> down. Also, How can we get values from DataBase to show in our forms. For
> example just like by selecting a province, get the names of district from
> database to show in drop down list.
>
> Thank You!
>
> Regards: Rabia Naz Ali
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>



-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
lars@xxxxxxxxx
http://www.dhis2.org <https://www.dhis2.org/>

References