Hi
We would like to import/export xml data (subtree) of a dynamic xfa form. The following script does only work with static AcroForms:
formular.content.subformDaten.Button1[1]::click - (JavaScript, client)
event.target.exportAsXFDF({aFields:["formular[0].content[0].subformDaten[0]"]});
With dynamic forms the script does export an empty xml file (no data is included, only xml root tag):
<?xml version="1.0" encoding="UTF-8"?>
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"
><f href="ExportTest_frei.pdf"
/><ids original="EA43F92A6B6EA34F9C4DBBC2DA0B1840" modified="6A7C6282A167594F91240B773AA979A7"
/></xfdf
>
Any ideas? Many thanks.
Best regards,
Daniel
Views
Replies
Total Likes
You shoudl not be using xfdf formats with an XFA form. You can use the command xfa.host.exportData("", false). This will bring up a dialog and allow the user to choose the file name of the xml file that they want. If you woudl rather stick with the command format that you have use the event.target.exportXFAData instead.
Paul
Views
Replies
Total Likes
Hi Paul
The Problem that Daniel posted was originally mine. Now after subscribing to this forum myself, I try to describe the aim of using exportAsXFDF/importAnXFDF.
exportData("", false) and exportXFAData works, in my opinion, only with a DataConnection. In my form I have indeed such a connection for sending the whole form. But in addition I need the possibility to export and import only part of the data without overwriting the rest of the filled form.
exportAsXFDF works with static forms. So there MUST be a possibility that works with dynamic forms, right?
I hope anyone has a solution.
Beat
Views
Replies
Total Likes
Nope ...XFDF should not be used with any XFA form. It is not tested or verified hence it is not supported.
The exporting of data using import and exportXFAData does not rely on a DataConnection at all. It is used to interact with data files on the local machine.
You are correct that you cannot export only parts of the form ...it is all or nothing.
Paul
Views
Replies
Total Likes