JavaScript for Multiple Fields: Numeric and Data Entries

Sep 30, 2019

Hello! I'm trying to execute Java script for two variables on a slide: data entry and numeric entry fields. I would like the user to enter Yes or No in the data field and then a ticket number in the numeric field and when they click the Submit button, it will generate an email with their answers populated in the email body. See attached picture. Here is my JavaScript:

var email='email@hotmail.com';
var player = GetPlayer();
var subject="Email Subject Line";
var body_start=player.GetVar();
var body_start=player.("NumericEntry1");
var body_start=player.("TextEntry");
body_text = body_start;
var mailto_link='mailto:'+email+'?subject='+subject+'&body='+body_text;
win=window.open(mailto_link,"emailWin");

I have used a version of this java script to successfully generate an email for one variable in the past but I'm trying to add multiple variables and it's not working. Any suggested edits for the script would be much appreciated!

Thanks in advance!

1 Reply

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