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

make check box required

levi
Registered: Jun 26 2008
Posts: 8

i read a prior post on the same subject but it turns out the author was building a LiveCycle form. it was suggested to use the following javascript on the submit button in Acrobat:

if(this.getField("MyCheck").isBoxChecked(0))
this.submitForm(...);
else
app.alert("You must read and accept terms before submitting");

i used this code and it is giving me a syntax error at the else line. any suggestions?

i am very new at acrobat and javascript!!!!! Please help!

My Product Information:
Acrobat Pro 8.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Sorry for the late reply,

the "submitForm" code is incomplete. the (...) is placeholder for the real input arguments, which are very long. You can get more information by looking this function up in the Acropbat JavaScript Reference or by simply doing a search for the function on this site.

Also, here's an article that covers the submitForm function.

http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/submitting_data/

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/]http://www.adobe.com/devnet/acrobat/[/url]

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