Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

How can you disable the paste function in a dynamic text box in a livecycle form?

Avatar

Former Community Member

HI

I have created several dynamic forms using livecycle.  I need to turn off the paste function in the text boxes to avoid staff from copying notes they have written previously and pasting them into a new document.  I have looked online and am not able to come up with any answers.  Maybe some sort of javascript.  They will still need to be able to type into the text box.

Thank you for your help

Mark

4 Replies

Avatar

Level 10

Hi,

this is indeed possible.

You can check if the change value is larger than one character.

If so, the change value is pasted from the clipboard.

All you need is to add this Script (FormCalc) to the change event of your field.

if (Len($event.change) gt 1) then

          $event.change = ""

endif

Avatar

Level 2

Hi,

Did you get the solution for this?

I have a similar requirement, which has e-mail and confirm e-mail fields.

Thanks

Tanmay