CASE PROBLEM

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
adsegzy
Forum Contributor
Posts: 184
Joined: Tue Jul 28, 2009 9:26 am

CASE PROBLEM

Post by adsegzy »

Hello Success-Oriented People,

I have a form. when my visitors are filling the form, i want some fields to start in tittlecase, i want in some fields to be uppercase without the visitor turning on the CAPLOCK key on the keyboard and some other fields to be lowercase. how do i do it?

Regards,
Olusegun
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: CASE PROBLEM

Post by requinix »

With JavaScript. A few methods, like intercepting user input or reformatting the string when focus leaves the box.

Be advised: many people don't like/get confused when they type something and see something else show up instead.
oliur
Forum Commoner
Posts: 29
Joined: Tue May 26, 2009 3:43 am

Re: CASE PROBLEM

Post by oliur »

you could use two different css class for form input fields.

Code: Select all

 
<style type="text/css">
.upper{text-transform:uppercase; color:#FF3333;}
.lower{text-transform:lowercase;}
</style>
</head>
 
<body>
<form action="" method="get">
<input class="lower" name="input1" type="text" />
<input class="upper" name="input2" type="text" />
</form>
</body>
 
Post Reply