Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Masking copy+paste

    Type in "Smart Client" in the first name. Now double click in the field and copy the value and paste into notepad - the value that is pasted is "Smart_client___" - How do I suppress the prompt character? It is not part of the data.

    Code:
    
    isc.DynamicForm.create({
        width: 400,
        fields: [
            { name: "firstName", title: "First name", type: "text",
              mask: ">?<??????????????", hint: "&gt;?&lt;??????????????"},
            { name: "lastName", title: "Last name", type: "text",
              mask: ">?<??????????????", hint: "&gt;?&lt;??????????????"},
            { name: "state", title: "State", type: "text",
              mask: ">LL", hint: "&gt;LL"},
            { name: "phoneNo", title: "Phone no", type: "text",
              mask: "(###) ###-####", hint: "(###)&nbsp;###-####", hintInField: true}
        ]
    });

    #2
    Unfortunately, we have no control over this due to browser security constraints. If you have a use case where the pasted value isn't trivially corrected, we would recommend a button that pops up a TextArea containing the values that the user is likely to want to copy.

    Comment


      #3
      Right, forgot about that - but what about just the highlighting? Is there any way to control even that?

      Comment


        #4
        What do you mean by the hiliting in this case? If you mean controlling what's selected, there's setSelectionRange() on TextItem.

        Comment

        Working...
        X