Reputation: 31743
With Orbeon Forms, I created a form in Form Builder. Since Orbeon Forms uses XForms, the data in the form is captured in an XML document. That document is sent to the persistence API when saved, but how can I access it before that, on the browser, through JavaScript?
Upvotes: 0
Views: 125
Reputation: 31743
In Form Builder, edit the source, and add the following line inside the <fr:body>
element, say before the first <fr:section>
:
<xf:output value="saxon:serialize(/*, 'xml')"
id="my-xml" style="display: none"/>
In JavaScript, you can access the value of the my-xml
control you added with:
ORBEON.xforms.Document.getValue('my-xml')
Upvotes: 1