My advice? Drop that #2 requirement right now.

Humans are not machines. Humans have interruptions, humans think out of order, humans don't like it when they have no choices.

What if they just were looking for some other feature, but now they're trapped? What if they don't know what a MAC address is? What if they know it, but remembered that they need to do something else first?

The #3 requirement should serve well enough to fit your intention. If the MAC is invalid when they try to COMMIT their new entry, then you can rightfully balk. Until then, let them do whatever they want to do with the widgets.

Separately, I am not a fan of string-of-pearls input widgets. Dotted Four IP addresses, MAC addresses, credit card numbers, social security numbers, phone numbers, etc. If you feel you have to "automate" the Tab key because there are so many fields, then you have clearly been thinking the wrong direction. Offer one field with much smarter validation. Let computers do what computers are good at, but give humans a human interface. If that's not enough to convince you, how would you "cut" or "paste" a full MAC address with this scheme?

--
[ e d @ h a l l e y . c c ]


In reply to Re: Entry widget questions by halley
in thread Entry widget questions by snotnose

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.