Announcement

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

    Disable copy+paste in textfield

    Is there any way to achieve this with SmartClient? I need this behaviour for fields such as email.

    #2
    First, reconsider doing this at all - sounds like something that has no actual function but will annoy the user.

    If you need to do it for some reason, you want to add a handle for the showContextMenu event on the form and cancel it (via returning false) for a right click on the specific field.

    Comment


      #3
      I think it is a valid use case - if a form is asking for an email address for one field and verification of that email in another field, you wouldn't want the user to copy+paste from the first field in case they made a mistake in typing in the email address in the first place.

      To get the currently right-clicked element, does it suffice to get the current focused field in that dynamic form?
      Last edited by acarur01; 13 Mar 2012, 10:44.

      Comment


        #4
        Unless they are copying and pasting from elsewhere, where they know there are no typos.

        Comment


          #5
          Ok - you skipped over my question - To get the currently right-clicked element, does it suffice to get the current focused field in that dynamic form?

          Comment


            #6
            Note that if you edit an existing post to add a new question, we don't see a notification of this.

            Right-click should cause focus, yes. But again, as we've noted, we think implementing this enforcement at all is a very bad idea.

            Comment


              #7
              Ah, ok. I thought maybe you would read the final post. Will know for next time :)

              And yes, I have brought this up but the client is still asking for this functionality.

              Comment

              Working...
              X