208
Views
9
Comments
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.

2018-10-29 08-31-03
João Marques
 
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

2021-01-19 14-07-32
Tom Zhao

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

2024-10-25 09-14-42
Christopher Bautista

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

2020-08-31 05-04-40
Rahul Jain

Hi Amol, 

I hope this will be helpful to you.

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

Regards

--RJ--

OTP.oml
UserImage.jpg
Amol Rane

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?

2021-01-19 14-07-32
Tom Zhao

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

2020-08-31 05-04-40
Rahul Jain


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


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

Regards

--RJ--

OTPCopyPaste.oml
2020-08-31 05-04-40
Rahul Jain

Hi ,

Please find attached aml for traditional web.

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

CopyPasteTraditional.oml
2020-08-31 05-04-40
Rahul Jain

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.