Morris2 Posted October 4, 2011 Share Posted October 4, 2011 Hi. How do I arrange, that only capital letters are written into my HTML form, no matter if the user uses capital letters or not? Regards Morris. Link to comment https://forums.phpfreaks.com/topic/248426-how-do-i-arrange-that-only-capital-letters-are-written-into-my-html-form/ Share on other sites More sharing options...
awjudd Posted October 5, 2011 Share Posted October 5, 2011 If you are storing it in the database or somewhere you could always just use PHP's strtoupper (http://php.net/strtoupper) or if you want to maintain the user's input (the correct thing to do) you could just use CSS to make it uppercase (text-transform:uppercase) when displaying it. ~juddster Link to comment https://forums.phpfreaks.com/topic/248426-how-do-i-arrange-that-only-capital-letters-are-written-into-my-html-form/#findComment-1275891 Share on other sites More sharing options...
haku Posted October 5, 2011 Share Posted October 5, 2011 You do it with javascript. Check the user input, and convert it to a capital if it's not. Link to comment https://forums.phpfreaks.com/topic/248426-how-do-i-arrange-that-only-capital-letters-are-written-into-my-html-form/#findComment-1275921 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.