I have a text box input field where my requirement is when i am entering into text box field in mobile ,the on screen kyboard should only show numeric keyboard only (only digits) not standard keyboard (apha numeric).I tried using javascript snippet - document.querySelector('.phoneNumberInput input')?.setAttribute('inputmode', 'numeric');and called this phoneNumberInput class in textbox field,but it is not working.ANY suggestion to get on screenkeyboard showing only number.
asked
AKASH SRIVASTAVA
1 answers
0
You do not need JavaScript for this.
Mendix already provides this option directly in the Text Box widget.
Go to:
Text Box
General
Keyboard type
select:
Number pad → only digits
or Decimal pad → digits + decimal support
This will automatically show the numeric keyboard on mobile devices.
Kindly mark this as the accepted answer if it helps.