Header Forms

A Header form displays a Parent-Child relationship between a form and its subforms.

Parent child form display

In the screenshot above, the Header Form is the part highlighted in red. The Child records are displayed below the Header.

To create this type of display, create two forms:

  • Header form (Parent): Form Display: Header Form; Event Type: Name of the subform class
  • Sub-form (Child): Form Display: Admin; Event Type: Name of the header form class

Add two shared fields to the subform class:

  • parentEncounterId
  • parentEncounterUuid

In struts-config, add the following for the subform in order to display the relationship:

<action path="/SubFormClassName/list" type="org.rti.zcore.struts.action.records.ParentChildFormAction" name="SubFormClassName" validate="false" parameter="SubFormClassName" scope="request">
              <forward name="success" path="/WEB-INF/pages/admin/records/parent_child_form.jsp"/>
        </action>

You may access the header form and list of relevant submissions at the following url (substitute 000 for the formId of the Header form):

http://localhost:8088/irs/admin/records/pc.do;jsessionid=157D6A9C6A9A687F38AD45033A350B67?formId=000