Copy paste one output to multiple input boxes.

I have a mobile application where a user can enter a 4 digit OTP in 4 separate input boxes with character limit as 1.

Is there any way to allow the user to copy-paste in this case? For example: if the copied input is "4567" then on  paste, the 4 should go to the first input box, 5 to the second input box and so on.

mvp_badge
MVP

Hi Amol,


You can have a field where you past the 4567 value and add an OnChange handler on that input.

On that OnChange screen action you can split the 4567 into the different values (4, 5, 6 and 7) and assign each value to the corresponding input variable.


Regards,
João

Champion

Hi Amol

Maybe it's not the solution you want, But you can achieve this by using javascript

Please refer to Url below.
https://stackoverflow.com/questions/55189763/how-do-paste-to-multiple-input

Kind Regards

Hi Amol,

Both suggestions are great, kindly mark one as the solution that you think is best fit to your requirements.

Thank you and happy low-coding.. ;)

Chris

Hi Amol, 

I hope this will be helpful to you.

https://rahuljain877.outsystemscloud.com/OTP/Screen1

Regards

--RJ--

OTP.oml

I want to paste directly from to the 1st of the 4 input boxes, without inputting it in a separate textbox.

How can that be done?

Champion

Please refer to my early reply. Using javascript you can achieve it.

https://www.outsystems.com/forums/discussion/68059/copy-paste-one-output-to-multiple-input-boxes/#Post272416


I hope this will be helpful to you. Please test by below URL.


https://rahuljain877.outsystemscloud.com/OTP/Screen1

Regards

--RJ--

OTPCopyPaste.oml

Hi ,

Please find attached aml for traditional web.

https://rahuljain877.outsystemscloud.com/CopyPaste1/WebScreen1.aspx

CopyPasteTraditional.oml

Please find attached oml 

CopyPasteCSS.oml

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