Forum Discussion
exporting variables to be read in a Google docs spreadsheet
I've seen Tom's helpful screencast on how to embed a Google docs form into a Storyline project. However, what I want to do is a little different. I'd like to be able to export the values of about a dozen variables from Storyline so I could see them in a spreadsheet the way I would if students entered those values into a Google docs form.
I've got a grammar assessment, and I want to export a student's name and either OK/NEED TO REVIEW/MIGHT WANT TO REVIEW for each of a dozen or so topics. Now, I could just use a final page screen in Storyline showing a student her status on these dozen topics and ask her to fill out an embedded Google docs form in which she basically copies the results manually. These are just initial assessment scores, and I'm not worried about honesty issues. However, this seems like a pretty klutzy way to do things. Would anyone be able to help me out with a suggestion for a better method? I don't know any JavaScript, and my familiarity with Storyline is fairly low.
Thanks!
Dorothy
- MattLynchCommunity Member
I am having trouble finding the entry code for each input section.
When I inspect the google forms code I get this...
<input type="text" class="quantumWizTextinputPaperinputInput exportInput" jsname="YPqjbf" autocomplete="off" tabindex="0" aria-label="Full Name" aria-describedby="i.desc.2101111227 i.err.2101111227" name="Sydney Collective Fire Training User data" value="" required="" dir="auto" data-initial-dir="auto" data-initial-value="">
There doesn't seem to have the entry code in there at all.
Any ideas? Has google changed the code for forms?
- SteveFlowersCommunity Member
Hi, Matt -
On your form, while editing, try to generate a pre-filled link:
It will provide you with a URL like this:
https://docs.google.com/a/forms/d/18rlUiMXHUfebyWeOKJSXGeGJHNnrLW6iFF_v2Xdg9Iw/viewform?entry.1813808438=Option+1&entry.1973654167=Option+1&entry.1879837238=Option+1
- MattLynchCommunity Member
I seem to get the link with just
*****/forms/d/1i5jMBrIJq-vDE9svSB1datDrDfvKvKjb245T5H2-uVA/prefill
Not sure why I don't get the entry. Do you have part of it selected before getting the pre-filled link?
- SteveFlowersCommunity Member
Yes. You need to fill each pre-fill element that you want to return in the string.
- SteveFlowersCommunity Member
Fill and submit the pre-fill form. It should show you a link to copy.
- MattLynchCommunity Member
I edit the form and pre-fill the responses, but the link is still the same. I cannot get the entry and option to appear after the link. all I get is /prefill after it.
I must be doing something wrong
- JasonNagelsCommunity Member
Hi All -
I'm not sure how many people monitor this post anymore, but I thought I would give it a shot.
I had this working a few years ago, and unfortunatly I had my hard drive fail and lost my source files that worked. Now I'm trying to recreate the ability to post to a google form with not a lot of success.
I have created a test training:http://nagelsconsulting.com/Lockout/story.html
The idea is to have the firstname, lastname and score output to the google form.I can see now that after completing the course the timestamp is entered, but none of the values are passing to the google form. Here is my spreadsheet results:
https://docs.google.com/spreadsheets/d/1MTo41Vb8Vkfd6jaCPRzkdGg0LSHLUxk7GtRvBBrhvso/edit#gid=361735704The javascript I have entered is as follows:
var player = GetPlayer();
$.ajax({
url: "https://docs.google.com/forms/d/1eshntCAnj-xod2Ql-R2VBUx0lnMCQ-wrd_y9DfaMZok/formResponse",
type: "POST",
dataType: "jsonp",
data: {"entry.1307427408":player.GetVar("FirstName"), "entry.1400570972":player.GetVar("LastName"), "entry.1439160339":player.GetVar("Score")},
success: function (data) {
alert(data);
}
});
return false;----
I have also made sure to edit the published story.html with the following code:
<script
src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>any help that can be provided would be very much appreciated!
just in case anyone wants to take a look at the source file, I have attached the storyline test file.
Thanks Jason - it's always good to have more and newer examples so I appreciate you sharing.
Hey John - This thread is a bit dated and if you do not hear back from Kevin soon, you are welcome to reach out to him directly via the 'Contact Me' option on his user profile.
- BENOITGUILLOCommunity Member
Hello, thank you for your work and generosity Michael and Andrzej. Your tips, tricks and codes are so usefull !