Previous | Next | (P-PDF) Forms & FDF
Topic: Re: Copy/clone Field Actions? (Via Email)
Conf: (P-PDF) Forms & FDF, Msg: 100765
From: prodok
Date: 11/17/2003 10:46 PM
Mark,
I might have been a little bit too terse; sorry aobut that.
You will define that function at document level. That makes sure that
it is available to any field within the document.
Then, consider this as a development tool, you would use the console to
insert the function calls using the console. Let's do a little example.
Assume that we have 10 fields named myField.0 to myField.9, and we want
to get the function myFunct into the Validate event of these fields.
So, we would type the following into our console:
for (var i = 0 ; i <= 9 ; i++) {
this.getField("myField." + i).setAction("Validate", "myFunct()") ;
}
Then select everything of these three lines and press
(or (that's the key in the numeric keypad)). And that should
add this function call to the Validate event.
Hope, this can help a bit further.
Max Wyss
PRODOK Engineering
Low Paper workflows, Smart documents, PDF forms
CH-8906 Bonstetten, Switzerland
Fax: +41 1 700 20 37
or +1 815 425 6566
e-mail: mailto:max@prodok.com
http://www.prodok.com
[ Building Bridges for Information ]
______________________
> Thanks. I think I see, though I'm a little confused as to
> scope/initiation.
>
> I need all the actions set at start of use and to persist right
> through the user session, my assumption is I write function(s) as
> required to set all my show/hide actions to the appropriate fields and
> then call the top action-setting function from a document level
> script. This will ensure the fields are set as soon as the user mouses
> over the form?
>