Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If three criterions are enough for you, then you should use index in brackets:</p> <pre><code>&lt;xf:input ref="/file/criteria/criterion[1]" model="select_data"&gt; &lt;xf:label&gt;Select&lt;/xf:label&gt; &lt;/xf:input&gt; &lt;xf:input ref="/file/criteria/criterion[2]" model="select_data"&gt; &lt;xf:label&gt;Select&lt;/xf:label&gt; &lt;/xf:input&gt; &lt;xf:input ref="/file/criteria/criterion[3]" model="select_data"&gt; &lt;xf:label&gt;Select&lt;/xf:label&gt; &lt;/xf:input&gt; </code></pre> <p>But if you use xf:repeat instead, you can add as many criterions you need:</p> <pre><code>&lt;xf:group ref="/file/criteria" mode="select_data"&gt; &lt;xf:repeat nodeset="criterion"&gt; &lt;xf:input ref="."&gt; &lt;xf:label&gt;Select&lt;/xf:label&gt; &lt;/xf:input&gt; &lt;/xf:repeat&gt; &lt;xf:trigger&gt; &lt;xf:label&gt;Insert new row&lt;/xf:label&gt; &lt;xf:insert nodeset="criterion" position="after" at="last()" ev:event="DOMActivate"/&gt; &lt;/xf:trigger&gt; &lt;xf:trigger&gt; &lt;xf:label&gt;Delete last row&lt;/xf:label&gt; &lt;xf:delete nodeset="criterion" at="last()" ev:event="DOMActivate" /&gt; &lt;/xf:trigger&gt; &lt;/xf:group&gt; </code></pre> <p>Beware: this example with repeat needs some polishing, so that you can't delete the last row in table, and possibly hide the last row, that is duplicated when you insert a new. See <a href="http://en.wikibooks.org/wiki/XForms#Tabular_and_Repeating_Data" rel="nofollow noreferrer">http://en.wikibooks.org/wiki/XForms#Tabular_and_Repeating_Data</a> for additional examples.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload