I’m using openmrs standalone 2.6.1 on a mac and would like to use the “when” tag but it does not seem to respond as described. In the following if I select 1066/1067 the div is still visible. Any help is appreciated. Following is the html form:
paperFormId = (Fill this in) headerColor =#009d8e fontOnHeaderColor = white<style>
.section {
border: 1px solid $headerColor;
padding: 2px;
text-align: left;
margin-bottom: 1em;
}
.sectionHeader {
background-color: $headerColor;
color: $fontOnHeaderColor;
display: block;
padding: 2px;
font-weight: bold;
}
table.baseline-aligned td {
vertical-align: baseline;
}
</style>
<span style="float:right">Paper Form ID: $paperFormId</span>
<h2>sample (v1)</h2>
<section headerLabel="1. Encounter Details">
<table class="baseline-aligned">
<tr>
<td>Date:</td>
<td><encounterDate default="today"/></td>
</tr>
<tr>
<td>Location:</td>
<td><encounterLocation default="SessionAttribute:emrContext.sessionLocationId"/></td>
</tr>
<tr>
<td>Provider:</td>
<td><encounterProvider default="currentUser"/></td>
</tr>
</table>
</section>
<section headerLabel="2. Sample Obs">
<obs id="testObsId" conceptId="48" labelText="Miscarriage?" answerConceptIds="1065,1066,1067">
<controls>
<when value="1065"
thenJavaScript="htmlForm.simpleUi.showField('form-signed-role-other')"
elseJavaScript="htmlForm.simpleUi.hideField('form-signed-role-other')"/>
</controls>
</obs>
<div id="form-signed-role-other">
Specify:
<obs conceptId="5089"/>
</div>
</section>
<submit/>