-
Hi all, I'm trying to write an experiment in which the subject draws something via the sketchpad plugin and is later presented with that very drawing. Here's my current code:
This code first runs two sketchpad trials and tags them with "drawing" = "yes". Then, I define pngCells as an empty array. I define function "myfunc" which filters the data for cells that say "yes" under column "drawing", such that I should now have a variable "drawingData" with just the rows that have my base64 drawing outputs. I use a for loop to access each base64 code (under column "png") and store them in previously-defined array pngCells. Then, I try to read in the first object in that array under a trial type jsPsychSurveyHtmlForm with some textboxes underneath (see var match). I think it's not working because the function call, but I'm not sure. Does anyone have any guidance? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey, I managed to figure it out. Code is below:
This will present the user with their first drawing (grabbed by pngCells[0]) and have them fill in the blank to indicate what it was a drawing of. |
Beta Was this translation helpful? Give feedback.
Hey, I managed to figure it out. Code is below: