I need the ability to save filled out forms locally to people's laptops/tablets while out in the field (offline), then submit the forms when they are back in the office (attached to the network).
In my InfoPath 2013 I created the form and added a "Save" button to the form. I added the following code to that Save button:
_____________________________________
if(this.New)
{
this.SaveAs("c:\\forms\\form1.xml");
}
else
{
this.Save();
}
_____________________________________
This code works... and creates a file called "form1.xml" when the Save button is clicked. The problem I'm having is how do I save the form with a unique filename each time so that users are not over-writing the same filename over and over?
The second problem (which I haven't figured out yet) is that in preview mode in Infopath, I can click on the save button and it creates the form file with no problem or errors. When I fill out the form using InfoPath filler and click on the Save button I created, it gives me a bunch of security errors, and won't create the file.
Any help or suggestions would be greatly appreciated.