Preventing the user from copying and pasting from one text field to another.

Hi All.

How can we prevent a user from copying data from a text field and pasting it to diffrent field?

Thanks.

  Discussion posts and replies are publicly visible

Parents
  • Hello Singh002,

    While I'm not aware of a way to disable an operating system's built in copy and paste capability, there are other strategies you can employ to keep data from being copied and pasted. Once a field is filled out, you can change the display value to asterisks so that the information can't be copied and pasted. See below code for example.

    I hope this helps.

    Malcolm


    load(
    local!customer1Address,
    local!customer2Address,
    a!formLayout(
    firstColumnContents: {
    a!textField(
    label: "Customer 1 Address",
    value: if(
    rule!APN_isEmpty(local!customer1Address),
    "",
    joinarray(repeat(len(local!customer1Address), "*"), "")
    ),
    saveInto: {
    local!customer1Address
    }
    ),
    a!textField(
    label: "Customer 2 Address",
    value: if(
    rule!APN_isEmpty(local!customer2Address),
    "",
    joinarray(repeat(len(local!customer2Address), "*"), "")
    ),
    saveInto: {
    local!customer2Address
    }
    )
    }
    )
    )
  • Just for your own edification, it's not necessary to write a custom rule for this. Appian actually has this functionality out of the box! The "masked" option for text fields will determine whether the text is masked on input.
Reply Children
No Data