Hello,
I am a 'novice' who is DIY'ing the construction of a dynamic pdf form, using Adobe Livecycle Designer 7 (I know, it's a VERY old version!)
[So, any help that comes along must be 'for Idiots'!]
I need to construct a code (Java script?) so that a few of my text-fields DISPLAY data in Title Case - IRRESPECTIVE of how the user types in the data.
So, for example, in a "Address" text-field...
If someone types in ..
"205 sherborne 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 code online, and tried it in the 'exit' event of the field I need to modify (with 'language' selected as JavaScript)...
< this.rawValue = this.rawValue.replace(/\b([a-z])/g, function (_, initial) {return initial.toUpperCase();}); >
... This did convert all the 'initial' letters of the words to Upper Case - AS LONG AS they were not ALL typed in Upper Case!
So, that code worked for the first two of my samples for Sherborne Avenue above - but it did NOT work for the last one...
That is, "205 SHERBORNE AVENUE" did NOT get converted to Title Case - which is what I need help with.
Thanks in advance...