Help - Passing Variables from SL360 to PDF using Javascript

Feb 05, 2020

Hi Heroes,

I'm trying to figure out a way to get variables out of storyline and replaces certain form fields in a pdf using javascript.

The pdf is placed in a folder in the published SL package.

I'm using this javascript when the pdf opens (in Acrobat):

var player = GetPlayer();
noble = this.getField("1");
brand = this.getField("3");
behavior = this.getField("2");
incite = this.getField("4");

noble.value = player.GetVar("TextEntry");
brand.value = player.GetVar("TextEntry1");
behavior.value = player.GetVar("TextEntry2");
incite.value = player.GetVar("TextEntry3");

In which my forms in acrobat are 1, 2, 3 & 4 and my SL variables are TextEntry, TextEntry1, etc

I would like for the SL variables to be passed on so when the PDF is opened:

1 = TextEntry

2 = TextEntry1

3 = TextEntry2

4 = TextEntry3

Thank you in advance for your help!

3 Replies

This discussion is closed. You can start a new discussion or contact Articulate Support.