Authentication | XM Community
Skip to main content

I am using a QR Code along with Authentication for students to log attendance using their numeric student ID. I would like to use a number pad for numeric entry. Where do I put the Javascript?

 

I am not a programmer so please be gentle and explain it like you are speaking to a 3-year-old. 

 

Thank you. 

Please check this post.


Thank you. I read the post and think I understand what is needed. However, the way my survey is constructed I do not get that option when using the authentication function. The survey is very simple. I don’t have a place to add the JavaScript. There is only text in the first block and then it branches to authentication. 

 


Go to Survey Header → Click ‘Source’ icon (<>) → Paste below code → Save & Apply.

<script>
if(jQuery("input(id*='QR~Authentication-FL']").length==1)
jQuery("input>id*='QR~Authentication-FL']").attr('type', 'number');
</script>

 


I got this to work. Thank you. On an iPhone it brings up the “number” setting with digits across the top fo the keyboard. 

 

Is there any way to bring up a keypad? Will the keypad work on both iPhone and Android devices? 


keypad as in number keypad. Only numbers. I don’t know the correct vocabulary to ask the question. 


The code will bring keyboard with numbers on both Android and iPhone


It does that, but students are miskeying the numbers when typing on the number keyboard. I am trying to bring up a keypad:

1 2 3 

4 5 6 

7 8 9 

    0

 


I appreciate all your help!!!!


@Karen9737,

Try changing the inputmode also:

jQuery("input[id*='QR~Authentication-FL']").attr({'type':'number','inputmode':'numeric'});

 


That’s IT!!!!!!! THANK YOU BOTH SO MUCH!!!!!! 


And of course now I’ve had a student show up and use their iPad to scan the QR Code. Is it possible to bring up the numeric keypad on an iPad or tablet?


Leave a Reply