Tell me if this is possible:
We need to create 50 engineering test forms. Each form uses the same layout but has different text data and different number of table rows to accomdate that text data.
Can we create each form and save them as XML data files. Then somehow import those files into the form. The end user will click on a dropdown object, select a part number from the list of 50 and the corresponding XML data will display in the form.
Please help me with this. I have tested creating the files and used Acrobat to import them and it works great. However, I want to incorporate this directly into the form.
So, basically, if I understand you correctly, you want to have 1 dropdown, you select a value there (like file1, file2, ...) and then you import/merge that file in your open document ?
Hmm, the script is easy, but, unfortunately, the xfa.host.importData() function is not trusted. I always get this error:
NotAllowedError: Security settings prevent access to this property or method.
See also this page.
Maybe it works when you use Reader Extensions, but I cannot test that for the moment.