I noticed that when I capitalize with css text-transform:capitalize; and send this input with an http-post to another page, it won’t affect the value for this form-element.
- Why ?
- Is there a workaround for it without using php’s
ucwords()?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The answers, in brief:
Because CSS changes only the presentation of the data, not the underlying data itself.
Not that I can think of. Unless you’re willing to use JavaScript to capitalize individual words prior to form submission?
If, however, you’re willing to use JavaScript:
JS Fiddle demo.
This is, obviously, a much simplified demonstration of the capabilities, but is, I think, enough to get you started, albeit only if you intend to go this route. And, if you do, remember that you must validate on the server-side too.
References:
.replace().