Skip to main content
Nintex Community Menu Bar
Question

Mobile Number Field Inputs

  • July 11, 2024
  • 8 replies
  • 29 views

Forum|alt.badge.img+7

Trying to get Number Inputs on a mobile field editor to display like the image below instead of the default text box.

Does anyone know how to do this, or has a field renderer that could do the trick?

This topic has been closed for replies.

8 replies

Forum|alt.badge.img+5

Mansour…we have done this recently. Here’s the code I used. 

FIrst create a snippet 

then on the number field give it a css class of numberonly.

See code below.

var $ = skuid.$;$(“.numberonly”).find(“input”).on(“click touchstart”,function(){
                $(this).attr({“type”:“number”, “pattern”:“[0-9]*”});
});

hope this helps!

Jeff Rutter



Forum|alt.badge.img+5

as a warning…this is sometimes slightly buggy and may jump back to the other keyboard, but has done the trick for our needs (we are using Ipads)!


Forum|alt.badge.img+7
  • Author
  • July 11, 2024

Hi Jeff,

Trying to implement your solution now, but running into a snag.

Is there a CSS class I should be creating?
Should I be using this JS snippet as a custom renderer?


Forum|alt.badge.img+5

sorry! Actually you don’t need a css class. Just give the field the css class referenced in the code snippet. 

And no need to override the field with the js snippet as a custom renderer. We just had tabs and whenever the tab was shown we ran the snippet I shared. Maybe you could run it on page load instead, but we didn’t have that use case. 

-Jeff


Forum|alt.badge.img+7
  • Author
  • July 11, 2024

Got it working.
Thank you very much!


Forum|alt.badge.img+5

Great! Glad to help a fellow Skuid user out! 🙂


Forum|alt.badge.img+5
  • Nintex Employee
  • July 11, 2024

Hey Jeff, I just wanted to thank you for your contributions on the community. We appreciate it.


Forum|alt.badge.img+5

You’re welcome, Matthew!