-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Copy link
Milestone
Description
Expected Behaviour
The xforms-value-changed event should only fire when the value has been changed after the form has loaded. So when loading a form for editing a submission which already has values set, the action should not fire.
Observed Behaviour
The action fires on load and updates the value.
Reproduction Steps
Form (XML or XLSX file):
<?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" xmlns:orx="http://openrosa.org/xforms">
<h:head>
<h:title>Value changed event</h:title>
<model>
<instance>
<data id="xforms-value-changed-event">
<source/>
<destination/>
<meta>
<instanceID />
</meta>
</data>
</instance>
<bind nodeset="/data/destination" type="dateTime"/>
<bind jr:preload="uid" nodeset="/data/meta/instanceID" readonly="true()" type="string"/>
</model>
</h:head>
<h:body>
<input ref="/data/source">
<setvalue event="xforms-value-changed" ref="/data/destination" value="now()"/>
</input>
</h:body>
</h:html>Steps:
- Load the form above
- Update the source field
- Submit the form above and see that the destination field is filled in with the current time
- Edit the submission and submit again without changing the source field value
- Notice that the destination field date is updated
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done