The HTML Form Entry allows anyone with basic HTML programming skills and a knowledge of the OpenMRS system to create forms. It is an alternative to the Infopath FormEntry module in many (but not all) cases.
The key point about writing forms with this module is that you only have to write HTML (with some special tags for things in the OpenMRS model) and the module will automatically "just know" what to do when the user clicks the submit button.
Currently a form submission creates one encounter for one patient.
- OpenMRS 1.6.3+, OpenMRS 1.7.2+, OpenMRS 1.8+, OpenMRS 1.9+
- Note that although the module technically supports OpenMRS 1.7.2+, if you are running OpenMRS 1.7.x we strongly recommend upgrading to OpenMRS 1.8 as there may be some instability
- If you are using OpenMRS 1.9+ you should also install the htmlformentry19ext module.
Comparison with Infopath FormEntry module
- Forms are entered in-the-webapp. No need for installed software on the client.
- You can review a form after entering it and have it look "just like you entered it"
- Form submission immediately creates data (i.e. no waiting for queues to be processed.)
- No WYSIWYG editor (though one is in the works)
Want to help improve this module? Contact Mark Goodrich.
- Download the Htmlformentry module
- If you're using OpenMRS 1.9+, ALSO get the htmlformentry19ext module.
- Source code:
- Download the module from the repository and install it.
- Go to "Manage HTML Forms" under the administration page. (Make sure you are looking at the "HTML Form Entry" section, not the "Forms" section!)
- Create a new form there (click "New HTML Form").
- Fill out the necessary information; including the Name, Description, Version, and select the Encounter Type from the list. (When an HTML form is submitted, it will create this type of encounter.)
- Save the form. Then it will open the page for editing the HTML Form.
- Customize the HTML form to your specifications. Recent versions of the HTML Form Entry Module include a basic form that can be customized. For additional documentation on the HTML tags that are available, see the HTML Reference.
Creating new HTML Form
Adding a new or editing a form
Filling out a form
Note that if you put in an illegal value (per the constraints in the concept dictionary) it is immediately flagged.
Viewing a form
This looks pretty close to the initial entry.
Here's the code behind the screenshots
- htmlformentry.dateFormat: (added in HFE 1.9) lets you specify a date format (as defined in Java's SimpleDateFormat) that will be used to display all dates in HTML Forms. This will hold for entering new forms, and viewing/editing existing ones. (For example set the global property to "dd-MMM-yyyy" for an unambiguous date format like 31-Jan-2012.)
- htmlformentry.showDateFormat: (added in HFE 1.9) set to true if you want static text for the date format to be displayed, else set to false. This text is displayed next to the date widgets as something like (dd/mm/yyyy)
- htmlformentry.timeFormat: (added in HFE 2.6) lets you specify a time format (as defined in Java's SimpleDateFormat) that will be used to display all times in HTML Forms. Default is 24-hour time (e.g. 18:41). Setting this global property to "h:mm a" would change this to 6:41 PM.
The following privileges may be necessary for various activities. It may be necessary to create them manually, and add them to your user's role.
- [<=1.4] "Patient Dashboard - View Html Forms Section" <-- Required to view the HTML Forms tab on the patient dashboard
- [>=1.5] "Form Entry" <-- Required to enter forms generally
- "Add Encounters" <-- Required to submit a form
To request more features, ask for them on firstname.lastname@example.org or create them as tickets in our JIRA site.
Want to build an interface out of nothing but htmlforms? The HtmlFormFlowsheet module provides an easy way of combining html forms into a simple patient-dashboard-type configurable interface. Or, you can embed flowsheet tables directly into your existing htmlforms. This module is particularly useful if you are trying to model patient-based flowsheet type data (such as an MDRTB CAT-IV treatment card, or a chronic care flowsheet). See: the htmlformflowsheet module wiki.
- Collaborating on HTML Form Entry Using Git
- How to Embed HTML Form (generated by HTML Form Entry module) in a custom module
- HTML Form Entry 1.9-ext Release Notes
- HTML Form Entry examples
- HTML Form Entry Module - Automatically loading forms during development
- HTML Form Entry Module Getting Started
- HTML Form Entry Module Reference
- HTML Form Entry Module Technical Overview
- HTML Form Entry Release Notes
- HTML Form Entry Road Map
- HTML Form Entry Testing Checklist
- Infopath to HTML Form Converter (Design Page)
- Jembi Html Form Entry Module