[Xsltforms-support] Problem with checkboxes in xf:repeat
Brought to you by:
alain-couthures
From: Tim T. <tim...@gm...> - 2015-02-07 15:02:23
|
Hello, I am new to XForms and am using XSLTForms in eXist 2.2 to work on an XRX app with RESTXQ. I have a search form that lets users query a remote API, which responds with a set of XML records if the query is matched. I am using xf:repeat to output content from the records, and I want to be able to provide a checkbox at the start of each record, so that the user can choose. However, when I place a checkbox inside the repeat (using xf:input bound to a boolean), I don't get the desired functionality. Instead of being independent of each other, the checkboxes get activated as a group. When I click the first box, the second box is activated as well, etc. Model: <xf:instance xmlns="" id="test"> <data> <off>false</off> </data> </xf:instance> <xf:bind nodeset="instance('test')/off" id="offVal" type="xs:boolean"/> Form: <div> <xf:repeat nodeset="instance('default')/sru:searchRetrieveResponse/sru:records/sru:record" id="marc-repeat" appearance="full"> <div class="checkbox"> <xf:input incremental="true" ref="instance('test')/off"> <xf:label>Select</xf:label> </xf:input> </div> ... </xf:repeat> </div> Thanks in advance, Tim |