Uploaded image for project: 'HTML Form Entry Module'
  1. HTML Form Entry Module
  2. HTML-569

HTML character codes are displayed in new HTML form

    Details

    • Type: Bug
    • Status: Closed
    • Priority: TBD
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: HTML Form Entry 2.5
    • Labels:
      None
    • Complexity:
      Undetermined

      Description

      Create a new form in OpenMRS Version: 1.11.0 SNAPSHOT Build dde4ceat at http://uat01.openmrs.org:8080/openmrs

      The form shows < and > html codes rather than the actual character like...

      &lt;htmlform&gt;
      	&lt;!-- Autogenerated example form  (template from 01-Nov-2010 --&gt;
      	&lt;macros&gt;
      		paperFormId = (Fill this in)
      		headerColor =#009d8e
      		fontOnHeaderColor = white
      	&lt;/macros&gt;
      
      	&lt;style&gt;
      		.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;
      		}
      	&lt;/style&gt;
      
      	&lt;span style=&quot;float:right&quot;&gt;Paper Form ID: $paperFormId&lt;/span&gt;
      	&lt;h2&gt;Test 2 (v1)&lt;/h2&gt;
      
      	&lt;section headerLabel=&quot;1. Encounter Details&quot;&gt;
      		&lt;table class=&quot;baseline-aligned&quot;&gt;
      			&lt;tr&gt;
      				&lt;td&gt;Date:&lt;/td&gt;
      				&lt;td&gt;&lt;encounterDate default=&quot;today&quot;/&gt;&lt;/td&gt;
      			&lt;/tr&gt;
      			&lt;tr&gt;
      				&lt;td&gt;Location:&lt;/td&gt;
      				&lt;td&gt;&lt;encounterLocation/&gt;&lt;/td&gt;
      			&lt;/tr&gt;
      			&lt;tr&gt;
      				&lt;td&gt;Provider:&lt;/td&gt;
      				&lt;td&gt;&lt;encounterProvider/&gt;&lt;/td&gt;
      			&lt;/tr&gt;
      		&lt;/table&gt;
      	&lt;/section&gt;
      
      	&lt;section headerLabel=&quot;2. Demographic Information&quot;&gt;
      		&lt;table class=&quot;baseline-aligned&quot;&gt;
      			&lt;tr&gt;
      				&lt;td&gt;Name:&lt;/td&gt;
      				&lt;td&gt;&lt;lookup class=&quot;value&quot; expression=&quot;patient.personName&quot;/&gt;&lt;/td&gt;
      			&lt;/tr&gt;
      			&lt;tr&gt;
      				&lt;td&gt;Old Identification Number:&lt;/td&gt;
      				&lt;td&gt;&lt;lookup class=&quot;value&quot; complexExpression=&quot;#foreach( $patId in $patientIdentifiers.get(&#39;Old Identification Number&#39;) ) $patId #end &quot;/&gt;&lt;/td&gt;
      			&lt;/tr&gt;
      			&lt;tr&gt;
      				&lt;td&gt;OpenMRS Identification Number:&lt;/td&gt;
      				&lt;td&gt;&lt;lookup class=&quot;value&quot; complexExpression=&quot;#foreach( $patId in $patientIdentifiers.get(&#39;OpenMRS Identification Number&#39;) ) $patId #end &quot;/&gt;&lt;/td&gt;
      			&lt;/tr&gt;
      			&lt;tr&gt;
      				&lt;td&gt;Gender:&lt;/td&gt;
      				&lt;td&gt;&lt;lookup class=&quot;value&quot; expression=&quot;patient.gender&quot;/&gt;&lt;/td&gt;
      			&lt;/tr&gt;
      			&lt;tr&gt;
      				&lt;td&gt;Birthdate:&lt;/td&gt;
      				&lt;td&gt;
      					&lt;lookup class=&quot;value&quot; complexExpression=&quot;#if( \$patient.birthdateEstimated ) ~#end&quot;/&gt; &lt;lookup class=&quot;value&quot; expression=&quot;patient.birthdate&quot;/&gt;
      					(Age: &lt;lookup class=&quot;value&quot; expression=&quot;patient.age&quot;/&gt;)
      				&lt;/td&gt;
      			&lt;/tr&gt;
      			&lt;tr&gt;
      				&lt;td&gt;Birthplace:&lt;/td&gt;
      				&lt;td&gt;&lt;lookup class=&quot;value&quot; expression=&quot;personAttributes.get(&#39;Birthplace&#39;)&quot;/&gt;&lt;/td&gt;
      			&lt;/tr&gt;
      			&lt;tr&gt;
      				&lt;td&gt;Citizenship:&lt;/td&gt;
      				&lt;td&gt;&lt;lookup class=&quot;value&quot; expression=&quot;personAttributes.get(&#39;Citizenship&#39;)&quot;/&gt;&lt;/td&gt;
      			&lt;/tr&gt;
      			&lt;tr&gt;
      				&lt;td&gt;Civil Status:&lt;/td&gt;
      				&lt;td&gt;&lt;lookup class=&quot;value&quot; expression=&quot;personAttributes.get(&#39;Civil Status&#39;).name.name&quot;/&gt;&lt;/td&gt;
      			&lt;/tr&gt;
      			&lt;tr&gt;
      				&lt;td&gt;Health Center:&lt;/td&gt;
      				&lt;td&gt;&lt;lookup class=&quot;value&quot; expression=&quot;personAttributes.get(&#39;Health Center&#39;)&quot;/&gt;&lt;/td&gt;
      			&lt;/tr&gt;
      			&lt;tr&gt;
      				&lt;td&gt;Health District:&lt;/td&gt;
      				&lt;td&gt;&lt;lookup class=&quot;value&quot; expression=&quot;personAttributes.get(&#39;Health District&#39;)&quot;/&gt;&lt;/td&gt;
      			&lt;/tr&gt;
      			&lt;tr&gt;
      				&lt;td&gt;Mother&#39;s Name:&lt;/td&gt;
      				&lt;td&gt;&lt;lookup class=&quot;value&quot; expression=&quot;personAttributes.get(&#39;Mothers Name&#39;)&quot;/&gt;&lt;/td&gt;
      			&lt;/tr&gt;
      			&lt;tr&gt;
      				&lt;td&gt;Race:&lt;/td&gt;
      				&lt;td&gt;&lt;lookup class=&quot;value&quot; expression=&quot;personAttributes.get(&#39;Race&#39;)&quot;/&gt;&lt;/td&gt;
      			&lt;/tr&gt;
      		&lt;/table&gt;
      	&lt;/section&gt;
      
      	&lt;submit/&gt;
      
      &lt;!-- END OF FORM
      
      Simple examples to copy-and-paste. Full reference at http://wiki.openmrs.org/x/kg8z
      
      SECTION
      	&lt;section headerLabel=&quot;\#. Title&quot;&gt;
      		Content
      	&lt;/section&gt;
      
      NUMERIC OBSERVATION
      	&lt;obs conceptId=&quot;id-of-numeric-concept&quot; labelText=&quot;Label before&quot;/&gt;
      
      DATE OBSERVATION
      	&lt;obs conceptId=&quot;id-of-date-concept&quot; labelText=&quot;Label before&quot;/&gt;
      
      CODED OBSERVATION
      (as a dropdown)
      	&lt;obs conceptId=&quot;id-of-coded-concept&quot; labelText=&quot;Label before&quot;/&gt;
      (as radio buttons)
      	&lt;obs conceptId=&quot;id-of-coded-concept&quot; labelText=&quot;Label before&quot; style=&quot;radio&quot;/&gt;
      (as an autocomplete)
      	&lt;obs conceptId=&quot;id-of-coded-concept&quot; labelText=&quot;Label before&quot; style=&quot;autocomplete&quot; answerClasses=&quot;Diagnosis&quot;/&gt;
      (as a checkbox for a specific answer)
      	&lt;obs conceptId=&quot;id-of-coded-concept&quot; labelText=&quot;Label before&quot; answerConceptId=&quot;id-of-answer-concept&quot; answerLabel=&quot;label for answer&quot;/&gt;
      (as a dropdown with specific choices)
      	&lt;obs conceptId=&quot;id-of-coded-concept&quot; labelText=&quot;Label before&quot; answerConceptIds=&quot;concept-id-1,concept-id-2,concept-id-3&quot; answerLabels=&quot;Label 1,Label 2, Label 3&quot;/&gt;
      
      
      FREE TEXT OBSERVATION
      (as a normal text field)
      	&lt;obs conceptId=&quot;id-of-text-concept&quot; labelText=&quot;Label before&quot;/&gt;
      (as a textarea)
      	&lt;obs conceptId=&quot;id-of-text-concept&quot; labelText=&quot;Label before&quot; rows=&quot;4&quot; cols=&quot;80&quot;/&gt;
      --&gt;
      &lt;/htmlform&gt;
      

      If you try to save the form, you get an error...

      Reference is not allowed in prolog.

      I don't know if this is a bug in HTML Form entry for Mark Goodrich to look into, or a bug in OpenMRS 1.11 for Kaweesi Joseph to look into, but there apparently is some incompatibility between the two that needs to be addressed before 1.11 is released.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mogoodrich Mark Goodrich
                Reporter:
                arbaughj James Arbaugh [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: