Java Script Help - email user input
Nov 23, 2016
Hi guys, looking for Java script advice. I want to create an activity in SL2 where the user types in free form fields and their input is emailed for evaluation (see attached image of screen).
Based on a previous post, I adapted the following Java script for my trigger. Not working - email icon with trigger does nothing. Appreciate your help!
Rick
var player = GetPlayer();
var useremail=player.GetVar("email");
var subject="Partnership Opportunities";
var exercisenotes1=player.GetVar("entryRef1");
var exercisenotes2=player.GetVar("entryRef2");
var exercisenotes3=player.GetVar("entryRef3");
var exercisenotes4=player.GetVar("entryRef4");
var exercisenotes5=player.GetVar("entryRef5");
var mailto_link='mailto:'+useremail+'?subject='+subject+'&body=
'+"Activity Notes - My partnership opportunities:“
+exercisenotes1+"Contact 1“
+exercisenotes2+"Contact 2“
+exercisenotes3+"Contact 3"
+exercisenotes4+"Contact 4“
+exercisenotes5+"Contact 5";
win=window.open(mailto_link,'emailWin');
1 Reply
Hi there Rick! Thanks for reaching out here. Javascript is really not my forte, so I'll have to defer to the community on this one. Also wanted to point out these Javascript Best Practices, in case you hadn't run across them yet.
This discussion is closed. You can start a new discussion or contact Articulate Support.