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

Mixing symbols and text

rkshook
Registered: Oct 14 2011
Posts: 2

I have Yes and No columns on my form. I need the user to be able to place a check mark in the box, leave the box blank or put NA in the box. How can I accomplish this?

My Product Information:
Acrobat Pro 9.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
So the check symbol and the NA text are not used at the same time? If this is the case then it gets simpler. Just change the textFont for the field at the time of entry.

Since there is no check mark key on any keyboard, how do you propose the user enter the data? You could use a keystroke script to identify the some kind of special key sequence and then change the font and value.

Why not use check boxes instead of a text box? It would be easier.

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

rkshook
Registered: Oct 14 2011
Posts: 2
I have a check box in the Yes and No column but if neither is checked I need NA to appear. Is it possible to layer a text box under the 2 check boxes so that if neither one is checked NA would appear by default?
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Ok, so the user does not type directly into the text field? That's good. You can use the MouseUp script in the check boxes to control the font and value of the text field. It's not too difficult.

The following scripts should be close to what you need.

Yes Check Box Script

if(event.value == "Yes")
this.getField("theTextFld").value = "\uXXXX"; //unicode value for check symbol
else if(this.getField("NoCheckBox").value == "Off")
this.getField("theTextFld").value = "NA";

************************
No Check Box Script

if(event.value == "No")
this.getField("theTextFld").value = "";
else if(this.getField("YesCheckBox").value == "Off")
this.getField("theTextFld").value = "NA";

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