Search code examples
orbeon

Why are the elements for a non-relevant section template missing?


I'm using a section template created by Orbeon Form Builder that I included in another form also created by Form Builder. When in this form we make the section template invisible, it disappears from the form instance.

Is it possible to make the section template invisible without loosing it in form instance?


Solution

  • For each section templates, Form Builder generates an XBL component which wraps the fields in that section. In the form that uses the XBL corresponding to the section template, in the XML for the instance, there is just one element for the whole section, and the XBL component is bound to that element. The XBL component "knows" what the XML for the fields in the section is, and at runtime, when it becomes relevant, it inserts them inside the element for the section. Hence, if the section never becomes relevant, those fields will be missing from the instance.

    This behavior isn't consistent with what happens for regular sections, but it shouldn't cause any particular problem to Form Runner. Say, if you save the data without those fields, edit it later, and the section becomes relevant, the XBL component will then add the elements to the instance. For this reason, we created this issue.