Only show the form under certain condition

image
i need to show hypertension_form only if bp1_eq_bp2 === no in screening_form. Is it possible to do this?

1 Like

Hi @Sandip_Parajuli , welcome to CHT forum. You can do this by using contact-summary and form-properties. In your contact-summary.templated.js, you can define a property called let’s say show_hypertension_form. And in your forms properties.json, you can add that condition as well.

Here’s how it is done in delivery form in CHT-Core’s default config.
show_delivery_form is defined here

And is used in form properties like this:

I hope this will help you achieve what you are trying to do.

5 Likes