Skip to content

Output in markdown label is not being replaced #870

Description

@garethbowen

Expected Behaviour

output elements in markdown should be evaluated and the result rendered into the text block.

Observed Behaviour

The temporary output string is left behind, eg: 21. calculate, current value: --ODK-OUTPUT-STRING-1--

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:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms" xmlns:odk="http://www.opendatakit.org/xforms">
  <h:head>
    <h:title>QA Prefill 01 - Field types</h:title>
    <model odk:xforms-version="1.0.0">
      <instance>
        <data id="qa_prefill_01_field_types" version="2026080601">
          <t_calculate/>
          <t_calculate_show/>
          <meta>
            <instanceID/>
          </meta>
        </data>
      </instance>
      <bind nodeset="/data/t_calculate" type="string" calculate="'CALCULATED'"/>
      <bind nodeset="/data/t_calculate_show" readonly="true()" type="string"/>
    </model>
  </h:head>
  <h:body>
    <input ref="/data/t_calculate_show">
      <label> 21. calculate, current value: <output value=" /data/t_calculate "/> </label>
      <hint>XPath: /data/t_calculate - a calculation should win over the URL</hint>
    </input>
  </h:body>
</h:html>

Steps:

  1. Load the above form
  2. It should immediately show "CALCULATED" in the label.

Screenshots or Videos

Image

Additional Context

Raised in #464 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions