cancel
Showing results for 
Search instead for 
Did you mean: 

Adobeform : can we calculate the coordinate (y axis) of a flowed form using Javascript?

Former Member
0 Kudos

Hi,

I want to calculate the coordinate (y-axis and the height) of a flowed subform using JavaScript in Adobeform.

Is there any possibilities to get the coordinate of a flowed ?

Thank you for your help.

Accepted Solutions (0)

Answers (2)

Answers (2)

pavan_prabhu
Active Participant
0 Kudos

Hi Minoushka,

Currently I assume that the name of the flowed sub form is DATA.

In Ready Layout event, write the below JavaScript code.

var height = xfa.layout.h( DATA, "mm" );

Former Member
0 Kudos

Try this in layout ready event

var height = xfa.layout.h(Subform,"in",0);

Former Member
0 Kudos

Hello Arshid,

Thanks for your reply. But how can I output the height so that I can test if I'm actually getting a value?

Former Member
0 Kudos

Where do you want to use this height?

Input this value to any other text field with something like

getField("TextFieldName").value = height;

LBretschneider
Product and Topic Expert
Product and Topic Expert
0 Kudos

if you are able to work in preview mode (by having demo data setup for preview), you could simply go for a text box with:

xfa.host.messageBox("Test " + varName);

by that a small pop up appears that shows you the value.

xfa.layout.h or xfa.layout.y help you, but please consider that it might give you the y coordinate within the sourrounding subform.