How to Capitalize the first letter in a text field?

I have a text field of first_name and one of last_name.  I want to make sure not matter what format the user inputs the the first letter is Capitalized and the rest is lower case.  Can someone tell me how this is done?  Thanks!

Rick4209 wrote:
I have a text field of first_name and one of last_name.  I want to make sure not matter what format the user inputs the the first letter is Capitalized and the rest is lower case.  Can someone tell me how this is done?  Thanks!
It depends on what you want to do with the name. If this is for inserting the name in a database and you're using PHP, it's very simple:
$name = 'DaVID';
$formatted = ucfirst(strtolower($name));
echo $formatted; // outputs 'David'
This nests two functions: the inner function, strtolower(), converts everything to lowercase, and the outer function, ucfirst(), converts the first letter to uppercase.

Similar Messages

  • How to Capitalize the first letter or an entire word using a shortcut on the keyboard just like in microsoft that uses shift+F3

    please how can one How to Capitalize the first letter or an entire word using a shortcut on the keyboard just like in microsoft that uses shift+F3

    What do you mean there was "no effect?" I'm not aware of any effects.
    It looks like that Service is also in the App Store. From their screen shots, the services are prefaced with WordService:
    You can see an example in the App Store for their app: App Store
    After installing, you should now have those text services in your Services menu. You can then add shortcuts in the Keyboard System Prefs.
    Most Apple apps have a Transformations menu in the Edit menu. You can Make upper, lower, and Initial caps with those. I would stick with Word Services, but you can make Application Shortcuts for the items in the Transformations menu.
    Again, in Keyboard System Prefs, Under Applications, Click the Add button on the right side pane.
    Set it for All Applications
    Enter the menu command exactly as they appear in the Transformation menu (separate entries for each),
    Make Upper Case
    Make Lower Case
    Capitalize
    Give them a shortcut.

  • How to capitalize the first letter of each  word in a sentence?

    Can anyone please explain how to split a sentence at a comma, or space or hyphen in to words and capitalize the first letter of each word. But I don't know how many words the sentence contains.

    HI,
    data : begin of itab occurs 0,
             words(40),
             end of itab.
    data : v_sentence(1000).
    data : lv_firstchar.
    split v_sentence at ',' into table itab.
    loop at itab.
    translate itab-words+0(1) to upper case.
    modify itab index sy-tabix.
    endloop.

  • How to Capitalize the First Letter in Every Word in Mysql

    Hi,
    I have been trying to tidy up a massive database where visitors have been sloppy when entering text. The main thing I want to do is to Capitalize The First Letter In Every Word In Mysql.
    I have found the code below in PHP but it keeps finding an error on the WHILE line:
    <?php ini_set('display_errors', '1'); ?>
    <?php require_once('Connections/maison_connection.php'); ?>
    <?php
    $result = mysql_query ("SELECT column, id FROM table");
    while ($row = mysql_fetch_array($result)) {
    $id = $row["id"];
    $column2 = ucwords($row["column"]);
    $query2 = "UPDATE table SET column = '$column2′ WHERE id = '$id'";
    mysql_query($query2);
    ?>
    My table is called MailingList and the Column is called Name, so I have altered the script to this: but it still shows the same WHILE error:
    <?php ini_set('display_errors', '1'); ?>
    <?php require_once('Connections/maison_connection.php'); ?>
    <?php
    $result = mysql_query ("SELECT Name, id FROM MailingList");
    while ($row = mysql_fetch_array($result)) {
    $id = $row["id"];
    $Name2 = ucwords($row["Name"]);
    $query2 = "UPDATE MailingList SET Name = '$Name2′ WHERE id = '$id'";
    mysql_query($query2);
    ?>
    Any ideas??

    I got it to work this way in SQL: I am SURE there is an abbreviated way to do it, but at least it works
    UPDATE MailingList SET Name = replace(Name," a"," A");
    UPDATE MailingList SET Name = replace(Name," b"," B");
    UPDATE MailingList SET Name = replace(Name," c"," C");
    UPDATE MailingList SET Name = replace(Name," d"," D");
    UPDATE MailingList SET Name = replace(Name," e"," E");
    UPDATE MailingList SET Name = replace(Name," f"," F");
    UPDATE MailingList SET Name = replace(Name," g"," G");
    UPDATE MailingList SET Name = replace(Name," h"," H");
    UPDATE MailingList SET Name = replace(Name," i"," I");
    UPDATE MailingList SET Name = replace(Name," j"," J");
    UPDATE MailingList SET Name = replace(Name," k"," K");
    UPDATE MailingList SET Name = replace(Name," l"," L");
    UPDATE MailingList SET Name = replace(Name," m"," M");
    UPDATE MailingList SET Name = replace(Name," n"," N");
    UPDATE MailingList SET Name = replace(Name," o"," O");
    UPDATE MailingList SET Name = replace(Name," p"," P");
    UPDATE MailingList SET Name = replace(Name," q"," Q");
    UPDATE MailingList SET Name = replace(Name," r"," R");
    UPDATE MailingList SET Name = replace(Name," s"," S");
    UPDATE MailingList SET Name = replace(Name," t"," T");
    UPDATE MailingList SET Name = replace(Name," u"," U");
    UPDATE MailingList SET Name = replace(Name," v"," V");
    UPDATE MailingList SET Name = replace(Name," w"," W");
    UPDATE MailingList SET Name = replace(Name," x"," X");
    UPDATE MailingList SET Name = replace(Name," y"," Y");
    UPDATE MailingList SET Name = replace(Name," z"," Z");

  • How to capitalize the first letter

    Yesterday, I upgraded my operating system and pages on my Mac.  However, I can't capitalize the first letter after every sentence.  Can you please help me with this problem of mine? 
    Thank you,
    Vic.   

    I have the same problem. For the previous Pages, the problem is solved by +Menu > Preferences > Auto-Correction Preferences > check Fix Capitilization+. For this update I cannot find any solution!

  • Auto-Capitalization: How can I set Pages v5.01 to auto-capitalize the first letter of the first word in a sentence and to automatically change lower case "i" to "I" appropriately. I'm unable to find a menu that offers me these.

    Auto-Capitalization: How can I set Pages v5.01 to auto-capitalize the first letter of the first word in a sentence and to automatically change lower case "i" to "I" appropriately. I'm unable to find a menu that offers me these.

    Gavin Lawrie wrote:
    Once it had been established that the iWork rewrite had resulted in some features being lost and others broken, and once Apple had acknowledged the concerns* and suggested they are working on fixes**, I'm not sure what else there is to achieve.
    You are writing that in the perspective of having read about it here already. Repeated often enough that you encountered it somewhere in the posts.
    Users are flooding in here and don't know any of this. Of course we have to repeat everything endlessly.
    Because I like to give precise, understandable and workable answers to repeated questions, and Apple doesn't allow sticky posts here, I created a separate forum which users can consult to look up real answers, and contribute for themselves if they have something valuable to add:
    http://www.freeforum101.com/iworktipsntrick/
    There is a section purely devoted to Pages 5. Add whatever answers you feel will lighten the problems of Apple's 'upgrades'.
    Peter
    * Where have they acknowledged anything?
    ** They have barely anything listed, compared to the massive list of deleted features, and nothing but an extraordinarily long time frame considering they created the problems here and now. Apple has not said they will do anything at all about fixing the real issues, the biggest of which is that the new iWork apps break virtually all the work of existing users.

  • How to enable capitalize the first letter?

    As the title said, is there a way to make mac capitalize the first letter universally in the system, in the textedit, mail, .....?? Just like what iphone and ipad can do. Any ideas are welcome. Thank you.

    Gavin Lawrie wrote:
    Once it had been established that the iWork rewrite had resulted in some features being lost and others broken, and once Apple had acknowledged the concerns* and suggested they are working on fixes**, I'm not sure what else there is to achieve.
    You are writing that in the perspective of having read about it here already. Repeated often enough that you encountered it somewhere in the posts.
    Users are flooding in here and don't know any of this. Of course we have to repeat everything endlessly.
    Because I like to give precise, understandable and workable answers to repeated questions, and Apple doesn't allow sticky posts here, I created a separate forum which users can consult to look up real answers, and contribute for themselves if they have something valuable to add:
    http://www.freeforum101.com/iworktipsntrick/
    There is a section purely devoted to Pages 5. Add whatever answers you feel will lighten the problems of Apple's 'upgrades'.
    Peter
    * Where have they acknowledged anything?
    ** They have barely anything listed, compared to the massive list of deleted features, and nothing but an extraordinarily long time frame considering they created the problems here and now. Apple has not said they will do anything at all about fixing the real issues, the biggest of which is that the new iWork apps break virtually all the work of existing users.

  • Capitalize the first letter?

    Is there a way in CF to capitalize the first letter of a
    word?

    cf_dev2 wrote:
    > One way is using string functions. Left() to grab the
    first letter and
    > UCase() to capitalize it. You can use Right() and Len()
    to grab the rest of
    > the word.
    >
    > You can see an example of something similar at
    cflib.org. But read the usage
    > on how it operates if you pass multiple words.
    >
    http://www.cflib.org/udf.cfm?ID=9
    >
    Perfect. Thank you!

  • Why doesn't mail capitalize the first letter of a sentence?

    How do I make "mail" capitalize the first letter of a sentence? If not WHY not? If not WHY hasn't anyone from Apple addressed this annoying problem?

    Hi thank you you for contacting Apple
    Enable or disable the automatic capitalization feature on the Apple iPhone, iPad or iPod Touch.
    1. Select Settings from the Home screen.
    2. Select General.
    3. Select Keyboard.
    4. Turn Auto-Capitalization to on (green) or off (white).

  • Is there a command to capitalize the first letter of each word?

    That is to say, can you capitalize the first letter of each word in a document like say, word? Or using the net?
    Thanks guys.
    (hope that makes sense.)

    Select the text, then Format->Change Case->Title Case (Word 2004).

  • Is there a way to auto capitalize the first letter of every word?

    I Like To Type In This Way. I Was Wondering If There Is A Setting That Will Automatically Capitalize The First Letter Of Each Word So That I Don't Have To Keep Hitting Shift Before Each First Letter.
    Thank You

    AdamMarshall wrote:
    Nice to see so many 'helpful' responses.
    This casing is useful for example, on an Address field. It would be good if the OS had this option for developers.
    I'm pretty sure it does as I've certainly had apps that, in certain fields, do use title case.

  • Capitalize the first letter after full stop.

    Since I m not a Java Programmer, my speciality is PERL. I m looking
    for a little support from any of the Javascripts Gurus here. Its
    going to take 5 or less minutes for you to solve this issue.
    I have a textbox and I want when users are typing in it. The word
    after full stop (.) will be capitalized just like MS-Word. I mean
    the begining of the new sentence with capital letter, users don't
    have to push "shift" button to capitalize the first letter after
    every full stop .
    thanks for your help.
    Any Ideas,
    Zeshan.

    Try Google. Have you heard of it? www.google.com
    do a search!

  • How to get the first letter alone in Upper case?

    SQL*Plus: Release 9.2.0.1.0 - Production on Thu Jan 15 11:13:44 2009
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options.
    Hi all,
    Sorry if i am posting this one as a clone. I want the first letter alone in UPPER case in the given data. Is there any specific SQL function to do it or can we do it in REGEXP?
    I have tried with this below one query.
    select Upper(substr('oracle code',1,1))||substr('oracle code',2) from dual;
    Oracle code
    Is anything better than this in performance wise? If so please help me.
    Thanks,
    Ram

    Hi,
    what if the string is like this
    SELECT INITCAP(substr('oracle code Error ', 1, instr('oracle code Error ', ' '))) ||
           substr('oracle code Error', instr('oracle code Error ', ' '), length('oracle code error '))
    FROM dual;

  • How to get the first letter in Name as INITAL

    I am trying to put the first letter of first name as INITIAL in a sp column but I am not able to get the exact result. Could anybody help me with that
    TIA

    Thanks for the reply
    But where do I find the LEFT in the formula field

  • How to set the Background Color of a Text Field in a Tabular Report.

    Hello,
    I tried to set the Background Color of a Text Field in a Tabular Report.
    But I was not able to change this colur.
    In the report attributes --> column attributes
    I tried already:
    1. Column Formating -- >CSS Style (bgcolor: red)
    2. Tabular Form Element --> Element Attributes (bgcolor: red)
    but nothing worked.
    Can anybody help me?
    I Use Oracle Apex 2.2.1 on 10gR2
    thank you in advance.
    Oliver

    in "Report Attributes" select the column to move to the "Column Attributes" page. In the "Element Attributes" field under the "Tabular Form Element" region enter
    style="background-color:red;"
    I will also check if there is a way to do this via the template and post here again
    edit:
    in your template definition, above the template, enter the following:
    < STYLE TYPE="text/css" >
    .class INPUT {background-color:red;}
    < /STYLE >
    (remove the spaces after the < and before the >)
    change "class" to the class that the template is calling
    (I'm using theme 9, the table has: class="t9GCCReportsStyle1" so I would enter t9GCCReportsStyle1)
    A side-effect of using this second version is that ALL input types will have a red background color--checkboxes, input boxes, etc.
    Message was edited by:
    TheJosh

Maybe you are looking for

  • ActiveX to open and close application

    I am new to LV (have 6.1).  What I want to do is open up an external application when a certain LV action is performed (like a boolean button, or something similar), minimize the LV application (will use Application Builder here), and close it when a

  • CAN NOT INSTALL ON THIS HARD DRIVE

    I am currently running 10.3.9 on my 450 Mhz G4 which has 640 MB SDRAM but when I try to install my Tiger CD's (actually looking for the Archive and install option) I get a message that I can not "install Tiger on this drive". I own the CD's and actua

  • Graphics don't run in Reports

    Hi, when i run a report in Developer 2000 v1.32 than contains a graphics display in a client pc, the report generate a error. Which files should i install in the client machine to run Oracle Graphics displays ? Thanks.

  • My screen is very dim what do i do?

    i have a very dim screen and im not sure what to do

  • Can i make routers of different series while making my end node of different series

    Hi everyone, I am using 9792 programmable ethernet gateway and nodes (3202,3212,3226). rightnow, i am acquiring my data from 3202(end node). can i make the routers using the node 3212 (thermocouple node) and 3226 (RTD/Voltage node). will this work or