CHT Sample Form Library

@robinmurphy raised the idea in a separate thread of putting together a sample form (or, in my estimation, a small set of forms):

The plan is to contain most question types and a few of it’s permutations, a common summary screen layout, as well as some niche things like using icons from font-awesome and custom styling.
Internally we also plan on using it to showcase the usage of our extension-libs.

This is something I have been wanting to see for a long time and the timing now is extra good since it aligns with a Medic Q3 roadmap item that we will be working on in the near future!

So, I wanted to raise this thread here to continue the conversation with further input from Medic/community members! What would you like to see included in the library? What is the best way to make the resources available?

One important clarification I want to make is that the goal of these sample forms would be distinct from the motivations behind is existing default config that is provided with the CHT. The default config is meant to be a starter configuration that illustrates how the CHT could be configured for a simple real-world use case. The forms in the sample library would not represent a coherent project configuration, but instead would serve as a more low-level showcase of different features you could use when building your own configuration.


@gareth I am curious if you have any thoughts on this!

I guess some of the demo-forms that we used to have in the cht-core repo (but then moved to the private support-scripts repo) would be helpful to include here, but not all of them. (Many of those demo forms function more as test-cases for edge conditions that would not qualify as “model” form configs…)

Pinging @Esther_Moturi here too! I think the main goal of these sample forms would be as a learning/documentation tool and I would love your thoughts and feedback on the most effective way to provide this information.

Having a more cohesive sample/example library would be great, especially with contributions and learnings, like @robinmurphy’s, from across the whole community!

I agree that tying overlapping this with doc site efforts would help, as we already have a variety of samples there, like for an individual widget or feature.


Thanks for raising this @jkuester !

I think this is a great idea. We know from App Dev Surveys in the past that many community members start with reference apps and go from there so I’m sure there’s demand for a wider set of starter configs.

The main problem with the demo_forms was that they got out of date and broken, so I think it’s important that we factor in some way to maintain these long term. For example, we could use the cht-conf-test-harness with CI to prove that they continue to work with future releases.

Another issue that has come up a few times is configuration modules, or being able to combine separate components into one app. While this is definitely outside of scope for this quarter being able to combine and extend these forms with the other parts of the configuration is something to keep in mind for future iterations.