Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Adobe Acrobat Javascript compatibility

Avatar

Avatar
Give Back
Level 1
AmiAdobe
Level 1

Like

1 like

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Give Back
Boost 1
View profile

Avatar
Give Back
Level 1
AmiAdobe
Level 1

Like

1 like

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Give Back
Boost 1
View profile
AmiAdobe
Level 1

11-12-2020

Hello,

 

can't find a reference of supported Javascript functions for Adobe Acrobat Forms created in LiveCycle.

 

Does PDF javascript supports as example array.push and everything related to Array?

I can't add element to an array.

 

Thak you very much

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
Employee
Kosta_Prokopiu1
Employee

Likes

133 likes

Total Posts

319 posts

Correct Reply

88 solutions
Top badges earned
Establish
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Establish
Employee
Kosta_Prokopiu1
Employee

Likes

133 likes

Total Posts

319 posts

Correct Reply

88 solutions
Top badges earned
Establish
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
Kosta_Prokopiu1
Employee

14-12-2020

XFA supports all standard functions of basic JavaScript/ECMA including Array.push()

 

var aArray = new Array();
aArray.push("test");
aArray.push("test2");
app.alert(aArray)

 

renders

Kosta_Prokopiu1_0-1608018529442.png

 

Answers (3)

Answers (3)

Avatar

Avatar
Give Back
Level 1
AmiAdobe
Level 1

Like

1 like

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Give Back
Boost 1
View profile

Avatar
Give Back
Level 1
AmiAdobe
Level 1

Like

1 like

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Give Back
Boost 1
View profile
AmiAdobe
Level 1

08-01-2021

Thank you very much for the reply.

 

Does this works when the script runs in server side?

 

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

15-12-2020

There's an overview which functions from Acrobat JavaScript API you can use. You'll find it in the scripting basics reference: https://helpx.adobe.com/pdf/aem-forms/6-2/scripting-basics.pdf
Generally you can use any JavaScript function defined by ECMA-262 5th edition, not just the those definded by Acrobat DC JavaScript API: https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/AcrobatDC_js_api_reference.pdf

 

For arrays just use:

 

var aValues = []; // Create an empty array
aValues.push("A new value");
aValues.push("Another new value");

xfa.host.messageBox(aValues.join("\n"));

Avatar

Avatar
Give Back
Level 1
AmiAdobe
Level 1

Like

1 like

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Give Back
Boost 1
View profile

Avatar
Give Back
Level 1
AmiAdobe
Level 1

Like

1 like

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Give Back
Boost 1
View profile
AmiAdobe
Level 1

14-12-2020

Anyone on this?