Thursday, March 28, 2019

Form-level and control-level settings

With Orbeon Forms, some form controls have specific settings. For example, a Number field can be configured to show 2 digits after the decimal point. In the past, these settings could be configured in two ways:
  • Using configuration properties, which could apply to a single form or or multiple forms.
  • Using attributes in the source code of the form definition.
Neither solution was perfect. With Orbeon Forms 2018.2, we have improved this and you can now easily configure these settings through the Form Builder user interface:
  • for all such controls appearing in the form definition,
  • or for an individual form control in the form definition, in which case that local setting overrides the more general setting.

When neither type of setting is present, the configuration properties still apply.

This allows you to pick general defaults and change them as needed. For example, in general number fields have 2 digits after the decimal point, but in case a couple number fields need a specific setting, you can do that easily.

With Orbeon Forms 2018.2, this applies to the following built-in form controls:
  • The "Number" and "Currency" fields support setting:
    • a prefix
    • a suffix
    • the number of digits after the decimal point
    • the decimal separator
    • the thousands grouping separator
    • rounding options
    • the default field width ("full" or "natural")
  • The "Date", "Time" and "Date and Time" fields support setting:
    • the default field width ("full" or "natural")
The nice part is that this is done entirely through the Orbeon Forms component system. This means that it is possible to create new form controls which export metadata and editors which Form Builder will show in the "Control Settings" and the "Form Settings" dialogs.

For more details, see the documentation.

We hope you will like this feature Orbeon Forms 2018.2.

No comments:

Post a Comment