Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack

Documentation

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • mode in which mode to include the content
    • REQUIRED
    • allowed values: "ENTER", "EDIT", "VIEW" (not case-sensitive)
    • Example: <ifMode mode="ENTER">...</ifMode>
  • include whether to include or exclude the content based on the mode
    • allowed values: true or false
    • default: true

Example Usage

Code Block
html
html
<htmlform>
    <obs conceptId="5089" id="weight"/>
    <ifMode mode="ENTER">
        <script type="text/javascript">
            getField("weight.value").change(function() { window.alert("You entered a weight"); });
        </script>
    </ifMode>


    <ifMode mode="EDIT">
        This will only be displayed in edit mode.
    </ifMode>


    <ifMode mode="EDIT" include="false">
       This is NOT be displayed when in edit mode, but will be displayed in all other modes.
    </ifMode>

</htmlform>

<includeIf>

See <excludeIf>

...