How can I show a dropdown of other forms using XForms?

i am working on OpeMRS xform,.

  1. i am facing problem, i have around 10 xforms now i want to give link of 10 forms on the 1st form.

  2. i want to develope a dropdown in which i want to show all the10 forms,

can you please help me in this issue, i will be really thankful to you.

1 Like

Hi Dodo,

Can you give more details regarding the use case for having a drop down of the other forms? What do you plan to use this for?

Thanks dkayiwa,

let me share the actual scenario, what we wanted to do.

we have developed 10 forms for 10 different diseases, and the 1st form is the screening form, in which we demographics and other screening questions, the doc will fill the screening question and also select the form in whatever disease the patient fall in, so can move from screening form to that disease form directly.

I hope i answered.


Can i have a look at the screening form and at least two of the other forms?

Here is the snapshot of the screening form. at the top you can see the dropdwonof all the forms, it could be drop down or the list box. when doctor will be filling presenting complaints he can be able to to move from this form to the required form.

i hope this will help.

Just as an aside, the way we would handle this in the HTML Form Entry module is probably via the tag:

Thanks darius, let me try this out.

dkayiwa do you add, how we can do this in xforms??

What is the tag used by the htmlformentry module?

Thanks @dkayiwa, i dont know exactly, i will explore it more.

@darius can you help us here in exact tag or process?

Sorry, the talk email processor ate part of the link.

The tag is redirectOnSave and it supports dynamic behavior in this way:

<redirectOnSave script="groovy">
    import org.openmrs.api.context.Context;
    def customView = Context.getAdministrationService().getGlobalProperty("custom.view");
    return "custom.form?view=" + customView + "&amp;patientId={{}}";

Code and test for the tag.

1 Like

Very nice trick! :slight_smile: @dkseelro , can you create an xforms ticket for this?

here is the link of tickets, i dont know further what we have to do after this ticket. Thanks