Gossamer Forum
Home : Products : DBMan : Customization :

Stop ALL CAPITALS

Quote Reply
Stop ALL CAPITALS
(Sorry if I posted this elsewhere the other day! I'm sure I got a confirmation, yet now I can't find it anywhere, even searching by my user name.)

I need to allow input in some fields with several capitals (to allow for real names) but want to prevent someone accidentally leaving caps lock on (or intentionally SHOUTING ABOVE EVERYONE ELSE).

I've seen a few threads about converting upper case to lower case, or limiting upper case to the first character only.

Is there a simple way I can get all caps input in a field to invoke an error message requiring the user to return and correct the entry?

TIA,

Andy
Quote Reply
Re: Stop ALL CAPITALS In reply to
Andy,

There are three responses in the following Thread (that you posted in the Perl and CGI Forum):

http://www.gossamer-threads.com/scripts/forum/resources/Forum8/HTML/000839.html

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Stop ALL CAPITALS In reply to
Thanks!

Sorry for the brain malfunction.

Andy
Quote Reply
Re: Stop ALL CAPITALS In reply to
I've been trying to use the advice of Gordon Clemmons in the Perl/CGI forum and apply it to DBMan. But I'm getting nowhere fast.

My aim is to add new lines to my html.pl so a user is sent to sub html_add_failure or sub html_modify_failure (with an explanatory error message) if a field's input is in upper case (except that I'll allow the first letter of each word to be capitalised).

The following is what I've been trying to get my head round:

foreach (split(/ /, $your_text_field) {
&do_failed if (substr($_, 1) =~ /[A-Z]/));
}

Having thought I was learning, I'm at a complete loss how to tailor it to take the user to &html_add_modify_failure, how to incorporate an error message and where to place the lines in html.pl! Not sure if this is me or just Friday afternoon (GMT) feeling after too many long days.

I'd really appreciate being steered in the right direction.

TIA,

Andy