some ideas...

use password fields, the entered patient id will show up as '*' and they can't cut and paste from one field to the other (but they could cut from another application and paste into both...).

if your patient id is fixed length, (say N characters) then use N seperate input fields and use some javascript to automatically move the focus to the next field after a key is pressed. don't know how cut and paste would work with this but hopefully a key-press is an event and a cut and paste is also an event so if you only accept one character per event cut and paste won't work...

or along the same line, in just plain text entry fields, have event triggered javascript that adds a non-display character (or even a space) after every keystroke, if they cut and paste then the second textbox will have the extra characters and you can throw an error.


In reply to Re: prevent pasting into a CGI textbox by Anonymous Monk
in thread prevent pasting into a CGI textbox by nosbod

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.