Develop web based form like Enketo using C# and .Net

1. What is the problem? Be very detailed.
We at 'Collect and Report' are looking to develop Enketo like web based solution using C# and .Net. Can anyone guide me how to proceed with the same. We have already built the .Net based solution for uploading the form and creating the database and enabling the APIs required for the ODK Mobile App to function correctly.

Reason for developing this kind of application - the clients do not want to use hybrid environment where Analysis and Management Application is in C# and .Net while the Data Collection is being done in a different type of server application. This creates a challenge for the client's Server Team to manage the deployed ODK Solution.

2. What app or server are you using and on what device and operating system? Include version numbers.
C# and .Net based environment.

3. What you have you tried to fix the problem?

4. What steps can we take to reproduce the problem?

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.


Docker is supported on Windows. You can have servers like Enketo, Central, or FormShare in Docker containers under the same Windows Architecture.

Creating something like Enketo (Arbitrary Form Data Collection) with online/offline capabilities is something that my organization considered a while ago due to the same architectural issues you indicate and is not worth it since Docker can run Enketo over a Windows Server.

Hi, thank you for your response. We too have been recommending the clients to use Docker and manage the ODK/Enketo via docker but they have been very adamant regarding the same and raised concerns even about managing Docker. These are Govt. departments, so we cannot do much about the same. It is a shift that has to come in their thought process and I do not think I can do that with them.

Can you please guide how were you approaching the same. We are not looking for Offline functionality which is there in the browser. We just want to create the form with validations and skip logics like the way Enketo does. If you want we can take this discussion offline over Email/Whatsapp or Phone.

OK. Since you cannot use Linux at all then I assume you cannot use even Pyxform. So first you would need to create an XLS parser to read XLSForms and separate the form structure in a JSON file and the logic on another. Then using something like JSONForm render the data entry form using the structure JSON file while checking for any visual contains from the logic file (e.g., don't show this if). Then you would need to implement arbitrary logic as the user progresses in entering data. You would also need to think about how to handle external files, etc.

If you see the development of Enketo, it is a journey of more than 6 years to get it right. So this might take you quite some time to implement even if you have a ton of developers.

I would also download the complete source code of Enketo (it is separated into different modules) and learn how they did it. Then try to replicate something like it in C#. Very important if you base your C# code on Enketo then it would be good to release it under the same license or similar license.

Good luck!

Thanks a ton for your guidance. As of now the client is convinced that they can use Excel to create forms and then use XLS to XForm converters available on the internet to convert into the required XML format. From this point on our work starts. We have built a system to read the uploaded XML and make it available for the ODK Mobile App (rebranded as our own - Collect and Report). The Uploaded XML is then parsed and the required database is created. The Submissions APIs have also been created and they are working fine. The last challenge left is to get the form available on Web as well. We cannot always depend upon the Mobile App.

We do not intend to build everything which Enketo supports at one go. The plan is to start with essential fields which are used 90% of times -
Text, Number, Dropdowns, Radio Buttons, Checkboxes, Images, and the Skip Logic.

This will deliver the current work and then for the future we will keep adding new field supports. We will work on releasing it in the Open Source domain. Meanwhile, I will also get on with downloading the Enketo code and starting to dissect it. I think it is not going to be an easy task :slight_smile: