Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

How to swap the fields in custom form when they are in the same row?

The fields configured to be displayed in the same row in a custom form might be in the wrong order (from left to right). The left-to-right order for these fields in the same row can be changed by editing the form XML.


Example: The field ‘Stage data source(clinical)’ should be left of ‘Stage data source(pathological)’

 

  1. Go to Forms > the form to be edited.

  2. Click on ‘Export’ to download the form zip/XML

  3. Open the form XML and search for the controls that are to be changed in order of display

  4. Observe that these fields are enclosed within <row></row> tags. This specifies they are to be displayed in the same row

  5. Now, select the code block of control to be shown on the left. Place it after opening <row> tag.

  6. Below this control, place the code block of another authority to be shown to the right.

  7. Ensure that the controls displayed in the same row are above the closing </row> tag. Refer below code for reference.

    <row> <radioButton> <name>RB35</name> <udn>stageDataSourceClinical</udn> <caption><![CDATA[Stage data source (clinical)]]></caption> <phi>false</phi> <mandatory>false</mandatory> <toolTip><![CDATA[]]></toolTip> <showLabel>true</showLabel> <showInGrid>false</showInGrid> <showWhen><![CDATA[stagingBasis = "Clinical only" or stagingBasis = "Clinical & Pathological"]]></showWhen> <hidden>false</hidden> <defaultValue><![CDATA[&nbsp;]]></defaultValue> <options> <option> <value><![CDATA[Site medical records]]></value> </option> <option> <value><![CDATA[VCR linkage]]></value> </option> </options> <optionsPerRow>3</optionsPerRow> </radioButton> <radioButton> <name>DD49</name> <udn>stageDataSourcePathological</udn> <caption><![CDATA[Stage data source (pathological)]]></caption> <phi>false</phi> <mandatory>false</mandatory> <toolTip><![CDATA[]]></toolTip> <showLabel>true</showLabel> <showInGrid>false</showInGrid> <showWhen><![CDATA[stagingBasis = "Pathological only" or stagingBasis = "Clinical & Pathological"]]></showWhen> <hidden>false</hidden> <options> <option> <value><![CDATA[Derived by VCB Staff]]></value> </option> <option> <value><![CDATA[Pathology Report]]></value> </option> <option> <value><![CDATA[VCR linkage]]></value> </option> </options> <optionsPerRow>3</optionsPerRow> </radioButton> </row>

     

  8. Save the XML and re-import the form to the system.

 

Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com