157
Views
9
Comments
Solved
How to input otp input field with multiple input boxes from SMS?
Question

I have a 6-digit OTP input field they are filled by the user:

- I want to get 6-digits from SMS to fill in OTP fields when the user clicks on it at the top of the keyboard on iOS and Android.

Please help me with the solution for it.

2023-04-03 08-33-28
Lux Lee
Solution

I found a solution for it:

When the user clicks on OTP number on the top of the keyboard, that OTP will be assigned to the first box variable so that in OnChange of the first box I will loop the length of the value like this and assign value to other text boxes.


UserImage.jpg
vikas sharma
Champion

Hi,

So basically your requirement is to fill the otp automatically from sms or when user click on copy on otp message.

I think you should check below plugins : 

https://www.outsystems.com/forge/component-overview/7413/otp-autofill-plugin

https://www.outsystems.com/forge/component-discussions/2499/SMS+Cordova+Plugin

regards

2023-04-03 08-33-28
Lux Lee

Thank @Vikas Sharma I will try with SMS Cordova Plugin. I will update you later :D

UserImage.jpg
vikas sharma
Champion

Hi,

You should check with above plugins which I mentioned that if they can solve your purpose.

2026-03-12 06-20-48
KUNDAN CHAUHAN
Champion

Hi Luc Le ,

There are many threads about this subject, one of them i share  try to see  answer to see the next steps you should take ,

https://www.outsystems.com/forums/discussion/70812/how-to-create-otp-input-field-with-multiple-input-boxes/

Hope it help you

Kind Regards,

Kundan Chauhan

UserImage.jpg
vikas sharma
Champion

@KUNDAN CHAUHAN : I think he is asking about autofill and layout is already there. Wants when click on copy all 6 digits should fill in 6 boxes.

@Luc le : Please correct me if I am wrong.

2023-04-03 08-33-28
Lux Lee

hi @Vikas Sharma , yes you are right. I just asking about autofill from SMS.

2020-08-31 05-04-40
Rahul Jain
OTP.oml
2023-04-03 08-33-28
Lux Lee

Thank @Rahul Jain , But I need the autofill for 6 textboxes.

2023-04-03 08-33-28
Lux Lee
Solution

I found a solution for it:

When the user clicks on OTP number on the top of the keyboard, that OTP will be assigned to the first box variable so that in OnChange of the first box I will loop the length of the value like this and assign value to other text boxes.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.