I am using Acrobat 9 Pro to make this form as an Acroform.
I have a form with several rows, each row having a combo box with 3 options (68,92,160) plus a blank so that the user can enter a different number. The values are 68 = Charlotte, 92 = Raleigh, 160 = Norfolk, and blank has no value.
I want the entry in the combo box, if it is 68,92, or 160, to put the value for that option in another text field on that same row. I also want, if the user enters a different value, for example 25, to have the 2nd text field allow the user to enter some custom entry also in the 2nd text field. For example, if he enters 25 in the combo box, then he can enter Greenville in the 2nd text field.
How do I do this?
enter something like this
if(!event.willCommit)
{
if(event.changeEx != "")
{
var oFld = this.getField("SecondField");
oFld.value = event.changeEx;
oFld.readonly = true;
}
else
oFld.readonly = false;
}
This code places the export value into the second field if it is not empty. But if it's empty, it sets the second field to writable to the user can enter data into it.
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