Survey Form - Public

Hello,

Can we conduct anonymous survey form for the feedback and can save all their responses in DHIS2. This survey form will be public and a link will be sent to all the participants who are suppose to submit the survey form. Can we have public form in DHIS2 considering we have authenticated platform.

Will appreciate your suggestions on this and how can we implement this in DHIS2?

Thanks,
Hiral

don’t think it’s supported by dhis2.

I guess it’s a simple event program in dhis2 ? (multiple submissions allowed, not really tracking the entity/person answering the survey)

Other options

  • Is to collect data in another tool (google forms, …) and perhaps ask an LLM to code an import script between 2 platforms
    • the challenge is linking to “period/date” and “pyramid/orgUnit” concept of dhis2
    • and keeping “question/answers” and dataelements/valuetype compatible and easy to match
  • or use a data collection tool that allows that have this integration like https://www.openiaso.com/
    • it support mobile data collection (authenticated or not)
    • it support web mobile via enketo (authenticated or not)
    • has dhis2 integration (for the pyramid, and export to simple events, aggregate models of dhis2)

Hi Hiral!

Yes, this is absolutely doable, and it’s a fairly common requirement. Let me walk you through your realistic options.

The cleanest approach: External form with API push

The most reliable and truly anonymous setup is to host a simple public web form (this can be as lightweight as a static HTML page or a React app) and have it POST responses to DHIS2 via the Web API. The key is that you never expose your DHIS2 credentials in the frontend. Instead, you create a dedicated low-privilege DHIS2 user (data capture only, restricted to one org unit) and call the API from a thin backend or serverless function that holds those credentials securely.

Depending on your survey structure, you’d POST to either /api/dataValueSets (for aggregate/dataset style surveys) or /api/tracker (if you want each submission as a tracked entity or event). Participants just get a public link, fill in the form, and have no idea DHIS2 is involved. Their responses land directly in your instance.

If you want to stay fully within DHIS2

Create an Event Program for your survey (Event Program is enough for a one-time submission, no need for a full Tracker Program unless you need follow-ups). Then in the sharing settings, grant Public access to Data Capture for the program and all its data elements and option sets. When done correctly, users genuinely don’t need an account to submit.

That said, be thorough with the sharing settings because missing one data element or option set from public access is enough to break the whole thing silently. Also make sure anonymous users have absolutely no view access to other submissions.

Third option: KoboToolbox or ODK

If your team isn’t comfortable with API integration, tools like KoboToolbox were literally built for public survey links. You design the form there, share the link, and then push the collected data into DHIS2 via a script or built-in connector. It adds a second system to manage but it’s much friendlier for non-technical teams.

One thing to keep in mind regardless of approach: never expose admin credentials or broad API tokens in any public-facing code. Always create a minimal-privilege user specifically for this purpose, and consider adding some basic rate limiting so your form isn’t spammed.

For most teams, the external form with API push hits the right balance of security, anonymity and user experience.