orbeon / orbeon-forms

Orbeon Forms is an open source web forms solution. It includes an XForms engine, the Form Builder web-based form editor, and the Form Runner runtime.
http://www.orbeon.com/
GNU Lesser General Public License v2.1
518 stars 220 forks source link

Dynamic itemset labels (aka XPath in itemset labels) #2426

Open avernet opened 9 years ago

avernet commented 9 years ago

E.g. the user is asked to enter the name of her parents, and later is asked to make a choice between the two parents.

+1 from community

ebruchez commented 9 years ago

And so the idea would be to modify the itemset editor to support not only a static label, but a formula.

We could also decide not to support arbitrary formulas at first, but just have two options:

ebruchez commented 6 years ago

Would be a natural follow-up to #1342. Changes would be in the Edit Choices dialog.

Each item label can have its own distinct template. For example:

It's probably reasonable to have a single set of template parameters for the whole set of items. This would go below the list of items.

At runtime, the <xf:label ref="label"/> must be updated in view.xsl to use xxf:r(), probably, and pick the right template with indexes, which implies #1328.