Expand my Community achievements bar.

shared script

Avatar

Level 2

I have the need to use the same script in the same form in many different

objects.  The only change to the script is the name of the object.

What is the best way to do this?

example: if then statement to fillcolor red if field is blank.  I have many fields requiring the same if then statement.

Thank you,

Tyler

4 Replies

Avatar

Level 10

Hi,

Here is a sample which uses a script object (which contains a function). Then objects in the form have script in various events that call the function. As it happens the sample changes the visual appearance of the objects.

Have a look at the events because you will see hoe I am getting the SOM expression of the object and passing this to the function.

The text at the bottom of the form is just there to show the xml structure and how you can use this information to script for object properties. The script would be inserted via the script editor.

Hope that helps,

Niall

Avatar

Level 2

Over my head.  Not sure kiss applies to adobe's programming here.