These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Error message when trying to create 'submit by email' button

ehuebn20
Registered: Mar 26 2010
Posts: 7
Answered

I am running Acrobat Pro 9 on a PC and I am trying to create a "submit by email" button on my form. The button action is set to email the url: mailto:name [at] iwantTSS [dot] com, and I set the preference to email the entire pdf form as an attachment. However, when I test the button I get an error message:
"At least one required field was empty on export. Please fill in the required fields (highlighted) before continuing."

-But, there are no fields highlighted and NONE of my fields are set as 'required'. Help!

ehr

My Product Information:
Acrobat Pro 9.3.1, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
There must me a required field somewhere or Acrobat wouldn't complain. You can find this troublesome field by running the following code in the Console Window (see tutorial links below)

Assuming of course that you have an AcroForm:
for(var i=0;i<this.numFields;i++){var oFld = this.getField(this.getNthFieldName(i));if(oFld.required)console.println(oFld.name);}

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

ehuebn20
Registered: Mar 26 2010
Posts: 7
Hmmm...I entered that code into the console window as specified by the link below and hit Ctr+enter. But, nothing happened. What should I be looking for after executing this task?

ehr

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You have to select all the code first. If there are no required fields, then the only thing printed to the console window will be be word "undefined". But if nothing at all is printed then you haven't run anything.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

ehuebn20
Registered: Mar 26 2010
Posts: 7
I appreciate your help on this, but perhaps I should state that I am not a developer (at all) and I simply created a form in InDesign and built my fields on top of it in Acrobat Pro. I am not sure how to run the debugger in Acrobat, because I get a blank script/console window. The only way I can view any source info from my document is to export it as a xml or html. What's the best way to find this pesky little field that is throwing off my button action?

ehr

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Hmm, Unfortunately Acrobat doesn't provide and easy way to get this info. Or to easily identify other kinds of fields.

But I think this is really useful, so tell you what, I'm going to write a tool that will allow you to identify and navigate to required fields. And I'll post it at www.pdfscripting.com as a free automation tool.

I'll let you know when it's there.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The automation tool will be posted on this page at the end of next week:
http://www.pdfscripting.com/public/65.cfm

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

ehuebn20
Registered: Mar 26 2010
Posts: 7
Many thanks!

ehr

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
It's there,

http://www.pdfscripting.com/public/65.cfm

This Acrobat JavaScript Automation tool finds and lists all required form fields in a popup menu. Selecting an item from the menu navigates the PDF to that field. It works for both AcroForm and LiveCycle forms.

The same script could easily be modified to show ReadOnly fields, or to search for fields with any property you're interested in.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script