(XForms) Select nodeset 中的节点通过单击按钮自动转发

(XForms) Select node in nodeset repeater automatically by clicking a button

我使用带有 betterFORM 的 XForms 在 HTML 文档中实现表单。 我在 table 中实现了一个节点集转发器。现在我想意识到通过单击按钮会自动选择此重复 table 中的特定节点。这可能吗?

setindex 操作允许您 "mark a specific item as current in a repeating sequence"。您可以 运行 在表单加载时使用它,例如:

<xf:setindex
    ev:event="xforms-ready"
    repeat="my-repeat"
    index="2"/>