Expand my Community achievements bar.

Control over submitted XML data


Level 1

I am an advanced Designer user. I use a submit button to send form XML to a server - all fine. The issue I have is that the XML needs to be in a specific format to fit in with a specific schema), not just the standard form fields.


Is there any way to use javascript on the form to modify the XML before it is sent using the XML submit button?

I realize that it would be possible to "post-process" the XML by using a program at the server to transform the XML to the format I need after it has been submitted, but because of integration issues, this is an option I am hoping to avoid. The same applies to calling a webservice from the form - it would solve the XML formatting problem, but first prize is to do all the processing of the XML in the form, and avoid any server side processes.



2 Replies


Former Community Member

The structure of the xml that is submitted is controlled by the hierarchy of the form unless you use a schema or sample XML data file in the dat aview. In those cases the schema format or sample xml format will be followed. so I woudl simply import the schema into the DataSource view and bind the fields that you want to the apppropriate fields in the schema. After that the data will be submitted in the schema defined format.

Hope that helps



Former Community Member

When you define your form using a schema or sample XML, you get the opportunity to "Transform outgoing data" by specifying an XSLT script.

When you provide a script here, it will execute against your data before it is submitted.

Your other option is to bypass the submit processing and use FormCalcs put/post methods to explicitly format your message.