Skip navigation
dkfsbo1
Currently Being Moderated

Submit button error message

Apr 6, 2012 7:48 AM

Tags: #error #email #create_pdf

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

 
Replies
  • George Johnson
    11,651 posts
    Aug 11, 2002
    Currently Being Moderated
    Apr 6, 2012 8:10 AM   in reply to dkfsbo1

    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();
    
     
    |
    Mark as:
  • George Johnson
    11,651 posts
    Aug 11, 2002
    Currently Being Moderated
    Apr 6, 2012 8:12 AM   in reply to George Johnson

    Also, note that the page numbers are zero-based, so fields on the first page will show as page 0, etc.

     
    |
    Mark as:
  • George Johnson
    11,651 posts
    Aug 11, 2002
    Currently Being Moderated
    Apr 6, 2012 8:50 AM   in reply to dkfsbo1

    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.

     
    |
    Mark as:
  • George Johnson
    11,651 posts
    Aug 11, 2002
    Currently Being Moderated
    Apr 6, 2012 9:18 AM   in reply to dkfsbo1

    Those errors that are reported are probably caused by code elsewhere in your form. Try clearing the console by clicking the little garbage can in the lower-right of the console window and then clicking the button you set up again. Now what does the console show?

     
    |
    Mark as:
  • George Johnson
    11,651 posts
    Aug 11, 2002
    Currently Being Moderated
    Apr 6, 2012 9:49 AM   in reply to dkfsbo1

    It should not do that, so I suspect something is corrupted. Try doing a Save As, close the form, close Acrobat, and try again.

     
    |
    Mark as:
  • George Johnson
    11,651 posts
    Aug 11, 2002
    Currently Being Moderated
    Apr 6, 2012 11:33 AM   in reply to dkfsbo1

    No, you don't have to do that. I'd be interesting in looking at the form if you're free to email it to me at: acroscript at gmail dot com

     

    It's probably something simple, but it's hard to tell without looking at the form.

     
    |
    Mark as:
  • George Johnson
    11,651 posts
    Aug 11, 2002
    Currently Being Moderated
    Apr 6, 2012 12:40 PM   in reply to dkfsbo1

    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.

     
    |
    Mark as:
  • George Johnson
    11,651 posts
    Aug 11, 2002
    Currently Being Moderated
    Apr 6, 2012 1:12 PM   in reply to dkfsbo1

    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.

     
    |
    Mark as:
  • George Johnson
    11,651 posts
    Aug 11, 2002
    Currently Being Moderated
    Apr 6, 2012 3:05 PM   in reply to dkfsbo1

    The first (aka leading) character of the field name is a space character for the fields I listed. It's easy to miss, but the spaces are there.

     

    I'd be interested to know how you created those fields where the first character is a space, because Acrobat does not let me do it manually.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points