<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <h:head>
    <h:title>Water Points</h:title>
    <model>
      <instance>
        <water_points id="water_points"><formhub><uuid/></formhub>
          <water_point_type/>
          <photo/>
          <location_gps/>
          <location_name/>
          <functional/>
          <water_color/>
          <bad_smell/>
          <survey_note/>
          <survey_day/>
          <start_time/>
          <end_time/>
          <imei/>
          <phone_number/>
        </water_points>
      </instance>
      <bind nodeset="/water_points_4/formhub/uuid" type="string" calculate="'47a9043c9cd24c7d8d7453f10b325cd5'" />
      <bind nodeset="/water_points/water_point_type" type="select1"/>
      <bind nodeset="/water_points/location_gps" type="geopoint"/>
      <bind nodeset="/water_points/location_name" type="string"/>
      <bind nodeset="/water_points/functional" type="select1"/>
      <bind nodeset="/water_points/water_color" type="select1"/>
      <bind nodeset="/water_points/bad_smell" type="select1"/>
      <bind nodeset="/water_points/survey_note" type="string"/>
      <bind jr:preload="date" jr:preloadParams="today" nodeset="/water_points/survey_day" type="date"/>
      <bind jr:preload="timestamp" jr:preloadParams="start" nodeset="/water_points/start_time" type="dateTime"/>
      <bind jr:preload="timestamp" jr:preloadParams="end" nodeset="/water_points/end_time" type="dateTime"/>
      <bind jr:preload="property" jr:preloadParams="deviceid" nodeset="/water_points/imei" type="string"/>
      <bind jr:preload="property" jr:preloadParams="phonenumber" nodeset="/water_points/phone_number" type="string"/>
    </model>
  </h:head>
  <h:body>
    <select1 ref="/water_points/water_point_type">
      <label>Water point type</label>
      <item>
        <label>Tube Well</label>
        <value>tube_well</value>
      </item>
      <item>
        <label>Tap</label>
        <value>tap</value>
      </item>
      <item>
        <label>Deep Well</label>
        <value>deep_well</value>
      </item>
    </select1>
    <upload mediatype="image/*" ref="/water_points/photo">
      <label>Photo of water point</label>
    </upload>
    <input ref="/water_points/location_gps">
      <label>Take GPS of water point</label>
      <hint>GPS coordinates can only be collected when outside.</hint>
    </input>
    <input ref="/water_points/location_name">
      <label>Location Name</label>
    </input>
    <select1 ref="/water_points/functional">
      <label>Is the water point functional?</label>
      <item>
        <label>Yes</label>
        <value>yes</value>
      </item>
      <item>
        <label>No</label>
        <value>no</value>
      </item>
    </select1>
    <select1 ref="/water_points/water_color">
      <label>What is the color of the water?</label>
      <item>
        <label>Clear</label>
        <value>clear</value>
      </item>
      <item>
        <label>Red</label>
        <value>red</value>
      </item>
      <item>
        <label>Yellow</label>
        <value>yellow</value>
      </item>
    </select1>
    <select1 ref="/water_points/bad_smell">
      <label>Does the water have a bad smell?</label>
      <item>
        <label>Yes</label>
        <value>yes</value>
      </item>
      <item>
        <label>No</label>
        <value>no</value>
      </item>
    </select1>
    <input ref="/water_points/survey_note">
      <label>Note?</label>
    </input>
  </h:body>
</h:html>
