ahmedA From my search it seems you'd need attr('id') used on jQuery(#____), but I'm not sure what follows the hash, since I still don't know how to query select for a specific input. could you help?I thought perhaps what I saw in the spreadsheet would be the id, and tried this, but that doesn't work, either. document .getElementById("Q36_3") .addEventListener( "input", () => Qualtrics.SurveyEngine.setEmbeddedData("input3_time_fruits", Date.now()), { once: true } );
In other words, I would like to get the time and store it whenever the user switches between two text input boxes.Is there a way to use choiceId along with .InputText, maybe?
ahmedA thank you for your response, but doesn't that just save the very first time I enter something into the InputText?I want to make sure I save the first time I enter something into each textbox (of which there are two, but both are somehow joined together into a single ".InputText", and I want to name the two different times with different variables), so I think I should be having two different setEmbeddedData calls?
pogi Oh okay. How exactly can I reset the function or unload though? Am I supposed to clearInterval again in addOnUnload? I'm new to js so please bear with me if I don't get some stuff right away!
Oh you mean my typo?Thank you, that solved it!
@ahmedA hmm how do I refer to the text boxes though? for example, I know the next button is referred to as NextButton, but I'm not sure what to call the text box inputs. could you show me an example of using oninput on textboxes?
Right, thanks for pointing that out! I didn't quite do it your way, but I did have to find a place to insert the timer into.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.