Skip to content

Action with odk-instance-first-load event fires when adding new repeat #653

@garethbowen

Description

@garethbowen

Expected Behaviour

Actions that are set to fire on odk-instance-first-load should not fire when adding a new repeat.

Observed Behaviour

They do.

Reproduction Steps

Form (XML or XLSX file):

<h:html xmlns="http://www.w3.org/2002/xforms"
        xmlns:h="http://www.w3.org/1999/xhtml">

    <h:head>
        <h:title>Simple Form</h:title>
        <model>
            <instance>
                <data id="collect197test">
                    <rep>
                      <text />
                    </rep>
                    <meta>
                        <instanceID/>
                    </meta>
                </data>
            </instance>
            <setvalue ref="/data/rep/text" event="odk-instance-first-load" value="'first'"/>
            <bind nodeset="/data/meta/instanceID" type="string" readonly="true()" calculate="concat('uuid:',uuid())"/>
        </model>
    </h:head>

    <h:body>
        <group appearance="field-list">
          <repeat nodeset="/data/rep">
              <input ref="/data/rep/text">
                  <label>Text</label>
              </input>
          </repeat>
        </group>
    </h:body>

</h:html>

Steps:

  1. Load the form
  2. Add a repeat
  3. Only the first element should have a value of "first", but actually both do

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions