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

If statements/Signature fields

eherman
Registered: Sep 17 2009
Posts: 4

I was wondering if anyone knew how to create an if statement that would link a text field in a form so that unless a name was typed into a particular field a signature bar would not appear. I am trying to create a form that can be generally used so that all users can have access to it and not continue to recreate a form everytime someone needs to add a signature section or the user who needs to sign changes. Any info will be a big help. Thanks.

My Product Information:
Acrobat Pro 9.1.3, Windows
suewhitehead
Registered: Jun 3 2008
Posts: 232
You can do it by making a signature field and setting it to "hidden". Then in the text field, on blur, add a javascript.

This one will make the signature field visible only when the text field is not empty. (On blur only works after another place on the form is clicked.)

var f = this.getField("Signature")
//if the value of this field is not empty
if(this.value != " ")
{
//the signature field will be made visible (not hidden)
f.hidden = false
}
Kathleen Kearns
Registered: Jan 9 2009
Posts: 8
Hi,

I have a total in cell A that must match the total in Cell B. If it doesn't, I'd like "error" to reflect in cell C. Found the formula below but its not working. Is there a way?

=IF (A>B, “yes”,”no”)Kathleen
suewhitehead
Registered: Jun 3 2008
Posts: 232
On the Actions tab of CellB on blur, enter this Javascript:

var a = this.getField("CellA")
var b = this.getField("CellB")
var c = this.getField("CellC")

if(b.value == a.value){
c.value = b.value
}else
{
c.value = "error"
}