dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #15817
Re: Filter an Option Set in custom program registration form
Hi Adam,
I hope you have a best solution, I just have an idea which is not really
beautiful it based on three steps:
DHIS2 Side : - Create three defaults dataElements (With no options or
combo) : Region field, District field and Sous prefecture field.
HTML Side : - Create three Drop-down elements : Region, District and Sous
prefecture.
- Create three text fields (Put here the three
dataElement): Region, District and sous prefecture (Not editable by user)
JQuery Side : - Create a json file/variable to host region, district and
sous prefecture(This is the big job).
- Populate the region Drop-down element by regions
from json(When the form loaded).
- When region selected (based on event) :
* Change region text field value
(data element)
*Populate district drop-down by
filtering from json variable.
- When district selected (based on event) :
* Change district text field value
(data element)
* Populate sous prefecture
drop-down by filtering from json variable.
- When sous prefecture selected (based on event) :
Change sous prefecture field value.
Loking forward to hear about the result :)
Regards.
Diao
On Wed, May 16, 2018 at 10:47 PM, Adam Preston <adam704a@xxxxxxxxxxx> wrote:
> Hi Everyone.
>
> What I would like to do in version 2.28 is design a custom program
> registration form that filters a drop-down list (configured by an option
> set) based on the selection of a different form element. So, this...
>
>
>
>
> All of the scripting support for the custom forms seem to be for the data
> entry app as described here
> <https://docs.dhis2.org/master/en/user/html/dhis2_user_manual_en_full.html#d1473e19645>
> .
>
>
>
> Am I missing something?
>
>
> Sent from Outlook <http://aka.ms/weboutlook>
>
> _______________________________________________
> 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
>
>
--
*DIALLO Mamadou Diao Conseiller IT, Specialiste de DHIS 2 **( District
Health Information Software )*
*Projet de Renforcement du Système d'Information Sanitaire en Guinée*
*Phone : 623909413 | 662256106*
*Skype : diawwdiallo*
www.jsi.com
Follow ups
References