Number field UpDown Arrows

Is there a way to get rid of the Xojo Web Number Field UpDown arrows?

Those arrows are built into the browser as part of the HTML 5 input type for numbers.
This CSS trick may work:

Everything I see there is prefixed with -webkit though, so it may or may not have an effect on Firefox.

No big deal. I thought there might a Xojo field property I could use. I notice they show up in Safari and Chrome on the Mac, and Chrome on Windows. However, they are not there in IE on Windows.

You may use a regular textfield and use JavaScript to filter input so it takes only numbers.

This JQuery code in the Textfield Shown event will do just that :

[code]Sub Shown()
ExecuteJavaScript(“var test = ‘0123456789’; $(’#”+me.controlid+"’).keydown(function(e) { if ( e.keyCode < 48 || e.keyCode > 57 ) { e.preventDefault(); } }) ; ")

End Sub

Since it is JQuery, this must be place in the App HTMLHeader :

<script  type="text/javascript"  src=""></script>

Thanks, as usual, Michel. More than I need right now, but I’ll file this away for the future.

Do these Up/Down Arrows show up in Number-Type fields on the iPhone? They do not on the Android. If I hear they don’t on the iPhone, then I’ll probably use Number-Type fields on mobile layouts, and only shun them on desktop layouts.

They do not. They do change the keyboard to a number keyboard.

Thanks, as usual, Tim. That’s exactly what I was looking for. So on both Android and iPhone, they force the numeric keyboard without showing the Up/Down arrows.

On iPhone it does not force a number keyboard, it only defaults to showing one. The user can still switch to letters if they choose.

But you are correct in that the stepper arrows do not appear.

That’s the way it works on the Android as well. Just wanted to make sure it was the same on the iPhone. I was avoiding using Number-Typed fields because of the Up/Down Arrows, but noticed that if I used the Number-Typed field, the Android user got the numeric keyboard by default, without the Up/Down Arrows – the best of both worlds. Just wanted to make sure iPhone users experienced the same thing. Now that I know they do, I’m using Number-Typed fields again, but only for mobile layouts.

Arrows would be impossible to use with the fingers anyway.

True. However, on my Android, a Number-Typed field responds to hitting the arrow keys on the phone itself, even though you can’t see arrows on the field itself.

On iOS the numeric keypad that pops up has what looks like up and down arrows above the keyboard ^? but they do nothing.

What are you talking about? This is what I see on a numeric field:


Aren’t those arrows for Next/Previous field — greyed since you have only one field?

Yes, that’s what they’re for, just moving between fields. They look different because Tim is using Safari and Michel is using Chrome.