How can I use a script in a Livecycle Designer form, to force the display of text in title case?

Hello

I'm a 'newbie' who's DIY'ing the construction of a dynamic form using Adobe Livecycle Designer 7 (I know it's a VERY old version!)

[Thus, any aid that arrives must be "for Idiots"!]

I need to build a code (Java script?) so some of my text fields DISPLAY data in the case of title - no matter how the user types in the data.

Thus, for example, in a text field "address"...

If someone types in...

"sherborne 205 avenue.

-OR-

"205 Sherborne avenue"

-OR-

'205 SHERBORNE AVENUE'...

I need the data to be DISPLAYED ESSENTIALLY as...

"205 Sherborne Avenue".

I found the following online and tried code in the event "output" of the field that I need to change (with 'language' chosen as JavaScript)...

< this.rawValue = this.rawValue.replace (/ \b([a-z])/g, function (_, original) {return initial.toUpperCase () ;});})   >

... Was done to convert all the 'initial' words in uppercase letters - as LONG as they have not ALL typed in capital letters!

Thus, this code has worked for the first two of my samples for Sherborne Avenue above - but it has NOT worked for the last...

"205 AVENUE of SHERBORNE" does NOT get converted to title case - which is what I need help.

Thanks in advance...

I divided it in multimuple lines, but you could do without doubt in one if you wish

var sometext = this.rawValue;

someText = sometext.toLowerCase ();

this.rawValue = sometext.replace (/ \b([a-z])/g, function (_, original) {return initial.toUpperCase () ;});})

Tags: Adobe LiveCycle

Similar Questions

  • I got an iphone 4 to a friend in the Canada. I want to use it here in the Philippines as a regular iPad reserved for wifi, how can I use it without sim card? It does not pass the activation page. Help please?

    I got an iphone 4 to a friend in the Canada. I want to use it here in the Philippines as a regular iPad reserved for wifi, how can I use it without sim card? It does not pass the activation page. Help please?

    You can activate it without a SIM card. If it is locked, it takes a SIM card by the carrier, for it is locked. The SIM card should not be linked to an active line of service, but it must be present to activate it.

  • How can I use a script to set the variables?

    I have a script to set a few variables and I need to run the script multiple times throughout the form, for different users at different times.  How can I configure the script as an object in the Variables and call it when I need to run it?  Appreciate all help.  I use SS3.

    var emailSubject = "";
    var cleanDate = Page1.EventDetails.Block2.SpeakingDate.rawValue.replace(/[\/]/g, "-");
    var eventName = Page1.EventDetails.Block1.EventName.rawValue;
    var eventCity = Page1.EventDetails.USaddress.CityEvent.rawValue;
    var eventState = Page1.EventDetails.USaddress.StateEvent.rawValue;
    emailSubject = cleanDate + " - " + eventName + " - " + eventCity + " - " + eventState;
    

    To create a function to be able to reuse the code easily right click in your hierarchy (for example, on your "form1"), click "insert a Script object.

    A new script object will be created, just rename it to something appropriate and then create a function both inside and

    function myFunction(var1,var2,var3){
    ' just an example '
    page1.textfield1.rawValue = var1 + var2 + var3
    }
    

    (I didn't fully understand the significance of the date and the event and the city, and exactly what your function is supposed to do, but it's how you declare a function).

    To call this function you simply reference as form1.scriptobjectname.myFunction(123,"asdf",variablename)

    (just one example of the possible arguments).

    I hope that's not too hard to follow,

    Best regards, Mattias

  • I used Microsoft for years.  How can I use my files and store and add to them with the I mac

    I used Microsoft for years.  How can I now access my stored info and edit and add to my files with my Apple I Mac. Having problems to work with files in the mac

    I used microsoft years how can I access my stored info and edit and add to them on the Mac.

    This can help you get started > https://www.apple.com/support/macbasics/

    Additional help here > https://support.apple.com/en-us/HT201732

    A good resource for help on your Mac is easy to access. Click on an empty area anywhere on your screen. You should see Finder > file > edit > view > go > window > help at the top of your screen.

    Click on help > Mac Help then type in a keyword for what you need to help in the search field top right of the Help window.

  • How can you unit test documents created with LiveCycle Designer?

    Hello

    The preparation of the documents that contain forms dynamic (programmed in Javascript), which is a good way to test?

    Do you perform manual or automatic testing? If the latter, what technique do you use?

    Thank you!

    Hello

    I wrote a script Jasmine to run unit tests, there is an example of it here XDP form, Adobe LiveCycle Designer by BR001 Cookbooks: using the test framework Jasmine in a form in LiveCycle Designer Adobe

    Adobe labs has the Adobe PDF Test Toolkit but I have no experience with it, memory, software depended on it was quite expensive, Adobe PDF Test Toolkit - Adobe Labs

    Concerning

    Bruce

  • How can I use applescript to move objects to a specific position on the page?

    I have a PDF file with a bunch of items of text on each page, but the margins are irregular.  I want to automate the following process:

    1. Select all the objects on the page

    2. move objects (such as a group, i.e. preserving their arrangement relative to each other) until the upper left corner of the object of most of the top-left {. 67 ", 1"} from the upper left corner of the page.

    3. go to the next page.

    4. Repeat steps.

    I work on a mac, and I see that Acrobat is scriptable using Applescript.  Is it possible to do it with this?  If there is another way to describe this process without Applescript, I'd be open to that as well.

    Thank you very much.

    Acrobat has no interface for scripts change the position of an ordinary object.

  • How can I use a check box to insert another form acrobat on itself?

    I created a form in acrobat for our domain service department which includes a security inspection form. If a customer will not allow to carry out the inspection a NO check box is enabled and they would like to than the inspection sheet to disappear from the screen. Well they want security report card or introduced in the form of field service when the YES check box is selected. Any thoughts on whether either of these actions are still possible?

    It is possible with the latest versions of Reader on Windows and Mac. What kind of devices people service department use?

  • How can I using an apple extreme get a better signal around the House?

    How can I using an old apple extreme get a better signal around the House?

    I use an old apple express and a new express from apple.

    I need to update my extreme from apple for the last device namely a time capsule.

    Can I use my apple extreme connected to my new camera add more points around the House?

    What is the model number of the old AirPort Extreme?

    What is the model number of the old AirPort Express Terminal?

    We assume that the model number of the new AirPort Express Terminal is A1392, correct?

    What connects to what now on your network?  It looks like this?

    Internet connection > Modem > new AirPort Express?   How the old Express connects to the new Express?   Cable?  Wireless?

  • To delete all tables in TT, how can I use cursor this way Timesten 11?

    Hello
    I want to delete all tables in Timesten, so I create a procedure like this, but it seems does not work correctly.

    It seems cursor in not accurate Timesten with which in ORACLE. So we are looking for alternatives to do. Could you please provide your expert voice on it.

    Thank you very much.

    Like the following:


    Command > create or replace procedure dropAllTables
    > as
    > CURSOR mycursor IS select table_name from user_tables;
    > table_name user_tables.table_name%type;
    > dropSql varchar2 (200);
    > start
    > Open mycursor;
    > fetch mycursor into table_name;
    > while mycursor found %
    > loop
    > dropSql: = 'drop table ' | table_name;
    > immediately execute dropSql;
    > fetch mycursor into table_name;
    > end of loop;
    > close mycursor;
    > end;
    > /.

    Created procedure.

    Command > exec dropAllTables;


    8507: ORA-01001: Invalid cursor
    8507: ORA-06512: at "TT. DROPALLTABLES', line 13
    8507: ORA-06512: at line 1
    The command failed.



    How can I use cursor this way Timesten 11?

    It is the implementation of cursor close commit on in Timesten is the cause.

    As the drop statements are internally auto-valider the transaction so it closes the cursor itself. So when the next time that you attempt to extract it is your "error cursor not valid."

    Can you try this instead

    create or replace procedure dropAllTables
    as
    CURSOR mycursor IS select table_name from user_tables;
    table-name user_tables.table_name%type;
    type t_row_collection is table of the directory index user_tables.table_name%type;
    t_rows t_row_collection;
    dropSql varchar2 (200);
    Start
    Open mycursor;
    Mycursor fetch bulk collect into t_rows;
    Close mycursor;
    j in t_rows.first... loop t_rows. Last
    dropSql: = 'drop table ' | t_rows (j);
    immediately run dropSql;
    end loop;
    end;

  • How can I use a headset with Bravia BX300?

    Hello

    How can I use a headset with BRAVIA BX300?

    I inserted the headphones in white audio port on the left side of the TV. I also selected 'audio system' settings.

    But still its not working do not. How to make it work?

    Thank you.

    You can get headphones that connect wireless to the audio output of the TV, a buddy of mine has a game like this, the red/white taken in the transmitter.

  • How can I use Nepali fonts in Illustrator CS6?

    I try to use Nepali fonts in Illustrator CS6 but he does ' t support.

    How can I write Nepali fonts in Illustrator?

    I can also use Nepalese (script) Unicode fonts in Illustrator as well?

    My OS is Windows 10 English version.

    Hi sibaananda,

    I think that you would use police Devanagari to write Nepali people. If you do so, please see the following links:

    DEVANAGARI (Hindi) in Illustrator CS5?

    Hindi in Illustrator?

    Sanskrit fonts will not display correctly in Illustrator CS5 for Mac.

    Problem with fonts/script/language Hindi displays correctly.

    In case you don't have police, you can also get it here: Adobe Devanagari | Typekit

    Kind regards

    OM

  • How can I use an external HTML form with a file upload in my page of MUSE?

    How can I use an external HTML form with a file upload in my page of MUSE? I know I can insert an external form, but how do I create a link to my email

    Yes, in most cases. If it is not in your actual embed code, you will need to be added to the script that uses the code. There are literally hundreds of form manages the codes out there on the web, it would be impossible to tell you exactly where it needs to be added. Your best option is to use a third party such as JotForms or WooForms shape provider and use the third Muse Widgets for these services.

  • How can I use VB Encoding.UTF8.GetBytes () and System.Text.Encoding.Default.GetBytes () in actionscript can someone help me?

    How can I use it in the action script. My VB code is more

    Encoding.UTF8.GetBytes ("String") and System.Text.Encoding.Default.GetBytes ("char table")

    Thank you. !

    Udit Bhardwaj

    I love the way to convert as a result

    Encoding.UTF8.GetBytes ("String") is in ActionScript:

    YourByteArray.writeMultiByte ("String", "iso-8859-1");

    And

    System.Text.Encoding.Default.GetBytes ("char table")

    YourByteArray.writeMultiByte ("String", "String");

    Thank you for your suggestions to moccamaximum

    Thank you!

    Udit Bhardwaj

  • How can I resize window "script event handler?

    How can I resize window "script event handler? (I entered in a script long as event handler script. After adding the script, I can't view or scroll key buttons on the right) .attached is a screenshot of the problem I am facing.a.jpg

    Quit photoshop and go to

    For Photoshop CS6

    Photoshop CS6 Photoshop C:\Users\Your Name\AppData\Roaming\Adobe\Adobe CS6\Adobe settings

    For Photoshop CC

    C:\Users\Your Name\AppData\Roaming\Adobe\Adobe Photoshop CS6\Adobe Photoshop CC settings

    remove the

    Script Manager.xml events

    then restart photoshop


    I think that the events are for something like select menu or tool (filter), and then this, for example.

    For your script, probably add using skip under Script would be preferable.



  • How can I use SQL to check if the receipt is taken into account?

    Hi all:
    How can I use SQL to check if the reception of the AR is taken into account? Because there are so many recipes to check, I can not open to see the details one by one.

    My environment is: 11.5.9
    database: Oracle 9.2.0.8

    Terry,

    Run the script (11i: Oracle receivables data reception Data Collection Test [215969.1 ID]) and see if it helps.

    Thank you
    Hussein

Maybe you are looking for

  • IRQL_Not_less_or_equal blue screen

    Hi, recently I was make a little blue and black screens.  I use Dell XPS 1645 Vista 64-bit Home Premium and having up-to-date drivers.  Blue screens usually produce when I watch videos or even just do something else.  I get error IRQL_Not_less_or equ

  • Read Chinese Tranditional in WMP

    Is there anyway you can read traditional Chinese Windows Media Player when I add the Chinese song in WMP?

  • The departure of a vector key definition

    Hi all. I'm sure this is something that is extremely simple, but for the life of me I don't find the answer to my question. In a Word, just have to make the starting key is 1 instead of 0. Here is the code private String getString(String original, in

  • Cisco support for third party on SRE applications?

    Hi - I think about some applications of unified communications to third parties under VMWare ESXi5 running on a Cisco SRE 900 module.   According to the docs Cisco, 3rd party apps are supported on these modules (see table below), but the app in quest

  • Impossible to select and move the letters while playing 'Word with friends' through facebook

    Original title: play games During playback "words with friends" through face book... I can't select and move the letters on the touch screen without the screen, scrolling up and down.I need the touch screen to allow the movement of the letters c A C