How to Embed HTML Form (generated by HTML Form Entry module) in a custom module

This guide is targeted for openmrs developers who are looking to Embed HTML Form Entry module generated Form into a Separate OpenMRS module view/jsp

Something look like this: -->

 

Actually we need only two files to get things done:   

  1. HtmlFormEntryController.java : https://github.com/openmrs/openmrs-module-htmlformentry/blob/master/omod/src/main/java/org/openmrs/module/htmlformentry/web/controll/HtmlFormEntryController.java


    But to backup the HTML form entry dependent files, you have to add the HTML form entry API maven dependency into the POM

     

    <properties> ... <htmlformentryModuleVersion>2.1.1</htmlformentryModuleVersion> ... </properties>   <dependency> <groupId>org.openmrs.module</groupId> <artifactId>htmlformentry-api</artifactId> <version>${htmlformentryModuleVersion}</version> <scope>provided</scope> </dependency>
  2. htmlFormEntry.jsp :