Numeric Entry Keypad
Posted: Fri Mar 07, 2025 10:23 pm
I have asked before, and just checking, there is no way to access this type of numeric keypad from SpiderBasic?


Code: Select all
Procedure SetStringGadgetKeyboard(id.i, kbdt.u)
If kbdt = 1
! spider_GadgetID(v_id).gadget.textbox.setAttribute('inputmode','decimal');
ElseIf kbdt = 2
! spider_GadgetID(v_id).gadget.textbox.setAttribute('inputmode','numeric');
ElseIf kbdt = 3
! spider_GadgetID(v_id).gadget.textbox.setAttribute('inputmode','email');
Else
! spider_GadgetID(v_id).gadget.textbox.setAttribute('inputmode','text');
EndIf
EndProcedure
Whoa, now that's a cool trick. I'm not OP, but it works here, thanks for sharing!hoerbie wrote: Sat Mar 08, 2025 2:39 pm Sorry, but there is no pic, so maybe I'm wrong.
But if you want to open a special keypad on a mobile phone when clicking into a StringGadget, on Android a function like this works, if you call it with the ID-number of the StringGadget:
Code: Select all
Procedure SetStringGadgetKeyboard(id.i, kbdt.u) If kbdt = 1 ! spider_GadgetID(v_id).gadget.textbox.setAttribute('inputmode','decimal'); ElseIf kbdt = 2 ! spider_GadgetID(v_id).gadget.textbox.setAttribute('inputmode','numeric'); ElseIf kbdt = 3 ! spider_GadgetID(v_id).gadget.textbox.setAttribute('inputmode','email'); Else ! spider_GadgetID(v_id).gadget.textbox.setAttribute('inputmode','text'); EndIf EndProcedure
That's amazing thatnk for sharing it. Are there any other input options?hoerbie wrote: Sat Mar 08, 2025 2:39 pm Sorry, but there is no pic, so maybe I'm wrong.
But if you want to open a special keypad on a mobile phone when clicking into a StringGadget, on Android a function like this works, if you call it with the ID-number of the StringGadget:
Code: Select all
Procedure SetStringGadgetKeyboard(id.i, kbdt.u) If kbdt = 1 ! spider_GadgetID(v_id).gadget.textbox.setAttribute('inputmode','decimal'); ElseIf kbdt = 2 ! spider_GadgetID(v_id).gadget.textbox.setAttribute('inputmode','numeric'); ElseIf kbdt = 3 ! spider_GadgetID(v_id).gadget.textbox.setAttribute('inputmode','email'); Else ! spider_GadgetID(v_id).gadget.textbox.setAttribute('inputmode','text'); EndIf EndProcedure