Author Topic: Fill separated input field by single input?  (Read 1429 times)

iwishash

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
Fill separated input field by single input?
« on: January 28, 2014, 08:04:12 AM »
Hi,
I'm trying to make multiple input field but could be written by single input action.
I mean, for example something like credit card input field?
If there are 4 separated fields (each field has space for 4 characters) and if I touch (on mobile device) any field, it will be filled from first field.
And if I enter the 12 digit code, all field should be filled by single input.
Just like attached pic.

Any advice would be appreciated.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Fill separated input field by single input?
« Reply #1 on: January 28, 2014, 09:31:44 AM »
Set them up as 4 individual fields. Add a limit of 4 characters to each. In a script listening to UIInput.onChange, detect when you've entered all 4 characters, and give focus to the next input field.