Solved

Adobe Acrobat Field Validation

Posted on 2013-11-26
7
396 Views
Last Modified: 2013-12-02
Hi Experts,

I am working on an Adobe Acrobat form that has two fields.  The first is called 'Percentage' and the second is called 'Amount".

I am trying to figure out a validation rule that would allow the user to enter an amount in only one of those 2 fields.  So if there is something other than zero in the Percentage field, then they get a warning if they try to enter something in the Amount field, and vice vera.

Any suggestions are appreciated.

Thanks,

JJ
0
Comment
Question by:JJINFM
  • 4
  • 3
7 Comments
 
LVL 18

Expert Comment

by:Steven Harris
ID: 39678454
You may try something like:

var cField = ' other field name ';
if(cField=<0)
{
     app.alert("Please use one field only...");
     event.target.textColor = color.red;
}
else
{
     your calculation or code here
}

Open in new window

0
 

Author Comment

by:JJINFM
ID: 39678686
I get an error that reads: "SyntaxError: illegal XML character 2 : at line 3"

Would you know the cause?
0
 
LVL 18

Expert Comment

by:Steven Harris
ID: 39679043
It is probably not liking the format I am using, I am typing this freehand.  See if this errors as well:

var cField = ' other field name ';
if(cField=<0){app.alert("Please use one field only...");
event.target.textColor = color.red;}
else{your calculation or code here}

Open in new window

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:JJINFM
ID: 39681175
What seems to be the problem is "=<".  The editor will take "=" ,or "<", or "<=", but not "=<"

When I use "=<" I get the SyntaxError: illegal XML character 2: at line 3 message
0
 
LVL 18

Accepted Solution

by:
Steven Harris earned 500 total points
ID: 39681214
Switch over to (cField  >0), or you can also try (cField > "")

You may actually prefer the latter since you are looking for any value, not just a number greater than zero.
0
 

Author Comment

by:JJINFM
ID: 39690878
Excellent.  using cField>"" worked

Thanks for your help!
0
 
LVL 18

Expert Comment

by:Steven Harris
ID: 39690892
Glad I could help!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Acrobat Reader DC - Can't Copy Text 7 1,057
PDF File Not Opening in Chrome Browser 12 317
PDF - Populate hidden filed from drop down list 5 80
Adobe Acrobat Pro: Is this a known bug? 9 92
The ability to edit PDF documents can be useful, however it may not be a straight forward process. Many non-technical people don't realise that a PDF document is basically an image rather than a text file, even if it contains nothing but text. If…
PDF files have been in the limelight due to its unmatched features.  Personal documents, emails, business reports and eBooks are all converted into PDF files owing to peerless features provided by it. Adding watermark to a PDF file is a method to se…
In this second video of the Xpdf series, we discuss and demonstrate the PDFimages utility, which, in a single command, is able to extract all the images from a PDF file and save each one in a separate image file (PBM, PPM, or JPG). Download and inst…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now