Search code examples
orbeon

Orbeon forms - populate checkboxes dynamically


Is there a way to populate checkboxes component (or different component which allows multiple choice) with dynamic values (just like you can do for a dynamic dropdown)? Let's say I want do populate checkboxes with countries. Example form: https://demo.orbeon.com/demo/fr/orbeon/builder/edit/73aeafa983d00f305fb381d72e59ce7c69e2b1ea


Solution

  • Yes, you can do this with Actions & Services:

    • Use an HTTP services if your data comes from a service that returns JSON or XML.
    • Use an database service if you prefer to write SQL to extract data from a database.
    • Use an action to define when your service should be called (e.g. on form load), what data you want to pass to the service (if any), and what to do with the result, which, in your case, it to set the choices of a selection control.

    And note that Actions & Services are a PE feature.