Solved

Adobe Acrobat Field Validation

Posted on 2013-11-26
7
401 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
On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Creating a Word Form 3 72
Downloading and reading password protected documents 5 61
PHP and Form data to PDF 4 161
how to open ASPX file in Adobe Acrobat Reader 5 233
Getting information about Fonts being used in a PDF file A colleague of mine recently faced an issue related to the PDF file format. The PDFs were containing mission critical client information, they were successfully mailed but there was a sm…
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…
In this third video of the Xpdf series, we discuss and demonstrate the PDFtoText utility, which converts PDF files into plain text files. Download and install the software.: You may have already downloaded and installed the Xpdf tools while watching…
Sometimes we receive PDF files that are in the wrong orientation. They may be sideways or even upside down. This most commonly happens with scanned or faxed documents. It is possible to rotate the view of these PDFs with the free Adobe Reader produc…

733 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