User notes that they can print and email

Dec 10, 2013

Hi all. I built a course earlier this year that contains a "notes" function to allow users to take a moment to reflect and type their thoughts on certain questions. This is used in place of a typical multiple response/choice type question. Thought I'd share it here with you!

Here are the files:

Screenr Part 1: Demonstration -

Screenr Part 2: How It Was Built -

Storyline Source:

Published Output:



238 Replies


In a different post (about html course certificates) I proposed a solution that builds your html print window with content from StoryLine and includes a print button on the page that is ignored by the printer. I think this process should work for you with user notes even in firefox. :-)
Link to post with code.

Madelaine Whalen

This is exactly what I'm trying to do for a course, but I can't get the Java run! All the variables are working perfectly within my course, but when I click my Print button nothing happens. 

I checked all my Storyline settings and they seem to match the file given in the original post, except I'm building in SL2 not 1. Help!!!

Joe Zhou

Thanks for Stephanie and Owen contributions! It's never too late to say so until I recently find this page which helps me to develop the emailing and printing function!  ;)

Just wonder if there is a way to insert the specific email address/educator under the CC field in the email? By that means not only can learner receive the email with their reflections but also the educator.

Of course there is another way around this is that I can make another separate button which prompts another email window with educator's name on the receipiant field, however it compromises the user experience...

justin kliegman

This one gets very complicated but it works very well thank you. This is what i turned it into:


var exercisenotes12=player.GetVar("tf1"); as a test we are trying to load in a variable information of a true or false button to show yes or no for a moc intake form that we have made. anyone have any ideas?********** trying to get the information of a button that is checked to be translated into something i can stick in to this crazy mess i have created off of this  any takers?


var player = GetPlayer();

var useremail=player.GetVar("email");

var subject="New Multimedia Learning Solutions Project Outline";

var usernotes=player.GetVar("notes");

var exercisenotes1=player.GetVar("Ans1");

var exercisenotes2=player.GetVar("Ans2");

var exercisenotes3=player.GetVar("Ans3");

var exercisenotes4=player.GetVar("Ans4");

var exercisenotes5=player.GetVar("Ans5");

var exercisenotes6=player.GetVar("Ans6");

var exercisenotes7=player.GetVar("Ans7");

var exercisenotes8=player.GetVar("Ans8");

var exercisenotes9=player.GetVar("Ans9");

var exercisenotes10=player.GetVar("Ans10");

var exercisenotes11=player.GetVar("Ans11");

var exercisenotes12=player.GetVar("tf1"); as a test we are trying to load in a variable information of a true or false button to show yes or no for a moc intake form that we have made. anyone have any ideas?**********

var mailto_link='mailto:'+useremail+'?subject='+subject+'&body='+"How many times can your learner take this test?%0d%0A"+exercisenotes1+"%0d%0A%0d%0AWhat percentage correct means passing?.%0d%0A"+exercisenotes2+"%0d%0A%0d%0ADo they need to be able to re-take it if they fail it?%0d%0A"+exercisenotes3+"%0d%0A%0d%0ACan the questions be given to your user in any order (randomly arranged)?%0d%0A"+exercisenotes4+"%0d%0A%0d%0ADoes your user need to know which questions they got wrong in a review at the end?%0d%0A"+exercisenotes5+"%0d%0A%0d%0ALength of questions AND answers (word count) is limited?%0d%0A"+exercisenotes6+"%0d%0A%0d%0AHOW DO YOU TAKE PEOPLE OFF TO MEET YOUR MOTHER?0d%0A"+exercisenotes7+"%0d%0A%0d%0AWhat if Sponge Bob Square Pants was actually real and Bikini Bottom was actually a real place?%0d%0A"+exercisenotes8+"%0d%0A%0d%0Aquestion question nine question nine?%0d%0A"+exercisenotes9+"%0d%0A%0d%0A0Atime lookFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF?%0d%0A"+exercisenotes10+"%0d%0A%0d%0A0Atime lookFFFFFFFFFFFFFFdFFFFFFFF?%0d%0A"+exercisenotes11+"%0d%0A%0d%0A0A0A0A General Notes:%0d%0A"+usernotes;


Madelaine Whalen

Not entirely sure if this answers your question, but here's something I made that allows users to print notes. 

The user goes through a series of buttons and clicks the options that appeal to them, then types accompanying notes in a text entry field. These selections and notes appear on the final slide through a series of variable references, and a JavaScript command collates them for printing. 


The easiest solution would be to use a Text variable instead of a True/False variable and use your check box triggers to change the value to "No" or "Yes".

However, if you insist on using a T/F variable, you could do something like the following:

//call the storyline player if you have not already
var player = GetPlayer();

//create a function to get your true-false value, convert it from boolean to text, analyze the value and convert it to yes or no
function myFunction() {
     var trueOrFalse = player.GetVar("tf1").toString();
          if (trueOrFalse == "true") {
               return "YES";
          } else {
               return "No";

//run the function and store the value in a variable called userNotes12
var userNotes12 = myFunction();

I'm sure you could shorten this by just evaluating the boolean value rather than converting it to a string but I am not an expert when it comes to working with booleans; I find it easier to just work with strings. :-)

Len Taylor

Hello there. I modified and used Madelaine's example and in it's own scene within the project it works perfectly.  However, when I copy those two slides to the correct scene, the typed in text does not appear at all. I have made sure several different times about the code and variables and even published, but there is no change. Ideas? I have attached. Scene 8 is my test bed, the scene not working is the last two slides in scene 1. Thanks in advance!

Madelaine Whalen

It looks like you are referencing the wrong variables on slide 1.9, and potentially reusing the same variable too many times within the course. You need to have a unique variable assigned to each interaction/entry you want the learner to complete and be able to print, does that make sense?

Madelaine Whalen

I adjusted the interaction in Scene 1 a bit - let me know if this works the way you wanted it to. I renamed the variables to make it easier to tell that they belong to scene 1 and to make it easier to check your Java to ensure it all fits where it is supposed to. 

Wilson Santiago

Hi Folks.

I know this is an old thread, but it has proven quite helpful in my current project.  I have been able to modify this to my current project, but I have an additional function I cannot figure out.  I would like to be able to also print the username that the student will type in at the beginning of the module.  Everything I have tried so far has failed, although I do admit I am nearly illiterate in JavaScript.  Does anyone know a way to do this?