Skip to content
Discussion options

You must be logged in to vote

I think one way to do this would be to adapt the survey-text plugin and use the input event to register the value of the text field every time it changes.

This isn't a full solution, but it sketches out the main idea:

// store an array of the history of changes of the input element
var input_history = [];

// add event listener to input element, triggered on the input event.
document.querySelector('input').addEventListener('input', function(e){
	// get the value of the input text field
	var updated_value = e.target.value;
	// add this value to history array
	input_history.push(updated_value);
});

And at the end of the trial you could add the JSON version of this input_history to the trial…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@RachaelBryant
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by jodeleeuw
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants