Felix
Felix

Reputation: 125

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

I use XForms with betterFORM to realize forms in an HTML document. I implemented a nodeset repeater in a table. Now I want to realize that there is automatically selected a particular node in this repeat table by clicking a button. Is that possible?

Upvotes: 0

Views: 50

Answers (1)

ebruchez
ebruchez

Reputation: 7857

The setindex action allows you to "mark a specific item as current in a repeating sequence". You can run it upon form load for example with:

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

Upvotes: 0

Related Questions