Thursday, October 4, 2018

Dynamic labels, hints, and help messages

A form field typically has an associated label which indicates what the field is about. For example "Name" or "Street" or "Comments". Usually, labels are defined once in for all for a given language.

But there are cases where it is useful to allow those to change dynamically, depending for example on the value of other controls. For example, make a selection:
Then use the value of that control in the label of another control (typically in a subsequent wizard step). Here the "chocolate" part comes from the previous selection:
You express this in the Control Settings dialog by writing the label as a template, and by specifying what value should go in the placeholders.


The template uses curly brackets enclosing a parameter name. You assign values to each parameter in the template. This allows localizing the label, while not having to repeat the template parameters assignments.

The value of a template parameter can be:
  • the value of another form control
  • a formula
With Orbeon Forms 2018.1, this feature doesn't only apply to control labels:
  • Form controls can have dynamic labels, hints, and help messages.
  • Sections can have dynamic labels and help messages.
Learn more about this feature in the documentation:

No comments:

Post a Comment