How to capitalize first letter in text field

Hi,
Could someone let me know how to capitalize the first letter in a text field? For example, if I was having users enter a first name, I would want to capitalize the first but not subsequent letters. I appreciate any help you can give. Thanks.
Jeff

I was wondering if you can show me how to complete the script with "At()" function.I struggled a lot trying to implement javascript to capitalize the first letter of each word in a text box but apperantly I'm missing something. I appreciate your respond!
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
function capitalizeMe(obj) {
         val = obj.value;
         newVal = '';
         val = val.split(' ');
         for(var c=0; c < val.length; c++) {
                 newVal += val[c].substring(0,1).toUpperCase() +
val[c].substring(1,val[c].length) + ' ';
         obj.value = newVal;
// -->
</SCRIPT>

Similar Messages

  • How to Add/Concatenate to a text field, values selected in a combo box

    I have a combo box form field that allows the user to select a value from a list and click on an Add button. The Add button should add/concatenate the vaue selected to a text field in order to create a list of values selected. I'm not sure how to do this using Javascript in Acrobat? I know I need to add the javascript to the Add button's Mouse Up action. Any help would be greatly appreciated. Thanks!

    Thanks so much - it works!
    >>> "Gilad D (try67)" <[email protected]> 9/25/2013 9:16 AM >>>
    Re: How to Add/Concatenate to a text field, values selected in a combo box created by Gilad D (try67) ( http://forums.adobe.com/people/try67 ) in JavaScript - View the full discussion ( http://forums.adobe.com/message/5712118#5712118 )
    Let's say the text field's name is "Text1", and the combo is called "Combo1". You can then use this code as the MouseUp script of the Add button:
    var f1 = this.getField("Text1");
    var f2 = this.getField("Combo1");
    if (f1.value=="") f1.value = f2.value;
    else f1.value = f1.value + ", " + f2.value;
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5712118#5712118
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5712118#5712118
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5712118#5712118. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in JavaScript by email ( mailto:[email protected].com ) or at Adobe Community ( http://forums.adobe.com/choose-container!input.jspa?contentType=1&containerType=14&contain er=3286 )
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • How to create pdf files with text field data

    how to create pdf files with text field data

    That looks like it should work, but it doesn't.
    I opened the PDF I had created from Word in Acrobat (X Pro). Went to File > Properties. Selected "Change Settings". I then enabled "Restrict editing...", set a password, set "Printing Allowed" to "none", "Changes Allowed" to "none", and ensured that "Enable copying of text..." was disabled.
    I saved the PDF file, closed Acrobat, opened the PDF in Reader, and I was still able to select text and graphical objects.
    I reopened the PDF in Acrobat, and the document summart still shows everything as allowed. When I click on "show details" (from File > Properties) it shows the correct settings.
    Any ideas?

  • How to create a custom shape text field?

    I have a diamond shape movieClip and I need add a text Field in the same shape format.
    Now how to create a diamond shape text field?
    Please help me!
    Thanks,
    Jafy

    there's no easy way to do that in flash.  that's an advanced task.

  • How to capitalize 1st letter ??

    I'm curious, if I have a form that allows users to enter
    their name/address,
    etc, how can you specify that the first letter in the
    word/name is a
    capital?
    Users have been just entering: bob smith, when I'd like to
    enter it in my
    db as Bob Smith......
    Suggestions are appreciate..... can it be done with a regex
    expression? If
    so, any ideas how??
    Thanks!

    maybe something like:
    http://www.mediacollege.com/internet/javascript/text/case-capitalize.html
    http://psacake.com/web/jc.asp
    or with CF you can check at CFLIB
    http://www.cflib.org/index.cfm
    HTH
    Tim Carley
    www.recfusion.com
    [email protected]

  • How to put cursor in a text field

    hi,
    I have a text field in my jsf page.By default I want to put the cursor into this text field.when a letter is entered into this text field,the data table below this text field must change depending upon the value entered into the text field.After this change also,the cursor must be in the same text field.
    how it is possible.
    when I entered any letter in this field,there is a call to the server.the cursor must be in that textfield after the call.

    Use DOM+JS.
    With element.focus() you can set the focus on the desired element.
    With the 'onkeypress' attribute you can execute some piece of Javascript on every key press, for example submitting the form or doing an AJAX request.

  • How to add hint in a text field

    Hello,
    How do I add a hint in a text field to let the user know what to type in and the hint will disappear when they click on it?

    In the Accessibility palette (shift - F6 if it is not visible) fill in the tooltip field. Now when you hover over the field your tooltip will appear.

  • How do you auto-populate a text field based on entries in other text fields?

    I would like to be able to have a text field that populates as "Complete" or "Incomplete" based on whether all the mandatory text fields have been filled out or not.
    For example, if the "First Name," "Last Name," and "City" text fields are not filled out, the "completion status" text field will show "Incomplete" and once they are filled out, the "completion status" text field will turn into "Complete."
    How would I do this using javascript? I've searched the web for a tutorial, but most of the results seem to be dropdown-centric.
    Please point me in the right direction!

    Try the script below. I put this on the calculate event for Field1
    if(FirstName.rawValue == null || LastName.rawValue == null || City.rawValue == null){
    Field1.rawValue = "Incomplete"
    else
    Field1.rawValue = "Complete"

  • How do i detect am empty text field condition?

    Hi im a newbie with swing. I have a small problem. I have a text field. When user types some text into it i display a pane in the GUI. When the text field is cleared, i need to hide the pane. So basically i need to detect the condition when the text field is empty.
    I tried one approach in which i capture key press event. So when user presses the backspace key to clear the text field, the event is fired. In the keyPress method, i check if text field is empty using getText() method.
    So my keyPressed method is as follows:
    keyPressed()
    if(textField.getText().trim().equals(""))
         // make my pane invisible here
    This does work , however it requires one additional key press before detecting that the text field is empty. For ex if there are 3 letters in the text field, i require to press the backspace key 4 times to hide the pane. I think this is because the key presses event occurs first & is handled & after that the GUI is repainted with the new data.
    Any idea how i can tackle this? Or is there any other way in which i can detect the moment the text field becomes empty?

    Demo:
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class DocumentListenerExample {
        public static void main(String[] args) {
            final JLabel state = new JLabel();
            final JTextField field = new JTextField(10);
            field.getDocument().addDocumentListener(new DocumentListener(){
                public void insertUpdate(DocumentEvent e) {
                    change();
                public void removeUpdate(DocumentEvent e) {
                    change();
                public void changedUpdate(DocumentEvent e) {
                private void change() {
                    String text = field.getText().trim();
                    state.setText(text.length()==0 ? "empty field" : "non-empty field");
            JPanel cp = new JPanel(new GridLayout(1,2,8,8));
            cp.setBorder(BorderFactory.createEmptyBorder(8,8,8,8));
            cp.add(field);
            cp.add(state);
            field.setText("enter your text here");
            JFrame f = new JFrame("DocumentListenerExample");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setContentPane(cp);
            f.pack();
            f.setLocationRelativeTo(null);
            f.setVisible(true);
    }

  • How to append yyyy to a text field

    I am using database 11.1 and APEX 3.0. The user requirement is to auto append the year to a text field where there is a popup date picker. The application blows when a PLSQL function is added to the fields post calculation. How should I append yyyy to a text field with mm/dd or mm/dd/ or mm/dd/yy to create a date mm/dd/yyyy. Dates with dd/mm/yyyy need no year appended.
    Edited by: user478244 on Mar 24, 2010 3:49 PM

    Here is my first stab at achieving what you described. Place this code in an application process and have it run on submit before computations and validations. I am sure there are some bugs with this as I have not tested it very thoroughly.
    declare
       date_parts wwv_flow_global.vc_arr2;
       l_save_val varchar2(20);
       l_delim    varchar2(1) := '/';
    begin
      -- for each date picker on the current page
      for x in (select item_name,
                       v(item_name) item_value
                  from apex_application_page_items aapi
                 where aapi.application_id = :app_id
                   and aapi.page_id = :app_page_id
                   and upper(display_as) like 'DATE PICKER%'
                   and v(item_name) is not null)
      loop
        -- split the value of the date picker into tokens for each '/' found.
        date_parts := htmldb_util.string_to_table(x.item_value,l_delim);
        -- if there is not three tokens (ex: mm/dd) or if the last token is not four characters long (ex: 09)
        if date_parts.last != 3 or length(nvl(date_parts(3),0)) != 4 then
          -- set the third token (the year token) to the current year (ex: 2010)
          date_parts(3) := to_char(sysdate,'YYYY');
          -- concatinate all token parts together, separated by '/'
          for i in date_parts.first..date_parts.last loop
            l_save_val := l_save_val || date_parts(i) || l_delim;
          end loop;
          -- save the new value to the date picker item.
          apex_util.set_session_state (x.item_name, rtrim(l_save_val,l_delim));
        end if;
      end loop;
    end;
    edit
    I replaced the hard coded app id and app page id values with their corresponding bind variables.
    Cheers,
    Tyson Jouglet
    Edited by: Tyson Jouglet on Mar 24, 2010 5:59 PM

  • How to LINK two or more Text Field

    I have already asked once to get help with creating a link between two text fields (two fields created with a text tool) so that when text reached the end of one text field it will simply go into another. The given explanation was not specific enough. If you know how to do this and are willing to help, would you PLEASE give me SPECIFIC instructions, step-by-step on how this is done. Please do not assume that I have worked with the Adobe Acrobat program all my life. Thanks :)

    Stevan,
    It's almost laughable that I should give instructions since I know very little about JavaScript, but here goes . . .
    Be sure to follow George's instruction precisely. Make three text fields, which I'll call Text1, Text2, and Text 3.
    1) For the first text field, in the Options tab, remove Multi-line and remove Scroll long text. In the Format tab, in Custom Keystroke Script, click the Edit button, and enter the following:
    var t1=this.getField ("Text1");
    if (event.fieldFull)
    getField("Text2").setFocus();
    2) For the second text field, in the Options tab, remove Multi-line and remove Scroll long text. In the Format tab, in Custom Keystroke Script, click the Edit button, and enter the following:
    var t2=this.getField ("Text2");
    if (event.fieldFull)
    getField("Text3").setFocus();
    Click the Hand tool and start entering text in the first text field. When you run out of space in the first text field it should flow to the second text field and then to the third.
    As noted in my previous message of October 7, 8:05, there are some very severe limitations to this technique which I've not been able to overcome. I was hoping that George might have a suggestion to offer about the limitations, but since we haven't heard from him, maybe there are no workarounds for the limitations.

  • How can I create an expandable text field in Acrobat XI?

    I am trying to create a text field that expands with the text that is entered. I have found several forums saying to use subforms, but how do I create those? Does anyone know where I can find a really good turtorial for XI?

    There are two type of PDF forms: AcroForms that can be created with Acrobat, and XFA forms (static and dynamic) that can be created with LiveCycle Designer. Since the kind you want (dynamic XFA) cannot be created with Acrobat, you'll have to use LiveCycle Designer. Said another way, AcroForms do not support fields that automatically expand based on content. If you want to ask about dynamic XFA forms, you can ask in the LiveCycle Designer forum: http://forums.adobe.com/community/livecycle/livecycle_modules_and_development_tools/livecy cle_designer_es

  • How to make words in a text field change color in play mode by clicking on them?

    I have a text field on a slide, wanting to change the color of certain words randomly by clicking on them in play mode. I dont know what word in what order will be mentioned by the audience, so I can not set a fixed order in advance.
    Any help is appreciated.
    Thanks a lot.

    create a slide with all the text boxes in place
    duplicate the slide as many times as you have text boxes you want to change colour
    on the second slide, change the colour of one of the text boxes as required
    on the first slide, select one of the text boxes
    open the inspector:     Inspector > Hyperlink >
               enable as hyperlink > link to slide > click slide button > select the correct slide from the drop down menu
    in play mode, clicking on the hyperlink will display the appropriate slide with that text changing colour
    repeate the process for each text box

  • How to add supercripts in a text field

    How to add superscripts symbols like copyright,trademark and registered symbols in a static text field in the Livecycle designer 8.2?

    You can copy-and-paste special characters directly into a text object from a text editor such as MS Word. Alternatively, you can insert the hex character reference into the XML source for the applicable text object instance. For example, to add a copyright symbol, go to the XML Source tab and insert the reference &#x00A9; into the XML node <value><text>Foobar&#x00A9;</text></value>.
    Steve

  • InDesign CS6 how to set justification for form text field?

    Hi everyone,
    I've been playing with the ability to create form for PDF file but I haven't figure out how to set a center justification for a text field.  By default it's left.  Same thing for font, the one selected in InDesign while creating the form isn't used when editing the form in Acrobat.
    Do I need to create a paragraph style with a specific name to preserve both attributes?
    Thanks.

    InDesign CS6's forms features are great, but you're looking as version 1.0 of the feature. Those features cannot be set in InDesign.
    Furthermore, if you try to pick a font other than the standard ones at the top of the menu, don't expect that your form users will be able to pick those fonts when they open up the form in Reader or Acrobat. I'm pretty sure that custom fonts are not stored in the PDF form.

Maybe you are looking for

  • Job console messages in log file

    Hi All, Is there a log file which logs the job console messages...where is it located ...we are on V11.1.2.,,....We have a issue with Job console validation......when a EPMA planning application is validated...it has some errors....but when we try to

  • How to hear the 5.1 sound when watching some TV chanels that are transmited with A

    Hi all, I've got some question that i haven't found an answer to on goole, finnaly i've decided to try to search at source - at Creative site. I've read many post on this forum but it seems there isn't answer for my problem. I have got:? TV satellite

  • Import TXT to oracle table

    Hi All, I`m using this script to import TXT to oracle table. create table test ( pol_no varchar2(10) organization external ( type oracle_loader default directory ri_data_dir access parameters ( nobadfile fields terminated by ',') location ('policyno_

  • Win 8(64) and PSE11 shutting down

    I was just using PSE11 Editor on my Win 8(64) computer yesterday and it was working fine.  Today, I open PSE11 and it opens fine, but the minute I click on File > Open to open an image, it shuts down o me. Any idea what's going on?  Haven't changed a

  • Apple's New Rules on Apps

    Did Apple just blink?  See http://www.apple.com/pr/library/2010/09/09statement.html.  Sounds like they are now going to allow apps written in whatever tool.  Is this good news for Captivate???? Adobe stock is up 12% so far today.