Expand my Community achievements bar.

Save As Button, which saves the form data

Avatar

Level 2

Hello.

I'm trying to make a button to save the entered form data in a xml file. So far i have made a as a button by help from http://www.acrobatusers.com/tutorials/creating-save-button-livecycle-designer.

But it is possible to "auto-select" the xml-saving format, so the users don't need to choose it?

Best regards,

Mathias

3 Replies

Avatar

Former Community Member

Are you saving the entire form or just the Data?

If just the data the defaut format woudl be XDP ...if you want an XML file extension then you woudl want the command:

xfa.host.exportData("", false);

Paul

Avatar

Level 2

Hello Paul.

Thanks a lot - just what i needed, but is it possible to set some of the fields to be required filled in before saving the xml-file? Just like the email button, but with the save as button?

Best regards

Mathias

Avatar

Former Community Member

The validating of fields is done for a submit operation not a save operation. You can do a test on these fields before you allow the save (frm your button anyways). This wil not stop them from doing saves from the Acrobat menus (where your code will not run).

paul