Java for using keyboard and confirmation | XM Community
Skip to main content
Hi!



I need help with configuring my survey since the options in Qualtrics doesn't seem to cover my needs. Issues are as follows:



1. For parts of the survey the "Next"-button should replaced with pressing spacebar. I know how to hide the "next"-button through Java but not how to replace"Next" with spacebar.

2. For parts of the survey answers are given by entering numbers. There are two types of questions: in a certain type of question a valid answer range from 1-6 and another from 1-2. Preferably no other numbers should be able to be entered in either type of question (they are presented in two blocks on two separate pages). I've figured out how to use Java for making entering numbers through the keyboard automatic and limited to one character when the page loads. But I do not have a code for limiting the possible character types. Since the questions have a time limit for providing correct answers the inbuilt validation doesn't work (it stops the site from auto-proceding if the wrong type of character is given, e.g. if accidentally pressing 7 instead of 6 on the first type of question a error message appears until the participant gives the right type of answer).

3. In connection to the issue in 2 above I would also like that the action of pressing a number from 1-6 or 1-2 in itself acts as a confirmation that submits the page and moves the participant on to the next step in the survey. The participant should not need to press either spacebar, "next" or do anything else besides pressing the preferable number. As it is now the participant will have to wait, albeit just a few seconds, until the page auto-proceeds by itself.



If someone out there could help me with this it would be much appreciated!



Regards,

Erik
Be the first to reply!

Leave a Reply