Custom data entry form & Web Capture App

Hi,

I would like to develop a custom data entry form for an event program that contains javascript for a particular behaviour (that includes the assignment of values to Data Elements).

In previous version of dhis2 (like 2.30), this is something that was working, maybe because the input app was “event capture app”.

In the current versions of dhis2 (like 2.33) the input app is “Web Capture App” (based on React AFAIK), and I couldn’t do that. Does somebody know if this is possible? Could somebody share any link/documentation to tackle this problem?

Thanks in advance!

Carlos

1 Like

@Markus @austin @christos , maybe you would have some knowledge that help in this situation. Do you have any idea about this issue?

1 Like

any news on this?

Hey @JIMENEZ_POMARETA_Ram and @ctejo,
The Capture app does not properly support scripts in custom forms, as you have noticed.

Is it possible to make the assignments you need based on program rules? Assignment should work in custom forms like they do in default forms. Could you describe the assignment conceptually?

The custom form javascript might be added back to the Capture app either as part of the custom form functionality or by other means. To chart the path here your input is valuable.

Best regards,
Markus

Hi Markus!

Thanks for the quick answer. We have two needs:

  1. To instert some custom CSS to adapt the view to what our users are used to.
  2. To show some real-time calculations. Currently this is not possible to do through PR or PI, since there’s a one step delay still not solved, as described here: [DHIS2-10343] - Jira

Thanks so much Markus !

Hi Markus!

Sorry for the late reply.

Our use case is a cascading dropdown menu. We used for that a jQuery plugin (jQuery Cascading Dropdown Plugin Examples) + a json file. The idea is to fill a DE as result of the dropdown menu selection.

I hope this helps!