Expand my Community achievements bar.

How do I use scripting to set an object location?

Avatar

Level 1

Hello,

I have an "X" text object that I would like to change its (x,y) location on my .pdf form based on values that the .pdf user places into (2) separate decimal fields.

For Example:

If User enters for example 3.1 and 2.5 into the two decimal fields the location of the "X" object would be:

Xcoordinate = constant1 * 3.1 + constant 2

Ycoordinate = constant3 * 2.5 + constant 4

Does anyone have an idea on how I might be able to accomplish this using the script editor in LiveCycle Designer or some other method?

If not, is there a way for me to make the "X" movable (by dragging) by the end user who will not be using LiveCycle Designer?

Thanks,

Chris

1 Reply

Avatar

Level 10

Hi,

you can manipulate the x and y on any object as long it's placed in a positioned page or subform.

The simply use a FormCalc script in the change event of your numeric fields to change the desired property.

For the x property it could look this way.


Textfield1.x = Concat($event.fullText, "mm")


Note: The x and y property accepts 4 different measurements (in, mm, cm and pt).