Skip to content

Instantly share code, notes, and snippets.

@wpride
Created October 6, 2015 22:15
Show Gist options
  • Save wpride/26219918f85457bd1a52 to your computer and use it in GitHub Desktop.
Save wpride/26219918f85457bd1a52 to your computer and use it in GitHub Desktop.
<h:html xmlns:h="http://www.w3.org/1999/xhtml" xmlns:orx="http://openrosa.org/jr/xforms" xmlns="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa" xmlns:vellum="http://commcarehq.org/xforms/vellum">
<h:head>
<h:title>Basic Form</h:title>
<model>
<instance>
<data xmlns:jrm="http://dev.commcarehq.org/jr/xforms" xmlns="http://openrosa.org/formdesigner/02FD4762-52FB-404C-9AF1-5F67894D1521" uiVersion="1" version="549" name="Basic Form">
<q_name/>
<orx:meta xmlns:cc="http://commcarehq.org/xforms"><orx:deviceID/><orx:timeStart/><orx:timeEnd/><orx:username/><orx:userID/><orx:instanceID/><cc:appVersion/><cc:location/></orx:meta></data>
</instance><instance id="commcaresession" src="jr://instance/session"/>
<bind nodeset="/data/q_name" type="xsd:string" required="true()"/>
<itext>
<translation lang="en" default="">
<text id="q_name-label">
<value>Enter a name:</value>
</text>
</translation>
<translation lang="hin">
<text id="q_name-label">
<value>HIN: Enter a name:</value>
</text>
</translation>
</itext>
<setvalue event="xforms-ready" ref="/data/meta/deviceID" value="instance('commcaresession')/session/context/deviceid"/><setvalue event="xforms-ready" ref="/data/meta/timeStart" value="now()"/><bind nodeset="/data/meta/timeStart" type="xsd:dateTime"/><setvalue event="xforms-revalidate" ref="/data/meta/timeEnd" value="now()"/><bind nodeset="/data/meta/timeEnd" type="xsd:dateTime"/><setvalue event="xforms-ready" ref="/data/meta/username" value="instance('commcaresession')/session/context/username"/><setvalue event="xforms-ready" ref="/data/meta/userID" value="instance('commcaresession')/session/context/userid"/><setvalue event="xforms-ready" ref="/data/meta/instanceID" value="uuid()"/><setvalue event="xforms-ready" ref="/data/meta/appVersion" value="instance('commcaresession')/session/context/appversion"/><orx:pollsensor event="xforms-ready" ref="/data/meta/location"/><bind nodeset="/data/meta/location" type="geopoint"/></model>
</h:head>
<h:body>
<input ref="/data/q_name">
<label ref="jr:itext('q_name-label')"/>
</input>
</h:body>
</h:html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment