I have created a 26 page fillable form using adobe acrobat x pro. I tried to put the submit button on but every time I hit it - it says "at least one required field was empty. Please fill in the required fields (highlights) before continuing. I have hundreds of fields and I do not think I selected any as required - I just made some boxes red so folks would fill those out. There are digital signature boxes as well. Is there a way for me to see what it is looking for or to somehow by pass and make the submit button work to send me the PDF? Spent two weeks putting this form together and I am so close. Please help. Thanks deb
Add a button to your form and place the following code in the Mouse Up event. It will print a list of required fields to the console, along with the page numbers. You can then remove the button when you get things straightened out.
// Mouse Up script for button
for (var i = 0; i < this.numFields; i++) {
var fn = getNthFieldName(i);
var f = getField(fn);
if (f.type !== "button" && f.required) {
console.println("Field name: " + fn + " on page(s): " + f.page);
}
}
console.show();
Thank you so much for a quick response. This is my first form and I do not know any java, etc. I am sorry to ask even more help from you but I am just learning all this - I added the button and the select trigger says mouse up - what is the select action suppose to be (run a java script?) and do I change anything under options ie currently - Label only and behavior is currently invert.
This is what i tried but when I hit the button - it didn't do anything. Thanks so much for your time.
Yes, the Select Action should be "Run a JavaScript". When you click the "Add" button the JavaScript editor will be displayed and you can paste the code I showed earlier into the editor. You don't have to be concerened with any other button options. When you're done, select the Hand tool and click the button. The JavaScript console should then get displayed and it should show a list of any required fields. If it doesn't do anything, open the console by clicking Ctrl+J to see if there are any errors reported.
Control J - worked :-) this is what is says
Acrobat EScript Built-in Functions Version 10.0
Acrobat SOAP 10.0
TypeError: getField("Preview") is null
15:Document-Level:!!DocOpened
TypeError: f is null
7:Field:Mouse Up
TypeError: f is null
7:Field:Mouse Up
TypeError: f is null
7:Field:Mouse Up
TypeError: f is null
7:Field:Mouse Up
TypeError: f is null
7:Field:Mouse Up
TypeError: f is null
7:Field:Mouse Up
TypeError: f is null
7:Field:Mouse Up
TypeError: f is null
7:Field:Mouse Up
TypeError: getField("Preview") is null
15:Document-Level:!!DocOpened
TypeError: getField("Preview") is null
15:Document-Level:!!DocOpened
TypeError: f is null
7:Field:Mouse Up
What does this mean in layman terms? Thanks again so much.
Hi George - I even shut the computer down and restarted but still get the same:
Acrobat EScript Built-in Functions Version 10.0
Acrobat SOAP 10.0
TypeError: getField("Preview") is null
15:Document-Level:!!DocOpened
TypeError: f is null
7:Field:Mouse Up
I truly appreciate your suggestions. I used text boxes and radio buttons and datafields and digitial signatures in this pdf - do i need to extend reader rights for it to work?
Thanks again. deb
There is a weird bug that prevents the code I posted from fully working. It doesn't recognize fields with a leading space in their names for some reason. But I was able to identify the fields that are marked as required:
Field name: "Lead Paint Knowledge" on page(s): 23
Field name: "Year Built" on page(s): 15
Note that the first one is a radio button, and the companion radio button is named "Lead Pain Knowlege", so you should correct this.
There is an additinal error associated with code in a document-level JavaScript that runs when the form is opened. It not clear to me that the code is needed though. In any case, you should look into it more.
Wow - You are good. I went through that page so many times before and didn't see that one required. I fixed it but submit still doesn't work. I don't know anything about document level java script. Is there an easy way to remove the script that I can try to see if it works.
Thanks George.
Regarding the document-level JavaScript, it depends on which version of Acrobat you're using. In Acrobat 9, you'd select: Advanced > Document Processing > Document JavaScripts
It turns out Acrobat doesn't allow you to create field names with leading spaces, but somehow several fields in your form do have them. Here's a list:
' Building SitesLotsMaster Plan Zoning'
' HOA Fee'
' Other Fees'
' Pet Deposit'
' Processing Fee'
' Rental Fee Frequency'
' Rental Fee Move In Fee'
' Term 1'
' Term 2'
' of Buildings'
' of Docks'
' of Elevators'
' of Fireplaces'
' of Floors'
' of FloorsUnit'
' of Levels'
You can order the field names in alphabetical order in the Fields pane when in Form Editing mode, and they will be at the top of the list. You can then click on each to detemine which page number they're on. You should rename them to remove the leading spaces.
North America
Europe, Middle East and Africa
Asia Pacific