cformsII Support Forum
Current User: Guest *Frequently Asked Questions*
Search 
Search Forums:


 




Capitalize First Letter / Adding "ucfirst"

Add a New Topic Reply to Post
Post

Chris Me - Guest

7:54 pm - June 10, 2008

Hi,

One feature I would love: capitalize the first letter of an input name, so that the auto-response is more professional.

Right now my auto-response reads,

"Dear chris, Thank you for your note ... "

Any chance you could run the "ucfirst" function in the php to make it read,

"Dear Chris, Thank you for your note ... "

It wouldn't take long to add, but would really help since so many people forget to capitalize their names when they submit a form.

Thanks!

Please replace the ??? with your data!

  • Your URL: chrismeserole.com
  • The browser used: firefox 3
  • cforms version: ii
  • Your Wordpress version: 2.5.1

[desc]:
_

Oliver - Admin

8:12 pm - June 10, 2008

posts 3549

so that the auto-response is more professional...

The auto response otherwise would be as professional as the user was when entering a lower case name :-)

Anyway, you can do that already by using the my-functions.php feature and "filter" - post process the form data, capitalize the name and have cforms pick up the changes.

This way you can apply your own input logic as it would impossible for me to determine when an input field is a name field or otherwise needs to be capitalized.

Of course you can also 'force' the user to enter a first capital letter by using a regular expression, e.g. ^[A-Z]{1}[A-Za-z \.\-]+

Add a New Topic Reply to Post


Reply to Topic: Capitalize First Letter / Adding "ucfirst"
PLEASE READ THE FAQs FIRST! THANK YOU.

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 10 + 12        (Required)

Topic Reply:


 
© Simple:Press Forum - Version 3.1.3 (Build 356)