-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
867ccc8
commit 226447d
Showing
5 changed files
with
51 additions
and
95 deletions.
There are no files selected for viewing
95 changes: 23 additions & 72 deletions
95
collect_app/src/androidTest/assets/forms/form_design_error.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,39 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<h:html xmlns:h="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:jr="http://openrosa.org/javarosa" xmlns:odk="http://www.opendatakit.org/xforms" xmlns:orx="http://openrosa.org/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<?xml version="1.0"?> | ||
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:odk="http://www.opendatakit.org/xforms"> | ||
<h:head> | ||
<h:title>form_design_error</h:title> | ||
<h:title>Relevance and calculate loop</h:title> | ||
<model odk:xforms-version="1.0.0"> | ||
<instance> | ||
<data id="form_design_error"> | ||
<data id="form-list-relevance-issue"> | ||
<group> | ||
<select /> | ||
<select2 /> | ||
<name>A</name> | ||
<fullName/> | ||
<middleName>third</middleName> | ||
</group> | ||
<meta> | ||
<instanceID /> | ||
<instanceID/> | ||
</meta> | ||
</data> | ||
</instance> | ||
<instance id="list"> | ||
<root> | ||
<item> | ||
<label>A</label> | ||
<name>a</name> | ||
</item> | ||
<item> | ||
<label>B</label> | ||
<name>b</name> | ||
</item> | ||
<item> | ||
<label>C</label> | ||
<name>c</name> | ||
</item> | ||
</root> | ||
</instance> | ||
<instance id="list2"> | ||
<root> | ||
<item> | ||
<label>AA</label> | ||
<list>a</list> | ||
<name>aa</name> | ||
</item> | ||
<item> | ||
<label>AB</label> | ||
<list>a</list> | ||
<name>ab</name> | ||
</item> | ||
<item> | ||
<label>BA</label> | ||
<list>b</list> | ||
<name>ba</name> | ||
</item> | ||
<item> | ||
<label>BB</label> | ||
<list>b</list> | ||
<name>bb</name> | ||
</item> | ||
</root> | ||
</instance> | ||
<bind nodeset="/data/group/select" type="string" /> | ||
<bind calculate="concat( /data/group/select , 'a')" nodeset="/data/group/select2" type="string" /> | ||
<bind jr:preload="uid" nodeset="/data/meta/instanceID" readonly="true()" type="string" /> | ||
<bind nodeset="/data/group/name" type="string"/> | ||
<!-- The form design issue is that calculates can't be used as dynamic defaults because they're reevaluated continuously --> | ||
<bind calculate=" /data/group/name " nodeset="/data/group/fullName" type="string"/> | ||
<bind nodeset="/data/group/middleName" relevant=" /data/group/name != /data/group/fullName " type="string"/> | ||
<bind jr:preload="uid" nodeset="/data/meta/instanceID" readonly="true()" type="string"/> | ||
</model> | ||
</h:head> | ||
<h:body> | ||
<group appearance="field-list" ref="/data/group"> | ||
<select1 appearance="minimal" ref="/data/group/select"> | ||
<label>Select</label> | ||
<item> | ||
<label>A</label> | ||
<value>a</value> | ||
</item> | ||
<item> | ||
<label>B</label> | ||
<value>b</value> | ||
</item> | ||
<item> | ||
<label>C</label> | ||
<value>c</value> | ||
</item> | ||
</select1> | ||
<select1 appearance="minimal" ref="/data/group/select2"> | ||
<label>Select2</label> | ||
<itemset nodeset="instance('list2')/root/item[list= /data/group/select ]"> | ||
<value ref="name" /> | ||
<label ref="label" /> | ||
</itemset> | ||
</select1> | ||
<input ref="/data/group/name"> | ||
<label>What is your first name</label> | ||
</input> | ||
<input ref="/data/group/fullName"> | ||
<label>Please add your second name to have your full name</label> | ||
</input> | ||
<input ref="/data/group/middleName"> | ||
<label>Please add your middle name if you have one</label> | ||
<hint>Display if full name is different than first name</hint> | ||
</input> | ||
</group> | ||
</h:body> | ||
</h:html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters