Search code examples
orbeon

Orbeon Forms: Extracting Form Summary Data


We create a "summary section" at the top of one of our forms to display the main form data. To do this we used an Explanatory Text control along with many Template Parameters to extract the data from other controls (either directly or via xPath). This works fine..

However, when we came to extract the form data into another reporting tool (via API) we realised that the API only brings over data with a value e.g. text box, radio-button checkbox etc, and NOT the Explanatory Text..

So, here is the question.

We need to put this "summary" data in either a Plain/Formatted text box instead, but you can't use Template Parameters in these control in the same way as Explanatory Texts.

We tried using xPath to move the data from one control to the other, but that didn't work.

So what is the best way to address this?

Regards

PeteA


Solution

  • Indeed, the text shown by the Explanatory Text isn't saved in the data, which is by design, as in general that text is "explanatory" (hence the name of the control), and isn't part of the data captured by the form.

    So I'd instead look at a Plain or Formatted Text Area, as you did. For those, you won't be able to use a template, but you can use a calculation, building the text using concat(), and referring to the value of other controls with $my-control. If the text is short, it might just be fine; however if it is long, I can see how using the Explanatory Text would be quite a bit more convenient.