Mobile Form enables LiveCycle XFA forms on mobile devices. It does it by rendering XFA Form to Html5 document.
As per Sling website, Apache Sling is a web framework that uses a Java Content Repository, such as Apache Jackrabbit, to store and manage content. Sling applications use either scripts or Java servlets, selected based on simple name conventions, to process HTTP requests in a RESTful way.
Mobile Form has a service that generates HTML snippet from XFA form. That html snippet, along with the xfaform css and js, can be embedded into any web page using the sling constructs like the following:
<%@ page session="false" %> <%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0"%> <%@taglib prefix="cq" uri="http://www.day.com/taglibs/cq/1.0" %> <% String locale = "en_US"; request.setAttribute("xfaLocale",locale.replace("_","")); %>
Pause and take a look at the highlighted lines 14,15 and 18. Rest of the stuff is pretty standard sling jsp script. We use the recommended practice for including client side libraries. The first includeClientLib is for including the locale specific messages you can modify the xfaLocale parameter to control it where as the other includeClientLib is for including the XFA Runtime.
Sling include @ line 18 is responsible for the html snippet, I mentioned earlier. You can create you page and just add these lines to include client side libs and html snippet to get the form running.
We call the content node and the sling script, responsible for rendering form embedded in web page, Html profile. We call it so because, profile dictates how a form should look like and how it behaves. That means one needs to play with the profile for all the customization required in the form. Mobile Form leaves a lot of hooks in the generated html snippet in order to help the customization.