Copy link to clipboard
Copied
I have 2 working fillable forms (form A & form B) that need to be consolidated to 1. The end result isn't working properly.
When I open form A and add form B, fields of form A are the only fields that are working. Fields from form B aren't working.
If I open form B and then add form A, fields from form A aren't working.
I tried using 2 software in combing the 2 forms, Adobe Acrobat XI Pro and iSkysoft PDF Editor.
An error that says "An incorrect structure was found in the pdf file" pops up when I used Adobe and all the fields regardless if from form A or B aren't working.
Then I used iSkysoft to combine the 2 forms, tried it out using Adobe, only half of fields are working.
My question now is how do I identify the root of the error and can this be fixed?
I must say that I already checked if the forms have same field names and that I have already changed the field names of the duplicates. Is there a way to get a list of all the field names in a form? I may need to check the both forms again just to be sure.
Thanks in advance.
Copy link to clipboard
Copied
No, I was only referring to the scripts. You combine the two files as usual, then you open the second file, copy its doc-level scripts, go back to the merged file and add them there.
Copy link to clipboard
Copied
From re-reading your first paragraph a few times I am assuming that both of these forms are identical? Are Form A and Form B a single page in length each or do they have more pages?
Also, I see that you mentioned creating duplicate fields; did you copy and pasted the fields in question from Form A to Form B , or, did you used the "Create Multiple Copies" instead and then copy and pasted , or, did you used "Duplicate Accros Pages" functions, or, a combination of all these methods without renaming the fields before the merge? Were the fields renamed after the merge?
Is Form A and Form B using calculated fields?
Do any of these fields need to grab data from another field to populate other text fields?
Are any of these non-working fields referencing to a date field?
In any case (and, if so), lets say that if you used one form as a template to create another, and even if you changed the field names after merging both files into one, you also need to edit the calculated fields under "Calculate" tab, and check that the arithmetic functions points out to the correct field name(s) to work.
If this is the case all you have to do is change the field name values used in your calculations of Form A to adjust to the ones to be used in Form B... that should work.
Can you provide a screenshot of the non-working fields here?
As for obtaining a list of all the field names in your forms check the image below:
The preview pane to the right margin of your work space will open and you can scroll down/up and navigate through all the field names across your document. You may delete, rename, create multiple copies, add or re-arrange the tabbing order of the fields in your document just by right-clicking on each field name link.
Copy link to clipboard
Copied
Form A (14pages) and Form B (9pages) are 2 different forms. Both first pages almost have the same fields/content and same the fieldnames.
The rest of the pages have unique fieldnames. In the combined form I will need to delete the 1st page of form B.
Both forms have javascript codes in them. Almost all of the codes are just for grabbing data from different fields and consolidating it to one. So imagine 300 items that each have checkboxes (X, Y, Z) and dropdown/text fields. Depending on what item was checked, it will show up in 2 possible summary fields. A summary box for Item X and another one for Item Y. For items that Z are selected they don’t have to appear in any of the 2 summary fields. It is very complicated....
No calculation in terms of numbers and dates just codes for grabbing data from other fields.
Copy link to clipboard
Copied
Does you use document level functions in the forms?
Copy link to clipboard
Copied
I think the original creator of the forms used document level functions. A message pops up that I need an external editor to edit the javascripts. I am able to edit the javascript in document level though.
Copy link to clipboard
Copied
What you mean with "isn't working" ?
Copy link to clipboard
Copied
Yes, is a hassle.
You may want to share the code with a community professional or share your file with them.
inquired about your issue here and he might be able to assist with the technical part better than me, as for my self I am learning on the go.
I am also working on long form myself with similar issues and I am a newbie with calculated fields.
I had try67 who helped me out with an issue through one of these forums and literally it didn't took more than a day to get me situated with his assistance.
But if you are the type of person who likes to do everything yourself, then fortunately you can explore, view, edit and review all the code lines in your document in a single spot.
To do so check below:
Click on Tools and select the JavaScript addon. It will bring you to the next set of options as shown below:
Select "All Java Scripts" from the Tool Ribbon of this addon and a JavaScript Editor will pop up.
You may copy and paste this info in a text editor such as wordpad, notepad, MS Word, etc. and see for yourself if any field name values need to be renamed in each of the scripts. I highlighted where it says "**********belongs to:" so you can see how it actually is to find the code you are looking for for each text field or drop list in your document, plus if you look on the lower right corner of the pop up JavaScript editor (just above the "Go To" button) it shows the Line and Column numbers where the field(s) you are looking for are located.
Hope this points you in the right direction abim79352569
Copy link to clipboard
Copied
If both files have doc-level scripts then you will lose them from one (or more) of them when you merge them. You will need to manually copy them over.
Copy link to clipboard
Copied
Are you saying that I combine the 2 forms. Delete all the fields, save it and then manually copy all the fields from another saved copies of the forms? Will that delete the original doc level scripts?
Copy link to clipboard
Copied
No, I was only referring to the scripts. You combine the two files as usual, then you open the second file, copy its doc-level scripts, go back to the merged file and add them there.
Copy link to clipboard
Copied
Okay. I tried what you said. Combine the 2 forms and then copy and add the doc level scripts of form B to the merged one.
Is that all I need to do? I added all of the scripts but part 2, or part form B, in the merged file still isn't working.
Are there other reasons why the scripts aren't working?
Copy link to clipboard
Copied
Can you share both forms?
Copy link to clipboard
Copied
I have solved the issues I am having with the help of try67 and ls_rbls . Thanks for your time
Copy link to clipboard
Copied
Saying "it's not working" is not very helpful. In what way is it not working, exactly?
Are the scripts gone from the fields? Are they still there, but don't produce any results at all? Are they producing the wrong results? Are there any error messages in the JS Console when you change the value of one of the fields? etc.
Copy link to clipboard
Copied
So it looks like I needed to give the button time to process the scripts to capture all data in one field. Your tip of adding the doc level scripts to the merged file worked.
I mentioned that 1st pages of form A and B are somewhat the same in content and fieldnames but apparently there are items in form B page 1 that aren't in form A. That's why part B also isn't working properly in the merged file even though I added the doc level scripts of form B to the merged file. The missing fields are needed for the form B scripts to function. What I did to resolve this is to copy the missing fields and add it in the 1st page of the merged file. Problem solved.
Thank you for helping me.
Copy link to clipboard
Copied
Then the same procedure click on the Debugger to find out more or click on "Edit Document Level Scripts" and see what is in there.
Copy link to clipboard
Copied
Thanks for all the tips that you have given. Hopefully we both get the finished product we are looking for
Copy link to clipboard
Copied
I also forgot to mention that while you are editing your document you can right-click on any area of your document and select from the pop-up menu "Show Tab Numbers". When selected you will see the numerical order assigned to each field throughout your document.
Copy link to clipboard
Copied
Great!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now