diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml
new file mode 100644
index 000000000..088837fa2
--- /dev/null
+++ b/api-2.2/pom.xml
@@ -0,0 +1,145 @@
+
+ 4.0.0
+
+
+ org.openmrs.module
+ htmlformentry
+ 3.12.0-SNAPSHOT
+
+
+ htmlformentry-api-2.2
+ jar
+ HTML Form Entry API 2.2
+ 2.2 api project for htmlformentry
+
+
+ 2.2.0
+
+
+
+
+ ${project.parent.groupId}
+ ${project.parent.artifactId}-api
+ ${project.parent.version}
+ tests
+
+
+
+ ${project.parent.groupId}
+ ${project.parent.artifactId}-api
+ ${project.parent.version}
+
+
+
+ org.openmrs.module
+ htmlformentry-api-tests
+ ${project.parent.version}
+
+
+
+ org.openmrs.api
+ openmrs-api
+ ${openMRSVersion}
+ provided
+
+
+
+ org.openmrs.api
+ openmrs-api
+ ${openMRSVersion}
+ tests
+
+
+
+ org.openmrs.test
+ openmrs-test
+ pom
+ ${openMRSVersion}
+
+
+
+ org.openmrs.web
+ openmrs-web
+ ${openMRSVersion}
+
+
+
+
+ org.codehaus.groovy
+ groovy
+
+
+ cglib
+ cglib
+
+
+ xalan
+ xalan
+
+
+ joda-time
+ joda-time
+
+
+ org.joda
+ joda-convert
+
+
+ org.codehaus.jackson
+ jackson-mapper-asl
+
+
+ org.codehaus.jackson
+ jackson-core-asl
+
+
+
+ javax.servlet
+ javax.servlet-api
+ 3.0.1
+ test
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.1
+
+
+ 1.8
+
+
+
+
+
+
+ src/main/resources
+ true
+
+
+
+
+
+ src/test/resources
+
+ **/*.properties
+ **/*.xml
+
+ true
+
+
+ src/test/resources
+
+ **/*.properties
+ **/*.xml
+
+ false
+
+
+
+
+
diff --git a/api-2.2/src/main/java/org/openmrs/module/htmlformentry/ConditionElement.java b/api-2.2/src/main/java/org/openmrs/module/htmlformentry/ConditionElement.java
index 0f005e1ba..deda2b8bf 100644
--- a/api-2.2/src/main/java/org/openmrs/module/htmlformentry/ConditionElement.java
+++ b/api-2.2/src/main/java/org/openmrs/module/htmlformentry/ConditionElement.java
@@ -268,5 +268,4 @@ public void setConditionStatusesWidget(RadioButtonsWidget conditionStatusesWidge
public void setRequired(boolean required) {
this.required = required;
}
-
}
diff --git a/api-2.2/src/main/java/org/openmrs/module/htmlformentry/EnrollInProgramElement2_2.java b/api-2.2/src/main/java/org/openmrs/module/htmlformentry/EnrollInProgramElement2_2.java
new file mode 100644
index 000000000..7d61498c6
--- /dev/null
+++ b/api-2.2/src/main/java/org/openmrs/module/htmlformentry/EnrollInProgramElement2_2.java
@@ -0,0 +1,236 @@
+package org.openmrs.module.htmlformentry;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.Stack;
+import java.util.Vector;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.lang.ObjectUtils;
+import org.apache.commons.lang.StringUtils;
+import org.openmrs.Encounter;
+import org.openmrs.Patient;
+import org.openmrs.PatientProgram;
+import org.openmrs.PatientProgramAttribute;
+import org.openmrs.PatientState;
+import org.openmrs.Program;
+import org.openmrs.ProgramWorkflowState;
+import org.openmrs.module.htmlformentry.FormEntryContext.Mode;
+import org.openmrs.module.htmlformentry.element.EnrollInProgramElement;
+import org.openmrs.module.htmlformentry.widget.CheckboxWidget;
+import org.openmrs.module.htmlformentry.widget.DateWidget;
+import org.openmrs.module.htmlformentry.widget.ErrorWidget;
+import org.openmrs.util.OpenmrsUtil;
+
+public class EnrollInProgramElement2_2 extends EnrollInProgramElement {
+
+ private List patientProgramAttributes;
+
+ private List states;
+
+ private Program program;
+
+ private CheckboxWidget checkToEnrollWidget;
+
+ private ErrorWidget checkToEnrollErrorWidget;
+
+ private DateWidget dateWidget;
+
+ private ErrorWidget dateErrorWidget;
+
+ private Stack