How to populate PDF from results of drag and drop?
Jun 02, 2017
By
Frank Siegel
I have a slide with a bunch of drag and drop items in it. It has a trigger that submits the drag and drop interaction and goes to a results slide. The results slide has a button with a trigger that will jump to a pdf file with a checkbox for each draggable item. I would like to pre-fill in the checkboxes depending on what was dragged. How do I do that?
I have added triggers to change the state of a dragged item to Selected when it is dropped on the drop target. Is adding triggers to change state the best way? If so, how do I fill in the checkboxes on the .pdf for the items of selected state?
Is this even possible? If not, is there a native file type I could use?
Thanks
3 Replies
Hey, Frank--cool idea! This isn't a native feature of Storyline, but I know all sorts of things are possible with Javascript "magic". 😊
Hopefully the Java experts in the community can chime in and assist here!
I actually decided to go with html, as pdfmake wasn't really working for me, and I didn't really care whether my file was a pdf or not. In fact, I really didn't need a file -- just the info. I basically have 2 triggers on each item to be dragged and dropped, and I set a variable when I drop it on the target. I unset the variable when I drag it back. I created a transparent shape over the drop target so that I could tell when something was dragged over it, thus unsetting the variable. Then I just wrote some JavaScript to use the variables, generate an .html file, display it, and print it if I want.
Great solution! Thanks for letting us know how you made it work!
This discussion is closed. You can start a new discussion or contact Articulate Support.