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

This function is not enabled when I "Enable Acrobat Rights" in pro....

bensimmons99
Registered: Jun 2 2010
Posts: 28
Answered

The following script does not work when i open the documetn in Adobe Reader. What can I do to solve this issue?

//Validate before continuing
if (this.getField("DELIVER_TO").value !=null && this.getField("DELIVER_TO").value!="" && this.getField("VETTED").value !=null && this.getField("VETTED").value!="" &&
this.getField("VETTED CATEGORY").value !=null && this.getField("VETTED CATEGORY").value!="" &&
this.getField("DESCRIPTION1").value !=null && this.getField("DESCRIPTION1").value!="" && this.getField("PRICE1").value !=null && this.getField("PRICE1").value!="" &&
this.getField("DATE REQUIRED1").value !=null &&
this.getField("DATE REQUIRED1").value!="" && this.getField("ACCOUNT NUMBER1").value !=null && this.getField("ACCOUNT NUMBER1").value!="")
// change the names of the fields to match your fields...
{
// This is the form return e-mail. Its hardcoded
// so that the form is always returned to the same address
var cToAddr = "sendtoemailaddress [at] email [dot] com";

// First, get the client CC e-mail address
var cCCAddr = this.getField("DELIVER_TO").value;

var cSubLine = "NEW PR SUBMITTED ( "
+ this.getField("TOTAL").value + " "
+this.getField("PRODUCT OR SERVICE").value + " "
+ this.getField("REQUEST RECEIVED").value + ")";
var cBody = "Thank you for submitting your form. ATTACH ALL SUPPORTING DOCUMENTATION TO THIS EMAIL BEFORE SENDING!\n" +
"Save the mail attachment for your own records";

// Send the form data as an FDF attachment on an e-mail
this.mailForm({bUI: true, cTo: cToAddr, cCc: cCCAddr,
cSubject: cSubLine, cMsg: cBody});
}
else {
app.alert("You cannot submit this form to Purchasing until all required fields are completed... Required Fields are highlighted in RED.... IF YOU HAVE ALREADY SIGNED THIS DOCUMENT YOU MUST CLEAR THE FORM AND RESTART!");
}

My Product Information:
Acrobat Standard 9.3.1, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
What does "does not work" mean? What happens, exactly? Any error messages in the console?

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

bensimmons99
Registered: Jun 2 2010
Posts: 28
Nothing happens... If the user clicks the button while in Reader nothing happens, no error message, it just doesn't perfrom the required function. When in Adobe Standard 9 it works as desired.
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Did they enable the option to display the console on errors and warnings? (Edit - Preferences - JavaScript)

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

bensimmons99
Registered: Jun 2 2010
Posts: 28
okay,
now here is the error message that came up in the debugger:


Acrobat Annotations / Collaboration Built-in Wizard Functions Version 9.0
Acrobat SOAP 9.0

NotAllowedError: Security settings prevent access to this property or method.
Doc.mailForm:26:Field SUBMIT:Mouse Up
try67
Expert
Registered: Oct 30 2008
Posts: 2398
There you have it. You probably did not enable the form rights required for this function. (look under File - Document Properties - Security)

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

bensimmons99
Registered: Jun 2 2010
Posts: 28
So I set the security settings to "NO SECURITY" and saved the form. I then opened it up with Acrobat PRO and enabled reader rights, and saved the form. When I opened it up with Reader it would let me sign the form and save the form but it would not run the javascript from the "Submit to Purchasing Button".

What am I doing wrong? I have to present this form at 2pm today, and currently it does not work!

Does this have anything to do with after I sign the form and save it, it changes the security properties?
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Which actions are specified as allowed in the Security tab of the Document Properties?

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

bensimmons99
Registered: Jun 2 2010
Posts: 28
Before I "READER ENABLE" all are listed as allowed. After I make it reader enabled the following are listed as "NOT ALLOWED*

Changing the Document: Not Allowed*
Document Assembly: Not Allowed*
Creation of Template Pages: Not Allowed*

(The asterick at the bottom says This document restricts some Acrobat Features to allow for extended features in Adobe Reader. To Creat a copy of the document that is not restricted (and has no extended features in Adobe Reader), choose File> Save a Copy)What do I do now?