Testing arbitrary app forms via direct URL

Hi there!

I’m helping debug a config for CHT that’s getting an error when an offline users loads a form. I’ve set up an instance of docker helper with 4.15 and pushed the app config with cht-conf. I see a bunch of forms in config/forms/app/*.xml but don’t want to spend a bunch of time learning the logic of all the forms and which contacts they apply to.

To expedite my debugging, can directly load the app form? For example the TB Treatment form is ./forms/app/tb_start_treatment.xml , could I access it at something like https://192-168-1-107.local-ip.medicmobile.org:10443/#/apps/tb_start_treatment ? This URL 404s because I don’t know the path, but I’d love to know if this is possible!

thanks,
-adj

To directly open an app form with no contact in context, you should be able to hit /#/reports/add/tb_start_treatment.

If you want a contact in context, /#/contacts/{{ contact uuid }}/report/tb_start_treatment.

Disclaimer: directly navigating to form URL’s like this can absolutely cause issues and/or get you into invalid states.

Awesome - thanks for the info and I’ll be sure to be careful per your warning!

1 Like