Authentication | XM Community
Skip to main content
Solved

Authentication

  • August 9, 2024
  • 11 replies
  • 85 views

Forum|alt.badge.img+1

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. 

Best answer by TomG

@Karen9737,

Try changing the inputmode also:

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

 

11 replies

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • 1450 replies
  • August 12, 2024

Please check this post.


Forum|alt.badge.img+1
  • Author
  • 7 replies
  • August 12, 2024

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. 

 


rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • 1450 replies
  • August 12, 2024

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>

 


Forum|alt.badge.img+1
  • Author
  • 7 replies
  • August 12, 2024

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? 


Forum|alt.badge.img+1
  • Author
  • 7 replies
  • August 12, 2024

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


rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • 1450 replies
  • August 12, 2024

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


Forum|alt.badge.img+1
  • Author
  • 7 replies
  • August 12, 2024

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

 


Forum|alt.badge.img+1
  • Author
  • 7 replies
  • August 12, 2024

I appreciate all your help!!!!


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6083 replies
  • Answer
  • August 12, 2024

@Karen9737,

Try changing the inputmode also:

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

 


Forum|alt.badge.img+1
  • Author
  • 7 replies
  • August 12, 2024

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


Forum|alt.badge.img+1
  • Author
  • 7 replies
  • August 14, 2024

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?