Forum Discussion
DouglasCuddihy-
5 years agoCommunity Member
Adding References to Certificate of Completions
Does anyone know how to add custom fields to a printable certificate of completion? I'd like the learner to enter the name of their company and location in two fields early on in the course (see att...
SamHill
5 years agoSuper Hero
Hi Douglas, this should be possible just by accessing the player. Assuming that report.html opens in a new window, the JavaScript required in report.html would look something like this.
<script>
var player = window.opener.GetPlayer(); // get a reference to the SL player
var company = {};
var company.name = player.GetVar("TextEntry4"); // get var
var company.city = player.GetVar("TextEntry5"); // get var
<script>
You should then be able to output as you need to:
<div id="companyname"></div>
<script>document.getElementById("companyname").innerHTML = company.name;<script>
or
<div><script>document.write(company.name);</script></div>